:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #f4f5fa;
  --text: #171927;
  --muted: #7b7f91;
  --line: #e7e9f0;
  --primary: #6258e8;
  --primary-2: #776cf4;
  --primary-soft: #efedff;
  --success: #20b879;
  --success-soft: #e9f9f2;
  --warning: #e7a62f;
  --danger: #e65f70;
  --shadow: 0 8px 30px rgba(29, 32, 56, .06);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 248px;
  font-family: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body, #root { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 5; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 24px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--primary), #8c82ff); font-weight: 800; box-shadow: 0 8px 20px rgba(98,88,232,.22); }
.brand-name { font-family: Manrope, sans-serif; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.nav-title { padding: 10px 12px 7px; color: #a0a3b0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .11em; }
.nav { display: grid; gap: 3px; }
.nav-btn { border: 0; background: transparent; color: #6d7182; width: 100%; text-align: left; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: .15s ease; }
.nav-btn:hover { background: var(--surface-soft); color: var(--text); }
.nav-btn.active { background: var(--primary-soft); color: var(--primary); }
.nav-icon { width: 18px; text-align: center; font-size: 15px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 15px 8px 0; }
.user-email { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 9px; }
.logout { border: 0; background: transparent; color: var(--muted); padding: 0; font-size: 12px; }
.main { min-width: 0; padding: 24px 32px 50px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.page-title { font-family: Manrope, sans-serif; font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -.03em; }
.page-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.control { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 9px; padding: 9px 12px; font-size: 12px; box-shadow: 0 1px 1px rgba(0,0,0,.02); }
.primary { border: 0; background: var(--primary); color: white; border-radius: 9px; padding: 10px 14px; font-weight: 700; font-size: 12px; box-shadow: 0 7px 18px rgba(98,88,232,.18); }
.ghost { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 9px; padding: 10px 13px; font-weight: 600; font-size: 12px; }
.notice { background: var(--primary-soft); border: 1px solid #dfdbff; color: #5047bd; padding: 11px 13px; border-radius: 10px; font-size: 12px; margin-bottom: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric { padding: 17px 18px; min-height: 122px; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 600; margin-bottom: 10px; }
.metric-value { font-family: Manrope, sans-serif; font-size: 23px; font-weight: 800; letter-spacing: -.03em; }
.metric-meta { margin-top: 9px; font-size: 11px; display: flex; gap: 5px; align-items: center; }
.up { color: var(--success); } .down { color: var(--danger); }
.section { margin-top: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-title { margin: 0; font-family: Manrope, sans-serif; font-size: 14px; font-weight: 800; }
.section-note { color: var(--muted); font-size: 11px; }
.chart-card { padding: 18px 18px 11px; }
.chart-wrap { height: 300px; position: relative; }
.chart-svg { width: 100%; height: 100%; display: block; }
.chart-axis { fill: #9b9ead; font-size: 10px; }
.chart-grid { stroke: #eceef4; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#chartFill); }
.chart-empty { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th { background: #fafaff; color: #8a8d9c; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; text-align: right; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
td { padding: 13px 14px; border-bottom: 1px solid #f0f1f5; font-size: 12px; text-align: right; white-space: nowrap; }
tbody tr:hover { background: #fbfbfe; }
.campaign-name { font-weight: 700; color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 700; background: var(--success-soft); color: var(--success); }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 13px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at top right, #efedff, transparent 35%), var(--bg); }
.login-card { width: min(420px, 100%); padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 25px 70px rgba(32,35,62,.10); }
.login-card h1 { font-family: Manrope, sans-serif; font-size: 22px; margin: 0; }
.login-card p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.form { display: grid; gap: 12px; margin-top: 18px; }
.form label { color: #737789; font-size: 11px; font-weight: 600; }
.form input { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; outline: none; }
.form input:focus { border-color: #b8b2ff; box-shadow: 0 0 0 3px #efedff; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-soft); border-radius: 10px; }
.tab { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tab.active { background: white; color: var(--primary); box-shadow: 0 2px 7px rgba(0,0,0,.05); }
.error { color: var(--danger); font-size: 11px; }
.mobile-toggle { display: none; border: 1px solid var(--line); background: white; border-radius: 9px; padding: 8px 10px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 800px) { .app { grid-template-columns: 1fr; } .sidebar { position: fixed; left: -270px; width: 248px; transition: .2s ease; box-shadow: 10px 0 40px rgba(0,0,0,.08); } .sidebar.open { left: 0; } .mobile-toggle { display: block; } .main { padding: 18px 15px 35px; } .topbar { align-items: flex-start; } .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid-4 { grid-template-columns: 1fr; } .toolbar { width: 100%; } .toolbar > * { flex: 1; } .page-title { font-size: 21px; } }

.toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.small{padding:7px 10px;font-size:12px}.account-picker{display:grid;gap:8px}.account-option{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--border);border-radius:10px;padding:12px 14px}.account-option strong{font-size:13px}.section-note{font-size:11px;color:var(--muted)}
