/* Silver Pyramids Support Portal */

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

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --surface-3: #eef0f3;
  --border: #e2e5e9;
  --border-strong: #cdd2d8;
  --text: #13161b;
  --text-2: #3a414b;
  --muted: #69717d;
  --ink: #111418;
  --primary: #111418;
  --primary-hover: #2b3038;
  --on-primary: #ffffff;
  --accent: #33628f;
  --accent-soft: #e8eff7;
  --focus: rgba(51, 98, 143, .32);
  --danger: #b4261a;
  --danger-soft: #fdecea;
  --warn: #9a5200;
  --warn-soft: #fff3e0;
  --ok: #17784c;
  --ok-soft: #e3f6ec;
  --info: #1f5fa6;
  --info-soft: #e7f0fb;
  --neutral-soft: #eceef1;
  --shadow-sm: 0 1px 2px rgba(16, 20, 26, .06);
  --shadow: 0 1px 2px rgba(16, 20, 26, .05), 0 4px 16px rgba(16, 20, 26, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e11;
    --surface: #14171b;
    --surface-2: #181c21;
    --surface-3: #1f242a;
    --border: #272d34;
    --border-strong: #353c45;
    --text: #e8eaed;
    --text-2: #c4c9d0;
    --muted: #8d95a0;
    --primary: #e3e6ea;
    --primary-hover: #ffffff;
    --on-primary: #0f1215;
    --accent: #86afdb;
    --accent-soft: #182433;
    --focus: rgba(134, 175, 219, .35);
    --danger: #ff9a8f;
    --danger-soft: #3a1c19;
    --warn: #f5bd6b;
    --warn-soft: #33260f;
    --ok: #74d4a4;
    --ok-soft: #13291f;
    --info: #8cb8ea;
    --info-soft: #152336;
    --neutral-soft: #242a31;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--text); margin: 0; letter-spacing: -.015em; }
h1 { font-size: 26px; line-height: 1.25; font-weight: 650; }
h2 { font-size: 16px; font-weight: 620; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Brand mark (single-color logo via mask, follows text color) ---------- */
.brand-mark, .mark-fine {
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("/brand/mark-bold.svg") center / contain no-repeat;
  mask: url("/brand/mark-bold.svg") center / contain no-repeat;
}
.brand-mark { width: 62px; height: 29px; flex: none; }
.mark-fine { -webkit-mask-image: url("/brand/mark.svg"); mask-image: url("/brand/mark.svg"); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1160px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; align-items: baseline; gap: 10px; }
.brand-word { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.brand-sub { font-size: 13px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--border-strong); line-height: 1; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 550; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-3); }
.nav .i { width: 16px; height: 16px; }
.user { display: flex; align-items: center; gap: 10px; }
.role-badge { font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .role-badge { background: var(--primary); color: var(--on-primary); } }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); flex: none; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-size: 13px; font-weight: 600; }
.user-email { font-size: 12px; color: var(--muted); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

/* ---------- Layout ---------- */
.page { max-width: 1160px; margin: 0 auto; padding: 36px 24px 56px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 640px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.stack { display: grid; gap: 16px; }
.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 20px; border-top: 1px solid var(--border); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-body { padding: 20px; }
.aside-card { padding: 20px; }
.aside-card h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.aside-card ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; display: grid; gap: 6px; }
.aside-card p { color: var(--text-2); font-size: 14px; }
.callout { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); background: color-mix(in srgb, var(--danger-soft) 55%, var(--surface)); }
.callout h3 { color: var(--danger); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent; font: 600 14px var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }
/* legacy class names used by server-rendered pages */
.btn.primary { background: var(--primary); color: var(--on-primary); }

/* ---------- Sign-in ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand {
  position: relative; overflow: hidden; color: #eef0f3; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at 10% -10%, #2a3039 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #232932 0%, transparent 55%), #0e1114;
}
.auth-brand::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%); pointer-events: none; }
.auth-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.auth-logo .mark-fine { width: 250px; height: 116px; color: #f2f4f6; }
.auth-word { font-size: 30px; font-weight: 300; letter-spacing: .22em; text-transform: uppercase; color: #f4f6f8; line-height: 1.1; }
.auth-tag { font-size: 14px; color: #a9b0b9; letter-spacing: .02em; margin-top: -10px; }
.auth-pitch h2 { color: #fff; font-size: 22px; font-weight: 600; margin-bottom: 18px; }
.auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-pitch li { display: flex; gap: 12px; color: #c9ced5; font-size: 15px; }
.auth-pitch li .i { color: #fff; margin-top: 2px; }
.auth-pitch strong { color: #fff; font-weight: 600; display: block; }
.auth-copy { font-size: 12.5px; color: #7f8791; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 28px; }
.auth-card > p { color: var(--muted); margin: 8px 0 28px; }
.sso { display: grid; gap: 12px; }
.sso-btn { height: 48px; justify-content: center; gap: 12px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 10px; font-weight: 600; }
.sso-btn:hover { background: var(--surface-3); }
.sso-btn svg { width: 20px; height: 20px; }
.auth-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); display: flex; gap: 10px; }
.auth-note .i { width: 16px; height: 16px; margin-top: 2px; }

/* ---------- Form ---------- */
.form-card { overflow: hidden; }
.section { padding: 24px; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: 0; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.step { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--primary); color: var(--on-primary); flex: none; }
.section-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px 34px; }
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 16px; }
.field > label, .field > .label { font-weight: 600; font-size: 14px; color: var(--text); }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.req { color: var(--danger); margin-left: 2px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-2 .field + .field { margin-top: 0; }
input, select, textarea {
  width: 100%; font: 15px var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 9px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s;
}
input, select { height: 42px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea { resize: vertical; min-height: 150px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.invalid input, .invalid select, .invalid textarea, .invalid .dropzone, .invalid .choice-grid { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; }
.err:empty { display: none; }
.hint { color: var(--muted); font-size: 13px; }

/* Category cards */
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-radius: 12px; }
.choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.choice:hover { border-color: var(--border-strong); background: var(--surface-2); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; transition: background .15s, color .15s; }
.choice .ico .i { width: 18px; height: 18px; }
.choice-text { display: flex; flex-direction: column; min-width: 0; padding-right: 14px; }
.choice-title { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--text); }
.choice-hint { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 3px; }
.choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--surface); }
.choice:has(input:checked) .ico { background: var(--primary); color: var(--on-primary); }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--focus); }
.choice .tick { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: none; place-items: center; }
.choice .tick .i { width: 12px; height: 12px; stroke-width: 3; }
.choice:has(input:checked) .tick { display: grid; }
.badge-pop { align-self: flex-start; margin-top: 6px; font-size: 10.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 99px; }

.extra { margin-top: 16px; padding: 18px; border-radius: 11px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.extra h3 { margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }

/* Priority */
.prio-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; border-radius: 12px; }
.prio-opt { position: relative; padding: 12px 12px 12px 34px; border: 1px solid var(--border); border-radius: 11px; cursor: pointer; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.prio-opt:hover { border-color: var(--border-strong); }
.prio-opt input { position: absolute; opacity: 0; }
.prio-opt::before { content: ""; position: absolute; left: 13px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--muted)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--muted)) 20%, transparent); }
.prio-opt strong { display: block; font-size: 14px; font-weight: 600; }
.prio-opt span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.prio-opt:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.prio-opt:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--focus); }
.p-critical { --dot: #d93025; } .p-high { --dot: #e8830c; } .p-normal { --dot: #3c78b5; } .p-low { --dot: #8a929c; }

/* Dropzone */
.dropzone { position: relative; display: grid; place-items: center; gap: 4px; padding: 26px; border: 1.5px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); cursor: pointer; text-align: center; font-size: 14px; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; height: auto; }
.dropzone .dz-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); margin-bottom: 6px; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; font-size: 14px; }
.file-list li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list button { border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 4px; border-radius: 6px; }
.file-list button:hover { background: var(--surface-3); color: var(--danger); }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; background: var(--surface-2); border-top: 1px solid var(--border); flex-wrap: wrap; }
.form-foot .hint { display: flex; align-items: center; gap: 8px; }
.form-error { color: var(--danger); font-size: 14px; flex-basis: 100%; }

/* ---------- Queue ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px 18px; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 550; display: flex; align-items: center; gap: 8px; }
.stat-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--muted)); }
.stat-value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search .i { position: absolute; left: 12px; top: 12px; width: 16px; height: 16px; color: var(--muted); }
.search input { padding-left: 36px; height: 40px; }
.toolbar select { width: auto; min-width: 200px; height: 40px; }
.segmented { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 9px; gap: 2px; }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 6px 14px; border-radius: 7px; font: 600 13px var(--font); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tbl-head, .tbl-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 190px 100px 164px 92px; gap: 16px; align-items: center; padding: 0 20px; }
.tbl-head { height: 40px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tbl-row { min-height: 64px; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); color: var(--text); }
.tbl-row:last-child { border-bottom: 0; }
.tbl-row:hover { background: var(--surface-2); text-decoration: none; }
.key { font: 600 13px var(--mono); color: var(--text-2); }
.t-sum { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-cat { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); min-width: 0; }
.t-cat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-cat .i { width: 16px; height: 16px; color: var(--muted); }
.t-time { font-size: 13px; color: var(--muted); }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty .e-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--surface-3); color: var(--text-2); }
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; background: var(--neutral-soft); color: var(--text-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.indeterminate { background: var(--info-soft); color: var(--info); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.prio { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-2); }
.prio::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--dot, #8a929c); }
.prio.Highest, .prio.Critical { --dot: #d93025; } .prio.High { --dot: #e8830c; } .prio.Medium { --dot: #3c78b5; } .prio.Low, .prio.Lowest { --dot: #8a929c; }

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

/* ---------- Ticket detail ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.t-head { margin-bottom: 22px; }
.t-head-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.t-head .meta { color: var(--muted); font-size: 14px; margin-top: 8px; }
.prose { white-space: pre-wrap; word-wrap: break-word; color: var(--text-2); }
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 18px 20px; border-top: 1px solid var(--border); }
.tl-item:first-child { border-top: 0; }
.tl-item .avatar { width: 36px; height: 36px; }
.tl-item.support .avatar { background: var(--ink); color: #fff; border-color: var(--ink); }
.tl-item.internal { background: color-mix(in srgb, var(--warn-soft) 70%, var(--surface)); }
.tl-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.tl-meta strong { color: var(--text); font-size: 14px; }
.tag { font-size: 11px; font-weight: 650; letter-spacing: .03em; padding: 2px 7px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.tag.support { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .tag.support, .tl-item.support .avatar { background: var(--primary); color: var(--on-primary); border-color: var(--primary); } }
.tag.internal { background: var(--warn-soft); color: var(--warn); }
.composer { padding: 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.composer textarea { min-height: 110px; background: var(--surface); }
.composer .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.dl { display: grid; gap: 14px; margin: 0; }
.dl dt { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; }
.dl dd { margin: 3px 0 0; font-size: 14px; color: var(--text); }
.files, .aside-card ul.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.files a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); font-size: 14px; }
.files a:hover { background: var(--surface-2); text-decoration: none; }
.files .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files small { color: var(--muted); }

/* ---------- Success / error ---------- */
.center { display: grid; place-items: center; padding: 64px 20px; }
.result { max-width: 520px; width: 100%; padding: 40px 36px; text-align: center; }
.result .r-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: var(--ok-soft); color: var(--ok); }
.result .r-ico .i { width: 28px; height: 28px; stroke-width: 2.25; }
.result h1 { font-size: 24px; }
.result p { color: var(--muted); margin-top: 10px; }
.result .key-big { display: inline-block; font: 600 15px var(--mono); padding: 4px 10px; border-radius: 8px; background: var(--surface-3); color: var(--text); margin-top: 14px; }
.result .actions { display: flex; gap: 10px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.warn-box { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 9px; font-size: 14px; margin-top: 16px; text-align: left; }
/* server-rendered error page */
.center-card { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card.narrow { max-width: 460px; width: 100%; padding: 40px 36px; text-align: center; }
.card.narrow .brand-mark { width: 84px; height: 40px; margin-bottom: 20px; }
.card.narrow h1 { font-size: 22px; margin-bottom: 10px; }
.card.narrow p { margin-bottom: 24px; }

/* ---------- Misc ---------- */
.boot { min-height: 60vh; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); z-index: 50; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .tbl-head { display: none; }
  .tbl-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "key status" "sum sum" "meta meta"; gap: 4px 12px; padding: 14px 18px; }
  .tbl-row > .key { grid-area: key; }
  .tbl-row > .c-sum { grid-area: sum; }
  .tbl-row > .c-status { grid-area: status; justify-self: end; }
  .tbl-row > .t-cat, .tbl-row > .c-prio, .tbl-row > .t-time { display: none; }
  .tbl-row > .c-meta { grid-area: meta; display: flex; }
}
@media (min-width: 1081px) { .c-meta { display: none; } }
@media (max-width: 960px) {
  .grid-main { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 36px 28px; gap: 28px; }
  .auth-pitch, .auth-copy { display: none; }
  .auth-logo .mark-fine { width: 150px; height: 70px; }
  .auth-word { font-size: 22px; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .auth-panel { align-items: flex-start; padding: 32px 20px 48px; }
  .toolbar .search { flex-basis: 100%; }
  .toolbar select { flex: 1; }
  .c-meta { white-space: normal !important; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .choice { flex-direction: column; gap: 8px; padding: 12px; }
  .choice .ico { width: 32px; height: 32px; }
  .choice-hint { display: none; }
  .choice-text { padding-right: 0; }
  .choice-title { font-size: 13.5px; }
  .topbar-inner { padding: 0 16px; gap: 14px; }
  .brand-text, .user-meta, .role-badge { display: none; }
  .nav a span { display: none; }
  .nav a { padding: 9px 11px; }
  .page { padding: 22px 16px 40px; }
  h1 { font-size: 22px; }
  .section { padding: 20px 16px; }
  .section-sub { margin-left: 0; }
  .form-foot { padding: 16px; }
  .form-foot .btn { width: 100%; }
  .row-2 { grid-template-columns: 1fr; }
  .toolbar select { min-width: 0; }
  .search { max-width: none; }
  .result { padding: 32px 20px; }
}
