/* ==========================================================================
   BIDMETIC PUBLISHER - Professional dashboard
   Light theme, indigo primary, clean and trustworthy
========================================================================== */

:root {
  /* Surfaces */
  --bg: #f6f7fb;
  --bg-soft: #eef0f6;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --border: #e4e7ee;
  --border-strong: #d3d8e3;
  --divider: #eef0f6;

  /* Text */
  --text: #0c1124;
  --text-soft: #2c3349;
  --text-muted: #6b7488;
  --text-faint: #94a0b5;

  /* Brand: indigo (NOT emerald) */
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: #eef0ff;
  --brand-ink: #1e1b4b;

  /* Status / semantic */
  --money: #059669;
  --money-soft: #d1fae5;
  --money-deep: #065f46;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #0284c7;
  --info-soft: #e0f2fe;

  /* Chart palette */
  --c1: #4f46e5;
  --c2: #06b6d4;
  --c3: #f59e0b;
  --c4: #ec4899;
  --c5: #84cc16;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(13, 17, 36, 0.04);
  --shadow: 0 1px 3px rgba(13, 17, 36, 0.06), 0 0 0 1px rgba(13, 17, 36, 0.02);
  --shadow-md: 0 4px 12px rgba(13, 17, 36, 0.08), 0 1px 3px rgba(13, 17, 36, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: "cv02", "cv11", "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

::selection { background: var(--brand); color: #fff; }
.tnum { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   LAYOUT
========================================================================== */
.sidebar-overlay { display: none; }

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* ============== SIDEBAR ============== */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 22px 14px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 22px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 18px;
}
.brand .mark {
  width: 32px; height: 32px;
  background: var(--brand);
  border-radius: 8px;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: #fff;
}
.brand .mark svg { width: 18px; height: 18px; }
.brand .name {
  font-size: 17px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
}
.brand .tag {
  font-size: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 2.5px 7px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-left: auto;
}

.nav-group {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 16px 12px 6px;
}

.nav { list-style: none; }
.nav li { margin: 1px 0; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 500;
  transition: 0.12s;
}
.nav a svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.55; }
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a:hover svg { opacity: 0.85; }
.nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
.nav a.active svg { opacity: 1; color: var(--brand); }

.sidebar-foot { margin-top: auto; padding-top: 16px; }
.support-card {
  padding: 13px 13px;
  background: linear-gradient(135deg, var(--brand) 0%, #6366f1 100%);
  border-radius: 10px;
  color: #fff;
}
.support-card .ttl { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.support-card .desc { font-size: 11.5px; opacity: 0.85; line-height: 1.5; margin-bottom: 8px; }
.support-card a {
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============== MAIN ============== */
.main {
  padding: 26px 32px 50px;
  min-width: 0;
}

/* ============== TOPBAR ============== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.topbar .subline {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 2px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}
.user-chip .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 12px;
}

.menu-btn {
  display: none;
  width: 38px; height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

/* ============== STATUS PILLS ============== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px 3px 8px;
  border-radius: 999px;
  text-transform: capitalize;
  letter-spacing: 0.01em;
}
.pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.pill.active, .pill.approved, .pill.paid { background: var(--money-soft); color: var(--money-deep); }
.pill.pending, .pill.processing { background: var(--warn-soft); color: var(--warn); }
.pill.banned, .pill.rejected, .pill.suspended { background: var(--danger-soft); color: var(--danger); }
.pill.paused, .pill.disabled { background: var(--bg-soft); color: var(--text-muted); }

/* ==========================================================================
   HERO ROW (top 2 cards: balance + this month)
========================================================================== */
.hero-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-balance {
  background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%);
  color: #fff;
  border: none;
}
.hero-balance .label {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-balance .label::before {
  content: '';
  width: 6px; height: 6px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(52,211,153,0.25);
}
.hero-balance .amount {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.hero-balance .amount .cents {
  font-size: 26px;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
}
.hero-balance .sub {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 22px;
}
.hero-balance .cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: var(--brand-ink);
  padding: 10px 17px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
  transition: 0.15s;
  text-decoration: none;
}
.btn-cta:hover { background: rgba(255,255,255,0.92); color: var(--brand-ink); transform: translateY(-1px); }
.btn-cta-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 10px 17px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13.5px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-cta-ghost:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* Decoration on hero balance */
.hero-balance::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
  border-radius: 50%;
}

/* This month card */
.hero-month .label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.hero-month .amount {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
}
.delta.up { background: var(--money-soft); color: var(--money-deep); }
.delta.down { background: var(--danger-soft); color: var(--danger); }
.delta.flat { background: var(--bg-soft); color: var(--text-muted); }

.hero-month .meta-row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hero-month .meta-row .cell .k {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
  font-weight: 500;
}
.hero-month .meta-row .cell .v {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   STAT GRID (4 small cards)
========================================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: 0.15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.stat-card .name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-card .ico {
  width: 28px; height: 28px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 6px;
  display: inline-flex;
  align-items: center; justify-content: center;
}
.stat-card .ico svg { width: 14px; height: 14px; }
.stat-card .v {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-card .v.money { color: var(--money-deep); }
.stat-card .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   SECTION HEADER
========================================================================== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 14px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-head h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.section-head .meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   FILTER (date range)
========================================================================== */
.filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.chips {
  display: inline-flex;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 3px;
  gap: 0;
}
.chips a {
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-muted);
}
.chips a:hover { color: var(--text); }
.chips a.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.custom-r {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.custom-r input[type="date"] {
  font-family: var(--font);
  font-size: 12.5px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--text);
}
.custom-r button {
  font-size: 12.5px;
  font-weight: 600;
  background: var(--brand);
  color: #fff;
  padding: 6px 13px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
.custom-r button:hover { background: var(--brand-hover); }

/* ==========================================================================
   TWO COL: chart + countries
========================================================================== */
.two-col {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head h3 { font-size: 15px; font-weight: 600; }
.card-head .sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.card-body { padding: 20px; }

.chart-wrap {
  position: relative;
  height: 280px;
}

/* Country list */
.geo-list { list-style: none; }
.geo-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.geo-list li:last-child { border-bottom: 0; }
.flag-pill {
  width: 28px; height: 20px;
  border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}
.geo-list .info .country {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 3px;
}
.geo-list .info .bar-wrap {
  height: 4px;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
  max-width: 200px;
}
.geo-list .info .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #818cf8);
  border-radius: 4px;
}
.geo-list .amt {
  text-align: right;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--money-deep);
  font-variant-numeric: tabular-nums;
}
.geo-list .amt small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   TABLE
========================================================================== */
.tbl-wrap { overflow-x: auto; }
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tbl thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.tbl thead th.num,
.tbl tbody td.num { text-align: right; }
.tbl tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--divider);
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .strong { color: var(--text); font-weight: 600; }
.tbl .money { color: var(--money-deep); font-weight: 700; }

/* ==========================================================================
   EMPTY STATE
========================================================================== */
.empty {
  padding: 50px 24px;
  text-align: center;
}
.empty .ico-big {
  width: 56px; height: 56px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 14px;
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.empty .ico-big svg { width: 24px; height: 24px; }
.empty h4 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
}
.empty p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ==========================================================================
   FORMS
========================================================================== */
.fg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.fg.cols-3 { grid-template-columns: repeat(3, 1fr); }
.fld { display: flex; flex-direction: column; }
.fld.full { grid-column: 1 / -1; }
.fld label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.fld input, .fld select, .fld textarea {
  font-family: var(--font);
  font-size: 13.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  transition: 0.15s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.fld textarea { resize: vertical; min-height: 96px; }
.fld .hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

.btn-row {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--divider);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
  transition: 0.15s;
  text-decoration: none;
}
.btn:hover { background: var(--brand-hover); color: #fff; }
.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.secondary:hover { background: var(--bg-soft); color: var(--text); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b91c1c; }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

/* ==========================================================================
   NOTICES
========================================================================== */
.alert {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert.success { background: var(--money-soft); border-color: #a7f3d0; color: var(--money-deep); }
.alert.error { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.alert.warn { background: var(--warn-soft); border-color: #fed7aa; color: var(--warn); }
.alert.info { background: var(--info-soft); border-color: #bae6fd; color: var(--info); }

/* ==========================================================================
   CODE BLOCK
========================================================================== */
.code {
  background: #0f172a;
  color: #cbd5e1;
  padding: 14px 16px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
}
.code .copy {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.code .copy:hover { background: rgba(255,255,255,0.18); }

/* ==========================================================================
   AUTH PAGES
========================================================================== */
.auth-body { background: var(--bg); min-height: 100vh; }
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 100vh;
}
.auth-left {
  background:
    radial-gradient(at 12% 15%, rgba(255,255,255,0.18) 0, transparent 38%),
    radial-gradient(at 88% 85%, rgba(167,139,250,0.32) 0, transparent 42%),
    linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #6366f1 100%);
  color: #fff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 480px; height: 480px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-left::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.5;
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 19px;
  color: #fff !important;
  letter-spacing: -0.015em;
  position: relative;
  z-index: 3;
}
.auth-brand .m {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 9px;
  display: inline-flex;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.auth-brand .m svg { width: 18px; height: 18px; }

.auth-pitch { margin: 60px 0 60px; position: relative; z-index: 3; }
.auth-kicker {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c7d2fe !important;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 5px 13px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.auth-kicker::before {
  content: '';
  width: 6px; height: 6px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(52,211,153,0.25);
}
.auth-h {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 20px;
  color: #ffffff !important;
}
.auth-sub {
  font-size: 15.5px;
  color: rgba(255,255,255,0.85) !important;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 440px;
}

.auth-bullets { list-style: none; position: relative; z-index: 3; }
.auth-bullets li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font-size: 14.5px;
  color: rgba(255,255,255,0.95) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.auth-bullets li:last-child { border-bottom: none; }
.auth-bullets .check {
  width: 24px; height: 24px;
  background: rgba(52,211,153,0.18);
  border: 1px solid rgba(52,211,153,0.35);
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #6ee7b7;
}
.auth-bullets .check svg { width: 12px; height: 12px; }

.auth-foot {
  margin-top: auto;
  font-size: 12.5px;
  color: rgba(255,255,255,0.7) !important;
  position: relative;
  z-index: 3;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.auth-foot a { color: #fff !important; font-weight: 500; }
.auth-foot a:hover { color: #c7d2fe !important; }

.auth-right {
  padding: 56px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}
.auth-card {
  width: 100%;
  max-width: 400px;
}
.auth-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  color: var(--text);
}
.auth-tag {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 30px;
}
.auth-form .fld { margin-bottom: 16px; }
.auth-form .fld label {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.auth-form .fld input {
  padding: 12px 14px;
  font-size: 14px;
  border-width: 1.5px;
}
.auth-submit {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.15s;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}
.auth-submit:hover {
  background: var(--brand-hover);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}
.auth-switch {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--divider);
  text-align: center;
}
.auth-error {
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   RESPONSIVE — comprehensive mobile experience
========================================================================== */

/* Tablet landscape and below */
@media (max-width: 1100px) {
  .hero-row { grid-template-columns: 1fr; gap: 14px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 14px; }
  .main { padding: 24px 24px 50px; }
}

/* Tablet portrait — sidebar becomes drawer */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    box-shadow: 12px 0 40px rgba(0,0,0,0.15);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(13,17,36,0.45);
    z-index: 150;
    backdrop-filter: blur(2px);
  }
  .sidebar-overlay.show { display: block; }
  .menu-btn { display: inline-flex; }

  .main { padding: 18px 16px 40px; }

  /* Topbar: stack title vertically, badges below */
  .topbar { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 18px; }
  .topbar > div:first-child { width: 100%; }
  .topbar h1 { font-size: 20px; }
  .topbar .subline { font-size: 12.5px; }
  .topbar-right { width: 100%; justify-content: flex-end; }
  .user-chip { font-size: 12px; padding: 5px 10px 5px 5px; }
  .user-chip .avatar { width: 22px; height: 22px; font-size: 11px; }

  /* Auth pages */
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .auth-left { padding: 30px 22px 40px; min-height: auto; }
  .auth-right { padding: 30px 22px 50px; }
  .auth-pitch { margin: 30px 0; }
  .auth-h { font-size: 26px; }
  .auth-sub { font-size: 14px; }
  .auth-bullets li { font-size: 13.5px; }
  .auth-title { font-size: 24px; }

  /* Hero cards smaller padding */
  .hero-card { padding: 20px 22px; }
  .hero-balance .amount { font-size: 38px; }
  .hero-balance .amount .cents { font-size: 22px; }
  .hero-balance .sub { font-size: 12.5px; margin-bottom: 18px; }
  .hero-month .amount { font-size: 28px; }
  .hero-month .meta-row { gap: 10px; }
  .hero-month .meta-row .cell .v { font-size: 14px; }

  /* CTAs full width on mobile */
  .hero-balance .cta-row { flex-direction: column; }
  .btn-cta, .btn-cta-ghost { width: 100%; justify-content: center; }

  /* Section heads */
  .section-head h2 { font-size: 16px; }
  .section-head .meta { font-size: 12px; }

  /* Filter bar stacks vertically */
  .filter { flex-direction: column; align-items: stretch; padding: 10px; gap: 10px; }
  .chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chips a { white-space: nowrap; flex-shrink: 0; }
  .custom-r { width: 100%; justify-content: stretch; flex-wrap: wrap; }
  .custom-r input[type="date"] { flex: 1; min-width: 130px; }
  .custom-r button { width: 100%; padding: 9px; }

  /* Cards */
  .card-head { padding: 14px 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .card-head > div:last-child { width: 100%; }
  .card-body { padding: 16px; }

  /* Chart height smaller */
  .chart-wrap { height: 220px; }

  /* Country list — show smaller meta */
  .geo-list li { grid-template-columns: 26px 1fr auto; gap: 10px; padding: 10px 0; }
  .geo-list .info .country { font-size: 13px; }
  .geo-list .info .bar-wrap { max-width: 100%; }
  .geo-list .amt { font-size: 13px; }
  .geo-list .amt small { font-size: 10.5px; }

  /* Tables: horizontal scroll */
  .tbl { font-size: 12.5px; }
  .tbl thead th { padding: 10px 14px; font-size: 10.5px; }
  .tbl tbody td { padding: 11px 14px; }

  /* Forms */
  .fg, .fg.cols-3 { grid-template-columns: 1fr; gap: 14px; }
  .btn-row { flex-direction: column; gap: 8px; }
  .btn-row .btn, .btn-row .btn.secondary, .btn-row .btn.danger {
    width: 100%; justify-content: center; padding: 12px 16px;
  }

  /* Status pill smaller */
  .pill { font-size: 10.5px; padding: 3px 7px 3px 7px; }

  /* Sites/Ads two-col stacks */
  .two-col[style*="1fr 1.5fr"], .two-col[style*="1.5fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* Phone */
@media (max-width: 560px) {
  .main { padding: 14px 12px 40px; }

  .topbar h1 { font-size: 18px; }
  .topbar .subline { font-size: 12px; }
  .topbar-right .pill { font-size: 10px; }
  .user-chip { display: none; }

  .stat-grid { grid-template-columns: 1fr; gap: 10px; }

  .hero-card { padding: 18px 18px 20px; border-radius: 12px; }
  .hero-balance .label { font-size: 11px; }
  .hero-balance .amount { font-size: 34px; letter-spacing: -0.03em; }
  .hero-balance .amount .cents { font-size: 20px; }
  .hero-balance .sub { font-size: 12px; line-height: 1.5; }
  .hero-month .amount { font-size: 26px; }

  /* Hide CPM column from this-month meta */
  .hero-month .meta-row { grid-template-columns: 1fr 1fr; }
  .hero-month .meta-row .cell:nth-child(3) { display: none; }

  /* Stat card */
  .stat-card { padding: 14px 16px; }
  .stat-card .v { font-size: 20px; }

  /* Section head stacks */
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; margin: 18px 0 12px; }

  /* Empty state smaller */
  .empty { padding: 36px 16px; }
  .empty .ico-big { width: 48px; height: 48px; border-radius: 12px; }
  .empty h4 { font-size: 14px; }
  .empty p { font-size: 12.5px; }

  /* Auth tweaks */
  .auth-left { padding: 24px 18px 30px; }
  .auth-right { padding: 24px 18px 40px; }
  .auth-h { font-size: 22px; }
  .auth-pitch { margin: 22px 0; }
  .auth-title { font-size: 22px; }
  .auth-tag { font-size: 13px; margin-bottom: 22px; }
  .auth-brand { font-size: 17px; }
  .auth-bullets li { padding: 7px 0; font-size: 13px; gap: 10px; }

  /* Alerts */
  .alert { padding: 11px 13px; font-size: 12.5px; gap: 8px; border-radius: 8px; }

  /* Tables — make scrollable with sticky first column on phone */
  .tbl-wrap { margin: 0 -16px; padding: 0 16px; }
  .tbl thead th { padding: 9px 12px; font-size: 10px; }
  .tbl tbody td { padding: 10px 12px; font-size: 12.5px; }

  /* Code block */
  .code { padding: 12px 14px; font-size: 11.5px; word-break: break-all; }
  .code .copy { font-size: 10px; padding: 3px 7px; }

  /* Chart height even smaller */
  .chart-wrap { height: 200px; }
}

/* Very small phones (under 380px) */
@media (max-width: 380px) {
  .main { padding: 12px 10px 36px; }
  .hero-balance .amount { font-size: 30px; }
  .hero-balance .amount .cents { font-size: 18px; }
  .hero-month .amount { font-size: 24px; }
  .topbar h1 { font-size: 17px; }
  .btn-cta, .btn-cta-ghost { font-size: 13px; padding: 9px 14px; }
  .stat-card .v { font-size: 19px; }
  .stat-card .name { font-size: 11px; }
  .pill { display: inline-block; }
  .pill::before { display: none; }
}
