/* ==========================================================================
 Kefah | work orders — design tokens + component library (no framework)
 ========================================================================== */
:root {
color-scheme: light;
--font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif;

--bg: #eef0eb;
--surface: #ffffff;
--surface-2: #f6f7f4;
--surface-3: #eaece6;
--line: #dde1d8;
--line-strong: #c8cdc2;
--ink: #1f2427;
--ink-2: #474d46;
--ink-3: #686e63;
--ink-4: #8e9489;

--brand: #c4823f;
--brand-ink: #8a4f1b;
--brand-fill: #a3622a;
--brand-fill-hover: #8a4f1b;
--brand-soft: #f6ebdf;
--brand-soft-2: #efdcc6;
--focus: #c4823f;

--side: #22272a;
--side-2: #2c3236;
--side-3: #353c41;
--side-ink: #c4c9bf;
--side-ink-2: #8d948a;
--side-line: #343a3e;

--ok: #24703a;      --ok-soft: #e1f1e2;     --ok-fill: #2b7a3f;
--warn: #8a5300;    --warn-soft: #fbeed3;
--danger: #b42318;  --danger-soft: #fde5e2; --danger-fill: #b42318;
--info: #1d5ea6;    --info-soft: #e2ecf9;
--violet: #563fb0;  --violet-soft: #ebe7fb;
--teal: #0d685a;    --teal-soft: #dbf1eb;
--gray: #575d55;    --gray-soft: #eceee9;
--orange: #a3420f;  --orange-soft: #ffeddb;
--yellow: #7d4d06;  --yellow-soft: #fdf5c9;

--p-critical-bg: #fee2e2; --p-critical-fg: #991b1b; --p-critical-dot: #dc2626;
--p-high-bg: #ffedd5;     --p-high-fg: #9a3412;     --p-high-dot: #ea580c;
--p-medium-bg: #fef9c3;   --p-medium-fg: #854d0e;   --p-medium-dot: #ca8a04;
--p-low-bg: #dcfce7;      --p-low-fg: #166534;      --p-low-dot: #16a34a;

--sla-ok: #c4823f;
--sla-h48: #d4a20b;
--sla-h24: #ea7a1c;
--sla-over: #d92d20;
--track: #e7e9e3;
--viz-1: #c4823f;

--scrim: rgba(18, 22, 20, 0.42);
--shadow-pop: 0 10px 30px rgba(24, 28, 26, 0.16), 0 2px 6px rgba(24, 28, 26, 0.08);
--shadow-drawer: 0 0 0 1px rgba(24, 28, 26, 0.06), 0 18px 48px rgba(24, 28, 26, 0.22);
--shadow-btn: 0 1px 0 rgba(24, 28, 26, 0.05);

--r-xs: 4px;
--r-sm: 6px;
--r-md: 8px;
--r-lg: 12px;
--r-xl: 16px;

--side-w: 248px;
--side-w-rail: 72px;
--top-h: 60px;
--bottom-h: 62px;

--ease: cubic-bezier(.2, .8, .2, 1);
}

html.dark {
color-scheme: dark;
--bg: #121416;
--surface: #1a1d20;
--surface-2: #202427;
--surface-3: #282d31;
--line: #2d3337;
--line-strong: #3b4247;
--ink: #e9ebe6;
--ink-2: #c3c8be;
--ink-3: #9aa196;
--ink-4: #737a70;

--brand: #d89a57;
--brand-ink: #e6ad6e;
--brand-fill: #a3622a;
--brand-fill-hover: #b56f31;
--brand-soft: rgba(216, 154, 87, 0.13);
--brand-soft-2: rgba(216, 154, 87, 0.22);
--focus: #e0a565;

--side: #16191b;
--side-2: #202428;
--side-3: #2a2f33;
--side-ink: #c4c9bf;
--side-ink-2: #858c82;
--side-line: #262b2f;

--ok: #7fcf8a;      --ok-soft: rgba(70, 170, 90, 0.16);    --ok-fill: #2b7a3f;
--warn: #f0b45a;    --warn-soft: rgba(230, 160, 40, 0.15);
--danger: #f4948b;  --danger-soft: rgba(230, 80, 70, 0.17); --danger-fill: #b42318;
--info: #8fbaf0;    --info-soft: rgba(80, 140, 230, 0.17);
--violet: #b9aaf6;  --violet-soft: rgba(140, 110, 240, 0.18);
--teal: #74d2bf;    --teal-soft: rgba(40, 180, 150, 0.16);
--gray: #adb3a9;    --gray-soft: rgba(160, 170, 160, 0.13);
--orange: #fdae74;  --orange-soft: rgba(249, 115, 22, 0.17);
--yellow: #f6d860;  --yellow-soft: rgba(234, 179, 8, 0.15);

--p-critical-bg: rgba(239, 68, 68, 0.18);  --p-critical-fg: #fca5a5;
--p-high-bg: rgba(249, 115, 22, 0.18);     --p-high-fg: #fdba74;
--p-medium-bg: rgba(234, 179, 8, 0.16);    --p-medium-fg: #fde047;
--p-low-bg: rgba(34, 197, 94, 0.16);       --p-low-fg: #86efac;

--sla-ok: #c4823f;
--track: #2c3135;
--viz-1: #c4823f;

--scrim: rgba(0, 0, 0, 0.55);
--shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.35);
--shadow-drawer: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 48px rgba(0, 0, 0, 0.6);
--shadow-btn: none;
}

/* --------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
font-family: var(--font);
font-size: 14px;
line-height: 1.6;
color: var(--ink);
background: var(--bg);
-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: transparent;
text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--brand-soft-2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pre { white-space: pre-wrap; word-break: break-word; }

.ic {
width: 18px; height: 18px; flex: none;
stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.ic-sm { width: 16px; height: 16px; }
.ic-xs { width: 14px; height: 14px; }
.ic-lg { width: 22px; height: 22px; }
[dir="rtl"] .ic.flip { transform: scaleX(-1); }

/* --------------------------------------------------------------- emblem */
.emblem { display: block; width: 32px; height: 32px; flex: none; }
.on-dark, html.dark { --e-b: #e7e4dc; --e-c: #9ea392; }
.top-mark.emblem { width: 28px; height: 28px; }

/* --------------------------------------------------------------- buttons */
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: 8px;
height: 36px; padding: 0 14px;
border-radius: var(--r-md); border: 1px solid transparent;
font-size: 13px; font-weight: 600; white-space: nowrap; line-height: 1;
transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
user-select: none;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand-fill); color: #fff; box-shadow: var(--shadow-btn); }
.btn-primary:hover:not(:disabled) { background: var(--brand-fill-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-btn); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink-4); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.btn-success { background: var(--ok-fill); color: #fff; }
.btn-success:hover:not(:disabled) { background: #22652f; }
.btn-danger { background: var(--danger-fill); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #951c12; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover:not(:disabled) { background: var(--brand-soft-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; gap: 6px; border-radius: var(--r-sm); }
.btn-lg { height: 44px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
.btn.busy > .ic { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn { color: var(--brand-ink); font-weight: 600; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

/* --------------------------------------------------------------- form controls */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.req { color: var(--danger); margin-inline-start: 2px; }
.hint { font-size: 12px; color: var(--ink-3); }
.err-text { font-size: 12px; color: var(--danger); font-weight: 500; }
.input, .select, .textarea {
width: 100%; height: 40px; padding: 0 12px;
border: 1px solid var(--line-strong); border-radius: var(--r-md);
background: var(--surface); color: var(--ink);
transition: border-color .15s, box-shadow .15s;
outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft-2); }
.input.invalid, .select.invalid, .textarea.invalid { border-color: var(--danger); }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.select {
appearance: none; -webkit-appearance: none;
padding-inline-end: 34px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23686e63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: left 10px center;
}
html.dark .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa196' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E"); }
.select option, .select optgroup { background: var(--surface); color: var(--ink); }
.select-sm, .input-sm { height: 34px; font-size: 13px; border-radius: var(--r-sm); }
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-4); pointer-events: none; }
.input-icon > .input { padding-inline-start: 36px; }
.input-icon > .pw-toggle { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); border-radius: var(--r-sm); }
.input-icon > .pw-toggle:hover { background: var(--surface-3); color: var(--ink); }
.input-icon.has-toggle > .input { padding-inline-end: 42px; }
[dir="rtl"] .input-icon > .input[dir="ltr"] { padding-left: 12px; padding-right: 36px; }
[dir="rtl"] .input-icon.has-toggle > .input[dir="ltr"] { padding-left: 42px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.char-count { font-size: 12px; color: var(--ink-4); text-align: end; }

.file-drop {
display: flex; align-items: center; gap: 10px; padding: 10px 12px;
border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface-2);
color: var(--ink-2); font-size: 13px; cursor: pointer;
}
.file-drop:hover { border-color: var(--brand); color: var(--ink); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.file-chip { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; background: var(--surface); }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: var(--r-md); }
.seg > button, .seg > label {
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
height: 30px; padding: 0 12px; border-radius: var(--r-sm);
font-size: 13px; font-weight: 600; color: var(--ink-3); white-space: nowrap; cursor: pointer;
}
.seg > button:hover, .seg > label:hover { color: var(--ink); }
.seg > .on, .seg > label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg-block { display: flex; }
.seg-block > button, .seg-block > label { flex: 1; }

/* priority picker in the new-order form */
.prio-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.prio-pick label {
position: relative; display: flex; flex-direction: column; gap: 2px;
padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-md);
cursor: pointer; background: var(--surface); transition: border-color .15s, background-color .15s;
}
.prio-pick label:hover { border-color: var(--ink-4); }
.prio-pick input { position: absolute; opacity: 0; pointer-events: none; }
.prio-pick .pp-name { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; }
.prio-pick .pp-hint { font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.prio-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.prio-pick label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* switch */
.switch { position: relative; display: inline-flex; width: 40px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px; transition: background-color .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand-fill); }
[dir="rtl"] .switch input:checked + span::after { transform: translateX(-18px); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* --------------------------------------------------------------- pills, chips, badges */
.pill {
display: inline-flex; align-items: center; gap: 6px;
height: 24px; padding: 0 9px; border-radius: 999px;
font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill-sm { height: 21px; padding: 0 8px; font-size: 11px; }
.t-info { background: var(--info-soft); color: var(--info); }
.t-violet { background: var(--violet-soft); color: var(--violet); }
.t-warn { background: var(--warn-soft); color: var(--warn); }
.t-teal { background: var(--teal-soft); color: var(--teal); }
.t-ok { background: var(--ok-soft); color: var(--ok); }
.t-gray { background: var(--gray-soft); color: var(--gray); }
.t-danger { background: var(--danger-soft); color: var(--danger); }
.t-orange { background: var(--orange-soft); color: var(--orange); }
.t-yellow { background: var(--yellow-soft); color: var(--yellow); }
.t-brand { background: var(--brand-soft); color: var(--brand-ink); }
.pr-critical { background: var(--p-critical-bg); color: var(--p-critical-fg); }
.pr-high { background: var(--p-high-bg); color: var(--p-high-fg); }
.pr-medium { background: var(--p-medium-bg); color: var(--p-medium-fg); }
.pr-low { background: var(--p-low-bg); color: var(--p-low-fg); }
.pdot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.pdot.critical { background: var(--p-critical-dot); }
.pdot.high { background: var(--p-high-dot); }
.pdot.medium { background: var(--p-medium-dot); }
.pdot.low { background: var(--p-low-dot); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.count {
display: inline-flex; align-items: center; justify-content: center;
min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
background: var(--danger-fill); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
font-variant-numeric: tabular-nums;
}
.count-soft { background: var(--surface-3); color: var(--ink-2); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-xs); font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.tag-brand { background: var(--brand-soft); color: var(--brand-ink); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }

/* avatar */
.av {
--av: #5f6455;
display: inline-flex; align-items: center; justify-content: center; flex: none;
width: 32px; height: 32px; border-radius: 50%;
background: var(--av); color: #fff; font-size: 14px; font-weight: 700; line-height: 1;
}
.av-xs { width: 22px; height: 22px; font-size: 11px; }
.av-sm { width: 26px; height: 26px; font-size: 12px; }
.av-lg { width: 44px; height: 44px; font-size: 18px; }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.who-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.who-name { font-weight: 600; font-size: 13px; color: var(--ink); }
.who-sub { font-size: 12px; color: var(--ink-3); }
.crown { color: var(--brand); }

/* --------------------------------------------------------------- SLA track (the signature element) */
.sla { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sla-line { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 0; }
.sla-date { color: var(--ink-2); font-weight: 500; white-space: nowrap; font-size: 12px; }
.sla-meter { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sla-meter .track { flex: 0 0 56px; }
.sla-rel { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sla-rel .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.sla-rel.k-overdue { color: var(--danger); }
.sla-rel.k-h24 { color: var(--orange); }
.sla-rel.k-h48 { color: var(--yellow); }
.track { position: relative; height: 4px; border-radius: 999px; background: var(--track); overflow: hidden; }
.track > i { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p, 0%); border-radius: inherit; background: var(--sla-ok); }
.track.k-h48 > i { background: var(--sla-h48); }
.track.k-h24 > i { background: var(--sla-h24); }
.track.k-overdue > i { background: var(--sla-over); }
.track.k-closed > i { background: var(--ink-4); }
.sla-chip { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.sla-chip.k-overdue { background: var(--danger-soft); color: var(--danger); }
.sla-chip.k-h24 { background: var(--orange-soft); color: var(--orange); }
.sla-chip.k-h48 { background: var(--yellow-soft); color: var(--yellow); }
.sla-chip.k-ok { background: var(--ok-soft); color: var(--ok); }
.sla-chip.k-closed, .sla-chip.k-none { background: var(--gray-soft); color: var(--gray); }
.sla-chip.k-overdue .dot { animation: pulse 1.4s ease-in-out infinite; }

/* big timeline inside the order panel */
.timebar { padding: 14px 20px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.timebar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.timebar-state { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.timebar-state .rel { font-weight: 500; color: var(--ink-2); font-size: 13px; }
.timebar .track { height: 8px; overflow: visible; }
.timebar .track > i { border-radius: 999px; }
.timebar .now {
position: absolute; top: -5px; width: 2px; height: 18px; border-radius: 1px; background: var(--ink);
inset-inline-start: var(--p, 0%); transform: translateX(50%);
}
.timebar-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.timebar-ends b { color: var(--ink-2); font-weight: 600; }

/* --------------------------------------------------------------- boot / loading */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; background: var(--bg); color: var(--ink-3); font-size: 13px; z-index: 5; }
.boot .emblem { width: 56px; height: 56px; animation: pulse 1.6s ease-in-out infinite; }
.boot-err { max-width: 360px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; color: var(--ink-2); }

/* --------------------------------------------------------------- auth */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 1.05fr) 1fr; background: var(--surface); }
.auth-brand {
position: relative; overflow: hidden; padding: 40px 48px;
background: var(--side); color: #eef0eb;
display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.auth-brand .lockup { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand .lockup .emblem { width: 40px; height: 40px; }
.lockup-name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.lockup-sub { font-size: 12px; color: #a9afa4; letter-spacing: .02em; }
.auth-statement { position: relative; z-index: 1; max-width: 420px; }
.auth-statement h2 { font-size: 30px; line-height: 1.35; font-weight: 700; color: #f4f5f1; }
.auth-statement p { margin-top: 14px; font-size: 15px; line-height: 1.8; color: #b9beb3; max-width: 38ch; }
.auth-foot { position: relative; z-index: 1; font-size: 12px; color: #8d948a; display: flex; gap: 16px; }
.facets { position: absolute; inset: 0; pointer-events: none; }
.facets svg { position: absolute; width: 540px; height: 540px; left: -36px; bottom: -150px; }
.facets .f1 { fill: #c4823f; opacity: .9; }
.facets .f2 { fill: #353c41; }
.facets .f3 { fill: #7f8373; opacity: .55; }
.facets .f4 { fill: #3d454a; }
.facets .facet { transform-box: fill-box; transform-origin: center; animation: facet-in .9s var(--ease) both; }
.facets .facet:nth-child(2) { animation-delay: .12s; }
.facets .facet:nth-child(3) { animation-delay: .24s; }
.facets .facet:nth-child(4) { animation-delay: .36s; }
@keyframes facet-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; position: relative; }
.auth-card { width: min(420px, 100%); }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-title { font-size: 22px; font-weight: 700; line-height: 1.35; }
.auth-sub { margin-top: 6px; color: var(--ink-3); font-size: 14px; }
.auth-form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.auth-switch { margin-top: 20px; font-size: 13px; color: var(--ink-3); text-align: center; }
.auth-tools { position: absolute; top: 16px; inset-inline-end: 16px; display: flex; gap: 6px; }
.auth-note { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.auth-note .ic { color: var(--brand); margin-top: 2px; }
.pending-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pending-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; }
.pending-icon .ic { width: 28px; height: 28px; }
.steps { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: start; margin: 6px 0; }
.step { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.step .bullet { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--ok-soft); color: var(--ok); }
.step .bullet.wait { background: var(--brand-soft); color: var(--brand-ink); }
.step .bullet .ic { width: 14px; height: 14px; }

/* --------------------------------------------------------------- app shell */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.app.rail { grid-template-columns: var(--side-w-rail) minmax(0, 1fr); }
.side {
position: sticky; top: 0; height: 100vh; height: 100dvh;
background: var(--side); color: var(--side-ink);
display: flex; flex-direction: column; overflow: hidden;
border-inline-end: 1px solid var(--side-line);
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; height: var(--top-h); border-bottom: 1px solid var(--side-line); }
.side-brand .names { min-width: 0; }
.side-brand .n1 { color: #f1f2ee; font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; }
.side-brand .n2 { color: var(--side-ink-2); font-size: 12px; white-space: nowrap; }
.side-nav { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
position: relative; display: flex; align-items: center; gap: 12px;
height: 40px; padding: 0 12px; border-radius: var(--r-md);
color: var(--side-ink); font-weight: 500; font-size: 14px; text-align: start; width: 100%;
transition: background-color .12s, color .12s;
}
.nav-item:hover { background: var(--side-2); color: #fff; }
.nav-item.active { background: var(--side-3); color: #fff; font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; inset-inline-start: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
[dir="rtl"] .nav-item.active::before { border-radius: 3px 0 0 3px; }
.nav-item .ic { color: inherit; opacity: .9; }
.nav-item .nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .count { margin-inline-start: auto; }
.nav-sep { height: 1px; background: var(--side-line); margin: 10px 4px; }
.side-foot { border-top: 1px solid var(--side-line); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); width: 100%; text-align: start; }
.me-card:hover { background: var(--side-2); }
.me-card .who-name { color: #f1f2ee; }
.me-card .who-sub { color: var(--side-ink-2); }
.side-meta { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; font-size: 11px; color: var(--side-ink-2); }
.side-toggle { color: var(--side-ink-2); width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); }
.side-toggle:hover { background: var(--side-2); color: #fff; }

.app.rail .side-brand { justify-content: center; padding: 0; }
.app.rail .side-brand .names, .app.rail .nav-label, .app.rail .me-card .who-txt, .app.rail .side-meta .ver { display: none; }
.app.rail .nav-item { justify-content: center; padding: 0; }
.app.rail .nav-item .count { position: absolute; top: 4px; inset-inline-end: 8px; min-width: 16px; height: 16px; font-size: 10px; }
.app.rail .me-card { justify-content: center; }
.app.rail .side-meta { justify-content: center; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.top {
position: sticky; top: 0; z-index: 20;
height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 24px;
background: var(--surface); border-bottom: 1px solid var(--line);
}
.top-title { min-width: 0; flex: 1 1 auto; }
.top-title h1 { font-size: 18px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title p { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-mark { display: none; }
.top-search { position: relative; width: min(340px, 30vw); flex: none; }
.top-search .input { height: 38px; background: var(--surface-2); border-color: var(--line); padding-inline-end: 40px; }
.top-search .input:focus { background: var(--surface); }
.kbd { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--ink-4); border: 1px solid var(--line-strong); border-radius: var(--r-xs); padding: 0 5px; line-height: 18px; pointer-events: none; font-family: var(--font); }
.top-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn { position: relative; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn[aria-expanded="true"] { background: var(--surface-3); color: var(--ink); }
.icon-btn .count { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 10px; border: 2px solid var(--surface); box-sizing: border-box; pointer-events: none; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 4px 0 8px; border-radius: 999px; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--surface-3); }

.banner { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--brand-soft); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.banner > .ic { color: var(--brand-ink); }
.banner .grow { font-weight: 500; }

.view { flex: 1; padding: 24px; min-width: 0; outline: none; }
.view-inner { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

/* mobile bottom nav */
.bottom { display: none; }

/* --------------------------------------------------------------- panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-h h2 { font-size: 15px; font-weight: 700; line-height: 1.3; }
.panel-h .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.panel-b { padding: 16px 18px; }
.panel-b.flush { padding: 0; }
.section-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }

/* dashboard */
.greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.greet h2 { font-size: 22px; font-weight: 700; line-height: 1.3; }
.greet p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; text-align: start; border-inline-start: 1px solid var(--line); transition: background-color .12s; min-width: 0; }
.kpi:first-child { border-inline-start: 0; }
.kpi:hover { background: var(--surface-2); }
.kpi-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kpi-label .ic { color: var(--ink-3); }
.kpi-value { font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); }
.kpi-value.is-danger { color: var(--danger); }
.kpi-value.is-brand { color: var(--brand-ink); }
.kpi-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.att-list { display: flex; flex-direction: column; }
.att-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); text-align: start; width: 100%; transition: background-color .12s; }
.att-item:last-child { border-bottom: 0; }
.att-item:hover { background: var(--surface-2); }
.att-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.att-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.att-code { font-weight: 700; font-size: 13px; white-space: nowrap; }
.att-desc { font-size: 13px; color: var(--ink-2); min-width: 0; }
.att-meta { font-size: 12px; color: var(--ink-3); }
.att-reasons { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.reason-ic { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.reason-ic .ic { width: 16px; height: 16px; }

/* horizontal bars (single series = one colour; value at tip) */
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 136px minmax(0, 1fr); align-items: center; gap: 12px; padding: 5px 6px; margin: 0 -6px; border-radius: var(--r-sm); text-align: start; width: calc(100% + 12px); position: relative; }
.bar-row:hover { background: var(--surface-2); }
.bar-label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-plot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar-fill { height: 14px; min-width: 2px; background: var(--viz-1); border-start-start-radius: 0; border-end-start-radius: 0; border-start-end-radius: 4px; border-end-end-radius: 4px; flex: none; }
.bar-fill.zero { background: var(--line-strong); width: 2px !important; }
.bar-val { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar-tip { position: absolute; z-index: 5; inset-inline-end: 6px; top: -30px; background: var(--ink); color: var(--surface); font-size: 12px; padding: 3px 8px; border-radius: var(--r-sm); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; }
.bar-row:hover .bar-tip, .bar-row:focus-visible .bar-tip { opacity: 1; }
.chart-gap { height: 18px; }

.mini-list { display: flex; flex-direction: column; }
.mini-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); text-align: start; width: 100%; }
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: var(--surface-2); }
.day-head { padding: 8px 18px; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line); }

/* --------------------------------------------------------------- orders list */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px;
border-bottom: 2px solid transparent; margin-bottom: -1px;
font-size: 14px; font-weight: 600; color: var(--ink-3); white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--brand); }
.tab .n { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.tab.on .n { background: var(--brand-soft); color: var(--brand-ink); }
.tab .n.hot { background: var(--danger-fill); color: #fff; }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.toolbar .input-icon { flex: 1 1 220px; max-width: 320px; }
.toolbar .select { width: auto; min-width: 128px; }
.toolbar .spacer { flex: 1; }
.filter-toggle { display: none; }
.result-note { font-size: 12px; color: var(--ink-3); padding: 0 4px; white-space: nowrap; }

.tbl { display: flex; flex-direction: column; }
.tr {
display: grid; align-items: center; column-gap: 14px;
grid-template-columns: 10px 116px minmax(200px, 1fr) 92px 118px minmax(140px, 180px) 176px;
padding: 0 16px; min-height: 60px; border-bottom: 1px solid var(--line);
}
.tr.th { min-height: 40px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-3); position: sticky; top: var(--top-h); z-index: 2; }
.tr.th .sort { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: inherit; }
.tr.th .sort:hover { color: var(--ink); }
.tr.th .sort.on { color: var(--ink); }
.tr.row { cursor: pointer; transition: background-color .1s; content-visibility: auto; contain-intrinsic-size: auto 60px; }
.tr.row:hover { background: var(--surface-2); }
.tr.row:last-child { border-bottom: 0; }
.tr.row.is-unread { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.tr.row.is-unread:hover { background: var(--brand-soft); }
.tr.row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 0; }
.c-code { font-weight: 600; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.is-unread .c-code { font-weight: 700; }
.c-desc { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.c-desc .d1 { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-unread .c-desc .d1 { font-weight: 600; }
.c-desc .d2 { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; min-width: 0; }
.c-desc .d2 .tag { flex: none; }
.c-person { min-width: 0; }
.c-sla { min-width: 0; }
.tbl-empty { padding: 48px 16px; }
.list-more { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.tbl.ov .tr { grid-template-columns: 10px 112px minmax(180px, 1fr) 88px 112px minmax(118px, 160px) minmax(118px, 160px) 168px; }
.list-panel { container-type: inline-size; container-name: list; }
@container list (max-width: 979px) {
.tr { grid-template-columns: 10px 110px minmax(180px, 1fr) 88px 112px 164px; }
.tr .c-person { display: none; }
}
@container list (max-width: 1039px) {
.tbl.ov .tr { grid-template-columns: 10px 106px minmax(160px, 1fr) 84px 108px minmax(118px, 150px) 160px; }
.tbl.ov .tr .c-creator { display: none; }
.tbl.ov .tr .c-assignee { display: block; }
}
@container list (max-width: 869px) {
.tbl.ov .tr { grid-template-columns: 10px 106px minmax(160px, 1fr) 84px 108px 160px; }
.tbl.ov .tr .c-assignee { display: none; }
}
@container list (max-width: 779px) {
.tr.th { display: none; }
.tr.row, .tbl.ov .tr.row {
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "code pr" "desc desc" "st sla";
  row-gap: 6px; padding: 12px 14px; min-height: 0; align-items: start;
}
.tr.row > .c-dot { display: none; }
.tr.row > .c-code { grid-area: code; display: flex; align-items: center; gap: 6px; }
.tr.row > .c-desc { grid-area: desc; padding: 0; }
.tr.row > .c-pr { grid-area: pr; }
.tr.row > .c-st { grid-area: st; align-self: center; }
.tr.row > .c-sla { grid-area: sla; min-width: 150px; }
.tr.row > .c-person, .tbl.ov .tr.row > .c-assignee { display: none; }
.tr .c-desc .d1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mob-dot { display: inline-block !important; }
}

/* --------------------------------------------------------------- board */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 4px; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - var(--top-h) - 150px); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 700; font-size: 14px; }
.col-h .hint { font-weight: 400; }
.col-h .count { margin-inline-start: auto; }
.col-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.col-b { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; }
.card {
position: relative; overflow: hidden; text-align: start; width: 100%;
background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
padding: 12px; display: flex; flex-direction: column; gap: 8px;
transition: border-color .12s;
content-visibility: auto; contain-intrinsic-size: auto 150px;
}
.card:hover { border-color: var(--line-strong); }
.card.is-unread { border-color: var(--brand); }
.card-top { display: flex; align-items: center; gap: 6px; }
.card-code { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-desc { font-size: 13px; color: var(--ink); line-height: 1.55; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); }
.card-flag { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 8px; border-radius: var(--r-sm); }
.card .track { flex: none; height: 3px; margin-top: -2px; }
.col-empty { padding: 22px 10px; text-align: center; font-size: 12px; color: var(--ink-4); border: 1px dashed var(--line-strong); border-radius: 10px; }
.board-tabs { display: none; }

/* --------------------------------------------------------------- team */
.member-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) 118px auto; }
.mrow { display: contents; }
.mcell { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; min-width: 0; gap: 8px; }
.mhead .mcell { padding-block: 10px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.mcell.actions { justify-content: flex-end; gap: 6px; }
.pending-list { display: flex; flex-direction: column; }
.pend { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pend:last-child { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--ink-4); color: var(--ink); }
.chip.on { background: var(--side); border-color: var(--side); color: #fff; }
html.dark .chip.on { background: var(--brand-fill); border-color: var(--brand-fill); }

/* --------------------------------------------------------------- outbox */
.mail-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 2fr) 210px; }
.mail-row { display: contents; }
.mail-row > div { padding: 12px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.mail-head > div { padding-block: 10px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.mail-subj { font-weight: 600; font-size: 13px; }
.mail-body { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.mail-st { display: flex; flex-direction: column; gap: 3px; }
.mail-st span { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.45; color: var(--ink-3); }
.mail-st span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; margin-top: 6px; }
.mail-st .ok { color: var(--ok); }
.mail-st .bad { color: var(--danger); }
.mcell a { color: var(--ink-2); }
.mcell a:hover { color: var(--brand-ink); }

/* --------------------------------------------------------------- settings */
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .t { font-weight: 600; font-size: 14px; }
.set-row .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.6; }
.status-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status-line.ok { color: var(--ok); }
.status-line.off { color: var(--ink-3); }
.status-line.bad { color: var(--danger); }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 14px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* --------------------------------------------------------------- empty states */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 40px 20px; color: var(--ink-3); }
.empty-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-3); color: var(--ink-3); display: flex; align-items: center; justify-content: center; }
.empty-ic .ic { width: 22px; height: 22px; }
.empty h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.empty p { font-size: 13px; max-width: 42ch; }
.empty.compact { padding: 24px 16px; }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: var(--r-sm); }
@keyframes sk { to { background-position: -200% 0; } }

/* --------------------------------------------------------------- overlays */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; opacity: 0; transition: opacity .2s; }
.scrim.show { opacity: 1; }

/* order drawer */
.drawer {
position: fixed; z-index: 61; top: 0; bottom: 0; inset-inline-end: 0;
width: min(880px, 100vw); background: var(--surface);
box-shadow: var(--shadow-drawer); display: flex; flex-direction: column;
transform: translateX(-104%); transition: transform .28s var(--ease); outline: none;
}
[dir="ltr"] .drawer { transform: translateX(104%); }
.drawer.show { transform: none; }
.dw-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dw-titles { flex: 1; min-width: 0; }
.dw-code { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; border-radius: var(--r-sm); padding: 2px 6px; margin: -2px -6px 0; }
.dw-code:hover { background: var(--surface-3); color: var(--ink); }
.dw-title { font-size: 18px; font-weight: 700; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.dw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dw-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.dw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dw-role { font-size: 12px; color: var(--ink-3); margin-inline-end: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.dw-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.dw-main { padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dw-side { padding: 18px 18px 24px; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; background: var(--surface); min-width: 0; }
.dw-h { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.desc-box { font-size: 14px; line-height: 1.85; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.callout { border-radius: var(--r-md); padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.callout-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.callout p { font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.callout.ok { background: var(--ok-soft); border-color: transparent; }
.callout.ok .callout-h { color: var(--ok); }
.callout.danger { background: var(--danger-soft); border-color: transparent; }
.callout.danger .callout-h { color: var(--danger); }
.callout.warn { background: var(--warn-soft); border-color: transparent; }
.callout.warn .callout-h { color: var(--warn); }
.callout.teal { background: var(--teal-soft); border-color: transparent; }
.callout.orange { background: var(--orange-soft); border-color: transparent; }
.callout.orange .callout-h { color: var(--orange); }
.callout.req.orange { border-inline-start: 3px solid var(--orange); }
.callout.req.danger { border-inline-start: 3px solid var(--danger); }
.req-files { display: flex; flex-wrap: wrap; gap: 6px; }
.req-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.req-file:hover { border-color: var(--line-strong); }
.req-file .truncate { max-width: 220px; }
.req-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-vac { background: var(--orange-soft); color: var(--orange); }
.vac-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.vac-tag.now { color: var(--orange); }
.vac-hint { color: var(--orange); font-weight: 600; }
.panel-b > .vac-row { padding: 12px 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
.callout.teal .callout-h { color: var(--teal); }
.callout .qa { background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.callout .qa b { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px 10px; font-size: 13px; align-items: center; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; min-width: 0; color: var(--ink); font-weight: 500; }
.files { display: flex; flex-direction: column; gap: 8px; }
.file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); }
.file-ic { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; }
.file-name { font-size: 13px; font-weight: 600; }
.file-meta { font-size: 11px; color: var(--ink-3); }
.file-acts { display: flex; gap: 4px; }

/* activity stream */
.stream { display: flex; flex-direction: column; gap: 14px; }
.daysep { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.daysep::before, .daysep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ev { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
.ev-ic { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ev-ic .ic { width: 14px; height: 14px; }
.ev b { color: var(--ink-2); font-weight: 600; }
.ev .t { margin-inline-start: auto; white-space: nowrap; }
.msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
.msg-b { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; border-start-start-radius: 4px; padding: 10px 12px; min-width: 0; }
.msg.mine .msg-b { background: var(--surface); }
.msg.directive .msg-b { background: var(--brand-soft); border-color: var(--brand-soft-2); }
.msg.pending { opacity: .6; }
.msg-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-bottom: 4px; }
.msg-h .nm { font-weight: 700; color: var(--ink); font-size: 13px; }
.msg-h .dp { color: var(--ink-3); }
.msg-h .t { margin-inline-start: auto; color: var(--ink-4); white-space: nowrap; }
.msg-t { font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }

.dw-compose { border-top: 1px solid var(--line); padding: 10px 16px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.dw-compose .kinds { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kind { height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); }
.kind:hover { color: var(--ink); border-color: var(--line-strong); }
.kind.on { background: var(--side); color: #fff; border-color: var(--side); }
html.dark .kind.on { background: var(--brand-fill); border-color: var(--brand-fill); }
.compose-row { display: flex; align-items: flex-end; gap: 8px; }
.compose-row textarea { flex: 1; min-height: 42px; max-height: 160px; resize: none; padding: 10px 12px; }
.compose-row .btn { height: 42px; }

/* dialogs */
.dlg-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; }
.dlg-wrap .scrim { z-index: 0; }
.dlg {
position: relative; z-index: 1; width: min(560px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-drawer);
display: flex; flex-direction: column; overflow: hidden;
opacity: 0; transform: translateY(8px) scale(.985); transition: opacity .18s, transform .22s var(--ease);
}
.dlg.wide { width: min(720px, 100%); }
.dlg.narrow { width: min(440px, 100%); }
.dlg-wrap.show .dlg { opacity: 1; transform: none; }
.dlg-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.dlg-h h2 { font-size: 17px; font-weight: 700; line-height: 1.4; }
.dlg-h p { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.dlg-h .grow { min-width: 0; }
.dlg-b { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.dlg-f { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.dlg-f .muted { margin-inline-end: auto; font-size: 12px; }
.dlg-ic { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dlg-ic.danger { background: var(--danger-soft); color: var(--danger); }
.dlg-ic.brand { background: var(--brand-soft); color: var(--brand-ink); }
.dlg-ic.ok { background: var(--ok-soft); color: var(--ok); }

/* popovers */
.pop {
position: fixed; z-index: 70; width: 380px; max-width: calc(100vw - 24px); max-height: min(560px, calc(100vh - 80px));
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
display: flex; flex-direction: column; overflow: hidden;
opacity: 0; transform: translateY(-4px); transition: opacity .14s, transform .16s var(--ease);
}
.pop.show { opacity: 1; transform: none; }
.pop-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.pop-b { overflow-y: auto; }
.pop-sec { padding: 8px 16px 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.pop-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 16px; text-align: start; width: 100%; }
.pop-item:hover, .pop-item.kb { background: var(--surface-2); }
.pop-item .t1 { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pop-item .t2 { font-size: 12px; color: var(--ink-3); }
.pop-item .acts { display: flex; gap: 6px; margin-top: 6px; }
.pop-f { display: flex; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.pop-f .link-btn { display: inline-flex; align-items: center; gap: 6px; }

/* the bell: notifications list */
.bell-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.btab { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.btab:hover { color: var(--ink); }
.btab.on { color: var(--ink); border-bottom-color: var(--brand); }
.btab .count { min-width: 18px; height: 18px; font-size: 10.5px; }
.ntf { border-bottom: 1px solid var(--line); }
.ntf:last-child { border-bottom: 0; }
.ntf.unread { background: var(--surface-2); }
.ntf-hit { display: grid; grid-template-columns: 36px minmax(0, 1fr) 8px; gap: 10px; align-items: start; width: 100%; padding: 11px 16px; text-align: start; }
.ntf-hit:hover { background: var(--surface-3); }
.ntf-av { position: relative; width: 32px; height: 32px; }
.ntf-av .av { width: 32px; height: 32px; font-size: 13px; }
.ntf-type { position: absolute; bottom: -4px; inset-inline-end: -6px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); box-sizing: content-box; }
.ntf.unread .ntf-type { border-color: var(--surface-2); }
.ntf-type .ic { width: 10px; height: 10px; stroke-width: 2.4; }
.ntf-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ntf-t { font-size: 13px; font-weight: 500; color: var(--ink-2); line-height: 1.5; }
.ntf-t bdi, .toast-t bdi { white-space: nowrap; }
.ntf.unread .ntf-t { font-weight: 700; color: var(--ink); }
.ntf-b { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.ntf-time { font-size: 11.5px; color: var(--ink-4); }
.ntf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.ntf-acts { display: flex; gap: 6px; padding: 0 16px 11px; padding-inline-start: 62px; }

/* notification check (Settings) */
.check { padding: 14px 18px; }
.check-h { display: flex; align-items: center; gap: 16px; }
.check .t { font-weight: 600; font-size: 14px; }
.check .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.6; }
.check-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; }
.ck { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 7px 0; }
.ck-ic { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; color: var(--ink-4); }
.ck-ic .ic { width: 18px; height: 18px; }
.ck.ok .ck-ic { color: var(--ok); }
.ck.bad .ck-ic { color: var(--danger); }
.ck.warn .ck-ic { color: var(--orange); }
.ck.run .ck-ic { color: var(--brand-ink); }
.ck-empty { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
.ck-t { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 22px; }
.ck.wait .ck-t { color: var(--ink-4); font-weight: 500; }
.ck-n { font-size: 12.5px; color: var(--ink-3); line-height: 1.65; margin-top: 1px; }
.ck.bad .ck-n { color: var(--danger); font-weight: 500; }
.ck.warn .ck-n { color: var(--orange); font-weight: 500; }
.check-devs { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ck-sub { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-bottom: 4px; }
.dev { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 6px 0; font-size: 13px; }
.dev-n { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.dev-s { font-size: 12.5px; }
.dev-s.ok { color: var(--ok); }
.dev-s.bad { color: var(--danger); }

.menu { padding: 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border-radius: var(--r-sm); font-size: 14px; color: var(--ink); text-align: start; }
.menu-item:hover { background: var(--surface-3); }
.menu-item .ic { color: var(--ink-3); }
.menu-item.danger, .menu-item.danger .ic { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 10px; }

/* search results */
.search-pop { width: 100%; position: absolute; top: calc(100% + 6px); inset-inline-start: 0; inset-inline-end: 0; max-height: 420px; }
.search-empty { padding: 18px 16px; font-size: 13px; color: var(--ink-3); }
mark { background: var(--brand-soft-2); color: inherit; border-radius: 2px; padding: 0 1px; }

/* toasts */
.toasts { position: fixed; z-index: 90; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 32px); }
.toast {
pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px;
background: #22272a; color: #f1f2ee; border-radius: var(--r-md); box-shadow: var(--shadow-pop);
font-size: 13px; font-weight: 500; max-width: 440px;
opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .25s var(--ease);
}
html.dark .toast { background: #2b3034; }
.toast.show { opacity: 1; transform: none; }
.toast .ic { flex: none; }
.toast.success .ic { color: #7fcf8a; }
.toast.error .ic { color: #f4948b; }
.toast.warning .ic { color: #f0b45a; }
.toast.info .ic { color: #d89a57; }
.toast-t { display: block; font-weight: 700; }
.toast-s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 400; font-size: 12.5px; opacity: .82; margin-top: 2px; line-height: 1.5; }
.toast-act { color: #e6ad6e; font-weight: 700; padding: 4px 6px; margin: -4px 0; border-radius: var(--r-xs); white-space: nowrap; }
.toast-act:hover { background: rgba(255, 255, 255, .08); }

/* upload progress line inside dialogs/drawer */
.progress-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
.dash-grid { grid-template-columns: minmax(0, 1fr); }
.dw-grid { grid-template-columns: minmax(0, 1fr) 250px; }
.top-search { width: min(280px, 28vw); }
}
@media (max-width: 1080px) {
.app { grid-template-columns: var(--side-w-rail) minmax(0, 1fr); }
.app .side-brand { justify-content: center; padding: 0; }
.app .side-brand .names, .app .nav-label, .app .me-card .who-txt, .app .side-meta .ver { display: none; }
.app .nav-item { justify-content: center; padding: 0; }
.app .nav-item .count { position: absolute; top: 4px; inset-inline-end: 8px; min-width: 16px; height: 16px; font-size: 10px; }
.app .me-card, .app .side-meta { justify-content: center; }
.app .side-toggle { display: none; }
.board { grid-template-columns: repeat(4, minmax(232px, 1fr)); }
.set-grid { grid-template-columns: minmax(0, 1fr); }
.member-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; }
.member-grid .m-phone { display: none; }
}
@media (max-width: 860px) {
.dw-grid { grid-template-columns: minmax(0, 1fr); }
.dw-side { border-inline-start: 0; border-top: 1px solid var(--line); order: -1; padding-bottom: 18px; }
.dw-side .dw-side-files { display: none; }
.dw-main .dw-main-files { display: block; }
.top-search { display: none; }
.top-actions .search-btn { display: inline-flex; }
.mail-grid { grid-template-columns: 120px minmax(0, 1fr) 140px; }
.mail-grid .m-body-col { display: none; }
}
.dw-main .dw-main-files { display: none; }

@media (max-width: 760px) {
body { font-size: 14px; }
.app, .app.rail { grid-template-columns: minmax(0, 1fr); }
.side { display: none; }
.top { padding: 0 12px; gap: 8px; height: 56px; }
.top-mark { display: block; }
.top-title h1 { font-size: 16px; }
.top-title p { display: none; }
.top-actions .new-btn, .top-actions .user-btn .who-txt { display: none; }
.top-actions .search-btn { display: inline-flex; }
.view { padding: 12px 12px calc(var(--bottom-h) + 20px + env(safe-area-inset-bottom)); }
.view-inner { gap: 14px; }
.banner { padding: 10px 12px; flex-wrap: wrap; }
.bottom {
  display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; inset-inline: 0; bottom: 0;
  height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.bn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.bn.active { color: var(--brand-ink); }
.bn .count { position: absolute; top: 6px; inset-inline-start: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 10px; }
.bn-new { display: flex; align-items: center; justify-content: center; }
.bn-new span { width: 46px; height: 46px; border-radius: 50%; background: var(--brand-fill); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(163, 98, 42, .35); }
.bn-new .ic { width: 22px; height: 22px; stroke-width: 2.2; }
.toasts { inset-inline: 12px; bottom: calc(var(--bottom-h) + 12px + env(safe-area-inset-bottom)); align-items: stretch; }
.toast { max-width: none; }

.greet h2 { font-size: 19px; }
.greet .btn { display: none; }
.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi { padding: 14px 16px; border-inline-start: 0; border-top: 1px solid var(--line); }
.kpi:nth-child(-n+2) { border-top: 0; }
.kpi:nth-child(2n) { border-inline-start: 1px solid var(--line); }
.kpi-value { font-size: 26px; }
.att-item { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
.att-item .reason-ic { display: none; }
.att-reasons { justify-content: flex-start; }
.panel-h, .panel-b { padding-inline: 14px; }

.toolbar { padding: 10px 12px; }
.toolbar .input-icon { flex: 1 1 100%; max-width: none; }
.toolbar .select { flex: 1 1 calc(50% - 4px); min-width: 0; }
.toolbar .spacer { display: none; }
.toolbar.collapsible .select { display: none; }
.toolbar.collapsible.open .select { display: block; }
.toolbar.collapsible .input-icon { flex: 1 1 calc(100% - 120px); }
.filter-toggle { display: inline-flex; flex: 0 0 auto; }

.board-tabs { display: block; }
.board { grid-template-columns: minmax(0, 1fr); overflow: visible; }
.board .col { display: none; max-height: none; }
.board .col.on { display: flex; }
.board .col-h { display: none; }

.member-grid { display: block; }
.member-grid .mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--line); padding: 12px 14px; gap: 6px 10px; }
.member-grid .mhead { display: none; }
.member-grid .mcell { padding: 0; border: 0; }
.member-grid .m-dept, .member-grid .m-mail { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); }
.member-grid .actions { grid-row: 1; grid-column: 2; }
.pend { grid-template-columns: auto minmax(0, 1fr); }
.pend .acts { grid-column: 1 / -1; justify-content: flex-start; }

.mail-grid { display: block; }
.mail-grid .mail-head { display: none; }
.mail-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; border-bottom: 1px solid var(--line); gap: 4px 10px; }
.mail-row > div { padding: 0; border: 0; }
.mail-row .m-date { grid-column: 1 / -1; order: 3; font-size: 12px; color: var(--ink-3); }

.drawer { width: 100vw; }
.dw-head { padding: 12px 14px; }
.dw-title { font-size: 16px; }
.timebar { padding: 12px 14px 14px; }
.dw-actions { padding: 10px 14px; }
.dw-actions .dw-role { flex-basis: 100%; }
.dw-actions .btn { flex: 1 1 auto; }
.dw-main { padding: 14px 14px 20px; }
.dw-side { padding: 14px; }
.dw-compose { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }

.dlg-wrap { align-items: flex-end; padding: 0; }
.dlg, .dlg.wide, .dlg.narrow { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(24px); }
.dlg-f { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.dlg-f .btn { flex: 1; }
.dlg-f .muted { display: none; }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
.prio-pick { grid-template-columns: repeat(2, 1fr); }

.pop { width: auto; inset-inline: 8px !important; }

.auth { grid-template-columns: minmax(0, 1fr); }
.auth-brand { display: none; }
.auth-mobile-brand { display: flex; }
.auth-main { align-items: flex-start; padding: 28px 20px 40px; }
.set-row { padding: 14px; flex-wrap: wrap; }
.check { padding: 14px; }
.check-h { flex-wrap: wrap; }
.ntf-hit { padding: 11px 14px; }
.ntf-acts { padding-inline-start: 60px; }
}
.mob-dot { display: none; }
.search-btn { display: none; }

@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print {
.side, .top, .bottom, .dw-compose, .dw-actions, .toasts, .banner { display: none !important; }
.app { display: block; }
}

/* --------------------------------------------------------------- additions (kefah core) */
.boot .btn { margin-top: 4px; }
.dlg-err { color: var(--danger); font-size: 12.5px; font-weight: 600; margin-inline-end: auto; }
.dlg-f .dlg-err + .muted { display: none; }
.field.full { grid-column: 1 / -1; }
.check-field { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.sk-line { height: 12px; }
.sk-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 90px 120px; gap: 16px; align-items: center; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.sk-row:last-child { border-bottom: 0; }
.sk-card { height: 96px; border-radius: var(--r-lg); }
.drawer-root .scrim { z-index: 60; }
.pop .menu-item .count { margin-inline-start: auto; }
.pop-item .reason-ic { flex: none; }
.ms-res .pop-item { border-radius: 0; }
html.no-scroll { overflow: hidden; }

/* ================================================================ orders view (orders.js) */
.od-un { color: var(--brand-ink); font-weight: 600; }
.c-desc .d2 .od-extra { min-width: 0; }
.od-evt { min-width: 0; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ev { align-items: flex-start; }
.ev .ev-ic, .ev .t { margin-top: 1px; }
.msg.failed .msg-b { border-color: var(--danger); }
.od-fail { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--danger); font-weight: 600; }
.od-fail .link-btn, .od-fail button { font-size: 12px; font-weight: 700; }
.od-fail .od-retry { color: var(--brand-ink); }
.od-fail .od-discard { color: var(--ink-3); }
.od-stage { display: flex; flex-wrap: wrap; gap: 6px; }
.od-stage:empty { display: none; }
.od-stage .file-chip { max-width: 260px; padding-block: 3px; }
.compose-row .od-attach { height: 42px; width: 42px; flex: none; }
.od-kinds-note { font-size: 12px; color: var(--ink-3); }
.od-sum { padding: 10px 12px; gap: 4px; }
.od-sum .row { gap: 8px; }
.od-dd-sub { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.od-dlg-hint[hidden] { display: none; }
.dw-h .muted { font-weight: 500; }
.od-closed-note { font-size: 12px; color: var(--ink-3); }

/* ================================================================ CSP utilities
   The Content-Security-Policy (style-src 'self') blocks style="" attributes, so
   markup uses these instead. !important mirrors the precedence inline styles had.
   Runtime values (widths, colours, --p, --av) go in data-style="…", applied via
   CSSOM by App.hydrateStyles (core.js). */
.u-sprite { position: absolute !important; width: 0 !important; height: 0 !important; overflow: hidden !important; }
.u-w100 { width: 100% !important; }
.u-tar { text-align: right !important; }
.u-tac { text-align: center !important; }
.u-minw0 { min-width: 0 !important; }
.u-mt6 { margin-top: 6px !important; }
.u-gap12 { gap: 12px !important; }
.u-gap20 { gap: 20px !important; }
.u-fs16 { font-size: 16px !important; }
.u-contents { display: contents !important; }
.u-jcc { justify-content: center !important; }
.u-aife { align-items: flex-end !important; }
.u-inflex { display: inline-flex !important; }
.u-bb0 { border-bottom: 0 !important; }
.u-maxw120 { max-width: 120px !important; }
.u-danger { color: var(--danger) !important; }
.u-brand600 { color: var(--brand-ink) !important; font-weight: 600 !important; }
.u-dot6 { width: 6px !important; height: 6px !important; background: currentColor !important; }
.u-prose { font-size: 14px !important; line-height: 1.8 !important; white-space: pre-line !important; }
.u-sq30 { width: 30px !important; height: 30px !important; }
.u-sq32 { width: 32px !important; height: 32px !important; }
.u-round { border-radius: 50% !important; }
.u-h44 { height: 44px !important; }
.u-h46 { height: 46px !important; }
.u-h58 { height: 58px !important; }
.u-sk30 { height: 30px !important; width: 60% !important; }
.u-msres { min-height: 160px !important; overflow-y: auto !important; }
