/* ─────────────────────────────────────────────────────────────────────
   Crwdly Admin — shared styles
   Brand register (light) translation of the dark reference design.
   Tokens follow PRODUCT.md / DESIGN.md.
   ───────────────────────────────────────────────────────────────────── */

/* ── Reset & base ─────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root {
  /* Surfaces */
  --bg:        #FAFAF8;
  --surface:   #FFFFFF;
  --surface2:  #F5F5F2;
  --surface3:  #EBEBEA;
  --surface-hover: #F0F0EE;

  /* Text */
  --text:      #0A0A0A;
  --text-soft: rgba(10,10,10,0.62);
  --muted:     rgba(10,10,10,0.42);
  --faint:     rgba(10,10,10,0.22);

  /* Borders */
  --border:        rgba(10,10,10,0.08);
  --border-strong: rgba(10,10,10,0.14);

  /* Accent */
  --blue:        #0057FF;
  --blue-soft:   #4D8AFF;
  --blue-tint:   #EEF3FF;
  --blue-deep:   #0044CC;

  /* States */
  --success:        #1E8F5A;
  --success-tint:   #EAF6EE;
  --danger:         #E03030;
  --danger-tint:    #FDEDED;
  --amber:          #B8860B;
  --amber-tint:     #FFF8E1;

  /* Feature semantic palette (icon backgrounds only) */
  --plan-starter:  #0057FF;
  --plan-growth:   #1E8F5A;
  --plan-scale:    #B8860B;

  /* Type scale */
  --text-2xs: 9px;
  --text-xs:  11px;
  --text-sm:  12px;
  --text-md:  13px;
  --text-base:14px;
  --text-lg:  17px;
  --text-xl:  20px;
  --text-2xl: 22px;
  --text-3xl: 28px;

  /* Motion */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-fast:    140ms;
  --dur-base:    220ms;
  --dur-slow:    320ms;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-md);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
svg { display: block; }

/* ── Topbar ───────────────────────────────────────────────────────── */
.tb {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}
.tb-left { display: flex; align-items: center; gap: 11px; }
.tb-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.tb-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(0,87,255,0.4);
}
.tb-badge {
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--blue-tint);
  color: var(--blue);
  border: 1px solid rgba(0,87,255,0.15);
  letter-spacing: 0.06em;
}
.tb-right { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.icon-btn .dot-red {
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid var(--surface);
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue-tint);
  border: 1px solid rgba(0,87,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
}
.sep {
  width: 1px;
  height: 18px;
  background: var(--border);
}

/* ── Layout ───────────────────────────────────────────────────────── */
.wrap {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────────────── */
.sb {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 250ms var(--ease-out);
}
.sb-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 6px;
}
.sb-scroll::-webkit-scrollbar { width: 0; }

.sb.collapsed { width: 56px; }
.sb.collapsed .grp { opacity: 0; height: 0; padding: 0; overflow: hidden; }
.sb.collapsed .nav-label { opacity: 0; width: 0; overflow: hidden; }
.sb.collapsed .chip { display: none; }
.sb.collapsed .sb-foot-text { opacity: 0; width: 0; overflow: hidden; }
.sb.collapsed .logo-wrap { opacity: 0; width: 0; padding: 0; }
.sb.collapsed .burger-wrap { justify-content: center; }
.sb.collapsed .divline { margin: 5px 10px; }
.sb.collapsed .nav { margin: 1px 6px; padding: 8px 8px; justify-content: center; }
.sb.collapsed .nav.on::before { left: -2px; }

/* Burger */
.burger-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-wrap {
  display: flex; align-items: center; gap: 8px;
  overflow: hidden;
  transition: opacity 200ms ease;
}
.logo-wrap .lg-dot {
  width: 7px; height: 7px;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(0,87,255,0.4);
  border-radius: 50%;
  flex-shrink: 0;
}
.logo-wrap .lg-name {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
  color: var(--text);
}
.logo-wrap .lg-tag {
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  background: var(--blue-tint);
  color: var(--blue);
  border: 1px solid rgba(0,87,255,0.15);
  white-space: nowrap;
}

.burger {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4.5px;
  cursor: pointer;
  background: transparent;
  border: none;
  flex-shrink: 0;
  padding: 0;
  transition: background var(--dur-fast) ease;
}
.burger:hover { background: var(--surface-hover); }
.bar {
  width: 16px; height: 1.5px;
  background: var(--text-soft);
  border-radius: 2px;
  transition: all 220ms var(--ease-out);
  transform-origin: center;
}
.burger.open .bar1 { transform: translateY(6px) rotate(45deg); background: var(--text); }
.burger.open .bar2 { opacity: 0; transform: scaleX(0); }
.burger.open .bar3 { transform: translateY(-6px) rotate(-45deg); background: var(--text); }

/* Nav */
.grp {
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 16px 4px;
  transition: opacity 160ms ease;
}
.nav {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 1px 7px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.nav:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.nav.on {
  background: var(--blue-tint);
  color: var(--blue);
}
.nav.on::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5px;
  height: 14px;
  border-radius: 2px;
  background: var(--blue);
}
.nav svg { flex-shrink: 0; opacity: 0.85; }
.nav.on svg { opacity: 1; }
.nav-label {
  white-space: nowrap;
  transition: opacity 200ms ease, width 200ms ease;
}
.chip {
  margin-left: auto;
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
}
.chip-red {
  background: var(--danger-tint);
  color: var(--danger);
}
.chip-n {
  background: var(--surface3);
  color: var(--muted);
}
.chip-trial {
  background: var(--amber-tint);
  color: var(--amber);
}
.divline {
  height: 1px;
  background: var(--border);
  margin: 7px 14px;
}

.sb-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.sb-av {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue-tint);
  border: 1px solid rgba(0,87,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
}
.sb-foot-text {
  overflow: hidden;
  transition: opacity 200ms ease, width 200ms ease;
}
.sb-name { font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }
.sb-role { font-size: var(--text-xs); color: var(--muted); white-space: nowrap; }

/* ── Main ─────────────────────────────────────────────────────────── */
.main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
}
.main::-webkit-scrollbar { width: 6px; }
.main::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.main::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Page header */
.ph {
  padding: 22px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ph-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text);
}
.ph-sub {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 3px;
}
.btns { display: flex; gap: 8px; }

/* Buttons */
.btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
  font-family: inherit;
}
@media (hover: hover) and (pointer: fine) {
  .btn:active { transform: scale(0.97); }
}
.btn-p {
  background: var(--blue);
  color: #fff;
}
.btn-p:hover { background: var(--blue-deep); }
.btn-s {
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.btn-s:hover { color: var(--text); background: var(--surface-hover); }
.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border: 1px solid var(--border);
}
.btn-danger:hover {
  background: var(--danger-tint);
  border-color: rgba(224,48,48,0.3);
}
.btn-sm { padding: 5px 10px; font-size: var(--text-xs); }

/* ── Stat strip ───────────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 20px 24px 0;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.stat {
  background: var(--surface);
  padding: 15px 18px;
}
.sl {
  font-size: var(--text-2xs);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.sv {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.8px;
  color: var(--text);
  font-feature-settings: 'tnum';
}
.sc {
  font-size: var(--text-xs);
  margin-top: 4px;
  color: var(--muted);
}
.sc.up { color: var(--success); }
.sc.down { color: var(--danger); }

/* ── Section header ───────────────────────────────────────────────── */
.sec { margin: 22px 24px 0; }
.sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}
.st {
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
}
.link {
  font-size: var(--text-xs);
  color: var(--blue);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 500;
}
.link:hover { text-decoration: underline; }

/* Live dot */
.ldot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--danger);
  animation: ldot-pulse 2s ease-in-out infinite;
}
@keyframes ldot-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(224,48,48,0.4); }
  50%     { box-shadow: 0 0 0 5px rgba(224,48,48,0); }
}
@media (prefers-reduced-motion: reduce) {
  .ldot { animation: none; }
}

/* ── Table ────────────────────────────────────────────────────────── */
.tbl {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.th {
  display: grid;
  padding: 10px 16px;
  background: var(--surface2);
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.tr {
  display: grid;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  gap: 12px;
  transition: background 100ms ease;
}
.tr:first-of-type { border-top: none; }
.tr:hover { background: var(--surface2); }
.tr.drafted { opacity: 0.55; }
.tr.drafted:hover { opacity: 1; }

/* Dashboard / events table column layout */
.tbl.evs .th,
.tbl.evs .tr {
  grid-template-columns: 2fr 90px 95px 90px 80px 90px 64px;
}

.en {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
}
.eo {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 2px;
}
.slug {
  font-size: var(--text-xs);
  color: var(--blue);
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
.att {
  font-size: var(--text-sm);
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
.rv {
  font-size: var(--text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.rv.muted { color: var(--faint); }
.ra { display: flex; gap: 3px; justify-content: flex-end; }
.rb {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: var(--text-sm);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.rb:hover { background: var(--surface-hover); color: var(--text); }

/* Status badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; }
.bl  { background: var(--success-tint); color: var(--success); }
.bl  .dot { background: var(--success); }
.bu  { background: var(--blue-tint); color: var(--blue); }
.bu  .dot { background: var(--blue); }
.bd  { background: var(--surface3); color: var(--muted); }
.bd  .dot { background: var(--muted); }
.bw  { background: var(--amber-tint); color: var(--amber); }
.bw  .dot { background: var(--amber); }
.brd { background: var(--danger-tint); color: var(--danger); }
.brd .dot { background: var(--danger); }

/* Plan pill */
.plan {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ps  { background: var(--blue-tint);    color: var(--blue); }
.pg  { background: var(--success-tint); color: var(--success); }
.psc { background: var(--amber-tint);   color: var(--amber); }
.pan { background: #F3EEFF;             color: #6B46C1; }

/* ── Bottom grid (dashboard) ──────────────────────────────────────── */
.bg2 {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  margin: 18px 24px 28px;
}
.blk {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.bh {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bt {
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bb { padding: 14px 16px; }

/* API rows */
.ar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.ar:last-child { border-bottom: none; }
.an { font-size: var(--text-xs); color: var(--text-soft); flex: 1; }
.bw-meter {
  width: 80px; height: 4px;
  background: var(--surface3);
  border-radius: 3px;
  overflow: hidden;
}
.bf {
  height: 100%;
  border-radius: 3px;
  transition: width var(--dur-base) var(--ease-out);
}
.ac {
  font-size: var(--text-xs);
  color: var(--muted);
  width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.am {
  font-size: var(--text-xs);
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  width: 50px;
  text-align: right;
}

/* Activity feed */
.ai {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.ai:last-child { border-bottom: none; }
.ad {
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.at {
  font-size: var(--text-xs);
  color: var(--text-soft);
  line-height: 1.5;
}
.at b { color: var(--text); font-weight: 500; }
.atm {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 2px;
}

/* Revenue rows */
.rr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.rr:last-child { border-bottom: none; }
.rl {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: var(--text-sm);
}
.rrr { display: flex; align-items: center; gap: 8px; }
.rp { font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.ra2 {
  font-size: var(--text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* ── Tabs (event detail) ──────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  margin: 18px 24px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  padding: 10px 14px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.on {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.tab-panel { display: none; }
.tab-panel.on { display: block; animation: tab-in var(--dur-base) var(--ease-out); }
@keyframes tab-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* ── Forms ────────────────────────────────────────────────────────── */
.field {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
.field-input {
  font-family: inherit;
  font-size: var(--text-base);
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,87,255,0.12);
}
.field-error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: 2px;
}

/* Toggle */
.toggle {
  position: relative;
  width: 34px; height: 20px;
  background: var(--surface3);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out);
  flex-shrink: 0;
  border: none;
  padding: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform var(--dur-base) var(--ease-out);
}
.toggle.on {
  background: var(--blue);
}
.toggle.on::after { transform: translateX(14px); }
.toggle:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Login page ───────────────────────────────────────────────────── */
.lg-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.lg-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 12px 40px -16px rgba(10,10,10,0.10);
}
.lg-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.lg-brand-dot {
  width: 8px; height: 8px;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(0,87,255,0.5);
  border-radius: 50%;
}
.lg-brand-name {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.3px;
}
.lg-brand-tag {
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--blue-tint);
  color: var(--blue);
  border: 1px solid rgba(0,87,255,0.15);
  letter-spacing: 0.06em;
}
.lg-title {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.4px;
  margin: 18px 0 4px;
}
.lg-sub {
  font-size: var(--text-sm);
  color: var(--text-soft);
  margin-bottom: 22px;
}
.lg-btn {
  width: 100%;
  padding: 11px;
  justify-content: center;
  font-size: var(--text-base);
}
.lg-foot {
  margin-top: 22px;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--muted);
}
.lg-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.lg-or::before, .lg-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.lg-google {
  width: 100%;
  padding: 11px;
  justify-content: center;
  align-items: center;
  gap: 9px;
  font-size: var(--text-base);
  font-weight: 500;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  display: inline-flex;
}
.lg-google:hover { background: var(--surface2); border-color: rgba(11,11,12,0.16); }
.lg-google:active { transform: scale(0.99); }
.lg-google svg { flex-shrink: 0; }
.lg-error {
  background: var(--danger-tint);
  border: 1px solid rgba(224,48,48,0.18);
  color: var(--danger);
  font-size: var(--text-sm);
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* ── Empty state ──────────────────────────────────────────────────── */
.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: var(--text-sm);
}
.empty-title {
  font-size: var(--text-base);
  color: var(--text-soft);
  font-weight: 500;
  margin-bottom: 4px;
}

/* ── Skeleton loaders ─────────────────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
  height: 14px;
}
@keyframes skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; }
}

/* ── Toast ────────────────────────────────────────────────────────── */
.toast-host {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: var(--bg);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 100px;
  box-shadow: 0 6px 20px -4px rgba(10,10,10,0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.toast.in { opacity: 1; transform: none; }
.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }

/* ── Modal ────────────────────────────────────────────────────────── */
.mb-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.32);
  z-index: 900;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.mb-backdrop.in { opacity: 1; }
.mb {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, calc(-50% + 8px)) scale(0.98);
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(10,10,10,0.25);
  z-index: 901;
  width: 92%; max-width: 460px;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.mb.in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.mb-head {
  padding: 18px 22px 12px;
}
.mb-title {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.3px;
}
.mb-body {
  padding: 0 22px 18px;
  font-size: var(--text-sm);
  color: var(--text-soft);
  line-height: 1.55;
}
.mb-foot {
  padding: 12px 22px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .bg2 { grid-template-columns: 1fr; }
  .ph { flex-direction: column; align-items: flex-start; }
  .tbl.evs .th,
  .tbl.evs .tr {
    grid-template-columns: 1fr 70px 64px;
  }
  .tbl.evs .col-hide-sm { display: none; }
  .sb { position: fixed; z-index: 50; height: 100%; box-shadow: 4px 0 20px rgba(0,0,0,0.08); }
  .sb.collapsed { width: 0; border-right: none; }
}
