/* ==========================================================================
   ВЕЗЁМ PARTNERS v2.0 — Pro Affiliate SaaS Design System
   Unified Brand DNA: Electric Indigo (#5445ee) + Warm Gold (#ffd166 / #ffcf26) + Obsidian (#0d0b18)
   ========================================================================== */

:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef0f6;
  --line: #e5e7f0;
  --line-strong: #d3d7e6;
  --text: #12111e;
  --text-2: #3f3d56;
  --muted: #7a7891;

  --sb-bg: #0d0b16;
  --sb-surface: #171426;
  --sb-hover: #1f1b33;
  --sb-line: #24203b;
  --sb-text: #f5f4fb;
  --sb-muted: #8e8aa8;

  --indigo: #5445ee;
  --indigo-dark: #3f31d1;
  --indigo-soft: rgba(84, 69, 238, 0.11);
  --gold: #ffcf26;
  --gold-hover: #f6c008;
  --gold-soft: rgba(255, 207, 38, 0.18);
  --gold-ink: #12101b;

  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.14);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.13);
  --amber: #f59e0b;

  --shadow-sm: 0 2px 10px rgba(16, 14, 36, 0.04);
  --shadow-md: 0 10px 30px rgba(16, 14, 36, 0.07);
  --shadow-lg: 0 24px 60px rgba(10, 8, 24, 0.22);
  --radius: 18px;
  --radius-sm: 12px;
  --sb-w: 256px;
}

[data-theme="dark"] {
  --bg: #090812;
  --surface: #121020;
  --surface-2: #19162b;
  --surface-3: #221e38;
  --line: #262240;
  --line-strong: #352f57;
  --text: #f7f6fc;
  --text-2: #cbc8de;
  --muted: #8b86a6;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.4);
}

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

html, body {
  min-height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ==================== BUTTONS & CONTROLS ==================== */
.btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn.sm { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: 10px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 999px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 13px; }

.btn.gold {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 207, 38, 0.32);
}
.btn.gold:hover { background: var(--gold-hover); }

.btn.indigo {
  background: linear-gradient(135deg, #6557ff 0%, #4b3ce0 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(84, 69, 238, 0.28);
}
.btn.indigo:hover { filter: brightness(1.06); }

.btn.dark {
  background: #141222;
  color: #ffffff;
}
[data-theme="dark"] .btn.dark {
  background: #f5f4fb;
  color: #12101e;
}

.btn.outline {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.btn.outline:hover {
  border-color: var(--indigo);
  background: var(--surface-2);
}

.btn.ghost {
  background: var(--surface-3);
  color: var(--text-2);
}
.btn.ghost:hover {
  background: var(--line);
  color: var(--text);
}

.inp {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.inp:focus {
  border-color: var(--indigo);
  background: var(--surface);
}
textarea.inp {
  height: auto;
  padding: 11px 14px;
  resize: vertical;
}

.lbl {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 12px;
}
.lbl .inp { margin-top: 6px; }

/* Toggle Switch (1xWIN style) */
.switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.sw-track {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  transition: background 0.18s;
  flex-shrink: 0;
}
.sw-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.18s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.switch-pill input { display: none; }
.switch-pill input:checked + .sw-track { background: var(--indigo); }
.switch-pill input:checked + .sw-track .sw-thumb { transform: translateX(16px); }

/* ==================== 1. AUTH / LANDING VIEW ==================== */
.auth-shell {
  min-height: 100vh;
  background: radial-gradient(circle at 15% 0%, #1d1742 0%, #0b0916 62%);
  color: #f8f7fc;
  display: flex;
  flex-direction: column;
}
.auth-topbar {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(84, 69, 238, 0.45);
}
.auth-brand-title {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-stripes {
  display: inline-flex;
  gap: 3px;
  transform: skewX(-18deg);
}
.auth-stripes i {
  width: 5px;
  height: 12px;
  border-radius: 1.5px;
  background: var(--gold);
}
.auth-grid {
  max-width: 1320px;
  width: 100%;
  margin: auto;
  padding: 16px 24px 48px;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 30px;
  align-items: start;
}
@media (max-width: 980px) {
  .auth-grid { grid-template-columns: 1fr; }
}
.pitch-panel {
  background: linear-gradient(155deg, rgba(27, 23, 54, 0.92) 0%, rgba(15, 13, 30, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.pitch-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 207, 38, 0.15);
  border: 1px solid rgba(255, 207, 38, 0.4);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}
.pitch-h1 {
  font-size: clamp(26px, 3.3vw, 38px);
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.pitch-sub {
  font-size: 15px;
  color: #b4b0cc;
  margin-bottom: 24px;
}
.pitch-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}
@media (max-width: 640px) {
  .pitch-perks { grid-template-columns: 1fr; }
}
.pitch-perk {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 15px;
}
.pitch-perk b {
  display: block;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 4px;
}
.pitch-perk p {
  font-size: 12.5px;
  color: #a7a3c2;
}
.auth-card {
  background: #141126;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.auth-card .inp {
  background: #1d1936;
  border-color: #2f2954;
  color: #ffffff;
}
.auth-card .inp:focus { border-color: #7c73ff; }
.auth-card .lbl { color: #a7a3c2; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0d0b1a;
  padding: 4px;
  border-radius: 13px;
  margin-bottom: 18px;
}
.auth-tab {
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9691b5;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
}
.auth-tab.active {
  background: var(--gold);
  color: #12101e;
}

/* ==================== 2. PRO AFFILIATE APP SHELL ==================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* LEFT DARK SIDEBAR */
.sidebar {
  width: var(--sb-w);
  background: var(--sb-bg);
  color: var(--sb-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  border-right: 1px solid var(--sb-line);
  transition: width 0.2s ease, transform 0.22s ease;
}

.sb-brand {
  padding: 18px 18px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.sb-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(84, 69, 238, 0.4);
}
.sb-logo-txt {
  overflow: hidden;
}
.sb-logo-main {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #ffffff;
}
.sb-logo-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.sb-stripes {
  display: inline-flex;
  gap: 2.5px;
  transform: skewX(-20deg);
}
.sb-stripes i {
  width: 4px;
  height: 7px;
  background: var(--gold);
  border-radius: 1px;
}
.sb-logo-sub span {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--gold);
}

/* Partner Profile Pill inside Sidebar */
.sb-profile {
  margin: 4px 12px 14px;
  padding: 10px 12px;
  background: var(--sb-surface);
  border: 1px solid var(--sb-line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gold);
  color: #12101e;
  font-weight: 900;
  font-size: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  clip-path: polygon(0 0, 76% 0, 100% 24%, 100% 100%, 0 100%);
}
.sb-prof-info {
  flex: 1;
  min-width: 0;
}
.sb-prof-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-prof-id {
  font-size: 11px;
  color: var(--sb-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.sb-gear-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--sb-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.sb-gear-btn:hover {
  background: var(--sb-hover);
  color: #ffffff;
}

.sb-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 12px;
}
.sb-section-lbl {
  padding: 8px 12px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #676382;
}
.sb-nav {
  display: grid;
  gap: 3px;
}
.sb-item {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #a8a4c2;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  position: relative;
  transition: background 0.14s, color 0.14s;
}
.sb-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}
.sb-item.active {
  background: var(--sb-hover);
  color: #ffffff;
  font-weight: 700;
}
.sb-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: var(--gold);
}
.sb-ico {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.9;
}
.sb-item.active .sb-ico {
  color: var(--gold);
  opacity: 1;
}
.sb-divider {
  height: 1px;
  background: var(--sb-line);
  margin: 12px 8px;
}

/* Sidebar Footer (PIN + Theme + Lang) */
.sb-footer {
  padding: 12px;
  border-top: 1px solid var(--sb-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sb-chip {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--sb-line);
  background: var(--sb-surface);
  color: var(--sb-muted);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.sb-chip:hover { color: #ffffff; border-color: #3d3763; }

/* Collapsed Sidebar Desktop */
body.sb-collapsed { --sb-w: 76px; }
body.sb-collapsed .sb-logo-txt,
body.sb-collapsed .sb-prof-info,
body.sb-collapsed .sb-gear-btn,
body.sb-collapsed .sb-section-lbl,
body.sb-collapsed .sb-item span.sb-lbl,
body.sb-collapsed .sb-footer .sb-hide-col {
  display: none;
}
body.sb-collapsed .sb-profile { justify-content: center; padding: 8px; }
body.sb-collapsed .sb-item { justify-content: center; padding: 0; }
body.sb-collapsed .sb-footer { justify-content: center; }

/* MAIN WORKSPACE */
.workspace {
  flex: 1;
  margin-left: var(--sb-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.2s ease;
}

/* TOP HEADER BAR (1xWIN style) */
.cab-topbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 26px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 35;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sb-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: var(--gold);
  color: #12101e;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 10px rgba(255, 207, 38, 0.35);
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}
.bc-root { color: var(--muted); font-weight: 500; }
.bc-sep { color: var(--line-strong); }
.bc-cur { color: var(--text); font-weight: 700; }

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notif-wrap { position: relative; }
.bell-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
}
.bell-btn:hover { border-color: var(--indigo); }
.bell-dot {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.notif-pop {
  position: absolute;
  right: 0;
  top: 46px;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  z-index: 80;
}

.top-pill {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.top-pill b {
  color: var(--text);
  font-weight: 800;
}
.top-pill .max-rate {
  color: var(--muted);
  font-weight: 600;
}

/* PAGE CONTENT CONTAINER */
.page-body {
  padding: 26px 28px 48px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-head > div:first-child {
  flex: 1 1 280px;
  min-width: 0;
}
.page-h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* Segmented Period Bar (1xWIN Screen 1) */
.period-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.period-btn {
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.period-btn:hover { background: var(--surface-3); }
.period-btn.active {
  background: #141222;
  color: #ffffff;
  font-weight: 700;
}
[data-theme="dark"] .period-btn.active {
  background: var(--gold);
  color: #12101e;
}

/* ==================== DASHBOARD BENTO GRID (Screen 1) ==================== */
.dash-bento {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.dash-bento-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 1180px) {
  .dash-bento { grid-template-columns: 1fr 1fr; }
  .hero-income-card { grid-column: 1 / -1; }
  .dash-bento-bottom { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .dash-bento, .dash-bento-bottom { grid-template-columns: 1fr; }
}

/* Chamfered Black/Obsidian Hero Income Card */
.hero-income-card {
  grid-row: span 2;
  background: linear-gradient(140deg, #0d0b18 0%, #191433 65%, #231b4a 100%);
  color: #ffffff;
  padding: 24px 26px;
  border-radius: 18px;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 248px;
  position: relative;
  box-shadow: 0 16px 38px rgba(13, 11, 24, 0.24);
}
.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.hero-dot-lbl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #b7b3d1;
  font-weight: 500;
}
.hero-dot-lbl i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.hero-wm {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.34);
}
.hero-amount {
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.025em;
  margin: 8px 0 12px;
}
.hero-conv-row {
  display: flex;
  gap: 44px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.hero-conv-item span {
  display: block;
  font-size: 12px;
  color: #8f8ab0;
}
.hero-conv-item b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

/* Standard Bento KPI Card */
.bento-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s;
}
.bento-card.chart-active {
  border-color: var(--gold);
  box-shadow: 0 8px 26px rgba(255, 207, 38, 0.16);
}
.bento-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}
/* Signature Yellow Angled Tag Badge (1xWIN style) */
.kpi-flag {
  width: 36px;
  height: 36px;
  background: var(--gold);
  color: #12101e;
  border-radius: 9px;
  clip-path: polygon(0 0, 74% 0, 100% 26%, 100% 100%, 26% 100%, 0 74%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 900;
}
.bento-lbl {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}
.bento-val {
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
  letter-spacing: -0.02em;
}
.chart-pill-btn {
  align-self: flex-start;
  height: 27px;
  padding: 0 11px;
  border-radius: 999px;
  border: 0;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-pill-btn:hover { background: var(--line); color: var(--text); }
.bento-card.chart-active .chart-pill-btn,
.hero-income-card .chart-pill-btn.active {
  background: var(--gold);
  color: #12101e;
}

/* ANALYTICS CHART CARD */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.chart-card.fullscreen {
  position: fixed;
  inset: 18px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.chart-wrap {
  position: relative;
  width: 100%;
  height: 270px;
}
.chart-card.fullscreen .chart-wrap {
  flex: 1;
  height: auto;
}
.chart-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #121020;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 207, 38, 0.4);
  z-index: 10;
  transform: translate(-50%, -115%);
  white-space: nowrap;
}

/* ==================== FILTER TOOLBAR & EMPTY STATES (Screens 2 & 3) ==================== */
.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}
.search-box {
  position: relative;
  min-width: 240px;
  max-width: 340px;
  flex: 1;
}
.search-box .inp {
  padding-left: 38px;
  background: var(--surface);
}
.search-box svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.select-pill {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  min-width: 175px;
  outline: none;
}
.seg-tabs {
  display: inline-flex;
  background: var(--surface-3);
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--line);
}
.seg-tab {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.seg-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 58px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.empty-ico {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--gold-soft);
  color: #b58500;
  display: inline-grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 14px;
}
[data-theme="dark"] .empty-ico { color: var(--gold); }
.empty-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
}
.empty-sub {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 20px;
}

/* ==================== ENTITY LISTS & TABLES ==================== */
.surface-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.pro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.pro-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.pro-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.pro-table tr:last-child td { border-bottom: 0; }
.pro-table tbody tr:hover { background: var(--surface-2); }

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
  font-size: 13px;
}
[data-theme="dark"] .code-chip { color: #a5b4fc; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.gold { background: var(--gold-soft); color: #b47800; }
[data-theme="dark"] .badge.gold { color: var(--gold); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.muted { background: var(--surface-3); color: var(--muted); }

/* ==================== PROMO MATERIALS: LOGOS & RICH GALLERY (Screens 4 & 5) ==================== */
.logos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 30px;
}
@media (max-width: 860px) {
  .logos-grid { grid-template-columns: 1fr; }
}
.logo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
}
.logo-stage {
  height: 158px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  padding: 22px;
}
.logo-stage.light {
  background: #f4f5f9;
  border: 1px solid #e6e8f0;
}
.logo-stage.dark {
  background: #0d0b18;
}
.logo-stage img {
  max-height: 92px;
  max-width: 82%;
  object-fit: contain;
}
.logo-foot {
  padding: 14px 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo-foot-title { font-size: 14px; font-weight: 800; }
.logo-foot-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Rich Banner Gallery Cards (Screen 5) */
.banners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 1180px) {
  .banners-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .banners-grid { grid-template-columns: 1fr; }
}
.creative-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.creative-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--indigo);
}
.creative-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0d0b18;
  overflow: hidden;
  cursor: pointer;
}
.creative-visual canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.creative-hover-cta {
  position: absolute;
  inset: 0;
  background: rgba(13, 11, 24, 0.56);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.creative-visual:hover .creative-hover-cta { opacity: 1; }

.creative-meta {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.creative-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}
.creative-spec {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.creative-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-act-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.icon-act-btn:hover { color: var(--text); border-color: var(--indigo); }
.icon-act-btn.liked { color: var(--red); background: var(--red-soft); border-color: transparent; }

/* ==================== MODALS ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 8, 18, 0.68);
  backdrop-filter: blur(6px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.modal-box.wide {
  max-width: 1040px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-title {
  font-size: 19px;
  font-weight: 800;
}
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 16px;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 880px) {
  .studio-grid { grid-template-columns: 1fr; }
}
.studio-stage {
  background: #0a0914;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.studio-stage canvas {
  max-width: 100%;
  max-height: 520px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
}

.form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .form-2col { grid-template-columns: 1fr; }
}

/* FAQ Accordion */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-a {
  padding: 0 20px 16px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* Mobile Responsive Drawer */
.sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 45;
}
@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    width: 268px !important;
  }
  body.sb-mobile-open .sidebar { transform: translateX(0); }
  body.sb-mobile-open .sb-overlay { display: block; }
  .workspace { margin-left: 0 !important; }
  .page-body { padding: 18px 16px 40px; }
  .top-pill.hide-sm { display: none; }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #141126;
  color: #ffffff;
  border: 1px solid var(--gold);
  font-weight: 700;
  font-size: 13.5px;
  padding: 12px 18px;
  border-radius: 13px;
  box-shadow: var(--shadow-lg);
  z-index: 120;
}
