/* SupportSquire — Look A "Command Center": dark navy rail, light workspace.
   One responsive web app: desktop / tablet / phone breakpoints below. */
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; background: #F4F6FA; color: #1E293B; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Display preferences: themes + text size (per device) ----
   Console-only: the variables are (re)set on body.console, so the
   customer intake pages (body.cust) always keep their brand designs.
   Light values below are the app's original palette, unchanged. */
:root {
  --bg: #F4F6FA; --surface: #FFFFFF; --surface2: #F8FAFC; --hover: #F8FAFC;
  --line: #E3E9F2; --line2: #EEF2F7; --inline: #CBD5E1;
  --ink: #1E293B; --ink2: #334155; --soft: #475569; --muted: #64748B; --faint: #8494AB;
  --link: #0E7C86; --input: #FFFFFF;
}
body.console { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] body.console {
  color-scheme: dark;
  --bg: #0A141F; --surface: #12222F; --surface2: #0D1B28; --hover: #1A3247;
  --line: #27455C; --line2: #1D3448; --inline: #33506F;
  --ink: #E6EDF7; --ink2: #C7D3E4; --soft: #A9BCD2; --muted: #9DB2C6; --faint: #7E93B0;
  --link: #4CC3CE; --input: #0D1B28;
}
html[data-theme="contrast"] body.console {
  color-scheme: dark;
  --bg: #000000; --surface: #0A0A0A; --surface2: #141414; --hover: #1F2937;
  --line: #8D99AE; --line2: #3A4356; --inline: #8D99AE;
  --ink: #FFFFFF; --ink2: #E8EDF5; --soft: #E8EDF5; --muted: #D7DEE8; --faint: #B9C4D4;
  --link: #FFD23F; --input: #000000;
}
@media screen {
  html[data-ts="115"] body.console { zoom: 1.15; }
  html[data-ts="130"] body.console { zoom: 1.30; }
  html[data-ts="145"] body.console { zoom: 1.45; }
}

.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

/* ---- Rail ---- */
.rail { background: #0C1D33; color: #C7D3E4; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brandmark { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; }
.brandmark img { border-radius: 10px; }
.wm { font-size: 19px; font-weight: 800; color: #fff; letter-spacing: .2px; }
.wm .sq { color: #4CC3CE; }
.tag { font-size: 9.5px; letter-spacing: 2.5px; color: #E9C46A; font-weight: 700; }
.rnav { display: block; padding: 8px 11px; border-radius: 9px; color: #C7D3E4; font-weight: 600; font-size: 14px; }
.rnav:hover { background: #14304F; text-decoration: none; }
.rnav.on { background: #1E4B75; color: #fff; }
.brands-dd { margin: 2px 0 4px; }
.brands-dd summary { list-style: none; cursor: pointer; background: #14304F; color: #fff; font-weight: 800; padding: 9px 12px; border-radius: 10px; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; }
.brands-dd summary::-webkit-details-marker { display: none; }
.brow { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 9px; color: #E6EDF7; font-weight: 600; font-size: 14px; margin-top: 3px; background: rgba(255,255,255,.05); }
.brow:hover { background: #14304F; text-decoration: none; }
.brow.on { outline: 2px solid #4CC3CE; }
.brow.add { color: #9FD8DE; background: none; font-size: 13px; }
.bdot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.logoplate { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.logoplate img { display: block; }
.fbadge { background: #F2B138; color: #3A2A05; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; margin-left: auto; }
.sec { font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: #7E93B0; font-weight: 800; padding: 13px 11px 4px; }
.railfoot { margin-top: auto; padding: 12px 8px 2px; border-top: 1px solid #1E3A56; font-size: 12.5px; }
.railfoot .who { color: #E6EDF7; font-weight: 600; margin-bottom: 6px; }
.logout { background: none; border: 1px solid #33506F; color: #C7D3E4; border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; }
.logout:hover { background: #14304F; }
.acctlink { display: inline-block; border: 1px solid #33506F; color: #C7D3E4; border-radius: 8px; padding: 5px 12px; font-size: 12.5px; text-decoration: none; margin: 0 6px 6px 0; }
.acctlink:hover { background: #14304F; }
.acctlink.on { background: #14304F; color: #fff; border-color: #4CC3CE; }
.unread { color: #F2B138; margin-top: 8px; font-weight: 700; }

/* ---- Main / topbar ---- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 20px; position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 520px; }
.search input { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface2); color: var(--ink); padding: 8px 13px; font-size: 13.5px; }
.clock { font-size: 12.5px; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.topbtn { background: #0E7C86; color: #fff !important; font-weight: 700; padding: 8px 14px; border-radius: 9px; font-size: 13.5px; white-space: nowrap; }
.topbtn:hover { text-decoration: none; background: #0B6A73; }

/* ---- Team notifications strip (directly under the search bar) ---- */
.tnotif { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #FFF8E1; border-bottom: 1.5px solid #F2B138; padding: 7px 20px; font-size: 12.5px; color: #5B4A12; }
.tn-h { font-weight: 800; color: #7A5410; white-space: nowrap; }
.tn-i { color: #5B4A12; white-space: nowrap; }
.tn-i.urg { color: #B91C1C; font-weight: 700; }
.tn-form { margin-left: auto; }
.tn-all { background: none; border: none; color: var(--link); font-weight: 700; cursor: pointer; font-size: 12.5px; padding: 0; }

.content { padding: 20px 22px 34px; }
h1.page { font-size: 21px; margin: 0 0 4px; }
.page-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }

/* ---- Stats / panels / queue ---- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 12px 15px; }
.stat .n { font-size: 24px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat.warn .n { color: #B45309; } .stat.teal .n { color: var(--link); } .stat.red .n { color: #B91C1C; }
.stat.hero { border-width: 2px; border-color: var(--line); background: var(--surface2); }
.stat.hero .n { font-size: 36px; line-height: 1.05; }
.stat.hero .l { font-size: 12.5px; color: var(--ink2); }

/* Ticket count badge — org rows (entire organization) and site rows */
.tbadge { display: inline-flex; align-items: center; gap: 4px; background: #EAF1F8; color: #1D4E89;
  border: 1px solid #C9D9EE; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700;
  white-space: nowrap; flex: none; }
.tbadge.sm { font-size: 11.5px; padding: 1px 8px; }
.cols { display: grid; grid-template-columns: 1fr 330px; gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.panel > h4 { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: var(--ink2); }
.panel .body { padding: 12px 16px; line-height: 1.55; font-size: 14px; }
.trow { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line2); font-size: 13.5px; }
.trow:last-child { border-bottom: none; }
.trow:hover { background: var(--hover); }
.bchip { color: #fff; font-weight: 800; font-size: 11px; padding: 3px 8px; border-radius: 7px; flex: none; }
.tid { font-weight: 800; color: var(--link); white-space: nowrap; }
.subj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.age { color: var(--faint); font-size: 12px; white-space: nowrap; }
.pill { font-size: 10.5px; font-weight: 800; padding: 2.5px 9px; border-radius: 99px; white-space: nowrap; }
.p-new { background: #DBEAFE; color: #1D4ED8; } .p-open { background: #E0F2F1; color: #0B5560; }
.p-wait { background: #FEF3C7; color: #92400E; } .p-urg { background: #FEE2E2; color: #B91C1C; }
.p-done { background: #DCFCE7; color: #15803D; } .p-norm { background: #EEF2F7; color: #475569; }
.act { display: inline-block; background: #E4F3F4; color: #0B5560; font-weight: 700; font-size: 12.5px; padding: 5px 11px; border-radius: 8px; margin: 4px 4px 0 0; border: none; cursor: pointer; }
.deny { display: inline-block; background: #FEE2E2; color: #B91C1C; font-weight: 700; font-size: 12.5px; padding: 5px 11px; border-radius: 8px; border: none; cursor: pointer; }
.kv { display: flex; justify-content: space-between; padding: 3px 0; }
.flash { background: #F0FDF4; border: 1.5px solid #3D8A7A; color: #14532D; border-radius: 11px; padding: 11px 15px; font-size: 14px; margin-bottom: 16px; }
.flash.err { background: #FEF2F2; border-color: #DC2626; color: #7F1D1D; }

/* ---- CRM (Waves 1 + 2) ---- */
.health-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; vertical-align: -1px; }
.tagchip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); color: var(--ink2); font-size: 12px; font-weight: 700; padding: 3px 6px 3px 10px; border-radius: 99px; margin: 2px 4px 2px 0; }
.tagchip form { display: inline; }
.tagchip button { background: none; border: none; color: var(--muted); font-weight: 800; cursor: pointer; padding: 0 3px; font-size: 12px; }
.tagchip.static { padding-right: 10px; }
.pinned-note { background: #FFFBEB; border: 1.5px dashed #F2B138; border-radius: 13px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.55; }
.pinned-note .who { font-size: 12px; font-weight: 800; color: #92400E; margin-bottom: 3px; }
.org-note { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 11px; padding: 10px 13px; margin-bottom: 9px; font-size: 13.5px; line-height: 1.55; }
.org-note .who { font-size: 11.5px; font-weight: 800; color: #92400E; margin-bottom: 2px; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line2); font-size: 13.5px; align-items: baseline; }
.tl-item:last-child { border-bottom: none; }
.tl-item .ic { flex: none; width: 20px; text-align: center; }
.tl-item .tx { flex: 1; min-width: 0; line-height: 1.5; }
.tl-item .when { color: var(--faint); font-size: 12px; white-space: nowrap; }
.task-overdue { color: #B91C1C; font-weight: 800; }
.task-due { color: #B45309; font-weight: 800; }
.custrow { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line2); font-size: 13.5px; flex-wrap: wrap; }
.custrow:last-child { border-bottom: none; }
.custrow:hover { background: var(--hover); }

/* ---- Licenses & Seats (2026-11-04) ---- */
.p-off { background: #F3E8E8; color: #991B1B; }
.lic-summary { display: flex; gap: 22px; flex-wrap: wrap; align-items: baseline; font-size: 14.5px; }
.lic-sub { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.lic-over { color: #B91C1C; font-weight: 800; }
.lic-scroll { overflow-x: auto; margin: 8px 0 4px; }
.lic-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lic-table th { text-align: left; font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--ink2); padding: 6px 8px; border-bottom: 1.5px solid var(--line); }
.lic-table td { padding: 8px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.lic-table tr:last-child td { border-bottom: none; }
.lic-actions { min-width: 230px; }
.lic-inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lic-inline .lic-reason { width: 150px; padding: 5px 8px; }
.lic-inline .lic-note { width: 130px; padding: 5px 8px; }
.lic-more { margin-top: 8px; }
.lic-more > summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 700; color: #0B5560; display: flex; gap: 7px; align-items: center; }
.lic-more > summary::-webkit-details-marker { display: none; }
.lic-more .chev { color: var(--faint); font-size: 11px; transition: transform .15s ease; }
.lic-more[open] > summary .chev { transform: rotate(90deg); }
.lic-forms { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 6px; }
.lic-subform h5 { margin: 8px 0 8px; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; color: var(--ink2); }
details.lic-subform > form { margin-top: 8px; }

/* ---- Org → Site hierarchy (trickles the rail's Brands dropdown pattern
   down: Brand → Organization → Site; native <details>, same chevron) ---- */
.org-dd { border-bottom: 1px solid var(--line2); }
.org-dd:last-child { border-bottom: none; }
.org-dd > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 13.5px; flex-wrap: wrap; }
.org-dd > summary::-webkit-details-marker { display: none; }
.org-dd > summary:hover { background: var(--hover); }
.org-dd .chev, .site-dd .chev { color: var(--faint); font-size: 11px; flex: none; transition: transform .15s ease; }
.org-dd[open] > summary .chev, .site-dd[open] > summary .chev { transform: rotate(90deg); }
.org-dd .sitecount { color: var(--faint); font-size: 12px; white-space: nowrap; }
.org-kids { border-top: 1px dashed var(--line); border-left: 2px solid var(--line); margin: 0 0 6px 27px; padding: 4px 0 2px; }
.org-kid { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 16px; font-size: 13px; color: var(--ink2); }
a.org-kid:hover { background: var(--hover); text-decoration: none; }
.org-kid .sname { font-weight: 700; }
.org-kid .scontact { color: var(--muted); margin-left: auto; white-space: nowrap; }
.org-kid.rec { font-weight: 700; color: #0B5560; }
.org-kid.nosites { color: var(--faint); }
/* Customer record: each site is its own collapsible child row. */
.site-dd { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; overflow: hidden; }
.site-dd > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 9px 12px; font-size: 13.5px; background: var(--surface2); }
.site-dd > summary::-webkit-details-marker { display: none; }
.site-dd > summary:hover { background: var(--hover); }
.site-dd .sname { font-weight: 800; }
.site-dd .scontact { color: var(--soft); margin-left: auto; font-size: 12.5px; white-space: nowrap; }
.site-dd .site-detail { padding: 9px 12px 11px; border-top: 1px solid var(--line2); font-size: 13px; }
.site-dd .site-people { margin-top: 7px; color: var(--ink2); line-height: 1.6; }
.site-dd .site-people .who-line { color: var(--muted); font-size: 12.5px; }

/* ---- Ticket detail ---- */
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { border-radius: 13px; padding: 11px 14px; font-size: 14px; line-height: 1.55; max-width: 92%; }
.msg .who { font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.msg .when { font-weight: 400; color: var(--faint); }
.msg.cust { background: var(--surface2); align-self: flex-start; }
.msg.cust .who { color: var(--ink2); }
.msg.team { background: #DFF3F4; align-self: flex-end; }
.msg.team .who { color: #0B5560; }
.msg.note { background: #FFFBEB; border: 1.5px dashed #F2B138; align-self: stretch; max-width: 100%; }
.msg.note .who { color: #92400E; }
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 14px; }
.composer.notebox { background: #FFFBEB; border: 1.5px dashed #F2B138; }
textarea.ta, input.in, select.in { width: 100%; border: 1.5px solid var(--inline); border-radius: 9px; padding: 9px 11px; font-size: 14px; font-family: inherit; background: var(--input); color: var(--ink); }
textarea.ta { min-height: 84px; resize: vertical; }
.btn { background: #0E7C86; color: #fff; font-weight: 700; border: none; border-radius: 9px; padding: 9px 16px; cursor: pointer; font-size: 14px; }
.btn:hover { background: #0B6A73; }
.btn.amber { background: #B45309; } .btn.amber:hover { background: #92400E; }
.btn.ghost { background: var(--surface2); color: var(--ink2); }
.fld label { display: block; font-size: 12px; font-weight: 800; color: var(--soft); margin-bottom: 4px; }
.fld .req { color: #DC2626; }
.frm { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ctrls { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; }

/* ---- Chat ---- */
.intbar { background: #FEF3C7; border: 1.5px solid #F2B138; color: #7A5410; font-weight: 700; font-size: 13px; padding: 9px 15px; border-radius: 11px; margin-bottom: 14px; }
.chatwrap { display: grid; grid-template-columns: 240px 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.chanside { border-right: 1px solid var(--line); padding: 13px 10px; background: var(--surface2); }
.chan { display: block; padding: 7px 10px; border-radius: 8px; color: var(--soft); font-weight: 600; margin-bottom: 2px; font-size: 14px; }
.chan:hover { text-decoration: none; background: var(--hover); }
.chan.on { background: #E4F3F4; color: #0B5560; }
.chatmain { display: flex; flex-direction: column; min-height: 420px; }
.chatmsgs { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 55vh; }
.cmsg { background: var(--surface2); border-radius: 12px; padding: 8px 12px; font-size: 14px; line-height: 1.5; max-width: 85%; }
.cmsg.me { background: #DFF3F4; align-self: flex-end; }
.cmsg .who { font-size: 11.5px; font-weight: 800; color: #0E7C86; }
.cmsg .when { color: var(--faint); font-weight: 400; }
.chatinput { display: flex; gap: 9px; padding: 12px; border-top: 1px solid var(--line); }
.chatinput input { flex: 1; }

/* ---- Library ---- */
.qrg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.qcard { background: #FFF7E0; border: 1.5px solid #F2B138; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.qcard b { display: block; margin-bottom: 3px; }
.vis { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.vis-pub { background: #DCFCE7; color: #15803D; } .vis-int { background: #FEE2E2; color: #B91C1C; }

/* ---- Wizard / readiness ---- */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.steps span { background: var(--surface); border: 1px solid var(--line); padding: 7px 13px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--soft); }
.steps span.on { background: #0C1D33; color: #fff; border-color: #0C1D33; }
.bar { height: 9px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; background: #0E7C86; }
.chk { line-height: 2; font-size: 14px; }
.gate { color: #B91C1C; font-weight: 800; font-size: 11px; }
.wstep { display: none; } .wstep.on { display: block; }

/* ---- Login ---- */
.loginwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #0C1D33; padding: 20px; }
.logincard { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 380px; text-align: center; }
.logincard .wm { color: #0C1D33; font-size: 24px; } .logincard .wm .sq { color: #0E7C86; }
.logincard form { text-align: left; margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }

/* ---- Customer pages (per-brand themes override via inline CSS) ---- */
body.cust { background: var(--cust-bg, #F4F6FA); }
.cust-wrap { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; }
.cust-card { background: var(--cust-card, #fff); border: 1px solid var(--cust-line, #E3E9F2); border-radius: 15px; overflow: hidden; width: 100%; max-width: 640px; box-shadow: 0 10px 34px rgba(12,29,51,.13); }
.cust-head { background: var(--cust-head, #0C1D33); padding: 22px 26px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.cust-head-text { text-align: center; }
.cust-mark { height: 56px; width: auto; display: block; flex: none; }
.cust-wm { font-size: 24px; font-weight: 800; color: var(--cust-wm, #fff); letter-spacing: .4px; }
.cust-tag { color: var(--cust-tag, #9FD8DE); font-size: 11px; letter-spacing: 2.6px; margin-top: 4px; text-transform: uppercase; }
.cust-body { padding: 24px 28px; }
.cust-h { font-size: 23px; margin: 0 0 6px; color: var(--cust-ink, #1E293B); }
.cust-sub { color: var(--cust-muted, #64748B); font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.cust-foot { border-top: 1px solid var(--cust-line, #E3E9F2); margin-top: 18px; padding-top: 11px; font-size: 11.5px; color: var(--cust-muted, #94A3B8); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cust .fld { margin-bottom: 12px; }
.cust .btn { background: var(--cust-btn, #0E7C86); color: var(--cust-btn-ink, #fff); width: 100%; padding: 12px; font-size: 15px; }
.cust-err { background: #FEF2F2; border: 1.5px solid #DC2626; color: #7F1D1D; border-radius: 11px; padding: 11px 15px; font-size: 14px; margin-bottom: 15px; }
.cust-ok { text-align: center; padding: 12px 0 4px; }
.cust-ok .big { font-size: 21px; font-weight: 800; margin-bottom: 8px; }
.helpdocs { margin-top: 20px; border-top: 1px solid var(--cust-line, #E3E9F2); padding-top: 14px; }
.helpdocs h3 { font-size: 14px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .6px; color: var(--cust-muted, #64748B); }
.helpdocs details { border: 1px solid var(--cust-line, #E3E9F2); border-radius: 10px; padding: 9px 13px; margin-bottom: 8px; background: #fff; }
.helpdocs summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.helpdocs p { font-size: 13.5px; line-height: 1.6; color: #334155; white-space: pre-line; }

/* ---- Tablet (≤1100px): narrow rail, panels stack ---- */
@media (max-width: 1100px) {
  .app { grid-template-columns: 200px 1fr; }
  .cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .qrg { grid-template-columns: repeat(2, 1fr); }
  .ctrls { grid-template-columns: 1fr 1fr; }
}
/* ---- Phone (≤720px): rail becomes a top strip, one-thumb triage ---- */
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; }
  .brandmark { padding: 0 6px 0 0; }
  .brandmark img { width: 34px; height: 34px; }
  .wm { font-size: 16px; } .tag { display: none; }
  .brands-dd { order: 3; width: 100%; }
  .sec { display: none; }
  .rnav { padding: 7px 9px; font-size: 13px; }
  .railfoot { margin: 0 0 0 auto; border: none; padding: 0; display: flex; gap: 10px; align-items: center; }
  .railfoot .who { margin: 0; }
  .topbar { flex-wrap: wrap; padding: 9px 12px; }
  .clock { order: 3; width: 100%; }
  .content { padding: 14px 12px 26px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .frm { grid-template-columns: 1fr; }
  .qrg { grid-template-columns: 1fr; }
  .chatwrap { grid-template-columns: 1fr; }
  .chanside { border-right: none; border-bottom: 1px solid #E3E9F2; }
  .subj { white-space: normal; }
  .msg { max-width: 100%; }
  .ctrls { grid-template-columns: 1fr; }
}

/* ---- Theme treatments for the tinted, meaningful colors ----
   The rail is dark navy in every theme by design and never changes.
   What changes is the workspace: status pills, internal-note ambers,
   and action chips get deep-tint versions so their meaning survives. */
.dispctl { display: block; font-size: 12.5px; color: #C7D3E4; margin-top: 10px; }
.dispctl select { display: block; width: 100%; margin-top: 4px; background: #14304F; color: #fff;
  border: 1px solid #33506F; border-radius: 8px; padding: 6px 8px; font-size: 13px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }

html[data-theme="dark"] body.console .p-new,
html[data-theme="contrast"] body.console .p-new { background: #12325E; color: #7FB3FF; }
html[data-theme="dark"] body.console .p-open,
html[data-theme="contrast"] body.console .p-open { background: #0B3238; color: #5FD4DE; }
html[data-theme="dark"] body.console .p-wait,
html[data-theme="contrast"] body.console .p-wait { background: #33270A; color: #FFD23F; }
html[data-theme="dark"] body.console .p-urg,
html[data-theme="contrast"] body.console .p-urg { background: #3D0F16; color: #FF8296; }
html[data-theme="dark"] body.console .p-done,
html[data-theme="contrast"] body.console .p-done { background: #0C2E1A; color: #4ADE80; }
html[data-theme="dark"] body.console .p-norm { background: #1D3448; color: #C7D3E4; }
html[data-theme="contrast"] body.console .p-norm { background: #1A1A1A; color: #FFFFFF; }
html[data-theme="dark"] body.console .vis-pub,
html[data-theme="contrast"] body.console .vis-pub { background: #0C2E1A; color: #4ADE80; }
html[data-theme="dark"] body.console .vis-int,
html[data-theme="contrast"] body.console .vis-int { background: #3D0F16; color: #FF8296; }

html[data-theme="dark"] body.console .tnotif { background: #2A2008; border-bottom-color: #8A6A1F; color: #F5D98B; }
html[data-theme="dark"] body.console .tn-h { color: #F2B138; }
html[data-theme="dark"] body.console .tn-i { color: #F5D98B; }
html[data-theme="dark"] body.console .tn-i.urg { color: #FF8296; }
html[data-theme="contrast"] body.console .tnotif { background: #171100; border-bottom-color: #FFD23F; color: #FFE98A; }
html[data-theme="contrast"] body.console .tn-h { color: #FFD23F; }
html[data-theme="contrast"] body.console .tn-i { color: #FFE98A; }
html[data-theme="contrast"] body.console .tn-i.urg { color: #FF8296; }

html[data-theme="dark"] body.console .pinned-note, html[data-theme="dark"] body.console .org-note,
html[data-theme="dark"] body.console .msg.note, html[data-theme="dark"] body.console .composer.notebox,
html[data-theme="dark"] body.console .qcard, html[data-theme="dark"] body.console .intbar {
  background: #241A05; color: var(--ink); }
html[data-theme="contrast"] body.console .pinned-note, html[data-theme="contrast"] body.console .org-note,
html[data-theme="contrast"] body.console .msg.note, html[data-theme="contrast"] body.console .composer.notebox,
html[data-theme="contrast"] body.console .qcard, html[data-theme="contrast"] body.console .intbar {
  background: #171100; color: var(--ink); }
html[data-theme="dark"] body.console .pinned-note .who, html[data-theme="dark"] body.console .org-note .who,
html[data-theme="dark"] body.console .msg.note .who { color: #F2B138; }
html[data-theme="contrast"] body.console .pinned-note .who, html[data-theme="contrast"] body.console .org-note .who,
html[data-theme="contrast"] body.console .msg.note .who { color: #FFD23F; }

html[data-theme="dark"] body.console .msg.team, html[data-theme="contrast"] body.console .msg.team { background: #0C2E33; }
html[data-theme="dark"] body.console .msg.team .who, html[data-theme="contrast"] body.console .msg.team .who { color: #5FD4DE; }
html[data-theme="dark"] body.console .cmsg.me, html[data-theme="contrast"] body.console .cmsg.me { background: #0C2E33; }
html[data-theme="dark"] body.console .cmsg .who, html[data-theme="contrast"] body.console .cmsg .who { color: #4CC3CE; }
html[data-theme="dark"] body.console .chan.on, html[data-theme="contrast"] body.console .chan.on { background: #0C2E33; color: #5FD4DE; }
html[data-theme="dark"] body.console .act, html[data-theme="contrast"] body.console .act { background: #0B3238; color: #5FD4DE; }
html[data-theme="dark"] body.console .deny, html[data-theme="contrast"] body.console .deny { background: #3D0F16; color: #FF8296; }
html[data-theme="dark"] body.console .org-kid.rec, html[data-theme="contrast"] body.console .org-kid.rec { color: #5FD4DE; }

html[data-theme="dark"] body.console .tbadge { background: #0E2A47; color: #8FC3FF; border-color: #274B75; }
html[data-theme="contrast"] body.console .tbadge { background: #0A2447; color: #99CCFF; border-color: #4A6FA5; }
html[data-theme="dark"] body.console .flash { background: #0C2E1A; border-color: #2F7A4D; color: #B9F5CD; }
html[data-theme="dark"] body.console .flash.err { background: #3D0F16; border-color: #B33647; color: #FFC4CC; }
html[data-theme="contrast"] body.console .flash { background: #052E16; border-color: #00E676; color: #C8FFDF; }
html[data-theme="contrast"] body.console .flash.err { background: #3D0A14; border-color: #FF4D6D; color: #FFD9DE; }
html[data-theme="dark"] body.console .steps span.on,
html[data-theme="contrast"] body.console .steps span.on { background: #1E4B75; border-color: #1E4B75; color: #fff; }
html[data-theme="dark"] body.console .gate, html[data-theme="dark"] body.console .task-overdue,
html[data-theme="contrast"] body.console .gate, html[data-theme="contrast"] body.console .task-overdue { color: #FF8296; }
html[data-theme="dark"] body.console .task-due, html[data-theme="contrast"] body.console .task-due { color: #FBBF24; }
html[data-theme="dark"] body.console .stat.warn .n, html[data-theme="contrast"] body.console .stat.warn .n { color: #FBBF24; }
html[data-theme="dark"] body.console .stat.red .n, html[data-theme="contrast"] body.console .stat.red .n { color: #FF8296; }
/* The sign-in card stays white in every theme (its crest lockup was
   drawn for it); in High contrast the navy backdrop goes pure black. */
html[data-theme="contrast"] .loginwrap { background: #000000; }
