/* ===== Garne CRM — design tokens ===== */
:root{
  --paper:#FFFFFF;
  --sky:#F2F6FC;
  --sky-deep:#E6EEFB;
  --sky-line:#E2E8F3;
  --ink:#0B1626;
  --ink-soft:#33415A;
  --ink-invert:#0B1626; /* always-dark surface (tooltips/toasts) — deliberately NOT overridden in dark theme, since white text on it must stay readable in both themes */
  --slate:#5C6B85;
  --slate-2:#8592AA;
  --visa:#1E43D6;
  --visa-ink:#15308F;
  --visa-soft:#EAF0FD;
  --stamp:#D64526;
  --stamp-soft:#FCEAE4;
  --good:#1B8A5A;
  --good-soft:#E6F5EE;
  --amber:#B7791F;
  --amber-soft:#FCF3DF;
  --radius-lg:18px;
  --radius-md:12px;
  --radius-sm:8px;
  --shadow-card:0 1px 2px rgba(11,22,38,.04), 0 1px 1px rgba(11,22,38,.03);
  --shadow-pop:0 12px 32px rgba(11,22,38,.14), 0 2px 8px rgba(11,22,38,.08);
  --font-display:'Space Grotesk', 'Inter', sans-serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'IBM Plex Mono', monospace;
}

/* Dark theme — same token names, dark values, toggled via [data-theme="dark"] on <html>
   (see setTheme() in store.js). Every component already reads colors through var(--token),
   so this single block re-themes the whole app with no per-component changes needed. */
:root[data-theme="dark"]{
  --paper:#141A24;
  --sky:#1B222E;
  --sky-deep:#222A38;
  --sky-line:#2B3444;
  --ink:#ECF1F8;
  --ink-soft:#B9C3D6;
  --slate:#8B96AC;
  --slate-2:#6B7690;
  --visa:#5578F0;
  --visa-ink:#AFC0FA;
  --visa-soft:#1E2A47;
  --stamp:#E8593A;
  --stamp-soft:#3A2420;
  --good:#33B37B;
  --good-soft:#1B3428;
  --amber:#D99A3D;
  --amber-soft:#3A2E14;
  --shadow-card:0 1px 2px rgba(0,0,0,.3), 0 1px 1px rgba(0,0,0,.2);
  --shadow-pop:0 12px 32px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
svg{width:1em; height:1em; flex-shrink:0; display:inline-block;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  -webkit-font-smoothing:antialiased;
  font-size:14px;
  line-height:1.5;
}
h1,h2,h3,h4{font-family:var(--font-display); color:var(--ink); margin:0; letter-spacing:-0.01em;}
::selection{background:var(--visa-soft); color:var(--visa-ink);}
a{color:inherit;}
button{font-family:inherit;}

::-webkit-scrollbar{width:10px; height:10px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:var(--sky-line); border-radius:8px; border:2px solid var(--paper);}
::-webkit-scrollbar-thumb:hover{background:var(--slate-2);}

.mono{font-family:var(--font-mono);}

/* ===== App shell ===== */
.shell{display:flex; height:100vh; overflow:hidden;}

.rail{
  width:76px;
  background:var(--paper);
  border-right:1px solid var(--sky-line);
  display:flex; flex-direction:column; align-items:center;
  padding:18px 0 14px;
  flex-shrink:0;
  z-index:20;
}
.rail-logo{
  width:40px; height:40px; border-radius:12px;
  background:linear-gradient(135deg, var(--visa), var(--visa-ink));
  display:flex; align-items:center; justify-content:center;
  color:white; font-family:var(--font-display); font-weight:700; font-size:15px;
  margin-bottom:22px;
  box-shadow:0 4px 10px rgba(30,67,214,.25);
}
.rail-logo svg{width:23px; height:23px;}
.rail-nav{display:flex; flex-direction:column; gap:4px; flex:1; width:100%; align-items:center;}
.rail-item{
  width:52px; height:52px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  color:var(--slate); cursor:pointer; position:relative;
  transition:background .15s ease, color .15s ease;
  border:none; background:none;
}
.rail-item svg{width:22px; height:22px; stroke-width:2.3;}
.rail-item:hover{background:var(--sky); color:var(--ink);}
.rail-item.active{background:var(--visa-soft); color:var(--visa);}
.rail-item .dot{
  position:absolute; top:9px; right:10px;
  width:8px; height:8px; border-radius:50%;
  background:var(--stamp); border:2px solid var(--paper);
}
.rail-tip{
  position:fixed; left:70px; background:var(--ink-invert); color:white;
  font-size:12px; padding:6px 10px; border-radius:8px; white-space:nowrap;
  pointer-events:none; z-index:100; font-weight:500;
  box-shadow:var(--shadow-pop);
}

.main{flex:1; display:flex; flex-direction:column; min-width:0; background:var(--sky); }

.topbar{
  height:64px; flex-shrink:0; background:var(--paper); border-bottom:1px solid var(--sky-line);
  display:flex; align-items:center; gap:16px; padding:0 24px;
}
.search-box{
  flex:1; max-width:420px; height:38px; background:var(--sky); border-radius:10px;
  display:flex; align-items:center; gap:8px; padding:0 12px; color:var(--slate-2);
}
.search-box input{border:none; background:none; outline:none; font-size:13.5px; color:var(--ink); width:100%; font-family:var(--font-body);}
.search-box svg{width:16px; height:16px; flex-shrink:0;}

.topbar-spacer{flex:1;}

.role-switch{
  display:flex; align-items:center; gap:6px; background:var(--sky); border-radius:10px; padding:4px; font-size:12.5px;
}
.role-switch button{
  border:none; background:none; padding:6px 10px; border-radius:7px; cursor:pointer; color:var(--slate); font-weight:600;
  font-family:var(--font-body);
}
.role-switch button.active{background:var(--paper); color:var(--visa); box-shadow:var(--shadow-card);}

.icon-btn{
  width:38px; height:38px; border-radius:10px; border:none; background:var(--sky);
  display:flex; align-items:center; justify-content:center; color:var(--ink-soft); cursor:pointer; position:relative;
  transition:background .15s, transform .1s ease;
}
.icon-btn:hover{background:var(--sky-deep);}
.icon-btn:active{transform:scale(.92);}
.icon-btn svg{width:17px; height:17px;}
.badge-count{
  position:absolute; top:-4px; right:-4px; min-width:17px; height:17px; border-radius:9px;
  background:var(--stamp); color:white; font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center;
  padding:0 4px; border:2px solid var(--paper); font-family:var(--font-body);
}

.avatar{
  width:41px; height:41px; border-radius:12px; background:var(--visa-soft); color:var(--visa-ink);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:15px; font-family:var(--font-display);
  flex-shrink:0;
}
.avatar.sm{width:30px; height:30px; font-size:12px; border-radius:8px;}
.avatar.lg{width:64px; height:64px; font-size:21px; border-radius:16px;}

.user-chip{display:flex; align-items:center; gap:10px; cursor:pointer; padding:4px 6px 4px 4px; border-radius:10px;}
.user-chip:hover{background:var(--sky);}
.user-chip .name{font-size:13px; font-weight:600; color:var(--ink);}
.user-chip .role{font-size:11.5px; color:var(--slate);}

.view{flex:1; overflow-y:auto; padding:28px 32px 60px;}

/* ===== Page header ===== */
.page-head{margin-bottom:24px;}
.page-head h1{font-size:24px; font-weight:700;}
.page-head p{color:var(--slate); font-size:13.5px; margin-top:4px;}
.eyebrow{
  font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--visa);
  margin-bottom:6px; display:block;
}

/* ===== Cards / surfaces ===== */
.card{
  background:var(--paper); border:1px solid var(--sky-line); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-card);
}
.pad-lg{padding:24px;}
.pad-md{padding:18px;}

/* ===== Stat tiles ===== */
.stat-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:24px;}
.stat-tile{
  background:var(--paper); border:1px solid var(--sky-line); border-radius:var(--radius-lg);
  padding:18px 20px; display:flex; flex-direction:column; gap:10px; transition:border-color .15s, box-shadow .15s, transform .15s;
}
.stat-tile[style*="cursor:pointer"]:hover{border-color:var(--visa); box-shadow:var(--shadow-card); transform:translateY(-1px);}
.stat-tile .top{display:flex; align-items:center; justify-content:space-between;}
.stat-tile .icon{width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center;}
.stat-tile .icon svg{width:17px; height:17px;}
.stat-tile .num{font-family:var(--font-display); font-size:30px; font-weight:700; line-height:1;}
.stat-tile .label{color:var(--slate); font-size:12.5px; font-weight:500;}
.stat-tile .trend{font-size:11.5px; font-weight:600; padding:2px 7px; border-radius:6px;}

/* ===== Stamp rail — signature component ===== */
.stamp-rail{display:flex; align-items:flex-start; overflow-x:auto; overflow-y:hidden; padding-bottom:2px;}
.stamp-node{display:flex; flex-direction:column; align-items:center; position:relative; flex:1 1 0; min-width:72px;}
.stamp-ring{
  width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  border:2px solid var(--sky-line); background:var(--paper); color:var(--slate-2); font-size:12px; font-weight:700;
  font-family:var(--font-mono); flex-shrink:0; z-index:2; transition:all .2s;
}
.stamp-node.done .stamp-ring{
  border-color:var(--visa); background:var(--visa); color:white;
  box-shadow:0 0 0 3px var(--visa-soft);
}
.stamp-node.current .stamp-ring{
  border:2.5px solid var(--stamp); background:var(--stamp-soft); color:var(--stamp);
  box-shadow:0 0 0 4px var(--stamp-soft);
  transform:rotate(-6deg);
}
.stamp-node .line{
  position:absolute; top:17px; left:50%; width:100%; height:2px; background:var(--sky-line); z-index:1;
}
.stamp-node.done .line{background:var(--visa);}
.stamp-node:last-child .line{display:none;}
.stamp-label{margin-top:8px; font-size:10.5px; text-align:center; color:var(--slate); font-weight:600; white-space:nowrap; line-height:1.25; padding:0 2px;}
.stamp-node.current .stamp-label{color:var(--stamp);}
.stamp-node.done .stamp-label{color:var(--ink-soft);}

/* compact inline stamp rail for headers */
.stamp-rail.compact .stamp-ring{width:24px; height:24px; font-size:10px;}
.stamp-rail.compact .stamp-node{min-width:26px;}
.stamp-rail.compact .stamp-node .line{top:11px;}
.stamp-rail.compact .stamp-label{display:none;}

/* ===== Buttons ===== */
.btn{
  display:inline-flex; align-items:center; gap:7px; font-weight:600; font-size:13px; border-radius:10px;
  padding:9px 15px; cursor:pointer; border:1px solid transparent; font-family:var(--font-body); transition:all .12s;
  white-space:nowrap;
}
.btn:active:not(:disabled){transform:scale(.97);}
.btn svg{width:15px; height:15px;}
.btn-primary{background:var(--visa); color:white;}
.btn-primary:hover{background:var(--visa-ink);}
.btn-ghost{background:var(--sky); color:var(--ink-soft);}
.btn-ghost:hover{background:var(--sky-deep);}
.btn-outline{background:var(--paper); color:var(--ink-soft); border-color:var(--sky-line);}
.btn-outline:hover{border-color:var(--slate-2);}
.btn-danger{background:var(--stamp-soft); color:var(--stamp);}
.btn-danger:hover{filter:brightness(.93);}
.btn-sm{padding:6px 11px; font-size:12px; border-radius:8px;}
.btn:disabled{opacity:.45; cursor:not-allowed;}

/* ===== Badges / pills ===== */
.pill{display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; padding:3px 9px; border-radius:99px; letter-spacing:.02em; white-space:nowrap;}
.pill svg{width:11px; height:11px; flex-shrink:0;}
.pill-visa{background:var(--visa-soft); color:var(--visa-ink);}
.pill-good{background:var(--good-soft); color:var(--good);}
.pill-amber{background:var(--amber-soft); color:var(--amber);}
.pill-stamp{background:var(--stamp-soft); color:var(--stamp);}
.pill-slate{background:var(--sky); color:var(--slate);}
.pill-test{background:transparent; color:var(--slate-2); border:1px solid var(--sky-line); font-size:9px; font-weight:600; padding:1px 6px;}

/* ===== Kanban ===== */
.kanban{display:flex; gap:16px; overflow-x:auto; padding-bottom:8px; align-items:flex-start;}
.kanban-col{
  width:272px; flex-shrink:0; background:var(--sky); border-radius:var(--radius-lg); padding:12px; border:1px solid var(--sky-line);
}
.kanban-col-head{padding:6px 6px 12px; display:flex; align-items:center; gap:10px;}
.kanban-col-head .stamp-ring{width:28px; height:28px; font-size:11px;}
.kanban-col-title{font-size:12.5px; font-weight:700; color:var(--ink-soft); flex:1; line-height:1.25;}
.kanban-col-count{font-family:var(--font-mono); font-size:11px; color:var(--slate); background:var(--paper); border-radius:6px; padding:2px 6px; border:1px solid var(--sky-line);}
.kanban-list{min-height:40px; display:flex; flex-direction:column; gap:10px;}
.kanban-card{
  background:var(--paper); border:1px solid var(--sky-line); border-radius:var(--radius-md); padding:13px 14px;
  cursor:grab; box-shadow:var(--shadow-card); transition:box-shadow .15s, transform .15s;
}
.kanban-card:hover{box-shadow:var(--shadow-pop); transform:translateY(-1px);}
.kanban-card.sortable-ghost{opacity:.35;}
.kanban-card.sortable-drag{box-shadow:var(--shadow-pop); cursor:grabbing;}
.kanban-card-top{display:flex; align-items:center; gap:8px; margin-bottom:9px;}
.kanban-card-name{font-weight:600; font-size:13px; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.kanban-card-meta{display:flex; align-items:center; justify-content:space-between; margin-top:10px;}
.kanban-card-assignees{display:flex;}
.kanban-card-assignees .avatar{margin-left:-6px; border:2px solid var(--paper); box-shadow:0 0 0 1px rgba(11,22,38,.06);}
.kanban-card-assignees .avatar:first-child{margin-left:0;}

/* ===== Tabs ===== */
.tabbar{display:flex; gap:4px; border-bottom:1px solid var(--sky-line); margin-bottom:22px; overflow-x:auto;}
.tab{
  padding:11px 4px; margin-right:13px; font-size:12.5px; font-weight:600; color:var(--slate); cursor:pointer;
  border-bottom:2.5px solid transparent; white-space:nowrap; display:flex; align-items:center; gap:5px;
  transition:color .15s ease, border-color .15s ease;
}
.tab:hover{color:var(--ink);}
.tab.active{color:var(--visa); border-color:var(--visa);}
.tab .lock{width:12px; height:12px; opacity:.5;}

/* ===== Tables / rows ===== */
.row-list{display:flex; flex-direction:column;}
.row-item{display:flex; align-items:center; gap:14px; padding:13px 4px; border-bottom:1px solid var(--sky-line); border-radius:8px; transition:background .12s ease;}
.row-item:last-child{border-bottom:none;}
.row-item[style*="cursor:pointer"]:hover{background:var(--sky);}

/* ===== Data table (list view) ===== */
.data-table{width:100%; border-collapse:collapse; font-size:12.5px;}
.data-table th{text-align:left; padding:10px 14px; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--slate); border-bottom:1px solid var(--sky-line); white-space:nowrap;}
.data-table td{padding:12px 14px; border-bottom:1px solid var(--sky-line); vertical-align:middle;}
.data-table tbody tr{cursor:pointer; transition:background .12s;}
.data-table tbody tr:hover{background:var(--sky);}
.data-table tbody tr:last-child td{border-bottom:none;}
.deadline-chip{display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:700; padding:3px 10px; border-radius:99px; white-space:nowrap;}
.stack-avatars{display:flex; align-items:center;}
.stack-avatars .avatar{margin-left:-8px; border:2px solid var(--paper); box-shadow:0 0 0 1px rgba(11,22,38,.06);}
.stack-avatars .avatar:first-child{margin-left:0;}

/* ===== Empty states ===== */
.empty{text-align:center; padding:50px 20px; color:var(--slate);}
.empty svg{width:38px; height:38px; color:var(--slate-2); margin-bottom:12px;}
.empty h3{font-size:14.5px; color:var(--ink-soft); margin-bottom:5px;}
.empty p{font-size:12.5px;}

/* ===== Notification popover ===== */
.pop{
  position:absolute; top:52px; right:0; width:360px; background:var(--paper); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-pop); border:1px solid var(--sky-line); z-index:200; overflow:hidden;
  transform-origin:top right; animation:popdown .14s cubic-bezier(.16,1,.3,1);
}
@keyframes popdown{from{transform:scale(.95) translateY(-4px); opacity:0;} to{transform:scale(1) translateY(0); opacity:1;}}
.pop-head{padding:14px 16px; border-bottom:1px solid var(--sky-line); font-weight:700; font-size:13.5px; display:flex; justify-content:space-between; align-items:center;}
.pop-list{max-height:400px; overflow-y:auto;}
.pop-item{padding:12px 16px; display:flex; gap:11px; border-bottom:1px solid var(--sky-line); cursor:pointer;}
.pop-item:hover{background:var(--sky);}
.pop-item .dot-icon{width:32px; height:32px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.pop-item .dot-icon svg{width:15px; height:15px;}
.pop-item .txt{font-size:12.5px; line-height:1.4;}
.pop-item .txt b{font-weight:700;}
.pop-item .time{font-size:11px; color:var(--slate-2); margin-top:3px;}
.pop-item.unread{background:var(--visa-soft)}
.pop-item.unread:hover{background:var(--sky-deep)}

/* ===== Modal / drawer ===== */
.overlay{position:fixed; inset:0; background:rgba(11,22,38,.42); z-index:300; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(2px); animation:overlayin .16s ease;}
@keyframes overlayin{from{opacity:0;} to{opacity:1;}}
.drawer{position:fixed; top:0; right:0; bottom:0; width:66.6667vw; max-width:1100px; min-width:480px; background:var(--paper); z-index:301; box-shadow:var(--shadow-pop); display:flex; flex-direction:column; animation:slidein .22s cubic-bezier(.16,1,.3,1);}
@keyframes slidein{from{transform:translateX(24px); opacity:0;} to{transform:translateX(0); opacity:1;}}
.modal{width:480px; max-width:92vw; background:var(--paper); border-radius:var(--radius-lg); box-shadow:var(--shadow-pop); animation:popin .16s cubic-bezier(.16,1,.3,1);}
@keyframes popin{from{transform:scale(.96); opacity:0;} to{transform:scale(1); opacity:1;}}
.drawer-head{padding:20px 22px; border-bottom:1px solid var(--sky-line); display:flex; align-items:center; justify-content:space-between;}
.drawer-body{padding:22px; overflow-y:auto; flex:1;}
.drawer-foot{padding:16px 22px; border-top:1px solid var(--sky-line); display:flex; gap:10px; justify-content:flex-end;}

.field{margin-bottom:16px;}
.field label{display:block; font-size:12.5px; font-weight:600; color:var(--ink-soft); margin-bottom:6px;}
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea{
  width:100%; border:1px solid var(--sky-line); background:var(--sky); border-radius:10px; padding:10px 12px;
  font-size:13.5px; font-family:var(--font-body); color:var(--ink); outline:none; transition:border-color .12s;
}
.field input[type="checkbox"], .field input[type="radio"]{width:auto; flex-shrink:0;}
.field input:focus, .field select:focus, .field textarea:focus{border-color:var(--visa); background:var(--paper);}
.field textarea{resize:vertical; min-height:70px;}

/* ===== Evidence cards ===== */
.evidence-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:12px;}
.evidence-card{border:1px solid var(--sky-line); border-radius:var(--radius-md); padding:14px 16px; display:flex; gap:12px; align-items:flex-start; transition:background .15s, border-color .15s;}
.evidence-card .ic{width:36px; height:36px; border-radius:10px; background:var(--sky); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.evidence-card .ic svg{width:17px; height:17px; color:var(--slate);}
.evidence-card.filled{background:var(--good-soft); border-color:var(--good);}
.evidence-card.filled .ic{background:var(--paper);}
.evidence-card.filled .ic svg{color:var(--good);}
.evidence-card.not-planned{opacity:.5; filter:grayscale(.6);}
.evidence-card h4{font-size:13px; font-weight:700; margin-bottom:3px;}
.evidence-card p{font-size:11.5px; color:var(--slate);}
.evidence-links{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px;}
.link-chip{display:inline-flex; align-items:center; gap:5px; background:var(--sky); border-radius:7px; padding:4px 9px; font-size:11px; font-weight:600; color:var(--ink-soft);}
.link-chip svg{width:11px; height:11px;}

/* ===== Skeleton / loading ===== */
.skel{background:linear-gradient(90deg, var(--sky) 25%, var(--sky-deep) 37%, var(--sky) 63%); background-size:400% 100%; animation:shimmer 1.3s ease infinite; border-radius:8px;}
@keyframes shimmer{0%{background-position:100% 0;} 100%{background-position:0 0;}}

/* ===== Toast ===== */
.toast-wrap{position:fixed; bottom:22px; right:22px; z-index:500; display:flex; flex-direction:column; gap:8px;}
.toast{background:var(--ink-invert); color:white; padding:12px 16px; border-radius:11px; font-size:13px; font-weight:500; box-shadow:var(--shadow-pop); display:flex; align-items:center; gap:9px; animation:toastin .2s ease;}
.toast svg{width:15px; height:15px; color:#8FE3B8; flex-shrink:0;}
@keyframes toastin{from{transform:translateY(8px); opacity:0;} to{transform:translateY(0); opacity:1;}}

/* ===== misc ===== */
.divider{height:1px; background:var(--sky-line); margin:18px 0;}
.hint{font-size:11.5px; color:var(--slate-2);}
/* Client card: slightly larger, darker secondary text for readability. */
.client-card-view .hint{font-size:13px; color:var(--ink);}
.client-card-view .section-title{font-size:14.5px;}
.section-title{font-size:13.5px; font-weight:700; margin-bottom:12px; color:var(--ink);}
.flex-between{display:flex; align-items:center; justify-content:space-between;}
.locked-panel{display:flex; flex-direction:column; align-items:center; justify-content:center; padding:60px 20px; color:var(--slate); text-align:center;}
.locked-panel svg{width:32px; height:32px; margin-bottom:10px; color:var(--slate-2);}

@media (max-width: 980px){
  .stat-grid{grid-template-columns:repeat(2,1fr);}
  .evidence-grid{grid-template-columns:1fr;}
}

/* ===== Login screen ===== */
.login-screen{min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--sky); padding:20px;}
.login-card{width:100%; max-width:380px; background:var(--paper); border:1px solid var(--sky-line); border-radius:var(--radius-lg); box-shadow:var(--shadow-pop); padding:36px 32px; text-align:center;}
.login-title{font-family:var(--font-display); font-size:22px; font-weight:700; margin-bottom:4px;}
.login-sub{font-size:12.5px; color:var(--slate); margin-bottom:24px;}
.login-card .field{text-align:left; margin-bottom:14px;}
.login-error{color:var(--stamp); font-size:12px; font-weight:600; text-align:left; margin-top:-4px; margin-bottom:10px;}

/* ===== Client-facing share view ===== */
.share-screen{min-height:100vh; background:var(--sky); padding:40px 20px;}
.share-wrap{max-width:640px; margin:0 auto;}
.share-progress-track{height:12px; background:var(--sky-deep); border-radius:99px; overflow:hidden; margin:14px 0 6px;}
.share-progress-fill{height:100%; background:linear-gradient(90deg, var(--visa), var(--good)); border-radius:99px; transition:width .4s ease;}

/* ===== Client brief quiz (ClientView.js) — dedicated sky-blue palette, always light: this
   page is shown to anonymous clients, not staff, so it doesn't follow the app's dark toggle. ===== */
.brief-shell{min-height:100vh; background:linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%); padding-bottom:40px;}
.brief-header{background:rgba(255,255,255,.95); backdrop-filter:blur(12px); border-bottom:1px solid #e2e8f0; padding:16px 20px; position:sticky; top:0; z-index:20; box-shadow:0 2px 12px rgba(0,0,0,.06);}
.brief-header-inner{max-width:640px; margin:0 auto;}
.brief-header-top{display:flex; align-items:center; gap:10px; margin-bottom:12px;}
.brief-eyebrow{font-size:11px; color:#94a3b8; font-weight:700; letter-spacing:.1em; text-transform:uppercase;}
.brief-title{font-size:16px; font-weight:800; color:#1e293b;}
.brief-progress-wrap{display:flex; align-items:center; gap:12px;}
.brief-progress-track{flex:1; height:6px; background:#e2e8f0; border-radius:99px; overflow:hidden;}
.brief-progress-fill{height:100%; background:linear-gradient(90deg, #0ea5e9, #0284c7); border-radius:99px; transition:width .4s ease;}
.brief-progress-pct{font-size:12px; font-weight:700; color:#0ea5e9; min-width:36px; text-align:right;}
.brief-body{max-width:640px; margin:0 auto; padding:28px 20px 0;}
.brief-intro{font-size:12.5px; color:#64748b; margin-bottom:16px; text-align:center;}
.brief-card{background:#fff; border-radius:24px; padding:28px; box-shadow:0 2px 16px rgba(0,0,0,.05);}
.brief-section-title{font-size:13px; font-weight:800; color:#64748b; letter-spacing:.04em; text-transform:uppercase; display:flex; align-items:center; gap:10px;}
.brief-section-title::before{content:''; display:inline-block; width:4px; height:16px; border-radius:99px; background:linear-gradient(180deg, #0ea5e9, #0284c7); flex-shrink:0;}
.brief-question{font-size:17px; font-weight:700; line-height:1.45; color:#1e293b; white-space:pre-line; margin-top:18px;}
.brief-hint{font-size:13px; color:#64748b; line-height:1.55; white-space:pre-line; margin-top:12px; background:#f0f9ff; border:1px solid #e0f2fe; border-radius:12px; padding:12px 14px;}
.brief-textarea{width:100%; margin-top:18px; padding:14px 16px; border-radius:12px; border:1.5px solid #e2e8f0; background:#fff; color:#1e293b; font-size:14px; font-family:inherit; line-height:1.5; outline:none; resize:vertical; transition:border-color .15s, box-shadow .15s;}
.brief-textarea:focus{border-color:#0ea5e9; box-shadow:0 0 0 3px rgba(14,165,233,.12);}
.brief-textarea:disabled{background:#f1f5f9; color:#94a3b8; cursor:not-allowed;}
.brief-nav{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:22px;}
.brief-btn-next{padding:13px 26px; background:linear-gradient(135deg, #0ea5e9, #0284c7); color:#fff; border:none; border-radius:14px; font-size:14px; font-weight:800; cursor:pointer; box-shadow:0 8px 20px rgba(14,165,233,.35); font-family:inherit; transition:transform .15s, box-shadow .15s;}
.brief-btn-next:hover{transform:translateY(-1px); box-shadow:0 10px 24px rgba(14,165,233,.4);}
.brief-btn-back{padding:13px 22px; background:#fff; color:#64748b; border:2px solid #e2e8f0; border-radius:14px; font-size:14px; font-weight:700; cursor:pointer; font-family:inherit;}
.brief-btn-back:hover{background:#f8fafc;}
.brief-btn-back:disabled{opacity:.4; cursor:not-allowed;}
.brief-cta{background:#fff; border-radius:20px; padding:22px 24px; box-shadow:0 2px 16px rgba(14,165,233,.1); border:1px solid #e0f2fe;}
.brief-cta-btn{padding:11px 20px; background:linear-gradient(135deg, #0ea5e9, #0284c7); color:#fff; border:none; border-radius:12px; font-size:13.5px; font-weight:700; cursor:pointer; white-space:nowrap; font-family:inherit; box-shadow:0 6px 16px rgba(14,165,233,.3);}
.brief-success{display:flex; align-items:center; justify-content:center; min-height:70vh; padding:20px;}
.brief-success-card{background:#fff; border-radius:28px; padding:48px 36px; max-width:420px; width:100%; text-align:center; box-shadow:0 20px 60px rgba(14,165,233,.15);}
.brief-success-icon{font-size:52px; margin-bottom:14px;}
.brief-success-card h2{font-size:20px; font-weight:800; color:#1e293b; margin-bottom:8px;}
.brief-success-card p{color:#64748b; font-size:13.5px; margin-bottom:0;}
.brief-na{display:flex; align-items:center; gap:9px; margin-top:16px; padding:10px 14px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; font-size:13.5px; color:#475569; cursor:pointer; user-select:none;}
.brief-na input{width:16px; height:16px; accent-color:#0ea5e9; flex-shrink:0; cursor:pointer;}
.brief-jump-link{background:none; border:none; color:#0284c7; font-size:12.5px; font-weight:700; cursor:pointer; font-family:inherit; padding:6px 4px; white-space:nowrap;}
.brief-jump-link:hover{text-decoration:underline;}
.brief-review-item{display:flex; align-items:flex-start; gap:14px; padding:16px 0; border-bottom:1px solid #e2e8f0;}
.brief-review-item:last-child{border-bottom:none;}
.brief-review-q{font-weight:700; font-size:13.5px; color:#1e293b; white-space:pre-line;}
.brief-review-a{margin-top:5px; font-size:13px; color:#475569; white-space:pre-line;}
.brief-review-a.empty{color:#94a3b8; font-style:italic;}
.brief-review-edit{flex-shrink:0; padding:7px 14px; background:#fff; border:1.5px solid #e2e8f0; border-radius:9px; font-size:12.5px; font-weight:700; color:#0284c7; cursor:pointer; font-family:inherit; white-space:nowrap;}
.brief-review-edit:hover{border-color:#0ea5e9; background:#f0f9ff;}

/* ===== Loading — hourglass ===== */
.hourglass-wrap{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;}
.hourglass-wrap .hourglass-label{font-size:12.5px; color:var(--slate); letter-spacing:.02em;}
.hourglass-loader{font-size:40px; line-height:1; animation:hourglassFlip 1.8s ease-in-out infinite;}
.hourglass-loader.sm{font-size:22px;}
@keyframes hourglassFlip{
  0%, 100%{ transform:rotate(0deg); }
  50%{ transform:rotate(180deg); }
}
.maintenance-overlay{position:fixed; inset:0; z-index:9999; display:flex; align-items:center; justify-content:center; background:rgba(11,22,38,.45); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); text-align:center; padding:20px;}
.maintenance-overlay .hourglass-wrap{background:var(--paper); padding:36px 40px; border-radius:var(--radius-lg); box-shadow:var(--shadow-pop); max-width:340px;}
.maintenance-overlay .hourglass-label{font-size:13.5px; font-weight:600; color:var(--ink-soft); line-height:1.5;}
