/* Operator: LinkPanda brand (navy #041B2B, orange #ff9900, Inter, pill buttons), matching Insights by LinkPanda. */
:root {
  --lpn: #041B2B; --lpo: #ff9900; --lpo2: #f08f00;
  --bg: #F6F7F9; --card: #FFFFFF; --soft: #F2F4F7; --soft2: #E9EDF1; --line: #E3E7EC;
  --ink: #041B2B; --tx: #3D5163; --mut: #7A8B99; --sel: #FFF6E5; --selb: #ff9900;
  --rail: #F2F4F7; --railtx: #3D5163; --railhov: #E6EAEE;
  --pos: #079455; --warn: #B54708; --tip: #041B2B; --tipt: #fff;
}
html.dark {
  --bg: #03141F; --card: #071E2E; --soft: #0B2638; --soft2: #102E44; --line: #16354B;
  --ink: #F2F5F8; --tx: #C4D0DA; --mut: #8EA3B4; --sel: #0F3047; --selb: #ff9900;
  --rail: #071E2E; --railhov: #102E44; --railtx: #C4D0DA; --pos: #47CD89; --warn: #FDB022; --tip: #F2F5F8; --tipt: #041B2B;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 Roboto, Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "cv11" 1; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
svg { display: block; }
.mut { color: var(--mut); }
.err { color: #B42318; background: #FEF3F2; border: 1px solid #FECDCA; padding: 8px 12px; border-radius: 10px; font-size: 13px; }
html.dark .err { background: #3A1512; border-color: #6B221C; color: #FDA29B; }

/* Brand */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 22px; width: auto; }
.brand .lpdark { display: none; }
html.dark .brand .lplight { display: none; }
html.dark .brand .lpdark { display: block; }
.brand i { width: 1px; height: 20px; background: var(--line); }
.brand b { font: italic 700 20px Inter, sans-serif; color: var(--lpo); letter-spacing: -.01em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--lpo); background: var(--lpo); color: var(--lpn); font-weight: 600; font-size: 13.5px; padding: 8px 16px; border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--lpo2); border-color: var(--lpo2); }
.btn.gh { background: var(--card); border-color: var(--line); color: var(--ink); font-weight: 500; }
.btn.gh:hover { border-color: var(--ink); }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
.btn.wide { width: 100%; margin-top: 10px; justify-content: space-between; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.ib { width: 34px; height: 34px; border-radius: 999px; border: 1px solid transparent; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--tx); position: relative; }
.ib:hover { background: var(--soft); color: var(--ink); }
.ib svg { width: 18px; height: 18px; }
.ib[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: 38px; left: 50%; transform: translateX(-50%); background: var(--tip); color: var(--tipt); font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 50; pointer-events: none; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=date], input:not([type]), select, textarea { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--lpo); }
textarea { resize: vertical; line-height: 1.5; }

/* Login */
.lpage { display: grid; place-items: center; background: var(--lpn); }
.login .lbox { background: var(--card); width: 360px; max-width: calc(100vw - 32px); padding: 32px; border-radius: 18px; }
.login h1 { font-size: 22px; margin: 26px 0 6px; letter-spacing: -.02em; }
.login p { margin: 0 0 8px; font-size: 13px; }
.login .btn small { color: inherit; opacity: .55; font-weight: 500; }
.login form { margin: 0; }

/* Shell */
.top { height: 56px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 16px 0 20px; position: relative; z-index: 20; }
.top .search { flex: 1; max-width: 520px; margin-left: 28px; position: relative; }
.top .search input { padding-left: 36px; border-radius: 999px; background: var(--soft); border-color: transparent; }
.top .search input:focus { background: var(--card); border-color: var(--lpo); }
.top .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--mut); }
.top .sp { flex: 1; }
.top .who { width: 32px; height: 32px; border-radius: 999px; background: var(--lpn); color: var(--lpo); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; cursor: pointer; border: 0; }
html.dark .top .who { background: var(--lpo); color: var(--lpn); }
.menu { position: absolute; right: 12px; top: 50px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 220px; box-shadow: 0 10px 30px rgba(4,27,43,.14); z-index: 60; }
.menu .mh { padding: 8px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .mh b { display: block; font-size: 13.5px; }
.menu a, .menu button { display: flex; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; text-decoration: none; font-size: 13.5px; }
.menu a:hover, .menu button:hover { background: var(--soft); }
.shell { display: grid; grid-template-columns: 220px var(--lw, 400px) 1fr; height: calc(100vh - 56px); position: relative; }
.shell.full { grid-template-columns: 220px 1fr; }

/* Rail */
.rail { gap: 0 !important; background: var(--rail); color: var(--railtx); border-right: 1px solid var(--line); padding: 14px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.rail .compose { margin: 0 4px 10px; justify-content: center; padding: 7px 14px; }
.rail .h { font-size: 12px; font-weight: 600; color: var(--mut); padding: 10px 10px 2px; }
.rail a { display: flex; align-items: center; gap: 10px; padding: 3px 10px; line-height: 1.35; border-radius: 10px; text-decoration: none; font-size: 13.5px; cursor: pointer; }
.rail a:hover { background: var(--railhov); color: var(--ink); }
.rail a.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.rail a.on svg { color: var(--lpo); }
.rail a svg { width: 17px; height: 17px; flex: none; }
.rail a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail a em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink); min-width: 30px; display: inline-block; text-align: right; font-variant-numeric: tabular-nums; }
.rail a.on em { color: var(--ink); }
.rail a.needs em { color: var(--ink); }
.rail .dot { width: 8px; height: 8px; border-radius: 999px; flex: none; margin: 0 4px; }
.rail .sub a { padding-left: 34px; font-size: 13px; }
.rail .bot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.rail .tag { font-size: 10.5px; color: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.18); padding: 0 6px; border-radius: 999px; }

/* List */
.list { background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.lh { padding: 7px 28px 6px; background: var(--card); display: flex; align-items: center; gap: 8px; border-bottom: 2px solid #D3D9E0; }
html.dark .lh { border-bottom-color: #22465F; }
.lh h2 { font-size: 14px; margin: 0; flex: 1; letter-spacing: -.01em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh .n { color: var(--mut); font-size: 12.5px; font-weight: 500; }
.rows { overflow-y: auto; flex: 1; }
.row { display: block; padding: 8px 28px 8px 26px; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; cursor: pointer; text-decoration: none; }
.row:hover { background: var(--soft); }
.row.on { background: var(--sel); border-left-color: var(--selb); }
.row .l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.row .idot { width: 6px; height: 6px; border-radius: 999px; flex: none; }
.row .fr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx); font-size: 13.5px; }
.row .fr small { color: var(--mut); font-size: 11.5px; }
.row.un .fr { color: var(--ink); font-weight: 600; }
.row .tm { font-size: 11.5px; color: var(--mut); white-space: nowrap; margin-left: 2px; }
.row.un .tm { color: var(--ink); font-weight: 600; }
.row .l2 { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.row .sj { color: var(--tx); }
.row.un .sj { color: var(--ink); font-weight: 600; }
.row .sn { color: var(--mut); }
.pill { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--tx); white-space: nowrap; line-height: 16px; flex: none; }
.pill svg { width: 11px; height: 11px; }
.pill.hot { background: var(--lpo); border-color: var(--lpo); color: var(--lpn); }
.pill.warm { border-color: var(--lpn); color: var(--lpn); }
html.dark .pill.warm { border-color: var(--lpo); color: var(--lpo); }
.pill.client { background: var(--lpn); border-color: var(--lpn); color: #fff; }
html.dark .pill.client { background: #F2F5F8; color: var(--lpn); border-color: #F2F5F8; }
.pill.lock, .pill.age { color: var(--warn); border-color: currentColor; }
.pill.ibx { font-weight: 500; }
.pill.ibx i { width: 6px; height: 6px; border-radius: 999px; }
.empty { padding: 48px 24px; text-align: center; color: var(--mut); }
.more { padding: 12px; text-align: center; }

/* Reader */
.reader { overflow-y: auto; min-width: 0; background: var(--bg); }
.rbar { position: sticky; top: 0; background: var(--bg); padding: 10px 24px; display: flex; align-items: center; gap: 2px; z-index: 5; border-bottom: 1px solid var(--line); }
.rbar .sp { flex: 1; }
.rbar select { width: auto; border-radius: 999px; padding: 5px 30px 5px 12px; font-size: 13px; }
.rin { max-width: 860px; padding: 20px 24px 60px; }
.rin h1 { font-size: 20px; margin: 4px 0 6px; letter-spacing: -.02em; line-height: 1.3; }
.rin .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.why { font-size: 12px; color: var(--mut); }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.msg .mh { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; }
.av { width: 32px; height: 32px; border-radius: 999px; background: var(--soft2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; flex: none; }
.msg.out .av { background: var(--lpn); color: var(--lpo); }
.msg .mh .w { flex: 1; min-width: 0; }
.msg .mh b { font-size: 13.5px; }
.msg .mh small { display: block; color: var(--mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .mh .tm { font-size: 12px; color: var(--mut); white-space: nowrap; }
.msg .mb { padding: 0 16px 16px 60px; }
.msg.shut .mb { display: none; }
.msg.shut .mh small.to { display: none; }
.msg .pre { font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap; word-wrap: break-word; color: var(--tx); }
.msg iframe { width: 100%; border: 0; display: block; background: #fff; border-radius: 4px; }
.msg iframe.inv { filter: invert(1) hue-rotate(180deg); background: #D3E6F9; border-radius: 0; }
.atts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.atts a { font-size: 12.5px; text-decoration: none; }

/* Composer */
.comp { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 14px; }
.comp.focus { border-color: var(--lpo); }
.comp .to { display: grid; grid-template-columns: 34px 1fr; gap: 6px 8px; align-items: center; font-size: 13px; margin-bottom: 10px; }
.comp .to label { color: var(--mut); }
.comp .to input { padding: 6px 10px; }
.comp textarea { min-height: 180px; border: 0; padding: 4px 0; border-radius: 0; }
.comp textarea:focus { border: 0; }
.comp .cb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.comp .cb .sp { flex: 1; }
.comp .aiask { flex: 1; min-width: 180px; max-width: 340px; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.comp .note { font-size: 12px; color: var(--mut); }
.btn.ai { background: var(--lpn); border-color: var(--lpn); color: #fff; }
.btn.ai:hover { background: #0B2E47; }
html.dark .btn.ai { background: #12395A; border-color: #2B5A80; color: #fff; }
.locked { border: 1px solid var(--warn); color: var(--warn); border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-top: 14px; background: var(--card); }
.modal { position: fixed; inset: 0; background: rgba(4,27,43,.45); display: grid; place-items: center; z-index: 100; }
.modal .box { background: var(--bg); width: 760px; max-width: calc(100vw - 32px); max-height: calc(100vh - 64px); overflow-y: auto; border-radius: 16px; padding: 18px 20px; }
.modal .box h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; }
.modal .box h3 span { flex: 1; }
.modal .comp { margin-top: 0; }
.moveto { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 200px; box-shadow: 0 10px 30px rgba(4,27,43,.14); z-index: 40; max-height: 320px; overflow-y: auto; }
.moveto button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.moveto button:hover { background: var(--soft); }
.moveto input { margin: 4px 0; font-size: 13px; padding: 6px 10px; }

/* Pages: stats and settings */
.pg { overflow-y: auto; padding: 24px 32px 60px; }
.pg h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.ph { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.ph .sp { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card); }
.seg button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--tx); }
.seg button.on { background: var(--lpn); color: #fff; }
html.dark .seg button.on { background: var(--lpo); color: var(--lpn); }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.tile small { color: var(--mut); font-size: 12.5px; }
.tile b { display: block; font-size: 24px; letter-spacing: -.02em; margin-top: 2px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin: 0 0 12px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card h2 span { flex: 1; }
.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--mut); padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--soft); }
.t th:first-child { border-radius: 8px 0 0 8px; } .t th:last-child { border-radius: 0 8px 8px 0; }
.t td { padding: 10px; border-bottom: 1px solid var(--line); }
.t tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; }
.t .warn { color: var(--warn); font-weight: 600; }
.chart { width: 100%; height: 150px; }
.chart .bar { fill: var(--lpn); }
html.dark .chart .bar { fill: #DCE4EB; }
.chart .ln { stroke: var(--lpo); fill: none; stroke-width: 2; }
.chart text { fill: var(--mut); font-size: 11px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--mut); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: 0; background: none; padding: 10px 0; cursor: pointer; color: var(--mut); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--lpo); }
.fl { display: grid; gap: 10px; max-width: 640px; }
.fl label { font-size: 12.5px; color: var(--mut); display: grid; gap: 4px; }
.fl .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.chk input { accent-color: var(--lpo); width: 16px; height: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips .chk { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 8px; font-size: 13px; }
.sigprev { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; background: var(--card); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--lpn); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13.5px; z-index: 200; box-shadow: 0 8px 24px rgba(4,27,43,.25); }
html.dark .toast { background: #F2F5F8; color: var(--lpn); }
.toast.bad { background: #B42318; color: #fff; }
.kbd { font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; color: var(--mut); }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 999px; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { padding: 40px; display: grid; place-items: center; color: var(--mut); }

/* Smaller screens: list and reader take turns. */
@media (max-width: 1100px) { .shell { grid-template-columns: 200px var(--lw, 320px) 1fr; } .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .shell, .shell.full { grid-template-columns: 1fr; }
  .rail { display: none; } .rail.open { display: flex; position: fixed; inset: 56px 0 0 0; z-index: 30; width: 260px; }
  .shell.reading .list { display: none; } .shell:not(.reading) .reader { display: none; }
  .top .search { margin-left: 0; } .brand i, .brand img { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pg { padding: 16px; } .rin, .rbar { padding-left: 16px; padding-right: 16px; } .msg .mb { padding-left: 16px; }
}
@media (min-width: 801px) { .mnav, .back { display: none !important; } }

/* Inbox domain favicons */
.fav { width: 14px; height: 14px; border-radius: 3px; flex: none; display: inline-block; vertical-align: -2px; }
.rail .h { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 12px; }
.rail .h .fav { width: 14px; height: 14px; }
.rail a span { padding-left: 0; }
.rail a.ibx { padding-left: 32px; }
.rail .sub a { padding-left: 46px; }
.row .fav { width: 13px; height: 13px; }
.pill.ibx .fav { width: 11px; height: 11px; }
.rtag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--mut); white-space: nowrap; flex: none; }
.rtag svg { width: 11px; height: 11px; }
/* Clear separation between brands in the sidebar */
.rail .h { margin-top: 8px; padding: 10px 10px 4px; border-top: 1px solid var(--line); color: var(--ink); font-size: 12.5px; font-weight: 600; }
/* Main views and bottom links: a little more room than the inbox lists */
.rail > a:not(.ibx), .rail .bot a { padding-top: 6px; padding-bottom: 6px; }

/* Rota */
.lh h2 .duty { display: inline; margin-left: 8px; font-size: 11.5px; font-weight: 500; color: var(--mut); letter-spacing: 0; }
.now { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 20px; }
.now > div { display: flex; align-items: center; gap: 6px; font-size: 13.5px; padding: 4px 0; }
.now b { margin-left: auto; font-weight: 600; }
.now b.none { color: var(--warn); }
.tw { overflow-x: auto; }
.t.rota { table-layout: fixed; min-width: 900px; }
.t.rota th:first-child, .t.rota td.in { width: 120px; }
.t.rota td { vertical-align: top; padding: 6px 8px; border-left: 1px solid var(--line); }
.t.rota td.in { border-left: 0; padding-left: 22px; }
.t.rota tr.dg td { border-left: 0; background: var(--soft); font-weight: 600; font-size: 12.5px; padding: 6px 10px; }
.t.rota th.today { color: var(--ink); }
.t.rota td.today { background: var(--sel); }
.sh { font-size: 12px; display: flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--tx); line-height: 1.6; }
.sh .x { border: 0; background: none; padding: 0; cursor: pointer; color: var(--mut); opacity: 0; }
.sh:hover .x { opacity: 1; }
.sh .x svg { width: 11px; height: 11px; }
.rota .add { border: 0; background: none; color: var(--mut); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; border-radius: 6px; opacity: 0; }
.rota td:hover .add { opacity: 1; }
.rota .add:hover { background: var(--soft2); color: var(--ink); }
.rform { padding: 10px; display: grid; gap: 8px; width: 230px; }
.rform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rform input, .rform select, .chg input, .chg select { padding: 6px 8px; font-size: 13px; }
.chg { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chg > * { width: auto !important; }
.top .btn.sm svg { width: 14px; height: 14px; }

/* Operator logo: panda icon and bold navy wordmark */
.brand.op { gap: 9px; }
.brand.op img { height: 26px; width: 26px; display: block !important; }
.brand.op b { font: 800 19px Inter, sans-serif; font-style: normal; color: var(--lpn); letter-spacing: -.03em; }
html.dark .brand.op b { color: #fff; }
html.dark .brand.op img { filter: invert(1); }
@media (max-width: 800px) { .brand.op img { display: block !important; } }
.sh { overflow: hidden; } .sh { text-overflow: ellipsis; }
.t.rota td { overflow: hidden; }
.brand.op .mark { width: 30px; height: 30px; background: var(--lpn); -webkit-mask: url(/static/op-mark.svg) center/contain no-repeat; mask: url(/static/op-mark.svg) center/contain no-repeat; display: block; }
html.dark .brand.op .mark { background: #fff; }
.brand.op i.mark { flex: none; }
.lh h2 .duty .fav { width: 12px; height: 12px; vertical-align: -2px; margin-right: 2px; }

/* Team Operators */
.t.team td { vertical-align: middle; }
.t.team td.st { width: 28px; padding-right: 0; }
.t.team .st i { display: block; width: 10px; height: 10px; border-radius: 999px; }
.t.team .st i.on { background: #12B76A; box-shadow: 0 0 0 3px rgba(18,183,106,.15); }
.t.team .st i.off { background: #F04438; box-shadow: 0 0 0 3px rgba(240,68,56,.12); }
.dty { display: flex; align-items: center; gap: 5px; font-size: 13px; line-height: 1.7; }
.rail a em.zero { color: var(--lpn); display: inline-flex; justify-content: flex-end; }
.rail a em.zero svg { width: 15px; height: 15px; stroke-width: 2; }
html.dark .rail a em.zero { color: #fff; }

/* Outlook-style composer */
.ol { background: var(--card); border: 1px solid var(--line); border-radius: 4px; margin-top: 14px; display: flex; flex-direction: column; }
.ol.page { margin: 16px; min-height: calc(100vh - 56px - 32px); }
.olbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.olbar .sp { flex: 1; }
.btn.sq { border-radius: 4px; padding: 6px 14px; }
.olbar .from { font-size: 13.5px; color: var(--tx); display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; }
.olbar .from b { font-weight: 500; color: var(--ink); }
.olbar .from select { width: auto; border: 0; padding: 4px 24px 4px 4px; font-weight: 500; color: var(--ink); background-color: transparent; border-radius: 4px; }
.olbar .from select:focus { border: 0; outline: 1px solid var(--line); }
.olf { display: flex; align-items: center; gap: 12px; padding: 8px 14px 0; }
.olf .lab { min-width: 46px; text-align: center; border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; font-size: 13px; color: var(--ink); }
.ol input.olsub, .olf input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 2px; background: transparent; }
.ol input.olsub { margin: 8px 14px 0; width: calc(100% - 28px); padding: 10px 2px; font-size: 14.5px; }
.olf input:focus, .ol input.olsub:focus { border-bottom: 1px solid var(--lpn); }
html.dark .olf input:focus, html.dark .ol input.olsub:focus { border-bottom-color: #8EA3B4; }
.olai { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; color: var(--mut); }
.olai svg { width: 16px; height: 16px; flex: none; }
.olai input { border: 0; padding: 4px 0; background: transparent; font-size: 13.5px; }
.olai input:focus { border: 0; }
.lnk { border: 0; background: none; color: var(--lpn); font-weight: 600; cursor: pointer; white-space: nowrap; padding: 4px 0; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
html.dark .lnk { color: #fff; }
.ol textarea { border: 0; border-radius: 0; padding: 14px; min-height: 260px; flex: none; background: transparent; resize: none; overflow: hidden; }
.ol textarea:focus { border: 0; }
.olnote { font-size: 12px; color: var(--mut); padding: 8px 14px 12px; }
.olnote:empty { display: none; }
.row .wt { font-size: 11.5px; color: var(--mut); white-space: nowrap; min-width: 38px; text-align: right; }
/* Wait time colours (business days): dark green under 1 hour, green to 1 day, yellow-green to 2, yellow to 3, orange to 4, red from 4, dark red from 7 */
.row .wt { font-weight: 600; }
.row .wt.w0 { color: #2E5E1E; } .row .wt.w1 { color: #4A7C2A; } .row .wt.w2 { color: #7D9A24; } .row .wt.w3 { color: #CA8A04; }
.row .wt.w4 { color: #E8590C; } .row .wt.w5 { color: #D92D20; } .row .wt.w6 { color: #912018; }
html.dark .row .wt.w0 { color: #8DBB6A; } html.dark .row .wt.w1 { color: #A9CC7E; } html.dark .row .wt.w2 { color: #C6D46A; } html.dark .row .wt.w3 { color: #FACC15; }
html.dark .row .wt.w4 { color: #FB923C; } html.dark .row .wt.w5 { color: #F97066; } html.dark .row .wt.w6 { color: #E5484D; }

/* Templates */
.tplpick { width: 380px; max-height: 420px; padding: 8px; }
.tplpick input { margin: 0 0 6px; }
.tgh { font-size: 11.5px; font-weight: 600; color: var(--mut); padding: 8px 10px 2px; }
.tgh small { font-weight: 500; }
.tplw { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.tpll { padding: 10px; max-height: calc(100vh - 170px); overflow-y: auto; position: sticky; top: 0; }
.tpll input { margin-bottom: 6px; }
.tpll button, .tplpick button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: none; border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 1.35; color: var(--ink); }
.tpll button:hover, .tplpick button:hover { background: var(--soft); }
.tpll button.on { background: var(--sel); box-shadow: inset 2px 0 0 var(--lpo); }
.tvh { display: flex; align-items: flex-start; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tvh h2 { margin: 2px 0 6px; font-size: 17px; }
.tvh .sp { flex: 1; }
.tvs { font-size: 13.5px; }
.tvb { white-space: pre-wrap; font-size: 14px; line-height: 1.6; color: var(--tx); }
@media (max-width: 1000px) { .tplw { grid-template-columns: 1fr; } .tpll { position: static; max-height: 300px; } }

/* Template order and stars */
.trow { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 1.35; }
.trow:hover { background: var(--soft); }
.trow.on { background: var(--sel); box-shadow: inset 2px 0 0 var(--lpo); }
.trow.drag { opacity: .45; }
.trow .tt { flex: 1; min-width: 0; }
.grip { color: var(--mut); cursor: grab; display: inline-flex; opacity: .5; }
.trow:hover .grip { opacity: 1; }
.grip svg { width: 14px; height: 14px; }
.tstar { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--mut); opacity: .35; display: inline-flex; }
.trow:hover .tstar { opacity: .8; }
.tstar.on, .trow .tstar.on { color: var(--lpo); opacity: 1; }
.tstar.on svg { fill: currentColor; }
.tstar svg { width: 15px; height: 15px; }
.tplpick .tstar { padding: 0; margin-right: 6px; vertical-align: -2px; }
.tplpick .tstar svg { width: 13px; height: 13px; }
.tpll button.tstar, .tplpick .tstar { width: auto; display: inline-flex; flex: none; padding: 2px; }
.tstar:focus { outline: none; } .tstar:focus-visible { outline: 1px solid var(--line); }
.tpll button.tstar.on { background: none; box-shadow: none; }
.thint { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--mut); margin: 0 4px 6px; }
.thint svg { width: 13px; height: 13px; }
.thint { display: grid; gap: 2px; margin: 2px 4px 8px; } .thint span { display: flex; align-items: center; gap: 5px; }

/* Drag and drop onto sidebar folders */
.row[draggable] { -webkit-user-drag: element; }
body.dragging .rail a.dropok { box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }
body.dragging .rail a.over { box-shadow: inset 0 0 0 2px var(--lpn); background: var(--card); color: var(--ink); }
html.dark body.dragging .rail a.over { box-shadow: inset 0 0 0 2px #fff; }

/* Attachments */
.olfiles { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.olfiles:empty { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px 4px 8px; font-size: 12.5px; background: var(--soft); max-width: 320px; }
.fchip svg { width: 13px; height: 13px; flex: none; color: var(--mut); }
.fchip b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip small { color: var(--mut); white-space: nowrap; }
.fchip button { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--mut); display: inline-flex; }
.fchip button:hover { color: var(--ink); }
.ol.fdrop { outline: 2px dashed var(--lpn); outline-offset: -6px; }
#czTop .ol { margin: 0 0 14px; }

/* One continuous conversation panel */
.conv { background: var(--card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.conv .msg { border: 0; border-radius: 0; margin: 0; background: transparent; }
.conv .msg + .msg { border-top: 1px solid var(--line); }

/* Gmail signature preview under the message */
.olsig { padding: 4px 14px 0; }
.olsigl { font-size: 11px; color: var(--mut); margin-bottom: 4px; }
.sigf { width: 100%; border: 0; display: block; background: transparent; }
html.dark .sigf { background: #fff; border-radius: 4px; padding: 6px; }
.ol textarea { min-height: 260px; }

/* Log */
.ldot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; flex: none; }
.ldot.good { background: #12B76A; } .ldot.bad { background: #F04438; } .ldot.none { background: var(--line); }
.lgh { font-size: 12px; font-weight: 600; color: var(--mut); padding: 10px 0 4px; }
.lgh:first-child { padding-top: 0; }
.lrow { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.lrow .ln { min-width: 260px; }
.lrow .lw { color: var(--mut); font-size: 13px; }
.lrow .lw b { color: #D92D20; font-weight: 600; }
.card h2 .seg { margin-left: auto; }

/* Search with inbox choice */
.top .search { display: flex; align-items: center; background: var(--soft); border-radius: 999px; border: 1px solid transparent; }
.top .search:focus-within { background: var(--card); border-color: var(--lpo); }
.top .search input { background: transparent !important; border: 0 !important; flex: 1; min-width: 0; }
.top .search select { width: auto; max-width: 200px; border: 0; border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; background-color: transparent; font-size: 12.5px; color: var(--tx); padding: 6px 28px 6px 10px; }
.top .search select:focus { border-color: var(--line); outline: none; }
.top .search { flex: 1 1 560px; min-width: 380px; max-width: 620px; } .top .search input { min-width: 180px; } .top .search select { max-width: 190px; flex: none; }
.rava { width: 20px; height: 20px; border-radius: 999px; background: var(--lpn); color: #fff; font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; letter-spacing: .02em; }
html.dark .rava { background: #F2F5F8; color: var(--lpn); }
.rail .rduty { flex: none; font-size: 10px; font-weight: 500; color: var(--mut); letter-spacing: .04em; opacity: .8; margin-right: 2px; }

.lform { display: grid; gap: 8px; margin-top: 8px; } .lform .btn { justify-content: center; }
.addib { display: flex; gap: 8px; margin-bottom: 8px; } .addib input { max-width: 380px; }

.lor { display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 12px; margin: 14px 0 6px; } .lor::before, .lor::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.addp { display: flex; gap: 8px; flex-wrap: wrap; } .addp input, .addp select { width: auto; flex: 1 1 160px; }
.pwset { display: inline-flex; gap: 6px; } .pwset input { width: 220px; padding: 5px 10px; font-size: 13px; }
.rail .rduty { display: inline-flex; align-items: center; gap: 4px; } .rail .unatt { width: 6px; height: 6px; border-radius: 999px; background: #F04438; display: inline-block; }
/* Dropdowns: own arrow with room from the edge */
select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A8B99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 14px !important; padding-right: 34px !important; }
.top .search select { background-position: right 16px center !important; padding-right: 40px !important; }

/* Duty filter */
.rail .dutyf { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--tx); padding: 0 10px 8px; cursor: pointer; user-select: none; }
.rail .dutyf input { position: absolute; opacity: 0; width: 0; height: 0; }
.rail .dutyf .sw { position: relative; width: 26px; height: 14px; border-radius: 7px; background: #c9ced4; transition: background .15s; flex: none; }
.rail .dutyf .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; transition: transform .15s; }
.rail .dutyf input:checked + .sw { background: var(--lpn); }
.rail .dutyf input:checked + .sw::after { transform: translateX(12px); }
.rail .dutyf input:focus-visible + .sw { outline: 2px solid var(--lpn); outline-offset: 2px; }
.rail a.ibx.off { opacity: .35; pointer-events: none; }

.rota .gap { font-size: 11.5px; color: #D92D20; line-height: 1.6; }
.conv .msg.hid { display: none; }
.conv .more { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--soft); color: var(--mut); font: inherit; font-size: 12.5px; padding: 8px 20px; text-align: left; cursor: pointer; }
.conv .more:hover { color: var(--ink); }
.split { position: absolute; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 5; }
.split::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: transparent; transition: background .15s; }
.split:hover::after, .shell.resizing .split::after { background: var(--lpn); width: 2px; left: 2px; }
.shell.resizing { cursor: col-resize; user-select: none; }
.shell.resizing iframe { pointer-events: none; }
.shell.full .split { display: none; }
@media (max-width: 760px) { .split { display: none; } }
.row .rstar { color: var(--lpo); display: inline-flex; flex: none; }
.row .rstar svg { width: 13px; height: 13px; fill: currentColor; }
/* Slim scrollbars, like Outlook */
* { scrollbar-width: thin; scrollbar-color: #c4c9cf transparent; }
html.dark * { scrollbar-color: #4a5560 transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4c9cf; border-radius: 3px; }
html.dark ::-webkit-scrollbar-thumb { background: #4a5560; }
.chips .sqb { padding-left: 0; padding-right: 0; width: 38px; justify-content: center; }
.chips.acts { display: flex; flex-wrap: wrap; align-items: center; }
.chips.acts .sp { flex: 1; }
.chips .rpm { border-color: var(--lpn); color: var(--ink); font-weight: 600; }
html.dark .chips .rpm { border-color: #fff; }
.rail a.crit { align-items: center; }
.rail a.crit svg { color: #D92D20; }
.rail a.crit span { color: #B42318; font-size: 12.5px; white-space: normal; overflow: visible; line-height: 1.3; }
.rail a.crit em { background: #D92D20; color: #fff; border-radius: 999px; padding: 0 7px; min-width: 0; line-height: 18px; font-size: 11.5px; }
html.dark .rail a.crit span { color: #F97066; }
.chips .rpm .aidot { display: inline-flex; color: var(--lpo); margin-left: 2px; }
.chips .rpm .aidot svg { width: 14px; height: 14px; }

/* Gmail-style layout (option 1): Roboto, pale blue-grey background, one line per email when the list is wide enough. */
input, select, textarea, button { font-family: inherit; }
html:not(.dark) { --bg: #F6F8FC; --rail: #F6F8FC; }
html:not(.dark) .lh, html:not(.dark) .list { background: #F6F8FC; }
html:not(.dark) .rows { background: #fff; }
.shell { grid-template-columns: 240px var(--lw, 640px) 1fr; }
@media (max-width: 1100px) { .shell { grid-template-columns: 200px var(--lw, 420px) 1fr; } }
.rail a { font-size: 14px; }
html:not(.dark) .rail a.on { background: #DCE6F0; font-weight: 700; }
.rin h1 { font-size: 22px; font-weight: 400; }
.list { container-type: inline-size; }
@container (min-width: 560px) {
  .row { display: flex; align-items: center; gap: 10px; padding-top: 9px; padding-bottom: 9px; }
  .row .l1, .row .l2 { display: contents; }
  .row .fr { order: 1; flex: 0 0 170px; font-size: 14px; }
  .row .sj { order: 2; white-space: nowrap; font-size: 14px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
  .row .sn { order: 3; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  .row .rtag, .row .rava, .row .rstar { order: 8; }
  .row .tm { order: 9; font-size: 12.5px; }
  .row .wt { order: 10; }
}
html:not(.dark) .row.on { background: #E8EEF5; }
/* Lighter list: medium weight for unread, slightly smaller text, more air. */
.row.un .fr, .row.un .sj, .row.un .tm { font-weight: 500 !important; color: var(--ink); }
.row .fr, .row .sj, .row .sn { font-size: 13.5px !important; }
.row .sn { color: #7A8590; }
@container (min-width: 560px) { .row { padding-top: 11px; padding-bottom: 11px; gap: 12px; } .row .fr { flex-basis: 180px; } }
/* Ask AI chat */
.chat { position: fixed; right: 20px; bottom: 20px; width: 380px; max-width: calc(100vw - 32px); height: min(560px, calc(100vh - 100px)); background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(4,27,43,.18); display: flex; flex-direction: column; z-index: 60; }
.chat .chd { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.chat .chd b { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.chat .chd b svg { width: 18px; height: 18px; color: var(--lpo); }
.chat .chref { display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; padding: 7px 10px; background: var(--soft); border-radius: 4px; font-size: 12.5px; color: var(--tx); }
.chat .chref span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat .chb { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat .chhint { font-size: 13px; margin: 4px 2px; }
.chat .cm { max-width: 88%; padding: 8px 11px; border-radius: 8px; font-size: 13.5px; line-height: 1.45; word-wrap: break-word; }
.chat .cm.me { align-self: flex-end; background: var(--lpn); color: #fff; }
.chat .cm.ai { align-self: flex-start; background: var(--soft); color: var(--ink); }
.chat .cm.err { color: #B42318; }
.chat .chf { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.chat .chf textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; font-size: 13.5px; }
.chat .chf .btn { height: 40px; width: 40px; padding: 0; justify-content: center; }
.chips #askai svg { color: var(--lpo); }
html.dark .chat .cm.me { background: #12395A; }
.rail a em.over { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; color: #fff; background: #D92D20; border-radius: 4px; padding: 1px 6px; font-weight: 700; }
.rail a em.over svg { width: 14px; height: 14px; stroke-width: 2.4; }
/* AI instruction bar: a light blue band so it is clearly not part of the email text */
.olai { margin: 12px 14px 0; padding: 6px 12px; background: #E8F1FB; border: 1px solid #C9DDF3; border-radius: 6px; color: #1F5FAD; }
.olai svg { color: #1F5FAD; }
.olai input { color: var(--ink); }
.olai input::placeholder { color: #5B83B5; }
.olai .lnk { color: #1F5FAD; }
html.dark .olai { background: #0E2E4A; border-color: #1E4A70; color: #9CC8F5; }
html.dark .olai svg, html.dark .olai .lnk { color: #9CC8F5; }
html.dark .olai input::placeholder { color: #7FA6CC; }
.olbar { flex-wrap: wrap; row-gap: 8px; } .ol.page { max-width: 100%; box-sizing: border-box; }
.ainote { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 8px 12px; background: #E8F1FB; border: 1px solid #C9DDF3; border-radius: 6px; color: #1F5FAD; font-size: 13px; }
.ainote svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
html.dark .ainote { background: #0E2E4A; border-color: #1E4A70; color: #9CC8F5; }
.lt { color: var(--mut); font-size: .92em; font-weight: 400; }
.lt sup { font-size: .7em; }
.lt.bl { display: block; font-size: 11px; line-height: 1.3; margin-bottom: 3px; }
.rota .sh { flex-wrap: wrap; } .rota .sh .lt.bl { flex-basis: 100%; order: 5; }
.t tr.acc td { padding-top: 0; padding-bottom: 12px; border-top: 0; }
.t tr.acc + tr td, .t tr.acc { }
.accg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 2px 18px 2px 0; }
.accd { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12.5px; margin-right: 4px; cursor: pointer; }
.accg .chk { font-size: 12.5px; padding: 3px 9px; }
.t tr:has(+ tr.acc) td { border-bottom: 0; } .t tr.acc td { border-top: 0 !important; }
.rail .unatt.off { background: #B8C0C8; }
html.dark .rail .unatt.off { background: #4A5A68; }
