/* Bonik AI Bot — the dashboard, the admin and the sign-in pages. This is the Bonik AI web app's look
   (web.bonikai.app: src/index.css, layout/AppShell.tsx, ui/index.tsx — same colours and sizes):
     computer (>= 1024 px): white side menu in groups, a top bar, flat bordered cards, 12 px buttons;
     phone / tablet: the app — blue gradient header, bottom bar with five tabs, soft-shadow cards.
   The public site has its own file (site.css = the Bonik AI website's look).
   No inline styles anywhere (the CSP forbids them). Hind Siliguri comes from Google Fonts (see Layout). */
:root {
  color-scheme: light; accent-color: #1B66E0;
  --brand: #1B66E0; --brand-dark: #0F4BB5; --brand-soft: #E8F0FE; --brand-tint: #F5F8FE;
  --bg: #F4F6FB; --surface: #FFFFFF; --ink: #101828; --ink-2: #475467; --ink-3: #98A2B3; --line: #E7EAF1;
  --ok: #067647; --ok-soft: #E6F4EC; --err: #B42318; --err-soft: #FDECEA; --warn: #B54708; --warn-soft: #FDF1E2;
  --hero: linear-gradient(180deg, #07256A 0%, #1250C8 50%, #1C68F0 100%);
  --shadow: 0 1px 2px rgb(0 0 0 / .14), 0 1px 4px 1px rgb(0 0 0 / .07);
  --shadow-blue: 0 6px 20px rgb(20 80 192 / .20);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 80px;
}
@view-transition { navigation: auto; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; touch-action: manipulation; overscroll-behavior-y: none; }
body {
  margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 15px; min-height: 100vh; min-height: 100dvh;
  font-family: "Hind Siliguri", "Noto Sans Bengali", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
h1 { font-size: 1.5rem; line-height: 1.35; margin: 0 0 12px; font-weight: 700; }
h2 { font-size: 1.0625rem; line-height: 1.4; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 1.0625rem; margin: 0 0 6px; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: var(--brand); }
img { max-width: 100%; }
.ic { flex: none; display: block; }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.hint, .meta, .cnt { font-size: .8125rem; line-height: 1.5; color: var(--ink-2); margin-top: 4px; }
.cnt { color: var(--ink-3); }
.logo { border-radius: 22%; display: block; flex: none; }
.wordmark { height: 30px; width: auto; display: block; }
.bx-logo-tag { font-size: 11px; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #D3E2FB; padding: 1px 7px; border-radius: 6px; line-height: 1.5; }
button, .btn, .tab, .side-link, nav a { -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
form { margin: 0; }

/* ── buttons (the web app's Button: radius 12, 14 px semibold, 44 high with a mouse / 48 on a phone) ── */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.25;
  text-align: center; text-decoration: none; cursor: pointer; padding: 0 20px; height: 44px; border-radius: 12px;
  border: 1px solid transparent; background: var(--brand); color: #fff; transition: background-color .15s ease, border-color .15s ease; white-space: nowrap;
}
@media (pointer: coarse) { .btn, button.btn { height: 48px; } }
.btn:hover { background: var(--brand-dark); }
.btn-ghost, button.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover, button.btn-ghost:hover { background: var(--brand-tint); }
.btn-danger, button.btn-danger { background: var(--err); }
.btn-danger:hover, button.btn-danger:hover { background: #8F1C13; }
.btn-block { display: flex; width: 100%; }
.btn-small, button.btn-small { padding: 0 14px; height: 36px; font-size: 13px; }
@media (pointer: coarse) { .btn-small, button.btn-small { height: 40px; } }
.btn-link { font: inherit; font-size: 14px; font-weight: 600; background: none; border: 0; color: var(--brand); cursor: pointer; padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.btn-link:hover { background: var(--brand-tint); }
.inline-form { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.actions .btn { flex: 1 1 auto; }

/* ── fields (the web app's outlined text boxes: radius 12, 1 px line, 2 px blue when focused) ── */
label { display: block; font-weight: 500; font-size: 13px; color: var(--ink-2); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=file], select, textarea {
  display: block; width: 100%; min-width: 0; font: inherit; font-size: 16px; line-height: 24px; padding: 9px 16px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
@media (pointer: coarse) { input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], select { min-height: 48px; } }
textarea { min-height: 112px; padding: 12px 16px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #C9CFDA; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); outline: none; }
input[type=file] { padding: 9px; }
label.check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; }
label.check input { width: 20px; height: 20px; flex: none; }
.search { display: flex; gap: 8px; margin-bottom: 10px; }
.search input { flex: 1; }
.pw-toggle { margin-top: 2px; font-size: 13px; }

/* ── cards, alerts, chips ────────────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border-radius: 20px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
a.card { display: block; color: inherit; text-decoration: none; }
.alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid; font-size: 14px; }
.alert > :last-child { margin-bottom: 0; }
.alert-ok { background: var(--ok-soft); border-color: #BFE5D2; color: #0B4F31; }
.alert-err { background: var(--err-soft); border-color: #F5C6C1; color: #8A241C; }
.alert-info { background: var(--brand-tint); border-color: var(--brand-soft); color: var(--brand-dark); }
.chip, .badge { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 3px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip-ok, .badge-ok { background: var(--ok-soft); color: var(--ok); }
.chip-off { background: #EEF0F4; color: var(--ink-2); }
.chip-err, .badge-err { background: var(--err-soft); color: var(--err); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-ok::before, .badge-ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: var(--brand-soft); }
progress::-webkit-progress-bar { background: var(--brand-soft); }
progress::-webkit-progress-value { background: var(--brand); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--brand); }

/* ── lists and tables ────────────────────────────────────────────────────────────────────────── */
.rows, .plain, .todo, .menu { list-style: none; margin: 0; padding: 0; }
.rows > li, .todo > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rows > li:last-child, .todo > li:last-child, .plain > li:last-child { border-bottom: 0; }
.rows.card { padding: 4px 16px; }
.plain-rows > li { justify-content: flex-start; }
.plain > li { padding: 8px 0 8px 26px; border-bottom: 1px solid var(--line); position: relative; font-size: 14px; }
.plain > li::before { content: ""; position: absolute; left: 3px; top: 15px; width: 11px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.qa-row { align-items: flex-start !important; flex-wrap: wrap; }
.qa-main { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.qa-main a { text-decoration: none; color: var(--ink); }
.qa-actions { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-left: -10px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.facts th { width: 55%; white-space: normal; }
.table-wrap, .scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.notes { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); }
.page-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.page-name { font-weight: 700; font-size: 1.0625rem; word-break: break-word; }
.page-card form { margin-top: 10px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; padding: 7px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.tabs a:hover { background: var(--brand-tint); }
.tabs a.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }

/* menu rows (More, Home's Pages): tinted icon box, title, small line, arrow */
.menu > li { border-bottom: 1px solid var(--line); }
.menu > li:last-child { border-bottom: 0; }
.menu-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; color: var(--ink); text-decoration: none; width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.menu-row .ibox { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.menu-row .txt { flex: 1; min-width: 0; }
.menu-row .txt strong { display: block; font-weight: 600; line-height: 1.35; }
.menu-row .txt span { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.menu-row > .ic:last-child { color: var(--ink-3); }
.menu-row .end { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.t-green .ibox, .ibox.t-green { background: #E6F7EC; color: #1FAF54; }
.t-purple .ibox, .ibox.t-purple { background: #F1E9FE; color: #7C3AED; }
.t-amber .ibox, .ibox.t-amber { background: #FDF1E2; color: #D97706; }
.t-teal .ibox, .ibox.t-teal { background: #E0F4F7; color: #0891B2; }
.t-red .ibox, .ibox.t-red { background: #FDECEA; color: #D32F2F; }
.t-msgr .ibox, .ibox.t-msgr { background: #E3F1FF; color: #0084FF; }
.sec { display: flex; align-items: center; gap: 8px; margin: 20px 2px 10px; font-size: 15px; font-weight: 700; }
.sec::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); }
.sec-small { margin: 18px 4px 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }

/* Home: tool tiles, the "today" card and its two small numbers */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 2px; text-decoration: none; color: var(--ink); font-size: 12.5px; line-height: 1.3; text-align: center; border-radius: 14px; }
.tile:hover, .tile:active { background: var(--brand-tint); }
.tile .ibox { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.today { border-radius: 22px; padding: 16px; box-shadow: var(--shadow-blue); }
.today .lbl { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.today .big { font-size: 28px; font-weight: 700; color: #0C2D6B; line-height: 1.2; margin: 2px 0 12px; }
.today .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: #F0F4FF; color: var(--ink); text-decoration: none; }
.mini.warn { background: var(--warn-soft); }
.mini .ibox { width: 30px; height: 30px; border-radius: 9px; background: #fff; display: grid; place-items: center; color: var(--brand); flex: none; }
.mini.warn .ibox { color: var(--warn); }
.mini b { display: block; font-size: 17px; line-height: 1.2; }
.mini span { font-size: 11.5px; color: var(--ink-2); line-height: 1.3; display: block; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column; gap: 2px; margin-bottom: 0; }
.stat .num { font-size: 1.6rem; font-weight: 700; color: #0C2D6B; line-height: 1.2; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; }
.kpi { background: var(--surface); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.kpi .num { display: block; font-size: 1.5rem; font-weight: 700; color: #0C2D6B; line-height: 1.25; }
.kpi .lbl { color: var(--ink-2); font-size: 13px; }

/* plans */
.plans { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 8px; }
.plan-card { display: flex; flex-direction: column; }
.plan-card .plain { flex: 1; margin-bottom: 14px; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.plan-head h3 { margin: 0; font-size: 18px; }
.plan-card form { margin-top: auto; }
.pack { display: flex; flex-direction: column; gap: 16px; }
.pack-main { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 0; }
.pack-main .ibox { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.pack-main p { margin: 0 0 6px; }
.pack-t { font-size: 17px; font-weight: 700; }
.pack-side { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pack-side .price { margin: 0; }
.pack-side .hint { margin: 0; max-width: 240px; }
.price { font-size: 1.75rem; font-weight: 700; margin: 0 0 8px; color: var(--ink); }
.price .muted { font-size: 13px; font-weight: 400; }
.plan-current { box-shadow: 0 0 0 2px var(--brand), var(--shadow-blue); }

/* ── the frame on a phone / tablet: the app ──────────────────────────────────────────────────── */
.app-shell { background: var(--bg); }
.side, .topbar { display: none; }
.app-hero { background: var(--hero); color: #fff; padding: calc(var(--safe-top) + 10px) 16px 14px; position: sticky; top: 0; z-index: 20; }
.has-overlap .app-hero { position: static; padding-bottom: 64px; }
.hero-bar { display: flex; align-items: center; gap: 6px; min-height: 44px; max-width: 720px; margin: 0 auto; }
.hero-bar h1 { flex: 1; min-width: 0; margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-back { width: 40px; height: 40px; margin-left: -8px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.hero-back:active { background: rgb(255 255 255 / .18); }
.hero-tag { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; background: rgb(255 255 255 / .18); border-radius: 6px; padding: 2px 8px; }
.hero-home, .hero-more { max-width: 720px; margin: 0 auto; }
.hero-home { display: flex; align-items: center; gap: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: rgb(255 255 255 / .2); color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; text-decoration: none; text-transform: uppercase; }
.hero-home .who { flex: 1; min-width: 0; }
.hero-home .who h1 { margin: 0; color: inherit; font-weight: 700; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-home .who span { font-size: 11px; color: rgb(255 255 255 / .65); }
.pill-plan { border-radius: 999px; background: rgb(253 230 138 / .22); color: #FDE68A; font-size: 11px; font-weight: 700; padding: 6px 12px; text-decoration: none; white-space: nowrap; }
.hero-more h1 { color: #fff; font-size: 22px; margin: 6px 0 14px; }
.profile { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .22); color: #fff; text-decoration: none; }
.profile .avatar { width: 48px; height: 48px; font-size: 1.1rem; background: #3B4FD8; border: 2px solid rgb(255 255 255 / .5); }
.profile .who { flex: 1; min-width: 0; }
.profile .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile .who span { font-size: 12.5px; color: rgb(255 255 255 / .75); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-main { max-width: 752px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + var(--safe-bottom) + 28px); }
.has-overlap .app-main { margin-top: -52px; position: relative; z-index: 21; }
.app-main > h2 { margin: 20px 2px 10px; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.app-main > h2::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); }

.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; align-items: stretch;
  height: calc(var(--nav-h) + var(--safe-bottom)); padding: 12px 4px var(--safe-bottom); background: var(--surface);
  box-shadow: 0 -2px 16px rgb(16 24 40 / .08);
}
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 500; line-height: 1.2; }
.tab .pill { position: relative; width: 64px; height: 32px; border-radius: 999px; display: grid; place-items: center; transition: background-color .15s ease; }
.tab .lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tab.on { color: var(--brand); font-weight: 700; }
.tab.on .pill { background: var(--brand-soft); }
.tab:active .pill { background: var(--brand-tint); }
.dot { position: absolute; top: -5px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #E02424; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; }
.logout { margin: 0; }

/* ── the frame on a computer: the web app's side menu + top bar, flat cards ──────────────────── */
@media (min-width: 1024px) {
  :root { --nav-h: 0px; }
  .app-shell { display: flex; align-items: flex-start; }
  .bottom-bar { display: none; }
  .side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; width: 256px; flex: none; height: 100vh; height: 100dvh; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
  .side-logo { display: flex; align-items: center; gap: 8px; padding: 4px 8px; text-decoration: none; }
  .side-nav { display: flex; flex-direction: column; gap: 20px; }
  .side-group { display: flex; flex-direction: column; gap: 2px; }
  .side-label { margin: 0; padding: 0 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
  .side-link { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background-color .15s ease, color .15s ease; }
  .side-link:hover { background: var(--brand-tint); color: var(--ink); }
  .side-link.on { background: var(--brand-soft); color: var(--brand-dark); }
  .side-link .lbl { flex: 1; min-width: 0; }
  .side-link .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #E02424; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
  .side-user { margin-top: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 14px; }
  .side-user p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .u-name { font-size: 14px; font-weight: 600; }
  .u-mail { font-size: 12px; color: var(--ink-3); }
  .u-out { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font: inherit; font-size: 14px; color: var(--ink-2); background: none; border: 0; padding: 0; cursor: pointer; }
  .u-out:hover { color: var(--err); }
  .u-links { margin-top: 8px !important; display: flex; gap: 12px; font-size: 12px; }
  .u-links a { color: var(--ink-3); text-decoration: none; }
  .u-links a:hover { text-decoration: underline; }

  .app-col { flex: 1; min-width: 0; }
  .topbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; position: sticky; top: 0; z-index: 30; min-height: 60px; padding: 0 20px; background: rgb(255 255 255 / .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .state { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
  .state:hover { background: var(--brand-tint); }
  .state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
  .state-on { color: var(--ink); }
  .state-on .state-dot { background: #12B76A; }
  .plan-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 14px; font-weight: 600; text-decoration: none; }
  .plan-chip:hover { box-shadow: 0 0 0 2px rgb(27 102 224 / .3); }
  .top-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
  .top-btn:hover { background: var(--brand-tint); }
  .top-round { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
  .top-round:hover { background: var(--brand-tint); }

  .app-hero, .has-overlap .app-hero { position: static; background: none; color: var(--ink); padding: 32px 32px 0; }
  .hero-bar, .hero-home, .hero-more, .app-main { max-width: 80rem; margin-left: auto; margin-right: auto; }
  .hero-bar { min-height: 0; gap: 8px; }
  .hero-bar h1, .hero-more h1, .hero-home .who h1 { color: var(--ink); font-size: 24px; line-height: 32px; font-weight: 700; white-space: normal; margin: 0; }
  .hero-back { color: var(--ink); width: 40px; height: 40px; margin-left: -10px; }
  .hero-back:hover { background: var(--brand-tint); }
  .hero-tag { display: none; }
  .hero-home .avatar, .hero-home .pill-plan, .hero-more .profile { display: none; }
  .hero-home .who span { color: var(--ink-2); font-size: 14px; }
  .app-main, .has-overlap .app-main { padding: 16px 32px 48px; margin-top: 0; }
  .card, .kpi { box-shadow: none; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
  .card h2 { font-size: 18px; font-weight: 600; }
  .rows.card { padding: 6px 20px; }
  .today { box-shadow: none; border-radius: 16px; }
  .today .two { grid-template-columns: repeat(2, minmax(0, 260px)); }
  .plan-current { box-shadow: 0 0 0 2px var(--brand); }
  .tiles { grid-template-columns: repeat(6, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .actions .btn { flex: 0 0 auto; }
  .pack { flex-direction: row; align-items: center; gap: 24px; }
  .pack-side { flex-direction: column; align-items: flex-end; gap: 10px; padding: 0 0 0 24px; border-top: 0; border-left: 1px solid var(--line); min-width: 200px; }
  .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .sec { margin-top: 8px; }
  .narrow { max-width: 720px; }
}
@media (min-width: 640px) and (max-width: 1023.98px) { .plans { grid-template-columns: repeat(3, 1fr); } .kpis { grid-template-columns: repeat(4, 1fr); } }

/* ── sign-in pages: phone = the app's screen; computer = the web app's login (pitch left, form right) ── */
.auth-shell { background: var(--bg); }
.auth-side { display: none; }
.auth-col { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.auth-hero { background: var(--hero); color: #fff; text-align: center; padding: calc(var(--safe-top) + 36px) 20px 76px; }
.auth-brand { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 700; font-size: 22px; }
.auth-brand .logo { box-shadow: 0 8px 24px rgb(0 0 0 / .25); }
.auth-hero p { margin: 6px 0 0; color: rgb(255 255 255 / .75); font-size: 14px; }
.auth-main { flex: 1; width: 100%; max-width: 452px; margin: -52px auto 0; padding: 0 16px 24px; }
.auth-card { background: var(--surface); border-radius: 22px; padding: 20px; box-shadow: var(--shadow-blue); }
.auth-card > h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card .card { box-shadow: none; border: 0; padding: 0; margin-bottom: 12px; border-radius: 0; }
.auth-card form.card > p { margin: 18px 0 0; }
.auth-card > p:last-child { margin: 16px 0 0; }
.auth-main > h1 { margin-top: 68px; }
.auth-foot { padding: 8px 16px calc(var(--safe-bottom) + 20px); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-size: 13px; }
.foot-links a:hover { color: var(--brand); }
@media (min-width: 1024px) {
  .auth-shell { background: var(--surface); }
  .auth-grid { display: grid; grid-template-columns: 1.3fr 1fr; min-height: 100vh; }
  .auth-side { display: flex; flex-direction: column; padding: 28px 40px 40px; }
  .auth-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
  .auth-logo .wordmark { height: 36px; }
  .auth-pitch { margin: auto 0; max-width: 520px; }
  .auth-pitch h2 { font-size: 42px; line-height: 1.2; font-weight: 700; margin: 0 0 18px; color: var(--ink); }
  .auth-pitch h2 span { color: var(--brand); }
  .auth-pitch p { color: var(--ink-2); font-size: 15px; line-height: 1.7; margin: 0 0 20px; }
  .auth-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .auth-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); }
  .auth-chip .ic { color: var(--brand); }
  .auth-col { border-left: 1px solid var(--line); min-height: 0; }
  .auth-hero { display: none; }
  .auth-main { max-width: 440px; margin: auto; padding: 40px 24px 24px; flex: 0 1 auto; }
  .auth-card { box-shadow: none; padding: 0; border-radius: 0; background: none; }
  .auth-card > h1 { font-size: 22px; }
  .auth-main > h1 { margin-top: 0; }
}

/* ── the polish pass (2026-11-20): stat tiles, chart, list rows with a switch, empty states, tidy forms ── */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-height: 32px; }
.card-head h2 { margin: 0; }
.card-head .btn-link { margin-right: -10px; font-size: 13px; white-space: nowrap; flex: none; }
.page-intro { max-width: 60em; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-tile { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: #F0F4FF; color: var(--ink); text-decoration: none; }
.stat-tile .ibox { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--brand); }
.stat-tile .v { font-size: 22px; font-weight: 700; line-height: 1.15; color: #0C2D6B; }
.stat-tile .k { font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.stat-tile.t-amber { background: var(--warn-soft); }
.stat-tile.t-amber .ibox { color: var(--warn); }
.stat-tile.t-green .ibox { color: #1FAF54; }
.stat-tile.t-teal .ibox { color: #0891B2; }
.stat-tile.t-purple .ibox { color: #7C3AED; }
a.stat-tile:active { filter: brightness(.97); }
.stats-flat { margin-bottom: 14px; }
.chart { display: block; width: 100%; height: auto; max-height: 220px; }
.chart .bar { fill: #C9DBFA; }
.chart .bar-now { fill: var(--brand); }
.chart .bar-zero { fill: var(--line); }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart text { font-family: inherit; fill: var(--ink-3); font-size: 11px; }
.chart .val { fill: var(--ink-2); font-weight: 600; }
.plan-line { margin-bottom: 8px; }
.plan-nums { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.plan-nums b { font-size: 26px; color: var(--ink); font-weight: 700; }
.empty { text-align: center; padding: 18px 8px 10px; }
.empty .ibox { width: 52px; height: 52px; border-radius: 16px; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 10px; }
.empty p { margin: 0 0 6px; }
.empty .btn { margin-top: 8px; }
.ask-list, .qlist { list-style: none; margin: 0; padding: 0; }
.ask-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ask-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.ask-list .q { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.times { flex: none; min-width: 44px; text-align: center; font-size: 12px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 4px 8px; }
.qlist.card { padding: 2px 16px; }
.qrow { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.qrow:last-child { border-bottom: 0; }
.q-main { flex: 1; min-width: 0; display: block; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.q-main strong { display: block; font-weight: 600; line-height: 1.4; }
.q-main .a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.q-main .meta { display: block; }
a.q-main:hover strong { color: var(--brand-dark); }
.qrow.is-off .q-main { opacity: .6; }
.q-side { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); text-decoration: none; position: relative; }
.icon-btn:hover { background: var(--brand-tint); color: var(--brand); }
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; border: 0; background: #D0D5DD; cursor: pointer; padding: 0; transition: background-color .15s ease; display: block; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(16 24 40 / .25); transition: transform .15s ease; }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(18px); }
.list-count { font-size: 13px; margin: 0 2px 8px; }
.search .btn { flex: none; }
table.data thead th { background: var(--bg); padding-top: 9px; padding-bottom: 9px; border-bottom: 0; }
table.data thead th:first-child { border-radius: 10px 0 0 10px; }
table.data thead th:last-child { border-radius: 0 10px 10px 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.only-phone { display: block; }
.form-gap { margin-top: 14px; }
.page-card form { margin-top: 12px; }
@media (max-width: 1023.98px) {
  .has-overlap .today { background: var(--surface); border-radius: 22px; padding: 12px; box-shadow: var(--shadow-blue); margin-bottom: 14px; }
  .qrow-wrap { flex-wrap: wrap; }
  .qrow-wrap .q-side { margin-left: auto; }
  .q-side .icon-btn { margin-right: -8px; }
}
@media (min-width: 1024px) {
  .only-phone { display: none; }
  .today { padding: 0; border: 0; background: none; margin-bottom: 14px; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; column-gap: 14px; }
  .stat-tile .ibox { width: 44px; height: 44px; background: var(--brand-soft); }
  .stat-tile.t-amber { background: var(--surface); }
  .stat-tile.t-amber .ibox { background: var(--warn-soft); }
  .stat-tile.t-green .ibox { background: #E6F7EC; }
  .stat-tile.t-teal .ibox { background: #E0F4F7; }
  .stat-tile.t-purple .ibox { background: #F1E9FE; }
  .stat-tile .v { font-size: 26px; color: var(--ink); }
  .stat-tile .k { font-size: 13px; }
  a.stat-tile:hover { border-color: #C9CFDA; }
  .cols-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .qlist.card { padding: 4px 20px; }
  .qrow:hover { background: linear-gradient(var(--brand-tint), var(--brand-tint)) no-repeat; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  /* a form reads best at a text column's width, not across the whole screen */
  .app-main > form, .app-main > form.card, .app-main > form ~ .card { max-width: 760px; }
  .app-main > form > p:last-child { margin: 4px 0 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } @view-transition { navigation: none; } }
@media print { .side, .topbar, .bottom-bar { display: none !important; } body { background: #fff; } .app-hero { background: none; color: #000; position: static; } }
