/* ==========================================================================
   Alexis Care design system
   Warm neutrals, one clay accent, Fraunces (display) + Inter (text).
   Fonts are self-hosted (SIL Open Font License): free, and no third-party requests.
   ========================================================================== */
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-latin-wght-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --bg: #faf9f5;
  --bg-sunk: #f2efe6;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #2b2a27;
  --ink-2: #4a4843;
  --muted: #6f6d66;
  --faint: #9a978e;
  --line: #e8e4da;
  --line-2: #f0ece3;
  --accent: #a8604a;
  --accent-ink: #8f5240;
  --accent-soft: #f5e7df;
  --on-accent: #ffffff;
  --panel: #f4eee4;
  --panel-2: #ece3d5;
  --overlay: #4f4640;
  --focus: rgba(168, 96, 74, .28);

  --ok: #3b7d55;      --ok-soft: #e5f1e8;
  --warn: #9a6b1f;    --warn-soft: #f8efdc;
  --serious: #b0583a; --serious-soft: #f8e6de;
  --crit: #b0413e;    --crit-soft: #f8e3e2;
  --info: #4a68b0;    --info-soft: #e7ecf8;

  --shadow-sm: 0 1px 2px rgba(43, 42, 39, .05);
  --shadow: 0 1px 2px rgba(43, 42, 39, .05), 0 8px 24px -8px rgba(43, 42, 39, .10);
  --shadow-lg: 0 24px 64px -16px rgba(43, 42, 39, .24);
  --radius: 14px;
  --radius-sm: 9px;

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #18202a; --bg-sunk: #131a22; --surface: #1f2833; --surface-2: #232d39;
  --ink: #e8edf3; --ink-2: #c9d2dc; --muted: #97a3b0; --faint: #6e7a87;
  --line: #2f3a47; --line-2: #28323e;
  --accent: #8aa6c4; --accent-ink: #a9c0d8; --accent-soft: #263445; --on-accent: #131a22;
  --panel: #1f2a37; --panel-2: #243243; --overlay: #3a4a5e; --focus: rgba(138, 166, 196, .35);
  --ok: #7cc39c; --ok-soft: #1e3329; --warn: #d8b06a; --warn-soft: #362d1b;
  --serious: #e09a7e; --serious-soft: #3a2820; --crit: #e48c88; --crit-soft: #3a2324;
  --info: #9db2ea; --info-soft: #232e48;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 24px -8px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 64px -16px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--sans); font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -.015em; }
.serif { font-family: var(--serif); font-optical-sizing: auto; }
.display { font-family: var(--serif); font-weight: 350; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -.03em; }
.h1 { font-family: var(--serif); font-size: 32px; line-height: 1.15; }
.h2 { font-family: var(--serif); font-size: 22px; line-height: 1.25; }
.h3 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .xs { font-size: 12px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout primitives ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: var(--gap, 16px); }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 550; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface); border-color: color-mix(in oklab, var(--line) 60%, var(--ink)); }
.btn-quiet { background: transparent; color: var(--muted); padding: 0 10px; }
.btn-quiet:hover { color: var(--ink); background: var(--bg-sunk); }
.btn-danger { background: transparent; border-color: var(--line); color: var(--crit); }
.btn-danger:hover { background: var(--crit-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn .spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: block; }
.field + .field { margin-top: 16px; }
.label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 550; margin-bottom: 6px; color: var(--ink-2); }
.label .opt { font-weight: 400; color: var(--faint); }
.input, .select, .textarea {
  display: block; width: 100%; height: 42px; padding: 0 13px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { height: auto; min-height: 140px; padding: 11px 13px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239a978e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in oklab, var(--line) 50%, var(--muted)); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.input.invalid, .textarea.invalid, .select.invalid { border-color: var(--crit); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.error-text { font-size: 12.5px; color: var(--crit); margin-top: 6px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.pw-meter i { height: 3px; border-radius: 3px; background: var(--line); transition: background .2s; }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--crit); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--serious); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: var(--warn); }
.pw-meter[data-s="4"] i { background: var(--ok); }

.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented .seg {
  display: block; height: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.segmented .seg b { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.segmented .seg > span { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 3px; }
.segmented label:hover .seg { border-color: color-mix(in oklab, var(--line) 50%, var(--muted)); }
.segmented input:checked + .seg { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.segmented input:focus-visible + .seg { box-shadow: 0 0 0 4px var(--focus); }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px; border: 1.5px dashed var(--line);
  border-radius: 12px; background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.file-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 99px; background: var(--bg-sunk); font-size: 12.5px; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 4px; font-size: 15px; line-height: 1; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 14px; font-weight: 600; }
.divider { height: 1px; background: var(--line-2); margin: 18px 0; border: 0; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--bg-sunk); color: var(--ink-2); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-new { background: var(--info-soft); color: var(--info); }
.b-acknowledged, .b-in_progress { background: var(--warn-soft); color: var(--warn); }
.b-awaiting_customer { background: var(--accent-soft); color: var(--accent-ink); }
.b-patch_released { background: #ece6fb; color: #6941c6; }
:root[data-theme="dark"] .b-patch_released { background: #2c2a44; color: #b9b0e6; }
.b-resolved { background: var(--ok-soft); color: var(--ok); }
.b-closed { background: var(--bg-sunk); color: var(--muted); }
.sev { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; font-family: var(--mono); letter-spacing: 0; }
.sev::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.sev-P1 { color: var(--crit); } .sev-P2 { color: var(--serious); } .sev-P3 { color: var(--warn); } .sev-P4 { color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.st-operational { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.st-degraded { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.st-outage { background: var(--crit); box-shadow: 0 0 0 3px var(--crit-soft); }
.st-maintenance { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }

/* ---------- tables / lists ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; transition: background .1s; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.t-title { font-weight: 550; color: var(--ink); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty .h2 { color: var(--ink); margin-bottom: 6px; }

/* ---------- public header / landing ---------- */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in oklab, var(--bg) 82%, transparent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .container { display: flex; align-items: center; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 620; font-size: 15.5px; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; color: var(--accent); }
.brand small { font-weight: 400; color: var(--muted); }
.wordmark { font-family: var(--serif); font-size: 20px; font-weight: 520; letter-spacing: -.02em; line-height: 1; color: var(--ink); }
.wordmark em { font-style: italic; font-weight: 340; color: var(--accent); margin-left: 5px; }
.auth-aside .wordmark { color: var(--ink); }
.topnav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.topnav a.link { padding: 8px 12px; font-size: 14px; color: var(--ink-2); text-decoration: none; border-radius: 8px; }
.topnav a.link:hover { background: var(--bg-sunk); }

.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero .display em { font-style: italic; color: var(--accent); font-weight: 300; }
.hero p.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 620px; margin: 26px 0 36px; }
.hero-art { position: absolute; right: -120px; top: 40px; width: 560px; opacity: .9; pointer-events: none; color: var(--accent); }
.pill-note { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); margin-bottom: 28px; box-shadow: var(--shadow-sm); }
.pill-note b { background: var(--accent-soft); color: var(--accent-ink); padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }

.section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .h1 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 10px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 28px; }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 20px; }
.feature h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.flow > div { padding: 24px 24px 24px 0; border-top: 1px solid var(--line); position: relative; }
.flow > div::before { counter-increment: step; content: '0' counter(step); font-family: var(--mono); font-size: 12px; color: var(--accent); display: block; margin: 18px 0 14px; }
.flow > div::after { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.flow h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.flow p { margin: 0; color: var(--muted); font-size: 14px; padding-right: 12px; }

.sla-table { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sla-table > div { background: var(--surface); padding: 22px; }
.sla-table .big { font-family: var(--serif); font-size: 36px; line-height: 1; margin: 14px 0 4px; letter-spacing: -.02em; }

.status-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.status-strip .card { padding: 16px 18px; display: flex; gap: 12px; align-items: center; }

.cta-band { background: linear-gradient(135deg, var(--panel), var(--panel-2)); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.cta-band .h1 { color: var(--ink); font-size: clamp(26px, 3vw, 38px); max-width: 560px; }
.cta-band .btn-accent { flex: none; }
.footer { padding: 40px 0 56px; color: var(--muted); font-size: 13px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-aside { background: linear-gradient(160deg, var(--panel), var(--panel-2)); color: var(--ink); border-right: 1px solid var(--line); padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside .brand { color: var(--ink); }
.auth-aside .brand small { color: var(--muted); }
.auth-aside blockquote { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.25; letter-spacing: -.015em; max-width: 480px; position: relative; z-index: 1; }
.auth-aside .points { display: grid; gap: 14px; margin-top: 36px; position: relative; z-index: 1; }
.auth-aside .points div { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.auth-aside .points svg { flex: none; color: var(--accent); margin-top: 2px; }
.auth-aside .art { position: absolute; right: -160px; bottom: -160px; width: 520px; color: var(--accent); opacity: .22; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .h1 { margin-bottom: 8px; }
.auth-card > p.muted { margin: 0 0 28px; }
.auth-foot { margin-top: 24px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-foot a { color: var(--ink); font-weight: 550; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 14px; background: var(--bg-sunk); color: var(--ink-2); }
.notice svg { flex: none; margin-top: 2px; }
.notice.ok { background: var(--ok-soft); color: color-mix(in oklab, var(--ok) 70%, var(--ink)); }
.notice.err { background: var(--crit-soft); color: color-mix(in oklab, var(--crit) 80%, var(--ink)); }
.notice.warn { background: var(--warn-soft); color: color-mix(in oklab, var(--warn) 70%, var(--ink)); }
.notice.accent { background: var(--accent-soft); color: color-mix(in oklab, var(--accent-ink) 80%, var(--ink)); }
.mail-sent { text-align: center; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 360px; margin: 0 auto; }
.otp-box { width: 100%; aspect-ratio: 1 / 1.15; text-align: center; font: 600 26px/1 var(--mono); border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); outline: none; transition: border-color .15s, box-shadow .15s; caret-color: var(--accent); }
.otp-box:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.otp-box.invalid { border-color: var(--crit); }
.mail-sent .env { width: 72px; height: 72px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto 24px; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--bg-sunk); }
.sidebar .brand { padding: 6px 10px 22px; }
.nav-group { margin-bottom: 18px; }
.nav-group .eyebrow { font-size: 11px; padding: 0 10px 6px; color: var(--faint); }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a svg { color: var(--muted); flex: none; }
.nav a:hover { background: color-mix(in oklab, var(--bg-sunk) 50%, var(--line)); }
.nav a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.nav a.active svg { color: var(--accent); }
.nav .count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 0 7px; border-radius: 99px; line-height: 18px; }
.sidebar .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 650; color: #fff; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.me .who { min-width: 0; flex: 1; line-height: 1.3; }
.me .who b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--bg-sunk); color: var(--ink); }

.main { min-width: 0; }
.mobile-bar { display: none; }
.page { max-width: 1240px; margin: 0 auto; padding: 36px 40px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .h1 { margin-top: 6px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.kpi { padding: 18px 20px; }
.kpi .v { font-family: var(--serif); font-size: 36px; line-height: 1.05; letter-spacing: -.02em; margin-top: 10px; }
.kpi .v small { font-family: var(--sans); font-size: 14px; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi .d { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.kpi.alert .v { color: var(--crit); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.rail { position: sticky; top: 24px; display: grid; gap: 16px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a .n { font-size: 12px; color: var(--faint); margin-left: 4px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input, .filters .select { height: 36px; font-size: 13.5px; width: auto; }
.filters .search { position: relative; flex: 1; min-width: 220px; }
.filters .search .input { width: 100%; padding-left: 36px; }
.filters .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }

/* SLA */
.sla-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 550; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sla-ok { color: var(--muted); } .sla-soon { color: var(--warn); } .sla-late { color: var(--crit); } .sla-met { color: var(--ok); }
.meter { height: 6px; background: var(--bg-sunk); border-radius: 6px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 6px; background: var(--ok); transition: width .3s; }
.meter.soon > i { background: var(--warn); } .meter.late > i { background: var(--crit); }

/* ---------- ticket thread ---------- */
.ticket-head { padding: 26px 28px; }
.ticket-head .h1 { font-size: 28px; margin: 10px 0 14px; }
.desc { white-space: pre-wrap; word-wrap: break-word; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.timeline { position: relative; margin-top: 8px; }
.timeline::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl-item { position: relative; display: flex; gap: 14px; padding: 10px 0; }
.tl-item > .avatar, .tl-item > .tl-ico { position: relative; z-index: 1; }
.tl-ico { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); flex: none; }
.tl-body { flex: 1; min-width: 0; }
.tl-meta { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 32px; }
.tl-meta b { color: var(--ink); font-weight: 600; }
.bubble { margin-top: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.bubble.staff { background: var(--surface-2); }
.bubble.internal { background: var(--warn-soft); border-color: color-mix(in oklab, var(--warn) 30%, var(--line)); }
.patch-card { margin-top: 6px; border: 1px solid color-mix(in oklab, #6941c6 30%, var(--line)); background: linear-gradient(135deg, color-mix(in oklab, #6941c6 7%, var(--surface)), var(--surface)); border-radius: 14px; padding: 16px 18px; }
.patch-card .v { font-family: var(--mono); font-size: 13px; font-weight: 600; color: #6941c6; }
.att-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; text-decoration: none; color: var(--ink-2); max-width: 280px; }
.att:hover { border-color: var(--accent); color: var(--ink); }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer { margin-top: 18px; padding: 0; overflow: hidden; }
.composer .textarea { border: 0; box-shadow: none; border-radius: 0; min-height: 110px; background: transparent; padding: 16px 18px; }
.composer .textarea:focus { box-shadow: none; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.composer.internal { background: var(--warn-soft); }
.composer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.dl { display: grid; grid-template-columns: 112px 1fr; gap: 10px 12px; font-size: 13.5px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.stars { display: inline-flex; gap: 4px; }
.stars button { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--line); transition: color .1s, transform .1s; }
.stars button.on { color: var(--accent); }
.stars button:hover { transform: scale(1.12); }

/* suggestion panel */
.suggest-item { display: block; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 13.5px; }
.suggest-item + .suggest-item { margin-top: 8px; }
.suggest-item:hover { border-color: var(--accent); }
.route-card { display: flex; gap: 12px; align-items: flex-start; }
.route-card .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }

.product-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.product-pick label { cursor: pointer; position: relative; }
.product-pick input { position: absolute; opacity: 0; pointer-events: none; }
.product-pick .pp { display: block; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: all .15s; height: 100%; }
.product-pick .pp b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; }
.product-pick .pp span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.product-pick label:hover .pp { border-color: color-mix(in oklab, var(--line) 50%, var(--muted)); }
.product-pick input:checked + .pp { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.product-pick input:focus-visible + .pp { box-shadow: 0 0 0 4px var(--focus); }
.code-tag { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--bg-sunk); color: var(--muted); letter-spacing: .02em; }

.form-section { padding: 24px 26px; }
.form-section + .form-section { border-top: 1px solid var(--line-2); }
.form-section .step { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.form-section .step i { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .field + .field { margin-top: 0; }

/* charts */
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 44px; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-row .track { height: 10px; position: relative; }
.bar-row .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 0 4px 4px 0; }
.bar-row .fill.urgent { background: color-mix(in oklab, var(--accent) 45%, var(--ink)); }
.bar-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.colchart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.colchart .col { flex: 1; display: flex; align-items: flex-end; height: 100%; cursor: default; position: relative; }
.colchart .col i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; transition: opacity .1s; }
.colchart:hover .col i { opacity: .45; } .colchart .col:hover i { opacity: 1; }
.col-labels { display: flex; gap: 4px; margin-top: 6px; } .col-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--faint); white-space: nowrap; overflow: visible; width: 0; }
.tooltip { position: fixed; z-index: 100; pointer-events: none; background: var(--overlay); color: #fff; font-size: 12.5px; padding: 7px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }

/* product admin */
.product-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.member + .member { border-top: 1px solid var(--line-2); }

/* modal + toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(43, 42, 39, .35); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: rise .2s cubic-bezier(.2, .9, .3, 1.2); }
.modal-head { padding: 22px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-body { padding: 18px 24px; }
.modal-foot { padding: 14px 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--overlay); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); animation: rise .25s; max-width: 380px; }
.toast.err { background: var(--crit); color: #fff; }
.toast svg { flex: none; }

.skeleton { background: linear-gradient(90deg, var(--bg-sunk), var(--line-2), var(--bg-sunk)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.fade-in { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* customers */
.org-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-sunk); color: var(--muted); flex: none; border: 1px solid var(--line); }
.org-ico.lg { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.org-product { padding: 16px 20px; }
.org-product + .org-product { border-top: 1px solid var(--line-2); }
.check-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.check-card:hover { border-color: color-mix(in oklab, var(--line) 50%, var(--muted)); }
.check-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check-card input { accent-color: var(--accent); width: 16px; height: 16px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--bg-sunk); color: var(--muted); }
.input-prefix .input { border-radius: 0 10px 10px 0; }

.cred { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cred > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); }
.cred b { font-size: 15px; overflow-wrap: anywhere; text-align: right; }
.cred b.mono { font-size: 17px; letter-spacing: .04em; color: var(--accent-ink); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .two-col { grid-template-columns: 1fr; }
  .rail { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .features, .flow, .sla-table { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .hero-art { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .mobile-bar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 30; }
  .page { padding: 24px 16px 64px; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .features, .flow, .sla-table, .form-grid { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: 1fr 1fr; }
  .topnav a.link { display: none; }
  .hero { padding: 56px 0 48px; }
  .kpi .v { font-size: 28px; }
  .bar-row { grid-template-columns: 96px 1fr 36px; }
  .ticket-head { padding: 20px; }
  .ticket-head .h1 { font-size: 23px; }
  .table .hide-sm { display: none; }
  .form-section { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
