/* LexQuora design system — one source for website, web app, Super Admin and mobile app.
   Brand: LexQuora logo v1, Royal Indigo edition (navy, indigo, saffron). panels.css / site-indigo.css carry the full theme. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&family=Noto+Sans+Tamil:wght@400;500&display=swap');

:root {
  --ink: #0E1330; --ink-2: #171D45; --ink-3: #222A5C; --ink-line: rgba(255,255,255,.1);
  --gold: #F59E0B; --gold-2: #FBBF24; --gold-deep: #D97706; --gold-text: #3730A3; --gold-wash: #EEF0FF;
  --ivory: #F5F6FB; --paper: #F0F2F9; --white: #FFFFFF; --line: #E3E6F0; --line-2: #ECEEF5;
  --stone: #475069; --stone-2: #6B7280; --mist: #C9CDE4;
  --teal: #059669; --teal-text: #047857; --teal-wash: #E6F6EF;
  --red: #E11D48; --red-wash: #FDECEF; --blue-wash: #E6F3FA; --blue-text: #0369A1;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 18px;
  --shadow-1: 0 1px 2px rgba(14,19,48,.06), 0 1px 1px rgba(14,19,48,.04);
  --shadow-2: 0 6px 18px rgba(14,19,48,.08), 0 2px 6px rgba(14,19,48,.05);
  --shadow-3: 0 18px 48px rgba(14,19,48,.18);
  --focus: 0 0 0 3px rgba(79,70,229,.3);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--ivory); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-text); text-decoration: none; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
:lang(ta), .ta { font-family: 'Noto Sans Tamil', var(--font); }
::selection { background: var(--gold-wash); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ---------- Buttons: each kind has one job ---------- */
.btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid transparent; font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s; text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
/* Primary action on light surfaces: ink with gold text */
.btn-primary { background: var(--ink); color: var(--gold); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.btn-primary:hover { color: var(--gold-2); box-shadow: 0 8px 22px rgba(14,19,48,.28); }
/* Hero / conversion action: solid gold with a gentle shine */
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--ink); box-shadow: 0 6px 18px rgba(245,158,11,.35), inset 0 1px 0 rgba(255,255,255,.35); position: relative; overflow: hidden; }
.btn-gold::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn-gold:hover::after { transform: translateX(120%); }
.btn-gold:hover { box-shadow: 0 10px 28px rgba(245,158,11,.5), inset 0 1px 0 rgba(255,255,255,.35); color: var(--ink); }
/* Secondary */
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--ivory); }
/* On dark surfaces */
.btn-light { background: rgba(245,246,251,.06); border-color: rgba(245,246,251,.4); color: var(--ivory); backdrop-filter: blur(6px); }
.btn-light:hover { background: var(--ivory); color: var(--ink); }
/* Quiet */
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(14,19,48,.06); color: var(--ink); }
/* Money and completion */
.btn-teal { background: var(--teal-text); color: #fff; }
.btn-teal:hover { background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(20,150,140,.3); }
.btn-danger { background: transparent; color: var(--red); border-color: #F1C9C4; }
.btn-danger:hover { background: var(--red-wash); color: var(--red); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 34px; min-height: 34px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--gold-text); cursor: pointer; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }
/* Choice pills and segmented control */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font: 500 13px var(--font); cursor: pointer; color: var(--ink); transition: all .15s; }
.pill:hover { border-color: var(--gold); }
.pill.on { background: var(--ink); border-color: var(--ink); color: var(--gold); font-weight: 600; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--line-2); border-radius: 12px; }
.seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font: 500 13px var(--font); color: var(--stone); cursor: pointer; }
.seg button.on { background: var(--white); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.seg.dark { background: var(--ink-2); } .seg.dark button { color: var(--mist); } .seg.dark button.on { background: var(--gold); color: var(--ink); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--stone); font-weight: 500; }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  font: 400 15px var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--focus); }
.field .hint { font-weight: 400; color: var(--stone-2); font-size: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--mist); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s var(--ease); box-shadow: var(--shadow-1); }
.switch input:checked + span { background: var(--teal-text); }
.switch input:checked + span::before { transform: translateX(18px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Surfaces ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card-pad { padding: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 600; }
.card-dark { background: var(--ink); color: var(--ivory); border: 1px solid var(--ink-line); border-radius: var(--radius); }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.kpi .label { font-size: 13px; color: var(--stone); }
.kpi .value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.kpi .sub { font-size: 12px; color: var(--stone-2); }
.kpi::after { content: ''; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: var(--gold-wash); opacity: .7; }
.kpi > * { position: relative; z-index: 1; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #EFEAE0; color: var(--stone); }
.badge.gold { background: var(--gold-wash); color: var(--gold-text); }
.badge.teal { background: var(--teal-wash); color: var(--teal-text); }
.badge.red { background: var(--red-wash); color: var(--red); }
.badge.blue { background: var(--blue-wash); color: var(--blue-text); }
.badge.ink { background: var(--ink); color: var(--gold); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--stone); background: var(--paper); padding: 10px 16px; white-space: nowrap; }
.table td { padding: 12px 16px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.table tr.click { cursor: pointer; transition: background .12s; }
.table tr.click:hover td { background: #FCFAF4; }
.t-strong { font-weight: 600; }
.t-sub { font-size: 12px; color: var(--stone-2); }

/* ---------- App shell (web app + Super Admin) ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: none; background: var(--ink); color: var(--ivory); display: flex; flex-direction: column; padding: 20px 14px; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 4px 8px 6px; }
.sidebar .brand img { height: 34px; width: auto; }
.sidebar .acct { margin: 0 4px; padding: 10px 12px; border: 1px solid var(--ink-line); border-radius: 10px; font-size: 13px; background: var(--ink-2); }
.sidebar .acct b { display: block; color: var(--ivory); font-weight: 600; }
.sidebar .acct span { color: var(--mist); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .group { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8E887A; padding: 12px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #E9E2D2; font-size: 14px; position: relative; transition: background .15s, color .15s; }
.nav a svg { width: 18px; height: 18px; opacity: .8; }
.nav a:hover { background: rgba(245,246,251,.06); color: #fff; }
.nav a.on { background: linear-gradient(90deg, rgba(245,158,11,.22), rgba(245,158,11,.06)); color: var(--gold); font-weight: 600; }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav a.on svg { opacity: 1; }
.nav .count { margin-left: auto; font-size: 11px; background: var(--gold); color: var(--ink); border-radius: 99px; padding: 1px 7px; font-weight: 700; }
.sidebar .foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 32px; background: rgba(245,246,251,.88); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.topbar .search { flex: 1; max-width: 420px; position: relative; }
.topbar .search input { padding-left: 38px; background: var(--white); }
.topbar .search svg { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; color: var(--stone-2); }
.content { padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 24px; max-width: 1360px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-head h1 { font-size: 30px; }
.page-head .eyebrow { font-size: 13px; color: var(--stone); margin-bottom: 4px; }
.menu-btn { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.avatar.ink { background: var(--ink); color: var(--gold); }

/* ---------- Layout helpers ---------- */
.row { display: flex; align-items: center; gap: 12px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.grow { flex: 1; min-width: 0; } .right { margin-left: auto; } .center { text-align: center; }
.muted { color: var(--stone-2); } .small { font-size: 13px; } .tiny { font-size: 12px; } .strong { font-weight: 600; } .red { color: var(--red); } .teal { color: var(--teal-text); } .goldt { color: var(--gold-text); }
.hr { height: 1px; background: var(--line-2); border: 0; margin: 4px 0; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.list-item:first-child { border-top: 0; }
.stack-gap { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 14px; font: 500 14px var(--font); color: var(--stone); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--gold); font-weight: 600; }
.tabs button .n { font-size: 11px; background: var(--line-2); border-radius: 99px; padding: 1px 7px; margin-left: 6px; }

/* ---------- Modal, drawer, toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(14,19,48,.5); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .18s; }
.modal { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: rise .22s var(--ease); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { font-size: 18px; font-weight: 600; flex: 1; }
.modal-body { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--paper); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--ivory); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-3); font-size: 14px; display: flex; gap: 10px; align-items: center; animation: rise .25s var(--ease); pointer-events: auto; max-width: 90vw; }
.toast.ok::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.toast.err::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #F04438; }
@keyframes fade { from { opacity: 0 } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) } }
@keyframes shimmer { 100% { background-position: -200% 0 } }
.skel { background: linear-gradient(90deg, #EFEAE0 25%, #F7F3EA 50%, #EFEAE0 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; min-height: 16px; }

/* ---------- Empty states, notices ---------- */
.empty { padding: 40px 20px; text-align: center; color: var(--stone); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .arch { width: 52px; height: 72px; background: url('/assets/brand/lexquora-symbol.svg') center / contain no-repeat; opacity: .9; }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--gold-wash); color: var(--gold-text); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.notice.teal { background: var(--teal-wash); color: var(--teal-text); } .notice.red { background: var(--red-wash); color: var(--red); } .notice.ink { background: var(--ink); color: var(--ivory); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 26px; display: flex; flex-direction: column; gap: 18px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; }
.tl-item::before { content: ''; position: absolute; left: -24px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--gold); }
.tl-item.done::before { background: var(--teal-text); border-color: var(--teal-text); }

/* ---------- Auth screens ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(1200px 600px at 20% 0%, #2A2418 0%, var(--ink) 60%); color: var(--ivory); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ''; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 540px; border-radius: 210px 210px 0 0; border: 2px solid rgba(245,158,11,.35); }
.auth-art::before { content: ''; position: absolute; right: -80px; bottom: -160px; width: 340px; height: 460px; border-radius: 170px 170px 0 0; background: rgba(245,158,11,.06); }
.auth-art h1 { font-size: 40px; max-width: 520px; color: var(--ivory); }
.auth-art .gold { color: var(--gold); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.otp { display: flex; gap: 8px; } .otp input { width: 48px; height: 54px; text-align: center; font-size: 22px; font-weight: 600; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.otp input:focus { outline: none; border-color: var(--gold); box-shadow: var(--focus); }
.demo-chip { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px dashed var(--mist); border-radius: 12px; background: var(--paper); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, background .15s; width: 100%; }
.demo-chip:hover { border-color: var(--gold); background: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-3); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 12px 16px; } .content { padding: 20px 16px 40px; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .g3 { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .g2, .g4 { grid-template-columns: 1fr; } .page-head h1 { font-size: 24px; } .hide-sm { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* default icon sizing (icons inherit text colour) */
svg:where([aria-hidden="true"]) { width: 18px; height: 18px; flex: none; }
:where(.small, .tiny, .badge) svg:where([aria-hidden="true"]) { width: 14px; height: 14px; vertical-align: -2px; }
:where(.field > .row) svg { width: 15px; height: 15px; }
@media (max-width: 900px) { .sidebar:not(.open) { box-shadow: none; visibility: hidden; } .sidebar.open { visibility: visible; } }
@media (max-width: 600px) { .grid.g4 { grid-template-columns: 1fr 1fr; gap: 12px; } .kpi .value { font-size: 24px; } }
.tealt { color: var(--teal-text); } .goldt { color: var(--gold-text); }
.prose { font-size: 15px; line-height: 1.65; } .prose h2 { font-family: var(--serif); font-size: 22px; margin: 18px 0 8px; } .prose h3 { font-size: 17px; margin: 14px 0 6px; } .prose p { margin: 0 0 12px; } .prose ul { padding-left: 20px; margin: 0 0 12px; }
.card-dark .goldt, .auth-art .goldt, .notice.ink .goldt, .sidebar .goldt { color: var(--gold); }
.switch { display: inline-block; vertical-align: middle; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.switch input:disabled + span { opacity: .55; cursor: not-allowed; }
[hidden] { display: none !important; }

/* ===== v1.1 ===== */
/* type-to-search dropdown */
.combo { position: relative; display: block; }
.combo-box { position: relative; }
.combo-box > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--stone-2); pointer-events: none; }
.combo-box .input { padding-left: 36px; padding-right: 34px; width: 100%; }
.combo-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: var(--line-2); color: var(--stone); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; }
.combo-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(14,19,48,.16); padding: 6px; }
.combo-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-text); padding: 10px 10px 4px; }
.combo-opt { padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.combo-opt small { color: var(--stone-2); font-size: 12px; white-space: nowrap; }
.combo-opt:hover, .combo-opt.on { background: var(--paper); }
.combo-opt.on { box-shadow: inset 3px 0 0 var(--gold); }
.combo-add { color: var(--gold-text); font-weight: 600; border-top: 1px dashed var(--line); margin-top: 4px; }
.combo-empty { padding: 10px; font-size: 13px; color: var(--stone-2); }
.field .combo { font-weight: 400; }

/* WhatsApp & Excel buttons */
.btn-wa { background: #1FA855; color: #fff; border-color: #1FA855; }
.btn-wa:hover { background: #168C46; border-color: #168C46; color: #fff; }
.btn-xl { background: var(--white); color: #146C3A; border: 1px solid #B9DCC5; }
.btn-xl:hover { background: #EEF7F1; }

/* document folders */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.folder { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); cursor: pointer; text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s; }
.folder:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(14,19,48,.08); }
.folder .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #F4EBD6; color: var(--gold-text); flex: none; }
.folder .fi svg { width: 24px; height: 24px; }
.folder b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder span { font-size: 12px; color: var(--stone-2); }
.folder.firm .fi { background: var(--ink); color: var(--gold); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; flex-wrap: wrap; }
.crumbs a { color: var(--stone); } .crumbs b { color: var(--ink); }
.doc-group { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-text); padding: 14px 20px 6px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; }
.doc-group:first-child { border-top: 0; }

/* progress bar */
.prog { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; min-width: 80px; }
.prog > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-deep)); border-radius: 99px; }
.prog.done > i { background: var(--teal); }

/* steps checklist */
.step { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.step:first-child { border-top: 0; }
.step .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; background: var(--paper); border: 1px solid var(--line); color: var(--stone); }
.step.done .num { background: var(--teal); border-color: var(--teal); color: #fff; }
.step.done .t { text-decoration: line-through; text-decoration-color: rgba(14,19,48,.3); color: var(--stone); }

/* bulk import */
.dropzone { border: 2px dashed var(--line); border-radius: 16px; padding: 28px; text-align: center; background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; display: block; }
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: #FBF4E4; }
.imp-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.imp-sum div { border-radius: 12px; padding: 12px; background: var(--paper); border: 1px solid var(--line); }
.imp-sum b { display: block; font-family: var(--serif); font-size: 24px; }
.imp-sum .ok b { color: var(--teal-text); } .imp-sum .bad b { color: var(--red); } .imp-sum .dup b { color: var(--gold-text); }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lang-grid label { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--white); font-size: 14px; }
.lang-grid label:has(input:checked) { border-color: var(--gold); background: #FBF4E4; }
.lang-grid small { color: var(--stone-2); margin-left: auto; }
.wa-preview { background: #E7F5EC; border-radius: 14px; padding: 14px; }
.wa-preview textarea { width: 100%; min-height: 260px; border: 0; background: #fff; border-radius: 10px; padding: 12px; font: 14px/1.5 var(--font); resize: vertical; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.card-pad > h3, .stack-gap > h3 { display: flex; align-items: center; gap: 8px; }
:where(.small, .tiny, .muted, .t-sub, .hint) > svg:where([aria-hidden="true"]) { display: inline-block; vertical-align: -3px; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; }
.stat-row.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .stat-row.four { grid-template-columns: repeat(2, 1fr); } }
h2 > svg:where([aria-hidden="true"]), h3 > svg:where([aria-hidden="true"]) { display: inline-block; vertical-align: -3px; margin-right: 6px; }
/* v1.3 sign-in: keep icons on the same line as their label */
.link-btn { display: inline-flex; align-items: center; gap: 4px; } .link-btn svg { width: 16px; height: 16px; flex: none; }
.auth-box .eyebrow { display: inline-flex; align-items: center; gap: 6px; } .auth-box .eyebrow svg { width: 16px; height: 16px; flex: none; }
.req { color: var(--red); font-weight: 700; }
/* v1.6: a click outside a box nudges it instead of closing it */
@keyframes nudge { 0%, 100% { transform: rotate(0) translateX(0); } 20% { transform: rotate(-1.2deg) translateX(-6px); } 40% { transform: rotate(1.2deg) translateX(6px); } 60% { transform: rotate(-.8deg) translateX(-4px); } 80% { transform: rotate(.6deg) translateX(3px); } }
.modal.nudge { animation: nudge .45s ease; }
.modal .nudge-hint { box-shadow: 0 0 0 3px rgba(79,70,229,.35); transition: box-shadow .2s; }
@media (prefers-reduced-motion: reduce) { .modal.nudge { animation: none; outline: 3px solid rgba(79,70,229,.35); } }
/* v1.6: search + drop-down boxes; full names */
.combo-box .input { padding-right: 62px; text-overflow: ellipsis; }
.combo-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--stone-2); display: grid; place-items: center; cursor: pointer; }
.combo-toggle svg { width: 16px; height: 16px; transition: transform .15s; } .combo-toggle:hover { background: var(--paper); color: var(--fg, var(--ink)); }
.combo.open .combo-toggle svg { transform: rotate(180deg); }
.combo-clear { right: 36px; }
.combo-list { z-index: 400; box-shadow: var(--shadow-3); }
.combo-opt { flex-direction: column; align-items: flex-start; gap: 2px; }
.combo-opt .t { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.combo-opt small { white-space: normal; }
.combo-opt.sel .t { font-weight: 700; } .combo-opt.sel::after { content: '✓'; position: absolute; right: 12px; color: var(--accent, var(--gold-text)); font-weight: 700; }
.combo-opt { position: relative; padding-right: 30px; } .combo-opt.dis { opacity: .45; pointer-events: none; }
.combo-detail { margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line-2); font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.combo-detail b { font-weight: 700; overflow-wrap: anywhere; } .combo-detail span { color: var(--stone-2); font-size: 12px; }
.sel-combo .combo-box .input { padding-left: 14px; padding-right: 36px; cursor: pointer; }
.sel-combo .combo-box .input:focus { cursor: text; }
.sel-combo.is-disabled { opacity: .6; } .sel-combo.is-disabled .combo-toggle { pointer-events: none; }
.sel-hidden { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; min-width: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; }
.field .sel-combo, .field .combo { font-weight: 400; }
/* v1.6: keep "*" and "(optional)" on the same line as the field name */
.field > .req, .field > .hint, .field > .muted:not(div) { display: contents; }
