/* ==========================================================================
 * SWD client portal (1.6.0): dark app shell, top bar + side navigation,
 * zinc greys, one sky-blue accent, Onest.
 * ======================================================================== */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/onest-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/onest-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

:root {
	--p-bg: #0A0A0B;
	--p-top: #161618;
	--p-card: #18181B;
	--p-card-2: #1F1F23;
	--p-field: #202024;
	--p-line: rgba(255, 255, 255, .08);
	--p-line-2: rgba(255, 255, 255, .14);
	--p-ink: #FAFAFA;
	--p-ink-2: #D4D4D8;
	--p-mut: #A1A1AA;
	--p-mut-2: #71717A;
	--p-acc: #5CC8FF;
	--p-acc-h: #86D7FF;
	--p-on-acc: #0B1220;
	--p-ok: #4ADE80;
	--p-wait: #FBBF24;
	--p-bad: #F87171;
	--p-work: #C4B5FD;
	--p-r: 10px;
	--p-f: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--p-top-h: 64px;
	--p-side-w: 272px;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html.swdp-html { background: var(--p-bg); -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body.swdp { margin: 0; min-height: 100vh; background: var(--p-bg); color: var(--p-ink); font: 400 15px/1.55 var(--p-f); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
:where(.swdp) a { color: inherit; text-decoration: none; }
:where(.swdp) :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: inherit; }
:where(.swdp) button { cursor: pointer; background: none; border: 0; padding: 0; }
:where(.swdp) :where(h1, h2, h3) { margin: 0; font-weight: 700; letter-spacing: -.02em; }
:where(.swdp) p { margin: 0; }
:where(.swdp) :where(ol, ul) { margin: 0; padding: 0; list-style: none; }
.swdp .i { flex: none; display: block; }
.swdp :focus-visible { outline: 2px solid var(--p-acc); outline-offset: 2px; border-radius: 6px; }
.swdp [hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--p-acc); color: var(--p-on-acc); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
.mut { color: var(--p-mut); }
.lnk { color: var(--p-acc); font-weight: 500; }
.lnk:hover { color: var(--p-acc-h); text-decoration: underline; text-underline-offset: 3px; }
.lnk.danger { color: var(--p-bad); }
.swdp button.lnk { display: inline; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; height: var(--p-top-h); display: flex; align-items: center; gap: 12px; padding: 0 24px 0 28px; background: var(--p-top); border-bottom: 1px solid var(--p-line); }
.top .logo { display: block; margin-right: auto; }
.top .logo svg { display: block; height: 34px; width: auto; }
.top .burger { display: none !important; }
.ib { display: inline-flex !important; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; color: var(--p-mut); }
.ib:hover { color: var(--p-ink); background: rgba(255, 255, 255, .06); }
.ib.sm { width: 30px; height: 30px; }
.search { position: relative; width: min(340px, 30vw); }
.search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--p-mut); pointer-events: none; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 44px; background: transparent; border: 1px solid var(--p-line-2); border-radius: 10px; color: var(--p-ink); }
.search input::placeholder { color: var(--p-mut-2); }
.search input:focus { outline: none; border-color: var(--p-acc); box-shadow: 0 0 0 1px var(--p-acc); }
.tb { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px; border: 1px solid var(--p-line-2); border-radius: 10px; font-weight: 500; color: var(--p-ink); white-space: nowrap; }
.tb:hover { background: rgba(255, 255, 255, .05); }
.tb .i { color: var(--p-mut); }
.me { position: relative; }
.av { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #000; color: var(--p-ink); font-weight: 600; border: 1px solid var(--p-line-2); }
.av.sm { width: 34px; height: 34px; font-size: 13px; flex: none; background: var(--p-card-2); }
.swdp button.av:hover { border-color: var(--p-acc); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--p-card); border: 1px solid var(--p-line-2); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.menu-h { padding: 10px 12px 12px; border-bottom: 1px solid var(--p-line); margin-bottom: 6px; display: grid; gap: 2px; }
.menu-h span { color: var(--p-mut); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--p-ink-2); }
.menu a:hover { background: rgba(255, 255, 255, .06); color: var(--p-ink); }
.menu a .i { color: var(--p-mut); }

/* ---------- frame + side ---------- */
.frame { display: grid; grid-template-columns: var(--p-side-w) minmax(0, 1fr); min-height: calc(100vh - var(--p-top-h)); }
.side { position: sticky; top: var(--p-top-h); height: calc(100vh - var(--p-top-h)); overflow-y: auto; padding: 28px 16px 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.side nav { display: grid; gap: 4px; align-content: start; }
.nav { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 14px; border-radius: 10px; font-weight: 500; font-size: 16px; color: var(--p-ink-2); }
.nav .i { color: var(--p-mut); }
.nav:hover { background: rgba(255, 255, 255, .04); color: var(--p-ink); }
.nav.on { background: rgba(255, 255, 255, .06); color: var(--p-acc); }
.nav.on .i { color: var(--p-acc); }
.cnt { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 600; color: var(--p-acc); min-width: 30px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: rgba(92, 200, 255, .1); box-shadow: inset 0 0 0 1px rgba(92, 200, 255, .35); }
.grp { margin-top: 22px; }
.grp-h { width: 100%; display: flex !important; align-items: center; justify-content: space-between; padding: 6px 14px 8px; color: var(--p-mut); font-size: 15px; font-weight: 500; }
.grp-h .i { transition: transform .2s; }
.grp-h[aria-expanded="false"] .i { transform: rotate(180deg); }
.grp-b { display: grid; gap: 4px; }
.grp-h[aria-expanded="false"] + .grp-b { display: none; }
.side-foot { padding: 0 14px; font-size: 13px; color: var(--p-mut-2); }
.side-foot a:hover { color: var(--p-ink); }
.scrim { display: none; }

/* ---------- main ---------- */
.main { padding: 36px 40px 64px; min-width: 0; outline: none; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.ph h1 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; overflow-wrap: anywhere; }
.ph-acts { display: flex; gap: 12px; flex-wrap: wrap; flex: none; }
.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--p-mut); font-size: 15px; font-weight: 500; }
.crumbs a:hover { color: var(--p-ink); }
.crumbs .i { color: var(--p-mut-2); }
.crumbs span:last-child { color: var(--p-ink-2); }
.inline { display: inline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 10px; background: var(--p-acc); color: var(--p-on-acc) !important; font-weight: 600; font-size: 15px; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover { background: var(--p-acc-h); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.btn-2 { background: transparent; color: var(--p-ink) !important; box-shadow: inset 0 0 0 1px var(--p-line-2); }
.btn-2:hover { background: rgba(255, 255, 255, .06); }
.btn-2 .i { color: var(--p-mut); }
.btn-soft { background: rgba(92, 200, 255, .14); color: var(--p-acc) !important; box-shadow: inset 0 0 0 1px rgba(92, 200, 255, .35); }
.btn-soft:hover { background: rgba(92, 200, 255, .22); }
.btn-ok { background: var(--p-acc); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }

/* cards */
.card { background: var(--p-card); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--p-line); }
.pad { padding: 18px 22px; }
.pad-l { padding: 28px 30px; }
.empty { padding: 40px 28px; text-align: center; display: grid; justify-items: center; gap: 18px; color: var(--p-mut); }
.empty p { max-width: 520px; }

/* badges */
.b { display: inline-flex; align-items: center; height: 28px; padding: 0 9px; border-radius: 7px; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.b-new { --c: var(--p-acc); }
.b-work { --c: var(--p-work); }
.b-wait { --c: var(--p-wait); }
.b-ok { --c: var(--p-ok); }
.b-off { --c: var(--p-mut); }
.b-bad { --c: var(--p-bad); }
.pri { display: inline-block; margin-left: 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--p-wait); vertical-align: 1px; }
.pri-urgent { color: var(--p-bad); }
.due { display: inline-flex; align-items: center; gap: 6px; color: var(--p-ink-2); white-space: nowrap; }
.due .i { color: var(--p-mut); }
.due-late, .due-late .i { color: var(--p-bad); }

/* tables */
.tbl-wrap { overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 600; font-size: 15px; color: var(--p-ink); padding: 18px 16px; background: var(--p-card-2); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { padding-left: 32px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 32px; }
.tbl td { padding: 20px 16px; border-top: 1px solid var(--p-line); vertical-align: middle; color: var(--p-ink-2); font-size: 15.5px; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .025); }
.tbl td > time { white-space: nowrap; }
.tbl .ref { white-space: nowrap; color: var(--p-ink-2); font-variant-numeric: tabular-nums; }
.tbl .subj { color: var(--p-ink); width: 46%; }
.tbl .subj a:hover { color: var(--p-acc); }
.tbl .subj b { font-weight: 600; }
.tbl .site, .tbl .sub { display: block; color: var(--p-mut); font-size: 13.5px; margin-top: 2px; }
.tbl .go { text-align: right; white-space: nowrap; }
.tbl .go a { display: inline-flex; align-items: center; gap: 6px; color: var(--p-ink-2); font-weight: 500; }
.tbl .go a .i { color: var(--p-mut); }
.tbl .go a:hover, .tbl .go a:hover .i { color: var(--p-acc); }
.tbl .go a + a { margin-left: 14px; }
.tbl .go .btn { color: var(--p-on-acc); }
.tbl-staff .subj { width: 34%; }
.key { display: inline-flex; align-items: center; gap: 4px; }
.key code { font: 500 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--p-ink-2); background: var(--p-field); padding: 6px 8px; border-radius: 6px; }
.tfoot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 16px 32px; border-top: 1px solid var(--p-line); }
.tfoot > p { color: var(--p-ink-2); }
.per { display: inline-flex; align-items: stretch; height: 46px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--p-line-2); overflow: hidden; }
.per label { display: flex; align-items: center; padding: 0 16px; color: var(--p-mut); border-right: 1px solid var(--p-line-2); }
.swdp .per select { min-height: 0; height: 100%; width: auto; border-radius: 0; box-shadow: none; background-color: transparent; border: 0; padding: 0 38px 0 16px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='1.5'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.pages { display: flex; justify-content: flex-end; gap: 6px; }
.pg { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--p-ink-2); box-shadow: inset 0 0 0 1px var(--p-line); }
.pg:hover { background: rgba(255, 255, 255, .05); }
.pg.on { color: var(--p-acc); box-shadow: inset 0 0 0 1px rgba(92, 200, 255, .5); }
.gap { color: var(--p-mut); align-self: center; }

/* tabs */
.tabs { display: flex; gap: 6px; margin: -8px 0 20px; overflow-x: auto; padding: 2px; scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 9px; color: var(--p-mut); font-weight: 500; white-space: nowrap; }
.tab:hover { color: var(--p-ink); background: rgba(255, 255, 255, .04); }
.tab em { font-style: normal; font-size: 13px; color: var(--p-mut-2); }
.tab.on { color: var(--p-ink); background: var(--p-card); box-shadow: inset 0 0 0 1px var(--p-line-2); }
.tab.on em { color: var(--p-acc); }
.sres { margin: -6px 0 16px; }

/* dashboard */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat { display: grid; gap: 6px; padding: 22px 24px; transition: box-shadow .15s; }
.stat:hover { box-shadow: inset 0 0 0 1px var(--p-line-2); }
.stat span { color: var(--p-mut); font-weight: 500; }
.stat b { font-size: 34px; line-height: 1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.st-wait b { color: var(--p-wait); }
.st-new b { color: var(--p-acc); }
.st-bad b { color: var(--p-bad); }
.kpis { margin: -16px 0 28px; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.grid2.g-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid2 > section { display: grid; gap: 0; min-width: 0; }
.sh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sh h2 { font-size: 19px; }
.list .li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--p-line); }
.list .li:first-child { border-top: 0; }
.list .li b { display: block; font-weight: 600; }
.list .li .mut { font-size: 14px; }
.help-card { margin-top: 16px; padding: 24px; display: grid; gap: 10px; justify-items: start; }
.help-card h3 { font-size: 18px; }
.help-card .btn { margin-top: 6px; }

/* services */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.svc { padding: 24px 26px; display: grid; gap: 14px; align-content: start; }
.svc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.svc h2 { font-size: 19px; line-height: 1.3; }
.kick { display: block; color: var(--p-mut); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.svc-f { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: 14.5px; }
.dl dt { color: var(--p-mut); }
.dl dd { margin: 0; color: var(--p-ink-2); overflow-wrap: anywhere; }
.dl a { color: var(--p-acc); }

/* request view */
.tk { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.tk-staff { grid-template-columns: minmax(0, 1fr) 320px; }
.tk-main { display: grid; gap: 20px; min-width: 0; }
.infobar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 26px 32px; }
.infobar p { color: var(--p-mut); display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.infobar .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--p-mut-2); }
.infobar .due { color: var(--p-ink-2); }
.note-ok { display: flex; align-items: center; gap: 12px; padding: 14px 20px; margin-bottom: 20px; border-radius: 12px; background: rgba(74, 222, 128, .08); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .3); color: var(--p-ink); }
.note-ok .i { color: var(--p-ok); }
.thread { display: grid; gap: 20px; }
.msg { background: var(--p-card); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--p-line); border-left: 4px solid #D4D4D8; overflow: hidden; }
.msg-staff { border-left-color: var(--p-acc); }
.msg-note { border-left-color: var(--p-wait); background: #1C1A14; }
.msg-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 18px 26px; border-bottom: 1px solid var(--p-line); }
.msg-h b { font-size: 17px; font-weight: 600; }
.msg-h time { color: var(--p-mut); font-size: 14px; }
.via { display: inline-flex; align-items: center; gap: 5px; color: var(--p-mut); font-size: 13px; }
.msg-b { padding: 20px 26px; color: var(--p-ink); font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.msg-b p + p { margin-top: 12px; }
.msg-b a { color: var(--p-acc); text-decoration: underline; text-underline-offset: 3px; }
.att { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 26px 22px; }
.att-img a { display: block; width: 160px; height: 110px; border-radius: 8px; overflow: hidden; position: relative; box-shadow: inset 0 0 0 1px var(--p-line-2); background: var(--p-field); }
.att-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.att-img a:hover { box-shadow: 0 0 0 2px var(--p-acc); }
.att-f { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 8px; background: var(--p-field); box-shadow: inset 0 0 0 1px var(--p-line); color: var(--p-ink-2); max-width: 320px; }
.att-f span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-f em { font-style: normal; color: var(--p-mut); font-size: 13px; flex: none; }
.att-f:hover { color: var(--p-acc); }
.ev { text-align: center; color: var(--p-mut-2); font-size: 13.5px; padding: 0 12px; }
.composer { padding: 24px 28px; display: grid; gap: 4px; }
.composer h2 { font-size: 18px; margin-bottom: 10px; }
.ctabs { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.ctab { position: relative; }
.ctab input { position: absolute; opacity: 0; pointer-events: none; }
.ctab span { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 9px; color: var(--p-mut); font-weight: 500; cursor: pointer; }
.ctab input:checked + span { color: var(--p-ink); background: var(--p-card-2); box-shadow: inset 0 0 0 1px var(--p-line-2); }
.ctab input:focus-visible + span { outline: 2px solid var(--p-acc); }
.composer.is-note textarea { background: #1C1A14; border-color: rgba(251, 191, 36, .35); }
.swdp .canned { margin-left: auto; min-height: 38px; height: 38px; padding-top: 0; padding-bottom: 0; width: auto; max-width: 220px; }
.after { display: inline-flex; align-items: center; gap: 10px; color: var(--p-mut); margin-right: auto; }
.swdp .after select { min-height: 46px; height: 46px; padding-top: 0; padding-bottom: 0; width: auto; }
.rate { padding: 26px 28px; display: grid; gap: 14px; }
.rate h2 { font-size: 19px; }
.stars { display: flex; gap: 6px; border: 0; padding: 0; margin: 0; }
.stars label { cursor: pointer; color: var(--p-mut-2); }
.stars input { position: absolute; opacity: 0; }
.stars label:hover, .stars label:hover ~ label { color: var(--p-mut-2); }
.stars.has .on, .stars input:checked + span { color: var(--p-wait); }
.stars .on .i { fill: currentColor; }
.stars input:focus-visible + span { outline: 2px solid var(--p-acc); border-radius: 6px; }
.rated { display: flex; align-items: center; gap: 10px; padding: 18px 24px; color: var(--p-ink-2); }
.rated .i { color: var(--p-wait); fill: currentColor; }

/* staff side */
.tk-side { display: grid; gap: 18px; position: sticky; top: calc(var(--p-top-h) + 24px); }
.side-card { padding: 22px 22px 18px; display: grid; gap: 14px; }
.side-card h2 { font-size: 16px; }
.side-card .fld { margin: 0; }
.swdp .side-card select { min-height: 42px; height: 42px; padding-top: 0; padding-bottom: 0; }
.ppl { display: grid; gap: 14px; }
.ppl li { display: flex; gap: 12px; align-items: flex-start; }
.ppl b { display: block; font-weight: 600; font-size: 14.5px; }
.ppl a { display: block; color: var(--p-mut); font-size: 13.5px; overflow-wrap: anywhere; }
.ppl a:hover { color: var(--p-acc); }
.side-links { display: grid; gap: 6px; font-size: 14px; padding-top: 4px; }
.is-saving { opacity: .7; }

/* forms */
.form { display: grid; gap: 0; }
.fld { display: grid; gap: 8px; margin-bottom: 20px; border: 0; padding: 0; min-width: 0; }
.fld > label, .fld > legend, .lbl, .lbl-row label { font-weight: 500; color: var(--p-ink); font-size: 15px; padding: 0; }
.fld i { color: var(--p-bad); font-style: normal; margin-left: 2px; }
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.swdp input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(.search input), .swdp select, .swdp textarea { width: 100%; min-height: 48px; padding: 11px 16px; background: var(--p-field); border: 1px solid var(--p-line-2); border-radius: 10px; color: var(--p-ink); transition: border-color .15s, box-shadow .15s; }
.swdp .search input { background: transparent; min-height: 0; height: 44px; padding: 0 14px 0 44px; }
.swdp textarea { resize: vertical; line-height: 1.55; min-height: 120px; }
.swdp select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='1.5'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.swdp input:focus, .swdp select:focus, .swdp textarea:focus { outline: none; border-color: var(--p-acc); box-shadow: 0 0 0 1px var(--p-acc); }
.swdp input::placeholder, .swdp textarea::placeholder { color: var(--p-mut-2); }
.swdp input:disabled { opacity: .6; }
.swdp input:-webkit-autofill { -webkit-text-fill-color: var(--p-ink); -webkit-box-shadow: 0 0 0 40px #26303A inset; caret-color: var(--p-ink); }
.hint { color: var(--p-mut); font-size: 14px; }
.fld .hint { margin-top: -2px; }
.form > .hint { margin: -6px 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--p-line-2); color: var(--p-ink-2); cursor: pointer; font-weight: 500; font-size: 14.5px; }
.chip span:hover { background: rgba(255, 255, 255, .04); }
.chip input:checked + span { color: var(--p-acc); background: rgba(92, 200, 255, .1); box-shadow: inset 0 0 0 1px rgba(92, 200, 255, .55); }
.chip input:focus-visible + span { outline: 2px solid var(--p-acc); outline-offset: 2px; }
.drop { border: 1px solid var(--p-line-2); border-radius: 10px; padding: 26px 18px; text-align: center; color: var(--p-mut); background: rgba(255, 255, 255, .015); transition: border-color .15s, background .15s; }
.drop label { color: var(--p-acc); font-weight: 500; cursor: pointer; }
.drop label:hover { text-decoration: underline; }
.drop.is-over { border-color: var(--p-acc); background: rgba(92, 200, 255, .06); }
.flist { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.flist:not(:empty) { margin-top: 16px; }
.flist li { position: relative; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 8px 0 6px; background: var(--p-field); border-radius: 8px; box-shadow: inset 0 0 0 1px var(--p-line-2); color: var(--p-ink-2); font-size: 14px; max-width: 260px; }
.flist li img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; }
.flist li .fi { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--p-mut); }
.flist li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flist li button { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--p-mut); flex: none; }
.flist li button:hover { color: var(--p-bad); background: rgba(248, 113, 113, .1); }
/* avatars + verified staff replies */
.pa { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; background: var(--p-card-2); box-shadow: inset 0 0 0 1px var(--p-line-2); color: var(--p-ink-2); font-weight: 600; line-height: 1; }
.pa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pa-sky { background: #0A0A0B; box-shadow: inset 0 0 0 1px rgba(92, 200, 255, .45); }
.pa-sky svg { width: 46%; height: auto; display: block; }
.pa-sky svg * { fill: #fff; }
.vt { display: inline-flex; align-items: center; margin-left: -6px; }
.vt svg { display: block; }
.msg-h { align-items: center; }
.msg-h .pa { margin-right: 2px; }
.msg-staff .msg-h b { color: var(--p-ink); }
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.swdp button.av { overflow: hidden; padding: 0; }
.who { display: inline-flex; align-items: center; gap: 12px; vertical-align: middle; }
.tbl .subj .who + .site { margin-left: 46px; }
.photo-card { display: flex; align-items: center; gap: 22px; margin-bottom: 28px; }
.photo-card h2 { font-size: 17px; margin-bottom: 4px; }
.photo-card .acts { margin-top: 12px; }
.photo-card label.btn { cursor: pointer; }
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rcard { position: relative; }
.rcard input { position: absolute; opacity: 0; pointer-events: none; }
.rcard span { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--p-line-2); cursor: pointer; }
.rcard b { font-weight: 600; }
.rcard em { font-style: normal; color: var(--p-mut); font-size: 13.5px; line-height: 1.45; }
.rcard span:hover { background: rgba(255, 255, 255, .03); }
.rcard input:checked + span { background: rgba(92, 200, 255, .08); box-shadow: inset 0 0 0 1px rgba(92, 200, 255, .6); }
.rcard input:checked + span b { color: var(--p-acc); }
.rcard input:focus-visible + span { outline: 2px solid var(--p-acc); outline-offset: 2px; }
.rtypes { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rtype { display: grid; gap: 8px; text-align: left; padding: 24px; align-content: start; transition: box-shadow .15s; }
.rtype:hover { box-shadow: inset 0 0 0 1px rgba(92, 200, 255, .5); }
.rtype b { font-size: 17px; }
.rtype span { color: var(--p-mut); font-size: 14.5px; }
.rtype em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; color: var(--p-acc); font-weight: 500; margin-top: 6px; }
.rfiles { display: grid; gap: 4px; }
.msg-report { border-left-color: var(--p-ok); }
.msg-h .b { height: 24px; font-size: 13px; }
.check.deliver { align-items: flex-start; margin: 4px 0 14px; padding: 12px 14px; border-radius: 10px; background: rgba(74, 222, 128, .06); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .25); font-size: 14.5px; }
.check.deliver input { margin-top: 2px; flex: none; }
.flist li .fn { min-width: 0; }
.flist li .up { position: relative; flex: none; width: 60px; height: 4px; border-radius: 4px; background: var(--p-line-2); overflow: hidden; }
.flist li .up i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--p-acc); transition: width .2s; }
.flist li .pc { flex: none; font-style: normal; font-size: 12.5px; color: var(--p-mut); font-variant-numeric: tabular-nums; }
.flist li.is-err { box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .5); }
.flist li.is-err .pc { color: var(--p-bad); }
.att-vid, .att-aud { display: grid; gap: 8px; width: min(560px, 100%); }
.att-vid video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; box-shadow: inset 0 0 0 1px var(--p-line-2); }
.att-aud audio { width: 100%; }
.att-dl { display: inline-flex; align-items: center; gap: 6px; color: var(--p-mut); font-size: 13.5px; overflow-wrap: anywhere; }
.att-dl:hover { color: var(--p-acc); }
.acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.composer .acts { justify-content: flex-end; }
.pw { position: relative; }
.pw input { padding-right: 52px !important; }
.pw .ib { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.check { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px; cursor: pointer; color: var(--p-ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--p-acc); margin: 0; }
.err { color: var(--p-bad); font-size: 14px; margin: -8px 0 16px; }
.form-msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14.5px; }
.form-msg.is-bad { background: rgba(248, 113, 113, .08); box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .35); color: #FECACA; }
.form-msg.is-ok { background: rgba(74, 222, 128, .08); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .3); color: #BBF7D0; }
.filter { margin: -8px 0 20px; max-width: 420px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 48px 20px; background: rgba(0, 0, 0, .62); overflow-y: auto; overscroll-behavior: contain; }
.modal-c { position: relative; width: min(820px, 100%); background: var(--p-card); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--p-line-2), 0 30px 80px rgba(0, 0, 0, .6); padding: 34px 34px 30px; animation: pop .18s ease-out; }
.modal-c h2 { font-size: 21px; margin-right: 44px; }
.modal-c .lead { color: var(--p-mut); margin: 8px 0 26px; }
.modal-x { position: absolute !important; right: 16px; top: 16px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
body.is-locked { overflow: hidden; }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 10px; }
.toast { padding: 13px 18px; border-radius: 10px; background: #26262B; box-shadow: inset 0 0 0 1px var(--p-line-2), 0 12px 30px rgba(0, 0, 0, .5); max-width: 380px; animation: pop .18s ease-out; }
.toast.is-bad { box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .5), 0 12px 30px rgba(0, 0, 0, .5); }

/* ---------- sign in ---------- */
.p-login { display: block; }
.auth { min-height: 100vh; display: grid; align-content: center; justify-items: center; padding: 40px 16px; gap: 22px; }
.auth-c { width: min(560px, 100%); padding: 56px 64px 52px; display: grid; }
.auth-logo { justify-self: center; margin-bottom: 22px; }
.auth-logo svg { display: block; height: 46px; width: auto; }
.auth h1 { text-align: center; font-size: 30px; margin-bottom: 28px; }
.auth-lead { text-align: center; color: var(--p-mut); margin: -14px 0 24px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--p-mut); }
.auth-foot { color: var(--p-mut-2); font-size: 13.5px; text-align: center; }
.auth-foot a { color: var(--p-mut); text-decoration: underline; text-underline-offset: 3px; }
.auth .acts { margin-top: 2px; }
.or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--p-mut-2); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--p-line); }
.swdp input.code { text-align: center; font-size: 28px !important; letter-spacing: .5em; font-variant-numeric: tabular-nums; padding-left: calc(16px + .5em) !important; font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
	.tk-staff { grid-template-columns: minmax(0, 1fr); }
	.tk-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; order: -1; }
}
@media (max-width: 1100px) {
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid2, .grid2.g-even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
	:root { --p-side-w: 290px; }
	.top .burger { display: inline-flex !important; margin-left: -8px; }
	.top { padding: 0 16px; gap: 8px; }
	.frame { grid-template-columns: minmax(0, 1fr); }
	.side { position: fixed; left: 0; top: var(--p-top-h); bottom: 0; height: auto; width: var(--p-side-w); max-width: 86vw; z-index: 40; background: var(--p-bg); border-right: 1px solid var(--p-line); transform: translateX(-102%); transition: transform .22s ease; }
	body.side-open .side { transform: none; }
	.scrim { display: block; position: fixed; inset: var(--p-top-h) 0 0; z-index: 35; background: rgba(0, 0, 0, .55); }
	.main { padding: 28px 24px 56px; }
}
@media (max-width: 760px) {
	.top .logo svg { height: 28px; }
	.search { display: none; }
	.tb span { display: none; }
	.tb { width: 44px; padding: 0; justify-content: center; }
	.main { padding: 22px 16px 48px; }
	.ph { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 24px; }
	.ph > .btn, .ph-acts .btn { width: 100%; }
	.ph-acts { display: grid; grid-template-columns: 1fr 1fr; }
	.ph-acts form, .ph-acts form .btn { width: 100%; }
	.crumbs { font-size: 14px; }
	.stats { gap: 12px; }
	.stat { padding: 16px 18px; }
	.stat b { font-size: 28px; }
	.tbl thead { display: none; }
	.tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100% !important; }
	.tbl tr { padding: 16px 18px; border-top: 1px solid var(--p-line); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; }
	.tbl tbody tr:first-child { border-top: 0; }
	.tbl td { border: 0; padding: 0 !important; font-size: 15px; }
	.tbl td.subj { grid-column: 1 / -1; order: -1; font-size: 16px; }
	.tbl td.ref { grid-column: 1 / -1; order: -2; font-size: 13px; color: var(--p-mut); }
	.tbl td[data-l] { display: contents; }
	.tbl td[data-l]::before { content: attr(data-l); color: var(--p-mut); font-size: 14px; }
	.tbl td.ref[data-l]::before { content: none; }
	.tbl td.ref[data-l] { display: block; }
	.tbl td.go { grid-column: 1 / -1; text-align: left; padding-top: 4px !important; }
	.tbl td.go:empty { display: none; }
	.tbl td > .b, .tbl td > .due, .tbl td > time { justify-self: start; }
	.tfoot { grid-template-columns: 1fr; justify-items: start; padding: 16px 18px; }
	.pages { justify-content: flex-start; }
	.infobar { padding: 18px 20px; }
	.msg-h { padding: 14px 18px; }
	.msg-b { padding: 16px 18px; font-size: 15.5px; }
	.att { padding: 0 18px 18px; }
	.att-img a { width: calc(50vw - 46px); height: 100px; }
	.composer, .rate { padding: 20px 18px; }
	.composer .acts { justify-content: stretch; }
	.composer .acts .btn { flex: 1; }
	.after { width: 100%; }
	.after select { flex: 1; }
	.canned { margin-left: 0; max-width: none; width: 100%; }
	.row2 { grid-template-columns: minmax(0, 1fr); }
	.modal { padding: 0; align-items: stretch; }
	.modal-c { border-radius: 0; min-height: 100%; padding: 26px 18px calc(28px + env(safe-area-inset-bottom, 0px)); }
	.modal-c .acts .btn { flex: 1; }
	.cards { grid-template-columns: minmax(0, 1fr); }
	.pad-l { padding: 22px 18px; }
	.auth-c { padding: 40px 22px 36px; }
	.auth h1 { font-size: 26px; }
	.toasts { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
	.swdp *, .swdp *::before, .swdp *::after { animation: none !important; transition: none !important; }
}

/* urgent contact */
.tb-urgent { border-color: color-mix(in srgb, var(--p-bad) 45%, transparent); }
.tb-urgent .i { color: var(--p-bad); }
.tb-urgent:hover { background: color-mix(in srgb, var(--p-bad) 10%, transparent); }
.modal-c.modal-sm { width: min(520px, 100%); }
.urg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.urg-o { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--p-r); background: var(--p-field); box-shadow: inset 0 0 0 1px var(--p-line-2); color: var(--p-ink); }
.urg-o:hover { box-shadow: inset 0 0 0 1px var(--p-acc); }
.urg-o .i { flex: none; color: var(--p-acc); }
.urg-o span { display: grid; gap: 2px; }
.urg-o small { color: var(--p-mut); font-size: 14px; }
.urg-n { margin-top: 20px; color: var(--p-mut); }
.urg-n .lnk { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
@media (max-width: 520px) { .urg { grid-template-columns: 1fr; } }
.urg-h { font-size: 13px; font-weight: 600; color: var(--p-mut); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 10px; }
.urg + .urg-h { margin-top: 22px; }

/* Sign-in history (1.13.0) */
.lg-sum { margin-bottom: 20px; }
.lg-sum .dl { grid-template-columns: max-content 1fr; }
.lg-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -8px 0 20px; }
.swdp .lg-filter input[type="search"] { width: auto; flex: 1 1 280px; max-width: 420px; }
.swdp .lg-filter select { width: auto; flex: 0 0 auto; }
.tbl.lg .subj { width: 30%; }
.tbl.lg .lg-when { white-space: nowrap; }
.tbl.lg .lg-when b, .tbl.lg td > b { font-weight: 500; color: var(--p-ink); }
.tbl .lg-ip { display: flex; margin-top: 4px; }
.tbl .lg-ip a:hover code { color: var(--p-acc); }
.tbl .lg-live { color: var(--p-ok); }
.lg-note { margin-top: 14px; font-size: 13.5px; }
