/* styles.css
 * ============================================================================
 * CarWash B2B Cabinet — prototype styling
 * Dense, calm, operational enterprise dashboard. Light theme, teal-blue accent.
 * ============================================================================ */

:root {
  /* accent — teal-blue */
  --accent-700: #155e75;
  --accent-600: #0e7490;
  --accent-500: #0891b2;
  --accent-50:  #ecfeff;
  --accent-100: #cff2f7;

  /* neutrals */
  --ink:        #0f172a;
  --ink-2:      #334155;
  --muted:      #64748b;
  --muted-2:    #94a3b8;
  --line:       #e6eaef;
  --line-2:     #eef2f6;
  --bg:         #f4f6f9;
  --surface:    #ffffff;
  --surface-2:  #f8fafc;

  /* status */
  --good:   #047857; --good-bg:   #ecfdf5; --good-bd:   #a7f3d0;
  --warn:   #b45309; --warn-bg:   #fffbeb; --warn-bd:   #fde68a;
  --bad:    #b91c1c; --bad-bg:    #fef2f2; --bad-bd:    #fecaca;
  --info:   #1d4ed8; --info-bg:   #eff6ff; --info-bd:   #bfdbfe;
  --neutral:#475569; --neutral-bg:#f1f5f9; --neutral-bd:#e2e8f0;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow: 0 4px 16px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.16);
  --sidebar-w: 236px;
  --topbar-h: 56px;
  --font: 'Nunito Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d5dce4; border-radius: 8px; border: 2px solid var(--bg); }

/* ── App shell ────────────────────────────────────────────────────────────*/
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: var(--topbar-h) 1fr; height: 100vh; }
.topbar { grid-column: 1 / 3; grid-row: 1; }
.sidebar { grid-column: 1; grid-row: 2; }
.main { grid-column: 2; grid-row: 2; overflow: auto; min-width: 0; }

/* ── Topbar ───────────────────────────────────────────────────────────────*/
.topbar {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 0 18px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; width: calc(var(--sidebar-w) - 18px); flex-shrink: 0; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-700));
  display: grid; place-items: center; color: #fff;
}
.brand .logo svg { width: 18px; height: 18px; }
.brand .bname { font-weight: 800; font-size: 14px; letter-spacing: -.2px; }
.brand .btag { font-size: 10px; color: var(--muted); margin-top: -2px; }

.topbar-spacer { flex: 1; }
.topbar-ctx { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-ctx .ctx-name { font-weight: 700; }
.topbar-ctx .ctx-sub { color: var(--muted); font-size: 11px; }


.lang-switch { display: flex; gap: 2px; }
.lang-switch button { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 7px; font-size: 11px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; }
.lang-switch button.active { color: var(--accent-700); background: var(--accent-50); }

.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 17px; height: 17px; }

/* ── Sidebar ──────────────────────────────────────────────────────────────*/
.sidebar { background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 10px 24px; }
.nav-group-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted-2); padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: 13px; margin-bottom: 1px; position: relative; }
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: var(--accent-50); color: var(--accent-700); }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-600); }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.nav-item .nav-badge { margin-left: auto; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-bd); }

.sidebar-footer { margin-top: 18px; padding: 10px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--muted); }
.sidebar-footer .src { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; }

/* ── Main / pages ─────────────────────────────────────────────────────────*/
.page { padding: 18px 22px 40px; width: 100%; max-width: none; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .ph-titles { min-width: 0; }
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-head .ph-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.company-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 16px; }
.company-strip .cs-item { display: flex; flex-direction: column; }
.company-strip .cs-k { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted-2); font-weight: 700; }
.company-strip .cs-v { font-weight: 700; font-size: 13px; }
.company-strip .cs-sep { width: 1px; align-self: stretch; background: var(--line); }

/* ── Buttons ──────────────────────────────────────────────────────────────*/
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent-600); border-color: var(--accent-600); color: #fff; }
.btn-primary:hover { background: var(--accent-700); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 5px 9px; font-size: 11.5px; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-danger { color: var(--bad); border-color: var(--bad-bd); background: var(--bad-bg); }

/* ── KPI grid ─────────────────────────────────────────────────────────────*/
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; }
.kpi .k-label { font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .k-val { font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin-top: 6px; line-height: 1.1; }
.kpi .k-sub { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.kpi.accent { background: linear-gradient(135deg, var(--accent-700), var(--accent-600)); border-color: transparent; color: #fff; }
.kpi.accent .k-label, .kpi.accent .k-sub { color: rgba(255,255,255,.82); }
.kpi.warnk .k-val { color: var(--bad); }
.kpi .k-ic { width: 16px; height: 16px; opacity: .7; }

/* ── Cards / panels ───────────────────────────────────────────────────────*/
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 13.5px; font-weight: 800; margin: 0; }
.card-head .ch-sub { font-size: 11px; color: var(--muted); font-weight: 500; }
.card-head .ch-actions { margin-left: auto; display: flex; gap: 6px; }
.card-body { padding: 12px 14px; }
.card-body.flush { padding: 0; }

/* ── Tables ───────────────────────────────────────────────────────────────*/
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table-wrap table.tbl { min-width: 100%; }
table.tbl th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 800; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; }
table.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: middle; }
table.tbl tbody tr:hover { background: var(--accent-50); }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .mono { font-family: 'SF Mono', ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 11.5px; }
table.tbl .strong { font-weight: 700; }
table.tbl .muted { color: var(--muted); }
.row-sub { font-size: 10.5px; color: var(--muted-2); }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line-2); }

/* ── Badges / chips ───────────────────────────────────────────────────────*/
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--neutral-bd); background: var(--neutral-bg); color: var(--neutral); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.good { color: var(--good); background: var(--good-bg); border-color: var(--good-bd); }
.badge.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-bd); }
.badge.bad  { color: var(--bad);  background: var(--bad-bg);  border-color: var(--bad-bd); }
.badge.info { color: var(--info); background: var(--info-bg); border-color: var(--info-bd); }
.badge.plain::before { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.chip.accent { background: var(--accent-50); border-color: var(--accent-100); color: var(--accent-700); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* ── Filter bar ───────────────────────────────────────────────────────────*/
.filterbar { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 3px; }
.field label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted-2); }
.input, select.input { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 6px 9px; font-size: 12.5px; color: var(--ink); font-family: inherit; min-width: 120px; height: 32px; }
.input:focus, select.input:focus { outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px var(--accent-50); }
.input.search { min-width: 200px; background-repeat: no-repeat; background-position: 9px center; padding-left: 30px; }
.filter-actions { margin-left: auto; display: flex; gap: 6px; align-items: flex-end; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; background: var(--accent-50); border: 1px solid var(--accent-100); color: var(--accent-700); border-radius: 20px; padding: 3px 6px 3px 10px; }
.filter-pill button { border: 0; background: transparent; color: var(--accent-700); display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; }
.filter-pill button:hover { background: var(--accent-100); }

/* segmented (tabs / demo states) */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.segmented button.active { background: var(--surface); color: var(--accent-700); box-shadow: var(--shadow-sm); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 9px 14px; font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--accent-700); border-bottom-color: var(--accent-600); }

/* ── Progress ─────────────────────────────────────────────────────────────*/
.progress { height: 7px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 6px; background: var(--accent-500); }
.progress.warn > span { background: var(--warn); }
.progress.bad > span { background: var(--bad); }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 4px; }
.progress-label b { font-weight: 800; }

/* promo mini card (dashboard) */
.promo-mini { padding: 11px 12px; border-bottom: 1px solid var(--line-2); }
.promo-mini:last-child { border-bottom: 0; }
.promo-mini .pm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.promo-mini .pm-code { font-weight: 800; font-size: 12.5px; }
.promo-mini .pm-name { font-size: 11px; color: var(--muted); }

/* list rows (branches/vehicles blocks) */
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.mini-row:last-child { border-bottom: 0; }
.mini-row .mr-main { font-weight: 600; }
.mini-row .mr-sub { color: var(--muted); font-size: 11px; }
.mini-row .mr-val { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }

/* quick actions */
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .qa-grid { grid-template-columns: 1fr 1fr; } }
.qa { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; }
.qa:hover { border-color: var(--accent-500); background: var(--accent-50); }
.qa .qa-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-50); color: var(--accent-700); display: grid; place-items: center; }
.qa .qa-ic svg { width: 18px; height: 18px; }
.qa .qa-t { font-weight: 700; font-size: 13px; }

/* ── States (empty/loading/error) ────────────────────────────────────────*/
.state { text-align: center; padding: 46px 20px; color: var(--muted); }
.state .state-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 12px; color: var(--muted-2); }
.state .state-ic svg { width: 24px; height: 24px; }
.state h4 { font-size: 14px; color: var(--ink-2); margin: 0 0 4px; }
.state p { font-size: 12.5px; margin: 0 auto; max-width: 340px; }
.skeleton-row { height: 40px; border-bottom: 1px solid var(--line-2); background: linear-gradient(90deg, var(--surface-2) 25%, #eef2f6 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--accent-600); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* alert box (edge cases) */
.alert { display: flex; gap: 11px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 12px; }
.alert .al-ic { flex-shrink: 0; width: 22px; height: 22px; }
.alert .al-ic svg { width: 22px; height: 22px; }
.alert .al-t { font-weight: 800; font-size: 13px; }
.alert .al-d { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.alert.warn { background: var(--warn-bg); border-color: var(--warn-bd); } .alert.warn .al-ic { color: var(--warn); }
.alert.bad  { background: var(--bad-bg);  border-color: var(--bad-bd); }  .alert.bad .al-ic  { color: var(--bad); }
.alert.info { background: var(--info-bg); border-color: var(--info-bd); } .alert.info .al-ic { color: var(--info); }
.alert.good { background: var(--good-bg); border-color: var(--good-bd); } .alert.good .al-ic { color: var(--good); }

/* ── Drawer ───────────────────────────────────────────────────────────────*/
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.38); opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 40; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 680px; max-width: 94vw; background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .22s cubic-bezier(.4,0,.2,1); z-index: 41; display: flex; flex-direction: column; }
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head .dh-t { font-size: 16px; font-weight: 800; }
.drawer-head .dh-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.drawer-head .dh-close { margin-left: auto; }
.drawer-body { overflow-y: auto; padding: 16px 18px 30px; flex: 1; }
.drawer-foot { border-top: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 8px; flex-wrap: wrap; }

/* definition list */
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 7px 12px; font-size: 12.5px; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; font-weight: 600; text-align: right; }
.section-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted-2); margin: 18px 0 8px; }
.section-label:first-child { margin-top: 0; }

/* timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 14px 4px; }
.tl-item::before { content: ''; position: absolute; left: -19px; top: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent-500); }
.tl-item.done::before { background: var(--accent-500); }
.tl-item.fail::before { border-color: var(--bad); background: var(--bad); }
.tl-item.pending::before { border-color: var(--muted-2); }
.tl-item .tl-t { font-weight: 700; font-size: 12.5px; }
.tl-item .tl-time { font-size: 11px; color: var(--muted); }

/* ── Modal ────────────────────────────────────────────────────────────────*/
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .16s; }
.modal.show { opacity: 1; pointer-events: auto; }
.modal-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 560px; max-width: 100%; max-height: calc(100vh - 40px); overflow: hidden; display: flex; flex-direction: column; transform: translateY(10px); transition: transform .18s; }
.modal-card-wide { width: 760px; }
.modal.show .modal-card { transform: translateY(0); }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.modal-body { padding: 18px; min-height: 0; overflow-y: auto; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--line-2); display: flex; flex: 0 0 auto; gap: 8px; justify-content: flex-end; background: var(--surface); }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } .login-aside { display: none; } }
.login-aside { background: linear-gradient(150deg, var(--accent-700), var(--accent-600) 60%, var(--accent-500)); color: #fff; padding: 46px; display: flex; flex-direction: column; justify-content: space-between; }
.login-aside .la-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.login-aside .la-logo { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.login-aside .la-logo svg { width: 24px; height: 24px; }
.login-aside h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.6px; margin: 0 0 14px; max-width: 460px; }
.login-aside .la-lead { font-size: 14px; opacity: .9; max-width: 420px; }
.login-aside .la-feats { display: grid; gap: 10px; margin-top: 26px; }
.login-aside .la-feat { display: flex; gap: 10px; align-items: center; font-size: 13.5px; opacity: .95; }
.login-aside .la-feat svg { width: 18px; height: 18px; flex-shrink: 0; }
.login-aside .la-foot { font-size: 12px; opacity: .75; }

.login-main { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.login-card { width: 380px; max-width: 100%; }
.login-card .lc-invite { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; }
.login-card .lc-invite .li-av { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-50); color: var(--accent-700); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.login-card h2 { font-size: 21px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.3px; }
.login-card .lc-sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.login-card label.fld-label { font-size: 12px; font-weight: 700; display: block; margin-bottom: 6px; }
.login-card .input { width: 100%; height: 44px; font-size: 15px; }
.login-card .fld-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.login-card .btn { width: 100%; justify-content: center; height: 44px; font-size: 14px; margin-top: 16px; }
.otp-inputs { display: flex; gap: 8px; }
.otp-inputs input { width: 100%; height: 52px; text-align: center; font-size: 22px; font-weight: 800; border: 1px solid var(--line); border-radius: 9px; font-family: 'SF Mono', ui-monospace, monospace; }
.otp-inputs input:focus { outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px var(--accent-50); }
.otp-inputs.err input { border-color: var(--bad-bd); background: var(--bad-bg); }
.login-alt { text-align: center; margin-top: 22px; font-size: 12.5px; color: var(--muted); }
.login-alt button { background: transparent; border: 0; color: var(--accent-700); font-weight: 700; }
.demo-note { margin-top: 14px; font-size: 11px; color: var(--muted-2); text-align: center; padding: 8px; background: var(--surface-2); border-radius: 8px; border: 1px dashed var(--line); }

/* admin banner */
.impersonate-banner { display: flex; align-items: center; gap: 10px; background: #1e293b; color: #fff; font-size: 12.5px; font-weight: 600; padding: 7px 16px; }
.impersonate-banner .ib-name { font-weight: 800; }
.impersonate-banner button { margin-left: auto; background: rgba(255,255,255,.14); border: 0; color: #fff; padding: 4px 10px; border-radius: 6px; font-weight: 700; font-size: 12px; }

/* toast */
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #1e293b; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; animation: toastin .2s; }
.toast svg { width: 16px; height: 16px; color: #6ee7b7; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

.help { color: var(--muted-2); cursor: help; display: inline-grid; place-items: center; }
.help svg { width: 13px; height: 13px; }
.tt { position: relative; }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #1e293b; color: #fff; font-size: 11px; font-weight: 600; padding: 5px 8px; border-radius: 6px; white-space: nowrap; z-index: 70; box-shadow: var(--shadow); }

.text-good { color: var(--good); } .text-bad { color: var(--bad); } .text-warn { color: var(--warn); } .text-muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.flex { display: flex; } .items-center { align-items: center; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mb-0 { margin-bottom: 0; }

/* promo form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .field { min-width: 0; }
.form-wide { grid-column: 1 / -1; }
.input.multi { min-height: 86px; height: auto; padding: 6px; }
.fld-help { font-size: 11px; color: var(--muted); margin-top: 4px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.shell-progress { display:flex; align-items:center; gap:8px; min-height:34px; padding:8px 22px; color:var(--muted); font-size:12px; border-bottom:1px solid var(--border); }
.shell-progress span { width:8px; height:8px; border-radius:50%; background:var(--accent); animation:pulse 1s infinite alternate; }
.sidebar-identity { display:flex; align-items:center; gap:10px; margin-top:auto; padding:14px 16px; border-top:1px solid var(--border); }
.identity-avatar { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:var(--accent-soft); color:var(--accent); font-weight:700; }
.identity-copy { display:flex; min-width:0; flex-direction:column; gap:2px; }
.identity-copy strong,.identity-copy span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.identity-copy span { color:var(--muted); font-size:11px; }
.promo-code-row { display:flex; align-items:center; gap:8px; }
.promo-code-row .input { flex:1; }
.invite-password-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; }
.invite-password-row .input { width:100%; min-width:0; height:40px; font-family:ui-monospace, SFMono-Regular, Consolas, monospace; }
.invite-password-row .btn { justify-content:center; min-height:40px; }
@media (max-width: 620px) {
  .invite-password-row { grid-template-columns:1fr 1fr; }
  .invite-password-row .input { grid-column:1 / -1; }
}
.promo-availability { min-height:16px; margin-top:4px; font-size:11px; color:var(--muted); }
.promo-availability.available { color:var(--good); }
.promo-availability.unavailable,.promo-availability.error { color:var(--bad); }
.chip-picker { border:1px solid var(--border); border-radius:10px; padding:10px; background:var(--surface); }
.chip-picker-selected { display:flex; min-height:30px; flex-wrap:wrap; gap:6px; }
.picker-chip { display:inline-flex; align-items:center; gap:5px; border:0; border-radius:999px; padding:5px 8px; background:var(--accent-soft); color:var(--accent); cursor:pointer; }
.picker-chip svg { width:12px; height:12px; }
.picker-chip.inactive { background:var(--warn-soft); color:var(--warn); }
.chip-picker-toolbar { display:grid; grid-template-columns:minmax(160px,1fr) auto auto; gap:6px; margin-top:8px; }
.chip-picker-options { display:grid; max-height:190px; gap:4px; margin-top:8px; overflow:auto; }
.chip-option { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; border:1px solid transparent; border-radius:8px; padding:8px; background:transparent; text-align:left; cursor:pointer; }
.chip-option:hover,.chip-option.selected { border-color:var(--accent); background:var(--accent-soft); }
.chip-option:disabled { cursor:not-allowed; opacity:.62; }
.picker-empty { padding:12px; text-align:center; }
@keyframes pulse { to { opacity:.35; } }

/* Managed B2B distribution */
.pool-grid { display: grid; gap: 16px; margin-bottom: 18px; }
.pool-card { overflow: hidden; }
.pool-stats { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pool-stats > div { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: var(--surface); }
.pool-stats strong { font-size: 22px; line-height: 1; }
.pool-stats span { color: var(--muted); font-size: 12px; }
.tbl.compact th, .tbl.compact td { padding-top: 10px; padding-bottom: 10px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; max-height: 220px; overflow: auto; }
.check-row, .radio-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
.check-row input, .radio-row input { flex: 0 0 auto; }
.check-row span { display: flex; flex-direction: column; min-width: 0; }
.check-row small { color: var(--muted); }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { margin-bottom: 8px; font-weight: 600; }
textarea.input { min-height: 96px; resize: vertical; }
@media (max-width: 700px) {
  .pool-stats { grid-template-columns: repeat(2, 1fr); }
  .pool-card .card-head { align-items: flex-start; }
}