:root {
  --ink:#162828; --muted:#637574; --green:#317757; --green-dark:#245f46;
  --sage:#edf5ef; --blue:#17678f; --line:#d3dfdc; --gold:#ac7116;
}
* { box-sizing:border-box; }
body { min-height:100vh; margin:0; background:#f9fcfb; color:var(--ink); font-family:Arial,Helvetica,sans-serif; }
button,input,select,textarea { font:inherit; } button,a { color:inherit; } a { text-decoration:none; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #17678f44; outline-offset:2px;
}
.shell { min-height:100vh; background:radial-gradient(circle at 82% -10%,#eaf6fb 0,transparent 31rem),#fbfdfc; }
.sidebar {
  position:fixed; inset:0 auto 0 0; z-index:30; width:248px; display:flex; flex-direction:column;
  padding:30px 18px 24px; border-right:1px solid #c9dcd3; background:linear-gradient(180deg,#eaf4ed,#f7fbf8);
}
.brand,.login-brand { display:flex; align-items:center; gap:10px; font-size:17px; font-weight:800; letter-spacing:-.03em; }
.brand { margin:0 10px 30px; }
.brand>span,.login-brand>span {
  display:grid; width:34px; height:34px; place-items:center; border-radius:11px 11px 11px 4px;
  background:var(--green); color:#fff;
}
.sidebar nav { display:grid; gap:7px; }
.nav { display:flex; align-items:center; gap:14px; padding:13px 15px; border-radius:14px; color:#405251; }
.nav>span { width:22px; font-size:23px; line-height:1; text-align:center; }
.nav:hover,.nav.active { background:#ffffffd1; color:var(--green-dark); }
.nav.active { font-weight:750; box-shadow:0 5px 18px #21513d0f; }
.help-note { display:flex; gap:10px; margin-top:auto; padding:14px; border:1px solid #cddfd3; border-radius:14px; background:#ffffff99; }
.help-note>b { display:grid; flex:0 0 auto; width:22px; height:22px; place-items:center; border:1px solid var(--green); border-radius:50%; color:var(--green); }
.help-note div { display:grid; gap:3px; }.help-note strong { font-size:12px; }.help-note span { color:var(--muted); font-size:10px; line-height:1.4; }
.content { min-height:100vh; margin-left:248px; }
.topbar {
  height:74px; display:flex; align-items:center; gap:20px; padding:0 40px; border-bottom:1px solid #d3dfdcbf;
  background:#ffffffbf; backdrop-filter:blur(13px);
}
.search { width:min(390px,42vw); display:flex; align-items:center; gap:8px; padding:10px 13px; border:1px solid var(--line); border-radius:11px; background:#fff; color:#788987; }
.search input { width:100%; padding:0; border:0; outline:0; background:transparent; }
.account { margin-left:auto; display:flex; align-items:center; gap:10px; }
.account>span { display:grid; width:39px; height:39px; place-items:center; border:1px solid #a5c3b2; border-radius:50%; background:var(--sage); color:var(--green); font-weight:800; }
.account div { display:grid; gap:2px; }.account strong { font-size:12px; }.account small { color:var(--muted); font-size:10px; }
.logout { margin:0; }.inner { max-width:1300px; margin:auto; padding:34px 40px 46px; }
.eyebrow,.label { margin:0; color:var(--green); font-size:10px; font-weight:850; letter-spacing:.11em; text-transform:uppercase; }
.welcome,.page-heading,.case-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.welcome h1,.page-heading h1,.case-heading h1,.login-card h1 {
  margin:7px 0 8px; font-size:clamp(31px,3vw,43px); line-height:1.04; letter-spacing:-.045em;
}
.welcome p:last-child,.page-heading p:last-child,.case-heading p:last-child { margin:0; color:var(--muted); font-size:15px; }
.page-heading,.case-heading { margin-bottom:25px; }.case-heading { align-items:center; }
.back { display:inline-block; margin-bottom:17px; color:var(--blue); font-size:12px; font-weight:750; }
.primary,.secondary,.quiet,.text-button,.row-action {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; border:0; border-radius:10px;
  cursor:pointer; font-weight:750; transition:.16s ease;
}
.primary { padding:12px 18px; background:linear-gradient(135deg,#428b68,var(--green)); color:#fff; box-shadow:0 8px 17px #286c4e26; }
.primary:hover { transform:translateY(-1px); background:var(--green-dark); }
.secondary { padding:11px 16px; background:linear-gradient(135deg,#237aa5,#145f88); color:#fff; }
.quiet { padding:9px 12px; background:#eef4f2; color:#48605d; }.text-button { padding:9px 4px; border:0; background:transparent; color:var(--blue); }
.wide { width:100%; }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; margin:29px 0 20px; }
.metric { min-height:102px; display:flex; align-items:center; gap:13px; padding:19px; border:1px solid var(--line); border-radius:15px; background:#ffffffd4; box-shadow:0 5px 18px #1b3d3709; }
.metric-icon { flex:0 0 auto; display:grid; width:48px; height:48px; place-items:center; border-radius:50%; font-size:23px; }
.metric-icon.blue { background:#e7f3fa; color:var(--blue); }.metric-icon.gold { background:#fff2d9; color:var(--gold); }.metric-icon.green { background:#e6f2e9; color:var(--green); }
.metric div { display:grid; gap:4px; }.metric div span { color:#425351; font-size:11px; }.metric strong { font-size:26px; line-height:1; }
.metric strong.blue { color:var(--blue); }.metric strong.gold { color:var(--gold); }.metric strong.green { color:var(--green); }
.recommended {
  position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between; gap:22px;
  padding:23px 26px 23px 32px; border:1px solid #bfd6ca; border-radius:16px; background:linear-gradient(105deg,#f0f8f3,#fbfdfb);
}
.recommended:before { position:absolute; inset:0 auto 0 0; width:7px; background:#57a9cf; content:""; }
.recommended h2 { margin:7px 0; font-size:clamp(23px,2.2vw,31px); letter-spacing:-.035em; }
.recommended p { margin:0; color:#526461; font-size:13px; }.rec-actions { display:flex; align-items:center; gap:18px; }
.today-grid { display:grid; grid-template-columns:minmax(0,1fr) 285px; gap:20px; margin-top:25px; }
.panel-title { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:10px; }
.panel-title h2,.assistant-card h2 { margin:4px 0 0; font-size:21px; letter-spacing:-.03em; }
.case-list,.draft-list { overflow:hidden; border:1px solid var(--line); border-radius:15px; background:#fff; }
.case-row { min-height:66px; display:grid; grid-template-columns:38px minmax(140px,1.15fr) minmax(120px,1fr) minmax(145px,.95fr) auto; align-items:center; gap:12px; padding:10px 15px; border-bottom:1px solid #e2e9e7; }
.case-row:last-child { border-bottom:0; }.case-row:hover,.draft-row:hover { background:#f8fbfa; }
.person-icon { display:grid; width:36px; height:36px; place-items:center; border-radius:50%; background:#eaf5fb; color:var(--blue); font-weight:800; }
.person { display:grid; gap:3px; min-width:0; }.person strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.person small,.case-type { color:var(--muted); font-size:10px; }.case-type { font-size:12px; }
.badges { display:flex; flex-wrap:wrap; gap:5px; }
.status,.priority { display:inline-flex; width:fit-content; padding:6px 9px; border-radius:7px; font-size:10px; font-weight:750; text-transform:capitalize; white-space:nowrap; }
.status-new,.status-needs_review,.priority-high { background:#fff2d8; color:#8b5a0c; }.priority-urgent { background:#fde3e3; color:#923838; }
.status-ready,.status-resolved,.status-admin { background:#e4f1e7; color:#2f6d4a; }
.status-in_progress,.status-waiting_nick { background:#e6f2f9; color:#1c6489; }
.status-waiting_customer,.status-draft,.status-support { background:#f0ebf7; color:#67517f; }
.status-archived,.status-sent { background:#eef2f1; color:#52615f; }
.row-action { padding:8px 10px; background:#eaf4f8; color:var(--blue); font-size:10px; }
.assistant-card { align-self:start; display:flex; flex-direction:column; padding:22px; border:1px solid #bdd8e7; border-radius:16px; background:linear-gradient(145deg,#eff8fd,#fbfdff); }
.spark { display:grid; width:48px; height:48px; place-items:center; margin-bottom:16px; border-radius:50%; background:#fff; color:var(--blue); font-size:24px; }
.assistant-card>p { margin:9px 0 14px; color:#536766; font-size:12px; line-height:1.55; }.assistant-card ul { display:grid; gap:8px; margin:0 0 20px; padding:0; color:#50625f; font-size:10px; list-style:none; }
.filters { display:grid; grid-template-columns:minmax(220px,1.6fr) minmax(160px,.8fr) minmax(160px,.8fr) auto auto; align-items:end; gap:12px; margin-bottom:18px; padding:17px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.filters label,.form-card>label,.form-grid label,.stack label { display:grid; gap:7px; color:#425553; font-size:11px; font-weight:750; }
input,textarea,select { width:100%; padding:11px 12px; border:1px solid #cbdad6; border-radius:9px; outline:0; background:#fff; color:var(--ink); font-weight:400; line-height:1.5; }
input:focus,textarea:focus,select:focus { border-color:#5e9d80; box-shadow:0 0 0 3px #498b691f; } textarea { resize:vertical; }
.form-card,.detail-card,.table-card,.info-card { border:1px solid var(--line); border-radius:16px; background:#fffffff2; box-shadow:0 5px 18px #1b3d3709; }
.form-card { max-width:850px; display:grid; gap:18px; padding:25px; }.form-card footer { display:flex; justify-content:flex-end; gap:10px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.related { display:flex; justify-content:space-between; gap:16px; padding:13px 15px; border-radius:11px; background:#eef6f1; font-size:12px; }
.related span { color:var(--muted); }.related a { color:var(--blue); font-weight:750; }
.detail-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(290px,.75fr); gap:22px; }
.main-column,.side-column { display:grid; align-content:start; gap:20px; }.detail-card { padding:23px; }
.detail-card h2 { margin:5px 0 13px; font-size:21px; letter-spacing:-.03em; }.summary { color:#4c5e5d; font-size:13px; line-height:1.7; }
.guided { display:flex; gap:12px; margin-top:20px; padding:16px; border-left:4px solid #58a7cc; border-radius:0 11px 11px 0; background:#eaf5fb; }
.guided>span,.step { flex:0 0 auto; display:grid; width:27px; height:27px; place-items:center; border-radius:50%; background:var(--blue); color:#fff; font-size:11px; }
.guided p { margin:4px 0 0; color:#526766; font-size:12px; line-height:1.5; }
.safety,.review-note { margin-top:18px; padding:13px; border-radius:11px; background:#fff6e6; color:#79551d; font-size:12px; }
.safety p { margin:4px 0 0; }.review-note { margin-top:0; background:#eef6f1; color:#40614f; }
.stack { display:grid; gap:14px; }.note-form { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }.note-form .secondary { justify-self:end; }
.note { padding:15px 0; border-bottom:1px solid #e3eae8; }.note>div { display:flex; justify-content:space-between; gap:12px; }
.note strong { font-size:12px; }.note time { color:var(--muted); font-size:10px; }.note p { margin:7px 0 0; color:#4c5e5d; font-size:12px; line-height:1.6; }
.metadata { padding:16px 22px; }.metadata dl { margin:0; }.metadata dl div { display:flex; justify-content:space-between; gap:16px; padding:9px 0; border-bottom:1px solid #e7edeb; }
.metadata dl div:last-child { border-bottom:0; }.metadata dt { color:var(--muted); font-size:10px; }.metadata dd { margin:0; font-size:11px; font-weight:750; text-align:right; text-transform:capitalize; }
.draft-row { min-height:62px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid #e4ebe9; }
.draft-row:last-child { border-bottom:0; }.draft-list .draft-row { padding:16px 18px; }.draft-row>span { display:grid; gap:4px; }.draft-row>span:last-child { justify-items:end; }
.draft-row strong { font-size:12px; }.draft-row small { color:var(--muted); font-size:10px; }
.table-card { overflow-x:auto; } table { width:100%; border-collapse:collapse; } th,td { padding:14px 16px; border-bottom:1px solid #e4ebe9; text-align:left; vertical-align:top; }
tr:last-child td { border-bottom:0; } th { color:var(--muted); font-size:10px; letter-spacing:.06em; text-transform:uppercase; } td { font-size:12px; }
td strong,td small { display:block; } td small { margin-top:3px; color:var(--muted); font-size:10px; }
.info-card { margin-top:18px; padding:18px 20px; }.info-card strong { font-size:13px; }.info-card p { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.6; }
.help-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }.help-grid p { color:var(--muted); font-size:12px; line-height:1.6; }
.flash { margin-bottom:20px; padding:13px 15px; border:1px solid; border-radius:11px; font-size:12px; }
.flash.success { border-color:#b8d5c5; background:#edf7f1; color:#285d42; }.flash.error { border-color:#e1b9b9; background:#fff0f0; color:#8f3434; }
.empty { display:grid; place-items:center; gap:7px; padding:42px 20px; color:var(--muted); text-align:center; }.empty strong { color:var(--ink); }.empty span { font-size:11px; }
.empty.small { padding:17px; }.empty.full { min-height:50vh; align-content:center; }
.icon-button { display:grid; width:39px; height:39px; place-items:center; border:0; border-radius:10px; background:#edf4f1; cursor:pointer; }
.menu,.mobile-close,.scrim { display:none; }
.login-body { display:grid; min-height:100vh; place-items:center; padding:24px; background:radial-gradient(circle at 80% 10%,#e4f4fb,transparent 32rem),linear-gradient(145deg,#edf6f0,#fbfdfc); }
.login-card { width:min(460px,100%); padding:34px; border:1px solid #c8dcd2; border-radius:20px; background:#fffffff0; box-shadow:0 24px 70px #1841341f; }
.login-brand { margin-bottom:34px; }.login-brand div { display:grid; gap:3px; }.login-brand small { color:var(--muted); font-size:10px; font-weight:400; }
.login-card>p:not(.eyebrow):not(.security-note) { margin:0 0 22px; color:var(--muted); font-size:13px; line-height:1.6; }
.security-note { margin:22px 0 0; color:var(--muted); font-size:10px; line-height:1.5; text-align:center; }
@media(max-width:1080px) {
  .metrics { grid-template-columns:repeat(2,1fr); }.today-grid { grid-template-columns:1fr; }
  .filters { grid-template-columns:1fr 1fr; }.detail-grid { grid-template-columns:1fr; }
}
@media(max-width:820px) {
  .sidebar { transform:translateX(-105%); box-shadow:14px 0 45px #14332a2e; transition:.2s; }.sidebar.sidebar-open { transform:translateX(0); }
  .mobile-close { position:absolute; top:20px; right:16px; display:grid; }.scrim.visible { position:fixed; inset:0; z-index:25; display:block; border:0; background:#0f262047; }
  .content { margin-left:0; }.topbar { height:68px; padding:0 20px; }.menu { display:grid; }.inner { padding:28px 20px 40px; }.help-grid { grid-template-columns:1fr; }
}
@media(max-width:620px) {
  .search,.account div,.logout { display:none; }.account { margin-left:auto; }
  .welcome,.page-heading,.case-heading { align-items:stretch; flex-direction:column; }.metrics { grid-template-columns:1fr 1fr; gap:10px; }
  .metric { min-height:90px; gap:9px; padding:13px; }.metric-icon { width:40px; height:40px; }
  .recommended { align-items:stretch; flex-direction:column; padding:21px 20px 21px 27px; }.rec-actions { align-items:stretch; flex-direction:column; gap:4px; }
  .case-row { grid-template-columns:36px 1fr auto; }.case-type,.row-action { display:none; }.filters,.form-grid { grid-template-columns:1fr; }
  .form-card { padding:19px; }.form-card footer { align-items:stretch; flex-direction:column-reverse; }.draft-row { align-items:flex-start; }
}
@media(prefers-reduced-motion:reduce) { * { animation-duration:.01ms!important; transition-duration:.01ms!important; } }
