/* Handbook Portal v2: consultant app, in the Handbook Portal brand (navy, pink, gold). */
:root {
  --ink: #0F2340; --ink-2: #33415C; --ink-3: #64708A; --ink-4: #98A1B3;
  --line: #E2E8F0; --line-2: #EEF2F6; --bg: #F6F7FB; --panel: #FFFFFF;
  /* Handbook Portal brand: navy, pink, gold (from the logo files) */
  --navy: #162C4E; --pink: #E62064; --gold: #CBA963;
  --brand: #E62064; --brand-2: #C3174F; --brand-soft: #FDEBF1;
  --ok: #059669; --ok-soft: #E7F7F0; --warn: #B45309; --warn-soft: #FEF5E6; --bad: #DC2626; --bad-soft: #FDECEC;
  --r: 12px; --r-sm: 8px;
  --sh: 0 1px 2px rgba(15,23,42,.04), 0 4px 18px rgba(15,23,42,.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); text-decoration: none; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -.01em; font-family: var(--font-display); font-weight: 700; }

/* Shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; font-weight: 700; color: var(--ink); font-size: 15px; }
.logo img { height: 34px; width: auto; display: block; }
.logo-sub { display: block; font-weight: 600; color: var(--ink-4); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 0 8px 18px; margin-top: -14px; }
.logo small { display: block; font-weight: 500; color: var(--ink-4); font-size: 11px; letter-spacing: .02em; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a.on { background: #E8EEF7; color: var(--navy); font-weight: 600; }
.chrome-client .nav a.on { background: var(--brand-soft); color: var(--brand-2); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); padding: 18px 10px 6px; }
.side-foot svg { width: 14px; height: 14px; vertical-align: -2px; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-4); }
.main { min-width: 0; }
.top { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; background: rgba(255,255,255,.8); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 19px; font-weight: 700; }
.crumbs { font-size: 12px; color: var(--ink-4); }
.crumbs a { color: var(--ink-3); }
.page { padding: 28px 32px 80px; max-width: 1180px; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.card-h { padding: 18px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-h h2 { font-size: 15px; font-weight: 650; }
.card-b { padding: 20px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.stack > * + * { margin-top: 20px; }

/* Stats */
.stat { padding: 18px 20px; }
.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; display: block; width: 24px; height: 3px; border-radius: 3px; background: var(--gold); margin-bottom: 12px; }
.stat b { display: block; font-family: var(--font-display); font-size: 24px; color: var(--ink); letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--ink-3); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid transparent; font: 600 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(195,23,79,.3); }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-ghost { background: var(--panel); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-danger { background: var(--panel); color: var(--bad); border-color: #F5C7C7; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12.5px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Forms */
label.f { display: block; font-weight: 600; color: var(--ink); font-size: 13px; margin-bottom: 6px; }
.help { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=search], input[type=date], input[type=url], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font: 14px var(--font); color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #F29BB9; box-shadow: 0 0 0 4px rgba(230,32,100,.14); }
input.inline-input { height: 34px; border-color: transparent; background: transparent; padding: 0 8px; margin-left: -8px; font-weight: 550; }
input.inline-input:hover { border-color: var(--line); background: #fff; }
.field + .field { margin-top: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: #CBD5E1; border-radius: 99px; transition: .15s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: .15s; }
.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:focus-visible + span { box-shadow: 0 0 0 4px rgba(230,32,100,.2); }

/* Tables */
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-4); padding: 10px 20px; background: #FAFBFD; border-bottom: 1px solid var(--line); }
.t td { padding: 10px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.off td { opacity: .5; }
.num-col { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Badges and notes */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--ink-3); }
.badge-brand { background: var(--brand-soft); color: var(--brand-2); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); font-size: 13.5px; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.note-info { background: #EEF2F8; color: var(--navy); }
.note-ok { background: var(--ok-soft); color: #065F46; }
.note-warn { background: var(--warn-soft); color: #92400E; }
.note-bad { background: var(--bad-soft); color: #991B1B; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }

/* Upload */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 34px 20px; border: 1.5px dashed #C7CEDB; border-radius: var(--r); background: #FBFCFE; cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop-icon { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(145deg, #203B66, var(--navy)); color: #fff; display: grid; place-items: center; }
.drop b { color: var(--ink); font-size: 15px; }
.drop input { display: none; }

/* Import list */
.imp { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.imp:last-child { border-bottom: 0; }
.imp-icon { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(145deg, #203B66, var(--navy)); color: #fff; display: grid; place-items: center; flex: none; }
.imp-main { flex: 1; min-width: 0; }
.imp-main b { color: var(--ink); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Review */
.sec-card .card-h { background: #FAFBFD; border-radius: var(--r) var(--r) 0 0; }
.sec-name { font-size: 15px; font-weight: 700; color: var(--ink); max-width: 420px; }
.pol-title { display: flex; align-items: center; gap: 6px; }
.savebar { position: sticky; bottom: 0; margin-top: 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 -4px 24px rgba(15,23,42,.06); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Brand editor */
.brand-grid { display: grid; grid-template-columns: 400px 1fr; gap: 20px; align-items: start; }
.brand-form { max-height: calc(100vh - 150px); overflow: auto; }
.group { border-bottom: 1px solid var(--line-2); }
.group summary { list-style: none; cursor: pointer; padding: 14px 20px; font-weight: 650; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.group summary::-webkit-details-marker { display: none; }
.group summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-4); border-bottom: 2px solid var(--ink-4); transform: rotate(45deg); transition: .15s; }
.group[open] summary::after { transform: rotate(225deg); }
.group-b { padding: 4px 20px 20px; }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row + .color-row { margin-top: 10px; }
.color-row input[type=color] { width: 38px; height: 38px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer; flex: none; }
.color-row .lbl { flex: 1; font-size: 13px; color: var(--ink-2); }
.color-row input[type=text] { width: 96px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; text-transform: uppercase; }
.seg { display: inline-flex; background: var(--line-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { cursor: pointer; }
.seg input { display: none; }
.seg span { display: block; padding: 6px 11px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch-row + .switch-row { margin-top: 12px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.preset { border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; padding: 8px; cursor: pointer; text-align: left; font: 600 12px var(--font); color: var(--ink-2); }
.preset:hover { border-color: var(--brand); }
.preset i { display: flex; height: 22px; border-radius: 5px; overflow: hidden; margin-bottom: 6px; }
.preset i b { flex: 1; }
.preview-card { position: sticky; top: 84px; overflow: hidden; }
.preview-tabs { display: flex; gap: 4px; }
.preview-frame { width: 100%; height: calc(100vh - 190px); border: 0; display: block; background: #fff; }
.logo-prev { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: repeating-conic-gradient(#F4F6FA 0% 25%, #fff 0% 50%) 50% / 14px 14px; }
.logo-prev img { max-height: 40px; max-width: 180px; }
.addr { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.addr:focus-within { border-color: #F29BB9; box-shadow: 0 0 0 4px rgba(230,32,100,.14); }
.addr input[type=text] { border: 0; box-shadow: none !important; flex: 1; min-width: 0; }
.addr span { padding: 0 12px; color: var(--ink-3); background: #F8FAFC; align-self: stretch; display: flex; align-items: center; border-left: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.fav-row { display: flex; align-items: center; gap: 12px; }
.fav-prev { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; background: #fff; flex: none; }
.fav-prev img { width: 28px; height: 28px; border-radius: 6px; }
.match-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-sm); background: linear-gradient(135deg, #FDF1F5, #F7F3EA); border: 1px solid #F1DDE4; }
.match-box b { color: var(--ink); font-size: 13px; }
.swatches { display: flex; gap: 4px; margin-top: 6px; }
.swatches:empty { display: none; }
.swatches i { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.found-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.found input { display: none; }
.found span { display: grid; place-items: center; height: 56px; padding: 6px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: repeating-conic-gradient(#F4F6FA 0% 25%, #fff 0% 50%) 50% / 12px 12px; }
.found img { max-width: 100%; max-height: 42px; }
.found input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(230,32,100,.18); }
input[type=range] { width: 100%; accent-color: var(--brand); }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: radial-gradient(900px 520px at 90% 0%, rgba(203,169,99,.28), transparent 60%), radial-gradient(900px 600px at 0% 100%, rgba(230,32,100,.22), transparent 60%), linear-gradient(160deg, #1C3862, #162C4E 50%, #0C1A30); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h2 { color: #fff; font-size: 36px; line-height: 1.15; max-width: 440px; letter-spacing: -.02em; }
.login-art p { color: #C9D3E4; max-width: 420px; font-size: 15px; }
.login-form { display: grid; place-items: center; padding: 32px; background: #fff; }
.login-form form { width: 100%; max-width: 360px; }
.login-form h1 { font-size: 24px; margin-bottom: 6px; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 10px 16px; overflow-x: auto; }
  .side .logo { padding: 0 8px 0 0; }
  .nav { display: flex; gap: 4px; }
  .nav-label, .side-foot { display: none; }
  .top { padding: 0 16px; }
  .page { padding: 20px 16px 80px; }
  .g2, .g3, .g4, .brand-grid, .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .brand-form { max-height: none; }
  .preview-card { position: static; }
  .t th:nth-child(n+4), .t td:nth-child(n+4) { display: none; }
}

/* ---------- v2 app screens ---------- */
.chrome-client .logo img { height: 36px; max-width: 190px; object-fit: contain; object-position: left center; }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.who { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; line-height: 1.3; }
.who b { color: var(--ink); font-size: 12.5px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(145deg, #203B66, var(--navy)); color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; }
.chrome-client .avatar { background: var(--brand); }
.flash { margin-bottom: 18px; }
.stat small { font-weight: 500; }
.bar { display: block; height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.prog { display: flex; align-items: center; gap: 10px; }
.prog .bar { flex: 1; margin: 0; }
.prog span { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }

.empty { text-align: center; padding: 48px 24px; }
.empty-icon { width: 58px; height: 58px; border-radius: 16px; display: inline-grid; place-items: center; background: linear-gradient(145deg, #203B66, var(--navy)); color: #fff; margin-bottom: 14px; }
.empty-icon svg { width: 26px; height: 26px; }
.chrome-client .empty-icon, .chrome-client .drop-icon, .chrome-client .imp-icon { background: var(--brand); }
.empty h2 { font-size: 20px; }
.empty p { max-width: 460px; margin: 8px auto 18px; }
.client-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }

/* New handbook checkout */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; max-width: 1040px; }
.summary { position: sticky; top: 84px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; font-weight: 700; color: var(--ink); font-size: 16px; }
.trial { display: flex; gap: 12px; margin-top: 14px; padding: 14px; border-radius: var(--r-sm); background: linear-gradient(135deg, #FDF1F5, #F7F3EA); color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.trial svg { width: 20px; height: 20px; color: var(--pink); flex: none; margin-top: 2px; }
.trial b { color: var(--ink); }
.agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 13px; line-height: 1.45; cursor: pointer; }
.agree input { margin-top: 3px; accent-color: var(--brand); }
.choice { display: grid; gap: 10px; }
.choice-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.choice-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice-opt input { margin-top: 3px; accent-color: var(--brand); }
.choice-opt b { display: block; color: var(--ink); }
.choice-opt small { color: var(--ink-3); font-size: 12.5px; }

/* Overview */
.quick { display: grid; gap: 4px; padding: 10px; }
.quick a { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-sm); color: var(--ink-2); }
.quick a:hover { background: var(--line-2); color: var(--ink); }
.quick a > svg { width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-2); flex: none; }
.quick b { display: block; color: var(--ink); }
.quick small { color: var(--ink-3); }
.feed { padding: 6px 0; }
.feed-row { display: flex; gap: 12px; padding: 9px 20px; font-size: 13px; line-height: 1.45; }
.feed-row b { color: var(--ink); font-weight: 600; }
.feed-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex: none; }
.feed-row .dot.ok { background: var(--ok); }
.tip { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-sm); background: #F8FAFC; border: 1px solid var(--line-2); font-size: 13px; line-height: 1.5; }
.tip svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 1px; }
.tip b { color: var(--ink); }

/* Policies */
.rowlink { color: var(--ink); font-weight: 600; }
.rowlink:hover { color: var(--brand); }
.sec-edit { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.sec-edit input[type=text] { flex: 1; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
.policy-manage { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.doc-preview { max-height: 70vh; overflow: auto; }
.prose-admin { font-size: 14px; line-height: 1.65; color: var(--ink-2); max-width: 74ch; }
.prose-admin h3 { font-size: 16px; margin: 1.5em 0 .4em; }
.prose-admin h4, .prose-admin h5 { font-size: 14.5px; margin: 1.2em 0 .3em; color: var(--ink); }
.prose-admin p { margin: 0 0 .9em; }
.prose-admin ul, .prose-admin ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose-admin ol.list { list-style: none; padding-left: 2.2em; }
.prose-admin .num { display: inline-block; min-width: 2.2em; margin-left: -2.2em; font-weight: 600; color: var(--brand-2); }
.prose-admin table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 1em 0; }
.prose-admin th, .prose-admin td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.prose-admin th { background: #F8FAFC; }
.versions { padding: 6px 0; }
.ver { display: flex; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.ver:first-child { border-top: 0; }
.ver-no { width: 38px; height: 26px; border-radius: 7px; background: var(--line-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-3); flex: none; }
.ver.current .ver-no { background: var(--brand); color: #fff; }
.ver b { color: var(--ink); font-size: 13px; }
.radio { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13.5px; cursor: pointer; }
.radio input { accent-color: var(--brand); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.checks input { accent-color: var(--brand); }

/* People */
.filters { display: flex; gap: 8px; }
.filters input, .filters select { height: 34px; width: auto; min-width: 150px; }
.person { display: flex; gap: 10px; align-items: center; line-height: 1.35; }
.person b { color: var(--ink); }
.grp { position: relative; }
.grp summary { cursor: pointer; list-style: none; font-size: 13px; }
.grp summary::-webkit-details-marker { display: none; }
.grp-pop { position: absolute; z-index: 4; top: 26px; left: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh); padding: 12px; min-width: 220px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border-radius: 99px; background: var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink); }
.chip small { color: var(--ink-3); font-weight: 500; }
.chip button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1; }
.chip button:hover { background: #fff; color: var(--bad); }
.inline-add { display: flex; gap: 8px; max-width: 460px; }

/* Settings */
.suffix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; max-width: 180px; }
.suffix input { border: 0; box-shadow: none !important; }
.suffix span { padding: 0 12px; color: var(--ink-3); background: #F8FAFC; align-self: stretch; display: flex; align-items: center; border-left: 1px solid var(--line); font-size: 13px; }
.danger .card-h { background: #FFFAFA; border-radius: var(--r) var(--r) 0 0; }
.danger-box { padding: 16px; border: 1px solid #F3D6D6; border-radius: var(--r-sm); background: #FFFCFC; }
.danger-box b { color: var(--ink); }
.lock-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: var(--r-sm); background: #F4F6FA; color: var(--ink-3); font-size: 12.5px; }
.lock-note svg { width: 15px; height: 15px; }
.lock-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; cursor: pointer; }
.lock-row input { accent-color: var(--brand); }
input:disabled, select:disabled, textarea:disabled { background: #F4F6FA; color: var(--ink-3); cursor: not-allowed; }

@media (max-width: 960px) {
  .checkout, .policy-manage { grid-template-columns: 1fr; }
  .summary { position: static; }
  .filters { flex-wrap: wrap; }
}

.viewas { display: flex; align-items: center; gap: 8px; padding: 10px 32px; background: var(--navy); color: #fff; font-size: 13px; }
.viewas svg { width: 16px; height: 16px; }
.viewas a { color: var(--gold); font-weight: 700; margin-left: auto; }
.avatar.sa { background: linear-gradient(145deg, var(--pink), #B0164C); }

/* ---------- superadmin ---------- */
.spark { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.spark-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.spark-col i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--pink), #F46C9A); }
.spark-col span { font-size: 11px; color: var(--ink-4); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--line-2); border-radius: var(--r-sm); width: fit-content; }
.tabs a { padding: 7px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.tabs a span { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: rgba(15,35,64,.08); font-size: 11px; text-align: center; }
.tabs a.on span { background: var(--brand-soft); color: var(--brand-2); }
.actions-menu summary { list-style: none; }
.actions-menu summary::-webkit-details-marker { display: none; }
.menu-btn { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: transparent; border-radius: 6px; font: 500 13px var(--font); color: var(--ink-2); cursor: pointer; }
.menu-btn:hover { background: var(--line-2); color: var(--ink); }
.menu-btn.danger { color: var(--bad); }

/* File inputs: match the app's buttons */
input[type=file] { display: block; width: 100%; max-width: 100%; font: 13px var(--font); color: var(--ink-3); padding: 6px; border: 1px dashed #C7CEDB; border-radius: var(--r-sm); background: #FBFCFE; cursor: pointer; }
input[type=file]:hover { border-color: var(--brand); background: var(--brand-soft); }
input[type=file]:focus { outline: none; border-color: #F29BB9; box-shadow: 0 0 0 4px rgba(230,32,100,.14); }
input[type=file]::file-selector-button { font: 600 13px var(--font); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; margin-right: 12px; cursor: pointer; transition: background .15s, border-color .15s; }
input[type=file]::file-selector-button:hover { background: var(--line-2); border-color: #CBD5E1; }
.help input[type=file] { display: inline-block; width: auto; margin-left: 6px; padding: 3px; }
.drop input[type=file] { display: none; }

/* Demo handbooks */
.badge-demo { background: #FEF3C7; color: #92400E; }
.demo-card .card-h { background: repeating-linear-gradient(135deg, #FFFBEB 0 14px, #FEF3C7 14px 28px); border-radius: var(--r) var(--r) 0 0; }
.choice.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .choice.two { grid-template-columns: 1fr; } }

/* Logo colour match: ready-made schemes */
.schemes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.scheme { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: 600 12.5px/1 var(--font, inherit); color: var(--ink); cursor: pointer; }
.scheme:hover { border-color: var(--brand); }
.scheme.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.scheme-bar { display: inline-flex; gap: 3px; padding: 4px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.scheme-bar i { width: 12px; height: 12px; border-radius: 3px; }
.badge { white-space: nowrap; }
.client-mark.has-img { background: #fff; padding: 0; overflow: hidden; }
.client-mark.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.choice + .field, .choice + .help { margin-top: 18px; }

/* Row action menu (billing table) */
.rowmenu { position: relative; display: inline-block; text-align: left; }
.rowmenu > summary { list-style: none; cursor: pointer; }
.rowmenu > summary::-webkit-details-marker { display: none; }
.rowmenu > summary svg { width: 14px; height: 14px; transform: rotate(90deg); }
.rowmenu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 210px; padding: 6px; display: grid; gap: 2px; box-shadow: 0 12px 32px rgba(15,35,64,.14); }
.rowmenu-pop button, .rowmenu-pop a { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 8px; background: none; font: 500 14px/1.3 var(--font, inherit); color: var(--ink); cursor: pointer; }
.rowmenu-pop button:hover, .rowmenu-pop a:hover { background: var(--bg-2, #F4F6FA); color: var(--ink); }
.rowmenu-pop button[value=cancel], .rowmenu-pop button[value=suspend] { color: var(--bad, #B42318); }

/* Button cells in tables: stay a real table cell (a flex td breaks the row lines), buttons lined up on the right */
td.btn-row { display: table-cell; text-align: right; white-space: nowrap; }
td.btn-row > * { display: inline-flex; vertical-align: middle; margin-left: 6px; }
td.btn-row > form { gap: 6px; }

/* Support: help tiles and conversation threads */
.help-tile { display: grid; gap: 6px; color: var(--ink); text-decoration: none; }
.help-tile:hover { border-color: var(--brand); color: var(--ink); }
.help-tile svg { width: 22px; height: 22px; color: var(--brand); }
.thread { display: grid; gap: 12px; }
.msg { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.msg-staff { background: #FBF8F2; border-left: 4px solid var(--gold, #CBA963); }
.msg-h { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.msg-h b { color: var(--ink); }
.msg-b { font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
