/* Inectio Aether — design tokens and components shared with Hermes, QMS and Support */
[hidden] { display: none !important; }
:root {
    --navy-950: #1b1b1b;
    --navy-900: #2f2f2f;
    --navy-800: #3b3b3b;
    --navy-700: #535353;
    --accent: #cd2122;
    --accent-hover: #ac1c1d;
    --accent-soft: #fbe9e9;
    --ink: #262626;
    --ink-2: #535353;
    --ink-3: #6c6c6c;
    --line: #e2e2e2;
    --line-2: #f0f0f0;
    --surface: #ffffff;
    --canvas: #f7f7f7;
    --green: #16794c;
    --green-bg: #e3f4ea;
    --red: #b42318;
    --red-bg: #fde8e6;
    --amber: #9a5b00;
    --amber-bg: #fff3d6;
    --blue: #1d4ed8;
    --blue-bg: #e6edff;
    --violet: #6d28d9;
    --violet-bg: #f1eaff;
    --grey: #4b5565;
    --grey-bg: #eef0f4;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-lg: 0 10px 30px rgba(16, 24, 40, .12);
    --font: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;
    --font-heading: "Montserrat", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; }
.dx-widget, .dx-widget input, .dx-overlay-wrapper { font-family: var(--font) !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -.02em; font-family: var(--font-heading); line-height: 1.25; }
p { margin: 0 0 .6em; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: 18px; }
.grid > *, .stack > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 2000; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(205, 33, 34, .55); outline-offset: 2px; border-radius: 4px; }

/* ---------- Staff shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); color: #d4d4d4; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid #333; z-index: 950; }
.brand { display: flex; gap: 11px; align-items: center; padding: 18px 18px 14px; color: #fff; text-decoration: none !important; }
.brand strong { display: block; font-size: 17px; letter-spacing: .01em; font-family: var(--font-heading); }
.brand small { display: block; font-size: 11px; color: #b1b1b1; margin-top: 1px; }
.nav { display: flex; flex-direction: column; padding: 6px 10px 16px; gap: 1px; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #a2a2a2; margin: 16px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: #d4d4d4; font-weight: 500; text-decoration: none !important; }
.nav a .dx-icon { font-size: 17px; color: #aaa; width: 18px; }
.nav a .count { margin-left: auto; font-size: 11px; background: rgba(255, 255, 255, .1); border-radius: 10px; padding: 0 7px; color: #ddd; font-variant-numeric: tabular-nums; }
.nav a .count.hot { background: var(--accent); color: #fff; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(205, 33, 34, .2); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav a.active .dx-icon { color: #f17475; }
.sidebar-foot { margin-top: auto; padding: 14px 18px; font-size: 11px; color: #999; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; gap: 14px; padding: 10px 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.menu-toggle { display: none; }
.search { position: relative; flex: 1; max-width: 560px; }
.search > .dx-icon { position: absolute; left: 11px; top: 9px; color: var(--ink-3); font-size: 16px; }
.search input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px 0 34px; font: inherit; background: var(--canvas); color: var(--ink); outline: none; }
.search input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-results { position: absolute; top: 42px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 70vh; overflow: auto; padding: 6px; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; }
.search-results a:hover, .search-results a.sel { background: var(--accent-soft); }
.search-results .empty { padding: 10px; color: var(--ink-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; border: 0; background: transparent; width: 36px; height: 36px; border-radius: 9px; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn .dx-icon { font-size: 19px; }
.icon-btn .dot { position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; line-height: 16px; padding: 0 4px; font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 20px; cursor: pointer; border: 0; background: transparent; font: inherit; color: var(--ink-2); }
.user-chip:hover { background: var(--line-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-700), var(--accent)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.client { background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.avatar.system { background: linear-gradient(135deg, #64748b, #94a3b8); }
.page { padding: 24px 28px 48px; max-width: 1640px; width: 100%; }
.page.flush { padding: 0; max-width: none; }
.demo-ribbon { background: repeating-linear-gradient(45deg, #fff3d6, #fff3d6 10px, #ffeab3 10px, #ffeab3 20px); color: var(--amber); font-size: 12px; font-weight: 600; padding: 4px 28px; border-bottom: 1px solid #f2d9a6; }

/* Popovers */
.popover { position: absolute; top: 48px; right: 0; width: 360px; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 1000; }
.popover-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-weight: 600; }
.notif { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important; }
.notif:hover { background: var(--canvas); }
.notif.unread { background: #fffafa; box-shadow: inset 3px 0 0 var(--accent); }
.notif strong { display: block; font-size: 13px; }
.notif span { display: block; font-size: 12px; color: var(--ink-2); }
.notif time { font-size: 11px; color: var(--ink-3); }
.menu-list a, .menu-list button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 9px 14px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none !important; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--canvas); }
.rel { position: relative; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; font-weight: 700; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; max-width: 900px; }
.crumbs { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 600; }
.card-head .hint { font-size: 12px; color: var(--ink-3); }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-3); }
.empty .dx-icon { font-size: 28px; display: block; margin-bottom: 6px; color: #bbb; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); text-decoration: none !important; color: inherit; display: block; position: relative; }
a.kpi:hover { border-color: #e4a1a2; }
.kpi .label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 4px; color: var(--ink); font-variant-numeric: tabular-nums; font-family: var(--font-heading); }
.kpi .foot { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.kpi.warn .value { color: var(--amber); }
.kpi.bad .value { color: var(--red); }
.kpi.good .value { color: var(--green); }
.kpi.bad::before, .kpi.warn::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.kpi.warn::before { background: #e9a93a; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 18px; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-grey { background: var(--grey-bg); color: var(--grey); }
.badge-violet { background: var(--violet-bg); color: var(--violet); }
.prio { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.prio-p1 { background: var(--red); color: #fff; }
.prio-p2 { background: #f59e0b; color: #fff; }
.prio-p3 { background: var(--blue-bg); color: var(--blue); }
.prio-p4 { background: var(--grey-bg); color: var(--grey); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--line-2); border-radius: 6px; padding: 1px 7px; font-size: 12px; color: var(--ink-2); margin: 1px 2px 1px 0; white-space: nowrap; }
.ref { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.due.overdue { color: var(--red); font-weight: 600; }
.due.soon { color: var(--amber); font-weight: 600; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fbfbfb; white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfcfc; }
.table .title-cell a { color: var(--ink); font-weight: 600; }
.table .title-cell small { display: block; color: var(--ink-3); font-size: 12px; }
.table.compact td, .table.compact th { padding: 7px 10px; }
.table-wrap, #work .card-body { overflow-x: auto; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--ink-3); }
.input, select.input, textarea.input { width: 100%; border: 1px solid #d4d4d4; border-radius: 8px; padding: 8px 11px; font: inherit; color: var(--ink); background: #fff; outline: none; min-height: 38px; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-sm { min-height: 32px; padding: 5px 9px; font-size: 13px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn .dx-icon { font-size: 16px; color: inherit; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: #fff; color: var(--ink); border-color: #d4d4d4; }
.btn-secondary:hover { background: var(--canvas); border-color: #bdbdbd; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #10603c; }
.btn-danger { background: #fff; color: var(--red); border-color: #f1c0bb; }
.btn-danger:hover { background: var(--red-bg); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; }
.alert { padding: 11px 14px; border-radius: 9px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.alert .dx-icon { font-size: 18px; margin-top: 1px; }
.alert-info { background: var(--blue-bg); color: #1e3a8a; }
.alert-warn { background: var(--amber-bg); color: #7a4800; }
.alert-error { background: var(--red-bg); color: var(--red); }
.alert-success { background: var(--green-bg); color: var(--green); }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 14px; color: var(--ink-2); font-weight: 600; border: 0; background: none; font: inherit; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tabs a.active, .tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a, .seg button { padding: 5px 12px; border-radius: 7px; color: var(--ink-2); font-weight: 600; font-size: 13px; border: 0; background: none; cursor: pointer; text-decoration: none !important; font-family: inherit; }
.seg .active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* Definition lists */
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; font-size: 13px; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }


/* ---------- Clocks & commitments ---------- */
.clock { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.clock:last-child { border-bottom: 0; }
.clock .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.clock .top strong { font-weight: 600; }
.bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin: 7px 0 5px; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--blue); }
.bar.amber > i { background: #e9a93a; }
.bar.red > i { background: var(--red); }
.bar.green > i { background: var(--green); }
.bar.grey > i { background: #b8b8b8; }

.steps { display: flex; gap: 0; margin: 14px 0 4px; }
.steps .st { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink-3); position: relative; padding-top: 18px; }
.steps .st::before { content: ""; position: absolute; top: 5px; left: 50%; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: #d4d4d4; z-index: 1; }
.steps .st::after { content: ""; position: absolute; top: 10px; left: -50%; right: 50%; height: 2px; background: #e3e3e3; }
.steps .st:first-child::after { display: none; }
.steps .st.done::before, .steps .st.done::after { background: var(--green); }
.steps .st.now { color: var(--ink); font-weight: 700; }
.steps .st.now::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.steps .st.now::after { background: var(--green); }

/* ---------- Auth ---------- */
.auth-page { background: #111113; color: #f2f0ef; }
.auth { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 100vh; padding: 40px 20px; overflow: hidden;
    background: radial-gradient(ellipse at 50% 110%, rgba(164, 39, 42, .18), transparent 55%), radial-gradient(ellipse at 50% 0, rgba(255, 255, 255, .035), transparent 60%); }
.auth::before { content: ""; position: absolute; inset: 24px; z-index: -1; border: 1px solid rgba(255, 255, 255, .045); border-radius: 16px; pointer-events: none; }
.auth-orbit { position: absolute; z-index: -1; width: 900px; height: 900px; border: 1px solid rgba(255, 255, 255, .035); border-radius: 50%; pointer-events: none; }
.auth-orbit::before, .auth-orbit::after { content: ""; position: absolute; inset: 110px; border: 1px solid rgba(255, 255, 255, .025); border-radius: 50%; }
.auth-orbit::after { inset: -110px; }
.auth-box { position: relative; width: 100%; max-width: 440px; padding: 40px 36px 32px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 24px;
    background: linear-gradient(155deg, rgba(255, 255, 255, .045), transparent 55%), #19191c; box-shadow: 0 32px 100px rgba(0, 0, 0, .35); }
.auth-box::before { content: ""; position: absolute; top: -1px; left: 25%; right: 25%; height: 1px; background: linear-gradient(90deg, transparent, #d65859, transparent); }
.auth-identity { display: grid; justify-items: center; gap: 14px; margin-bottom: 26px; text-align: center; }
.auth-identity h1 { color: #fff; font-size: 21px; }
.auth-identity p { color: #a9a9a9; font-size: 13px; margin: 0; }
.auth-logo { border-radius: 17px; box-shadow: 0 8px 32px rgba(0, 0, 0, .2), 0 0 50px rgba(205, 33, 34, .09); }
.auth label { color: #cfcfcf; font-size: 12.5px; font-weight: 600; display: block; margin-bottom: 5px; }
.auth .input { background: #222226; border-color: #3a3a40; color: #f2f0ef; }
.auth .input:focus { border-color: #d65859; box-shadow: 0 0 0 3px rgba(205, 33, 34, .25); }
.auth .field { margin-bottom: 12px; }
.auth a { color: #f08b8c; }
.auth-sep { display: flex; align-items: center; gap: 12px; color: #8a8a8a; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; margin: 22px 0 16px; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }
.btn-google { width: 100%; height: 46px; background: #fff; color: #1f1f1f; border-radius: 10px; font-weight: 600; gap: 10px; }
.btn-google:hover { background: #f1f1f1; }
.auth-note { margin-top: 14px; font-size: 12.5px; color: #b7b7b7; text-align: center; }
.auth-error { background: rgba(180, 35, 24, .18); border: 1px solid rgba(240, 139, 140, .3); color: #ffb4b4; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; text-align: left; }
.auth-ok { background: rgba(22, 121, 76, .18); border: 1px solid rgba(110, 231, 183, .25); color: #b5f0cf; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.auth-who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.auth-who div { border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 10px 12px; font-size: 12px; color: #a9a9a9; }
.auth-who strong { display: block; color: #eee; font-size: 12.5px; margin-bottom: 2px; }
.demo-panel { margin-top: 22px; border: 1px dashed rgba(233, 169, 58, .45); border-radius: 14px; padding: 12px; }
.demo-panel h2 { color: #e9a93a; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; font-family: var(--font); }
.demo-panel form { display: inline; }
.demo-panel button { display: flex; width: 100%; gap: 10px; align-items: center; background: transparent; border: 0; color: #ddd; padding: 6px 4px; border-radius: 8px; cursor: pointer; font: inherit; text-align: left; }
.demo-panel button:hover { background: rgba(255, 255, 255, .05); }
.demo-panel button small { color: #8f8f8f; display: block; font-size: 11.5px; }

/* Toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 3000; }
.toast { background: #1f1f1f; color: #fff; border-radius: 10px; padding: 11px 16px; box-shadow: var(--shadow-lg); max-width: 420px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; animation: toast-in .2s ease-out; }
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }


/* ---------- Aether: shared extras ---------- */
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.icon-lg { width: 22px; height: 22px; }
.ref { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.due { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.due.soon { color: var(--amber); font-weight: 600; }
.due.overdue { color: var(--red); font-weight: 600; }
.deadline time { font-weight: 600; }
.deadline .due::before { content: "· "; }
.hash { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 11.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.badge-violet { background: var(--violet-bg); color: var(--violet); }
.pill-count { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--line-2); font-size: 11.5px; font-weight: 700; align-items: center; justify-content: center; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 9px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.list-plain li:last-child { border-bottom: 0; }
.kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv small { color: var(--ink-3); font-size: 12px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; flex: 1; min-width: 180px; }
details.action { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
details.action > summary { list-style: none; cursor: pointer; padding: 10px 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
details.action > summary::-webkit-details-marker { display: none; }
details.action > summary::after { content: "▾"; margin-left: auto; color: var(--ink-3); }
details.action[open] > summary { border-bottom: 1px solid var(--line-2); }
details.action .body { padding: 12px 14px; }
details.action.danger > summary { color: var(--red); }
.token-once { border: 1.5px dashed var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.token-once code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: .04em; color: var(--ink); overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #cfcfcf; }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 17px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.client::before { background: var(--blue); }
.timeline li.bad::before { background: var(--red); }
.timeline li.good::before { background: var(--green); }
.timeline time { display: block; font-size: 11.5px; color: var(--ink-3); }
.attention-list a { display: grid; grid-template-columns: 6px 1fr auto; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important; align-items: center; }
.attention-list a:hover { background: #fcfcfc; }
.attention-list a:last-child { border-bottom: 0; }
.attention-list .tone { width: 6px; height: 28px; border-radius: 3px; background: var(--amber); }
.attention-list .tone.red { background: var(--red); }
.attention-list .tone.blue { background: var(--blue); }
.attention-list .tone.violet { background: var(--violet); }
.attention-list strong { display: block; font-size: 13.5px; }
.attention-list small { color: var(--ink-3); font-size: 12px; }
.repeater-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.repeater-row.items { grid-template-columns: minmax(0, 2fr) 130px auto; }
.client-projects[hidden] { display: none; }

/* ---------- Public shell (clients and recipients) ---------- */
.public-page { background: var(--canvas); }
.public { min-height: 100vh; display: flex; flex-direction: column; font-family: "Segoe UI", "Open Sans", Helvetica, Arial, sans-serif; }
.public h1, .public h2, .public h3 { font-family: "Segoe UI", "Montserrat", Helvetica, Arial, sans-serif; }
.pub-header { background: #fff; border-bottom: 1px solid var(--line); }
.pub-header .inner, .pub-footer .inner, .pub-main { max-width: 1060px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.pub-header .inner { height: 60px; display: flex; align-items: center; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.wordmark strong { font-size: 15px; letter-spacing: .22em; font-weight: 700; }
.wordmark small { font-size: 10.5px; letter-spacing: .14em; color: var(--ink-3); font-weight: 600; text-transform: uppercase; }
.pub-header .right { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); }
.pub-main { flex: 1; width: 100%; padding-top: 28px; padding-bottom: 56px; }
.pub-footer { border-top: 1px solid var(--line); background: #fff; color: var(--ink-3); font-size: 12px; }
.pub-footer .inner { padding-top: 14px; padding-bottom: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pub-footer a { color: var(--ink-2); }
.narrow { max-width: 560px; margin: 0 auto; }

/* The atmospheric motif: soft light through thin concentric rings, still when reduced motion is preferred. */
.aether-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 22px; padding: 44px 40px 40px; color: #f4f2f1;
    background: radial-gradient(ellipse at 85% -10%, rgba(205, 33, 34, .38), transparent 55%), radial-gradient(ellipse at 0% 110%, rgba(255, 255, 255, .07), transparent 50%), linear-gradient(150deg, #1b1b1b, #2f2f2f 60%, #1f1f21); }
.aether-hero::before, .aether-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .06); pointer-events: none; }
.aether-hero::before { width: 620px; height: 620px; right: -220px; top: -260px; box-shadow: 0 0 0 70px rgba(255, 255, 255, .012), 0 0 0 140px rgba(255, 255, 255, .01); animation: drift 24s ease-in-out infinite alternate; }
.aether-hero::after { width: 300px; height: 300px; left: -120px; bottom: -170px; }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(-24px, 18px); } }
@media (prefers-reduced-motion: reduce) { .aether-hero::before { animation: none; } * { scroll-behavior: auto !important; } }
.aether-hero .eyebrow { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: #c9c4c2; font-weight: 600; }
.aether-hero h1 { color: #fff; font-size: 34px; margin: 10px 0 8px; letter-spacing: -.02em; }
.aether-hero p { color: #d4d0ce; max-width: 560px; font-size: 15px; }
.token-form { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; max-width: 680px; }
.token-form label { display: block; width: 100%; font-size: 13px; font-weight: 600; color: #e8e4e2; margin-bottom: 2px; }
.token-input { flex: 1; min-width: 260px; height: 52px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #fff;
    font: 600 17px ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; padding: 0 16px; text-transform: uppercase; outline: none; }
.token-input::placeholder { color: rgba(255, 255, 255, .35); letter-spacing: .04em; }
.token-input:focus { border-color: #f08b8c; box-shadow: 0 0 0 3px rgba(205, 33, 34, .35); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.hero-error { margin-top: 14px; max-width: 680px; background: rgba(180, 35, 24, .22); border: 1px solid rgba(240, 139, 140, .35); color: #ffd0d0; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.journey .step { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.journey .num { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: .12em; }
.journey strong { display: block; margin-top: 6px; font-size: 15px; }
.journey p { color: var(--ink-3); font-size: 13px; margin-top: 3px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.panel-pad { padding: 26px 28px; }
.code-input { width: 100%; height: 58px; border-radius: 12px; border: 1px solid #cfcfcf; font: 700 26px ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .3em; text-align: center; outline: none; }
.code-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.masked { font-weight: 700; color: var(--ink); }

/* Upload workspace */
.ws-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.ws-head h1 { font-size: 24px; }
.ws-head .sub { color: var(--ink-2); margin-top: 4px; }
.ws-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 18px; align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist .n { width: 28px; height: 28px; border-radius: 8px; background: var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.checklist li.done .n { background: var(--green-bg); color: var(--green); }
.checklist .state { font-size: 12px; color: var(--ink-3); }
.checklist li.done .state { color: var(--green); font-weight: 600; }
.checklist li.missing .state { color: var(--amber); font-weight: 600; }
.dropzone { border: 2px dashed #cfcfcf; border-radius: 16px; background: #fcfcfc; padding: 28px 20px; text-align: center; transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; font-size: 16px; margin-top: 8px; }
.dropzone p { color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.dropzone .picker { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; }
.dropzone select { max-width: 260px; }
.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; }
.files-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-row { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 11px 14px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.file-row .name { font-weight: 600; overflow-wrap: anywhere; }
.file-row .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.file-row .acts { display: flex; gap: 4px; }
.file-row .progress { grid-column: 1 / -1; height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.file-row .progress > i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 3px; transition: width .2s; }
.file-row.done .progress > i { background: var(--green); }
.file-row.blocked { border-color: #f1c0bb; background: #fffafa; }
.file-row .why { grid-column: 1 / -1; font-size: 12.5px; color: var(--red); }
.quota { margin-top: 14px; }
.quota .bar { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin: 6px 0 4px; }
.quota .bar > i { display: block; height: 100%; background: var(--ink-2); border-radius: 4px; }
.action-bar { position: sticky; bottom: 0; margin-top: 20px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 14px;
    padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: var(--shadow-lg); }
.expiry { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--canvas); border: 1px solid var(--line); }
.expiry .icon { color: var(--ink-2); }
.expiry strong { display: block; }
.expiry small { color: var(--ink-3); }
.recipients-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.recipients-chips span { background: var(--line-2); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.recipients-chips span.pending { background: var(--amber-bg); color: var(--amber); }
.review-table td:first-child { width: 42%; }
.confirm-box { border: 1px solid var(--line); background: var(--canvas); border-radius: 12px; padding: 12px 14px; }
.sealed { text-align: center; padding: 30px 20px 10px; }
.sealed .mark { width: 56px; height: 56px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: inline-flex; align-items: center; justify-content: center; }
.sealed h1 { margin-top: 12px; font-size: 24px; }
.state-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.download-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.download-row:last-child { border-bottom: 0; }
.download-row .name { font-weight: 600; overflow-wrap: anywhere; }
.download-row small { color: var(--ink-3); font-size: 12px; }

/* Passport (printable receipt) */
.passport { max-width: 900px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px 34px; }
.passport header { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.passport h1 { font-size: 22px; }
.passport h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 8px; color: var(--ink-2); }
.passport .notice-small { font-size: 12px; color: var(--ink-3); margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.no-print { }
@media print {
    .pub-header, .pub-footer, .sidebar, .topbar, .no-print, .toasts { display: none !important; }
    .app { display: block; }
    body, .public-page { background: #fff; }
    .passport { border: 0; padding: 0; }
    .page, .pub-main { padding: 0; }
}

/* Dev mail viewer */
.mail { white-space: pre-wrap; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; background: var(--canvas); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }

/* Responsive */
@media (max-width: 1100px) {
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-main, .g3 { grid-template-columns: minmax(0, 1fr); }
    .ws-grid, .split { grid-template-columns: minmax(0, 1fr); }
    .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -260px; width: 248px; transition: left .2s; }
    .app.nav-open .sidebar { left: 0; box-shadow: var(--shadow-lg); }
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 10px 16px; }
    .page { padding: 18px 16px 40px; }
    .g2, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .user-name { display: none; }
    .dl { grid-template-columns: 110px 1fr; }
    .pub-header .inner, .pub-footer .inner, .pub-main { padding-left: 16px; padding-right: 16px; }
    .aether-hero { padding: 30px 22px 26px; border-radius: 16px; }
    .aether-hero h1 { font-size: 27px; }
    .panel-pad { padding: 20px 18px; }
    .repeater-row, .repeater-row.items { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .g4, .journey { grid-template-columns: minmax(0, 1fr); }
    .search { display: none; }
    .user-chip { padding: 2px; }
    .wordmark small { display: none; }
    .table-wrap { overflow-x: auto; }
    .passport { padding: 18px 16px; }
}

@media (max-width: 600px) { .hide-sm { display: none; } }
