:root {
  --bg: #f2f3f6;
  --panel: #ffffff;
  --soft: #eceef2;
  --border: #e0e3e9;
  --row-border: #eef0f3;
  --hover: #f5f6f8;
  --text: #16181d;
  --text-soft: #2f333a;
  --muted: #646b76;
  --faint: #979ea8;
  --accent: #ff9d2e;
  --accent-dark: #d97706;
  --accent-soft: rgba(255, 157, 46, 0.14);
  --purple: #ffc861;
  --danger: #dc2626;
  --warn: #92400e;
  --warn-bg: #fff7e6;
  --warn-border: #f0d49a;
  --scroll: #ccd1d9;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.06), 0 8px 24px rgba(20, 22, 26, 0.08);
  --radius: 16px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme="dark"] {
  --bg: #0a0b0c;
  --panel: #121316;
  --soft: #0e0f11;
  --border: #222529;
  --row-border: #191b1e;
  --hover: #17191c;
  --text: #e8eaee;
  --text-soft: #bfc4cb;
  --muted: #868c96;
  --faint: #555a62;
  --accent: #ff9d2e;
  --accent-dark: #ffb03a;
  --accent-soft: rgba(255, 157, 46, 0.14);
  --danger: #ff5c5c;
  --warn: #fbbf24;
  --warn-bg: #291f08;
  --warn-border: #57410f;
  --scroll: #24272b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px; flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 22px 18px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  z-index: 40;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.brand-logo {
  margin: 2px 0 12px;
  border-radius: 14px;
}
.brand-logo img {
  width: 100%; height: auto; object-fit: contain;
  border-radius: 30px;
  display: block;
}
.brand-sub { color: var(--muted); font-size: 11px; margin-top: 3px; letter-spacing: 0.4px; }
.brand-by { color: var(--faint); font-size: 9px; margin: 2px 0 18px; letter-spacing: 1px; }

nav { display: flex; flex-direction: column; gap: 6px; }
.nav-btn {
  display: flex; align-items: center; gap: 10px;
  border: none; background: transparent; color: var(--muted);
  text-align: left; font-size: 12.5px; font-weight: 700;
  padding: 11px 14px; border-radius: 10px;
  transition: all 0.15s ease;
}
.nav-btn svg { width: 15px; height: 15px; flex: none; }
.nav-btn:hover { background: var(--accent-soft); color: var(--accent-dark); }
.nav-btn.active { background: var(--accent); color: #1d0e02; box-shadow: 0 4px 12px rgba(255, 138, 30, 0.35); }

.side-foot {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px; padding-top: 18px;
}
.side-foot .btn-ic { display: inline-flex; width: 15px; height: 15px; flex: none; }
.side-foot .btn-ic svg { width: 100%; height: 100%; }
.theme-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); background: var(--soft); color: var(--text);
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.1px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: all 0.15s;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(255, 138, 30, 0.15); }
.theme-btn #themeIcon { line-height: 1; }

.logout-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 1px solid rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08);
  color: var(--danger); font-size: 10.5px; font-weight: 800; letter-spacing: 1.1px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: all 0.15s;
}
.logout-btn:hover { background: rgba(239, 68, 68, 0.16); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.18); }

.radar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--accent-soft); position: relative; }
.radar span {
  position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent);
  animation: spin 1.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.sidebar-backdrop { display: none; }

.main { flex: 1; min-width: 0; padding: 20px 22px 34px; }

.topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  margin: -20px -22px 0;
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.hamburger { display: none; }
.topbar-title { flex: 1; min-width: 180px; }
.topbar-title h1 { font-size: 17px; font-weight: 800; letter-spacing: 0.6px; }
.topbar-title small { color: var(--muted); font-size: 10px; }

.period-seg {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px; box-shadow: var(--shadow);
}
.period-seg button {
  border: none; background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 700; padding: 8px 14px; border-radius: 999px;
  transition: all 0.15s ease; white-space: nowrap;
}
.period-seg button:hover { color: var(--accent-dark); background: var(--accent-soft); }
.period-seg button.active { background: var(--accent); color: #1d0e02; box-shadow: 0 3px 10px rgba(255, 138, 30, 0.35); }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-areas: "cards live";
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}
.metric-grid {
  grid-area: cards;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-width: 0;
}
.right-col { grid-area: live; display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.metric-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px; min-width: 0;
}
.metric-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.metric-title { min-width: 0; }
.metric-title h2 { font-size: 13px; letter-spacing: 1px; font-weight: 800; }
.metric-title .big-number { font-size: 32px; font-weight: 800; margin-top: 5px; letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-title > small { color: var(--faint); font-size: 10px; }
.metric-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.money-badge {
  width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #ffb03a, #ff8a1e);
  color: #1d0e02; display: grid; place-items: center; font-size: 20px; font-weight: 800;
}
.money-badge.purple { background: linear-gradient(135deg, #ffd97a, #f0a90c); font-size: 15px; }
.money-badge.amber { background: linear-gradient(135deg, #ff9d2e, #ff7a1a); font-size: 17px; }
.money-badge.rose { background: linear-gradient(135deg, #ff6b6b, #ff4d4d); font-size: 15px; }
.money-badge.cyan { background: linear-gradient(135deg, #d5dae2, #8f97a3); font-size: 16px; }
.money-badge.world { background: linear-gradient(135deg, #ffb03a, #e07d14); font-size: 18px; }
.cmp { font-size: 10px; color: var(--muted); }
.cmp.up { color: var(--accent-dark); }
.cmp.down { color: var(--danger); }

.country-big { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.country-big .country-name { overflow: hidden; text-overflow: ellipsis; }
.country-bars { display: flex; align-items: stretch; gap: 10px; height: 152px; padding-top: 6px; }
.country-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; }
.country-bar .b-val { font-size: 9px; color: var(--muted); font-weight: 700; }
.country-bar .bar {
  width: 72%; max-width: 60px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #ffb03a, #e07d14);
  transition: height 0.5s ease;
}
.country-bar.top .bar {
  background: linear-gradient(180deg, #fbbf24, #f97316);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28);
}
.country-bar .b-cc { font-size: 8.5px; color: var(--muted); font-weight: 700; letter-spacing: 0.5px; }
.geo-bars-empty {
  flex: 1; width: 100%; display: grid; place-items: center;
  color: var(--muted); font-size: 10.5px; text-align: center;
}

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; transition: background 0.25s ease, border-color 0.25s ease; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h2 { font-size: 13px; letter-spacing: 1px; font-weight: 800; }
.panel-head small { color: var(--muted); font-size: 10px; }
.table-head { align-items: center; }
.count-pill { background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; font-size: 10px; font-weight: 800; padding: 3px 10px; margin-left: 8px; }

.metric-card .chart { grid-template-columns: 38px minmax(0, 1fr); gap: 4px 6px; margin: 2px 0 0; }
.metric-card .ylabels { font-size: 8.5px; }
.metric-card .plot { height: 140px; }

.chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px 8px; margin: 10px 0 4px; }
.ylabels { display: flex; flex-direction: column; justify-content: space-between; font-size: 9px; color: var(--muted); text-align: right; padding: 2px 0; }
.plot { height: 180px; position: relative; border-left: 1px dashed var(--border); }
.plot svg { width: 100%; height: 100%; display: block; }
.xlabels { grid-column: 2; display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); }
.xlabels { min-width: 0; }
.xlabels span { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; }
@media (max-width: 480px) {
  .xlabels span { font-size: 7px; }
}

.metric-card .plot { cursor: crosshair; }
.chart-tip-guide {
  position: absolute; top: 4px; bottom: 2px; width: 0;
  border-left: 1px dashed rgba(140, 146, 156, 0.55);
  display: none; pointer-events: none; z-index: 3;
}
.chart-tip-dot {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  display: none; pointer-events: none; z-index: 4;
}
.chart-tip {
  position: absolute; min-width: 96px;
  background: #17191d; color: #fff; border-radius: 10px;
  padding: 8px 11px; font-size: 10.5px; line-height: 1.5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30);
  display: none; pointer-events: none; z-index: 5; white-space: nowrap;
}
.chart-tip small {
  display: block; color: #8f959e; font-weight: 800;
  letter-spacing: 0.8px; font-size: 9px; margin-bottom: 4px;
}
.chart-tip .tip-row { display: flex; align-items: center; gap: 6px; }
.chart-tip .tip-row i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.chart-tip .tip-row span { color: #c3c9d6; padding-right: 10px; }
.chart-tip .tip-row b { font-weight: 800; color: #fff; margin-left: auto; }

.search {
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px;
  font-size: 11.5px; min-width: 200px; outline: none; background: var(--soft); color: var(--text);
}
.search:focus { border-color: var(--accent); }
.search::placeholder { color: var(--faint); }

.table-wrap { overflow: auto; max-height: 420px; border: 1px solid var(--border); border-radius: 12px; }
.table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
table { width: 100%; border-collapse: collapse; font-size: 11.5px; white-space: nowrap; }
thead th {
  position: sticky; top: 0; background: var(--soft); z-index: 2;
  text-align: left; font-size: 9.5px; letter-spacing: 1px; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--border); font-weight: 700;
}
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--row-border); color: var(--text-soft); }
tbody tr:hover { background: var(--hover); }
tbody tr:last-child td { border-bottom: none; }
.td-ip { font-size: 10.5px; }
.td-country { white-space: nowrap; }
.cc-code { color: var(--muted); font-size: 10px; }
.cflag {
  width: 16px; height: 16px; border-radius: 50%; object-fit: cover;
  display: inline-block; vertical-align: middle; margin-right: 6px; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.cflag.md { width: 20px; height: 20px; }
.cflag.xl { width: 30px; height: 30px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
.cflag-globe { display: inline-grid; place-items: center; font-size: 11px; line-height: 1; text-align: center; margin-right: 6px; }
.cflag-globe.md { font-size: 13px; }
.cflag-globe.xl { font-size: 20px; }
.td-os .os-ic { justify-content: center; width: 100%; }
.os-ic { display: inline-flex; align-items: center; gap: 5px; }
.os-ic svg { width: 13px; height: 13px; fill: var(--text-soft); }
.earn-pos { color: var(--accent-dark); font-weight: 800; }
.empty-row td { text-align: center; color: var(--muted); padding: 22px; font-size: 11px; }

.live-panel { flex: 1 1 0; display: flex; flex-direction: column; min-height: 300px; }
.leads-panel { flex: 1 1 0; min-height: 300px; display: flex; flex-direction: column; }

.live-table {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; background: var(--panel);
}
.live-table table {
  table-layout: fixed; width: 100%; border-collapse: collapse;
  font-size: 11px; white-space: nowrap;
}
.live-table-head { flex-shrink: 0; background: var(--soft); }
.live-table-head th {
  text-align: left; font-size: 9.5px; letter-spacing: 1px; color: var(--muted);
  padding: 10px 8px; border-bottom: 1px solid var(--border); font-weight: 700;
}
.live-table-head th.th-os { text-align: center; }
.w-uid { width: 30%; }
.w-cc { width: 17%; }
.w-ip { width: 43%; }
.w-os { width: 10%; }
.w-src { width: 14%; }
.live-table:not(.leads-table) .w-uid { width: 19%; }
.live-table:not(.leads-table) .w-src { width: 13%; }
.live-table:not(.leads-table) .w-cc { width: 16%; }
.live-table:not(.leads-table) .w-ip { width: 40%; }
.live-table:not(.leads-table) .w-os { width: 12%; }
.live-table-head th.th-src { text-align: center; padding: 10px 2px; letter-spacing: 0.5px; }
.live-table tbody td.td-src { text-align: center; }
.src-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; vertical-align: middle;
}
.src-ic svg { width: 14px; height: 14px; display: block; }
.src-ig svg { fill: #e1306c; }
.src-fb svg { fill: #1877f2; }
.src-th svg { fill: var(--text); }
.src-x svg { fill: var(--text); }
.src-tt svg { fill: var(--text); }
.src-tg svg { fill: #2aabee; }
.src-wa svg { fill: #25d366; }
.src-other { color: var(--text-soft); }
.src-other svg { fill: none; stroke: currentColor; }
.src-direct { color: var(--muted); font-weight: 700; font-size: 11px; line-height: 1; }
.w-earn { width: 18%; }
.leads-table .w-ip { width: 35%; }
.leads-table .th-earn,
.leads-table .td-earn { text-align: right; padding-right: 10px; }
.leads-table .w-net { width: 9%; }
.leads-table .w-ip { width: 31%; }
.leads-table .th-net,
.leads-table .td-net { text-align: center; }
.net-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; vertical-align: middle;
}
.net-ic svg { width: 16px; height: 16px; display: block; }
.net-imonetitize svg circle { fill: #f59e0b; }
.net-trafee svg circle { fill: #10b981; }
.conversion-page-table .td-net { text-align: center; }
.conversion-page-table .net-ic { width: 18px; height: 18px; }
.conversion-page-table .net-ic svg { width: 17px; height: 17px; }
.live-table-scroll {
  flex: 1; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain;  scrollbar-width: none;  -ms-overflow-style: none;}
.live-table-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.live-table-scroll::-webkit-scrollbar-thumb { background: transparent; }
.live-table-scroll::-webkit-scrollbar-track { background: transparent; }
.live-table tbody td {
  padding: 8px; border-bottom: 1px solid var(--row-border); color: var(--text-soft);
  overflow: hidden; text-overflow: ellipsis;
}
.live-table tbody td.td-os { text-align: center; }
.live-table tbody tr:hover { background: var(--hover); }
.live-table tbody tr:last-child td { border-bottom: none; }
.live-panel .td-ip { font-size: 10px; padding-right: 4px; }
.live-panel .os-ic svg { width: 12px; height: 12px; }
.live-panel .cflag { width: 15px; height: 15px; margin-right: 5px; }
.live-note { color: var(--faint); font-size: 9.5px; margin-top: 10px; }

.app-view { margin-top: 18px; }
.view-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.view-topbar h1 { font-size: 21px; font-weight: 900; letter-spacing: 0.3px; }
.view-topbar p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.view-actions { display: flex; gap: 8px; }
.secondary-btn {
  border: 1px solid var(--border); background: var(--panel); border-radius: 10px;
  padding: 9px 16px; font-size: 11.5px; font-weight: 700; color: var(--text); transition: all 0.15s;
}
.secondary-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.summary-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; }
.summary-card small { font-size: 9px; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.summary-card strong { display: block; font-size: 20px; font-weight: 800; margin-top: 5px; }
.full-panel { padding: 18px; }
.conversion-page-table, .performance-table { max-height: 560px; }
.performance-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.date-field { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; color: var(--text); }
.date-field span { font-size: 10px; color: var(--muted); font-weight: 700; }
.date-field input { border: none; outline: none; font-family: inherit; font-size: 11.5px; background: transparent; color: var(--text); }
.date-field input::-webkit-calendar-picker-indicator { filter: none; }
html[data-theme="dark"] .date-field input::-webkit-calendar-picker-indicator { filter: invert(0.85); }
.date-arrow { color: var(--muted); }
.performance-search { min-width: 160px; }

.perf-period-seg { margin-right: 4px; }

.perf-custom-range { display: flex; align-items: center; gap: 6px; }
.perf-custom-range input[type="date"] {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 10px; color: var(--text); font-family: var(--mono); font-size: 11.5px;
  outline: none; color-scheme: light;
}
.perf-custom-range input[type="date"]:focus { border-color: var(--accent); }
html[data-theme="dark"] .perf-custom-range input[type="date"] { color-scheme: dark; }
.perf-range-sep { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; }


.conn-banner {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-border);
  padding: 10px 18px; border-radius: 999px; font-size: 11px; font-weight: 700;
  box-shadow: var(--shadow); z-index: 100; max-width: 92vw; text-align: center;
}
.conn-banner.demo { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }

.login-body { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(160deg, var(--bg) 60%, var(--accent-soft)); }
.login-card {
  width: min(400px, 92vw); background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow); padding: 34px 30px;
  display: flex; flex-direction: column; gap: 8px; text-align: center;
}
.login-logo {
  margin: 0 auto 16px; width: 100%;
}
.login-logo img {
  width: 100%; height: auto; object-fit: contain;
  display: block;
  border-radius: 30px;
}
.login-genlink {
  text-align: center; color: #ffb03a;
  font-size: 10px; font-weight: 800; letter-spacing: 5px;
  text-transform: uppercase; margin-top: 10px; text-indent: 5px;
}
.login-brand { font-size: 21px; font-weight: 800; letter-spacing: 0.5px; }
.login-brand::before { content: "● "; color: var(--accent); }
.login-sub { color: var(--muted); font-size: 10.5px; letter-spacing: 0.5px; margin-bottom: 3px; }
.login-radar { margin: 0 auto 10px; }
.login-label { text-align: left; font-size: 9.5px; letter-spacing: 1.2px; color: var(--muted); font-weight: 700; margin-top: 8px; }
.login-input {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  font-size: 13px; outline: none; background: var(--soft); color: var(--text); transition: border 0.15s;
}
.login-input:focus { border-color: var(--accent); }
.login-error { background: rgba(255, 77, 77, 0.1); color: var(--danger); border: 1px solid rgba(255, 77, 77, 0.4); border-radius: 10px; padding: 9px 12px; font-size: 11px; text-align: left; }
html[data-theme="dark"] .login-error { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.4); }
.login-btn {
  margin-top: 14px; border: none; background: var(--accent); color: #1d0e02;
  font-size: 13px; font-weight: 800; letter-spacing: 1px; padding: 13px; border-radius: 10px;
  transition: all 0.15s; box-shadow: 0 4px 14px rgba(255, 138, 30, 0.35);
}
.login-btn:hover { background: var(--accent-dark); }
.login-btn:disabled { opacity: 0.6; cursor: wait; }
.login-foot { color: var(--faint); font-size: 8.5px; letter-spacing: 1.5px; margin-top: 16px; }

@media (max-width: 1240px) {
  .content-grid { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1080px) {
  .content-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "cards"
      "live";
  }
  .live-panel { min-height: 320px; }
  .live-panel .live-table-scroll { max-height: 420px; }
  .leads-panel { min-height: 320px; }
  .leads-panel .live-table-scroll { max-height: 280px; }
}
@media (max-width: 640px) {
  .metric-title .big-number { font-size: 28px; }
  .country-big { font-size: 21px; }
  .country-bars { height: 130px; }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform 0.25s ease; box-shadow: 0 0 40px rgba(0,0,0,0.15);
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(22,33,29,0.4); z-index: 35; }
  .hamburger {
    display: block; border: 1px solid var(--border); background: var(--panel); color: var(--text);
    border-radius: 10px; width: 40px; height: 40px; font-size: 16px; flex-shrink: 0;
  }
  .main { padding: 14px 12px 30px; }
  .topbar { margin: -14px -12px 0; padding: 14px 12px 10px; }
  .topbar-title h1 { font-size: 15px; }
  .period-seg { width: 100%; justify-content: stretch; }
  .period-seg button { flex: 1; padding: 8px 6px; }
  .search { min-width: 0; flex: 1; }
  .performance-filters { width: 100%; }
}

.podium-panel { margin-bottom: 14px; }
.podium-stage {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  gap: 14px; padding: 26px 10px 0; min-height: 300px;
}
.podium-floor {
  height: 8px; border-radius: 999px; margin-top: -2px;
  background: linear-gradient(90deg, transparent, var(--border) 12%, var(--border) 88%, transparent);
}
.podium-col { display: flex; flex-direction: column; align-items: center; }
.podium-top {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  margin-bottom: 8px; max-width: 118px;
}
.podium-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: #10160f;
  border: 2px solid rgba(255,255,255,.25);
}
.podium-avatar.gold   { background: linear-gradient(145deg, #ffe680, #f5b800); box-shadow: 0 0 18px rgba(250, 190, 0, .55); }
.podium-avatar.silver { background: linear-gradient(145deg, #f1f2f4, #9fa5ad); }
.podium-avatar.bronze { background: linear-gradient(145deg, #f0b490, #b06a3b); color: #24130a; }
.podium-avatar.iron   { background: linear-gradient(145deg, #75797f, #4d5157); color: #f2f3f5; }
.podium-name {
  font-size: 11px; font-weight: 800; color: var(--text);
  max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.podium-leads { font-size: 9px; font-weight: 800; color: var(--muted); letter-spacing: .4px; }

.crown { width: 34px; height: 24px; margin-bottom: 2px; filter: drop-shadow(0 0 8px rgba(250,190,0,.75)); animation: crownWiggle 2.2s ease-in-out infinite; }
.crown svg { width: 100%; height: 100%; fill: #ffd400; stroke: #8a6400; stroke-width: 1; }
@keyframes crownWiggle {
  0%, 100% { transform: rotate(-7deg) translateY(0); }
  50%      { transform: rotate(7deg)  translateY(-4px); }
}

.podium-bar {
  position: relative; width: 92px; border-radius: 12px 12px 0 0;
  display: flex; align-items: flex-start; justify-content: center;
  overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-bottom: none;
}
html[data-theme="light"] .podium-bar { border-color: rgba(22, 24, 29, 0.1); }
.p-1 .podium-bar {
  height: 168px;
  background: linear-gradient(180deg, #ffe066 0%, #f0a90c 55%, #b87800 100%);
  box-shadow: 0 0 34px rgba(250, 185, 0, .45), inset 0 6px 18px rgba(255,255,255,.35);
}
.p-2 .podium-bar {
  height: 128px;
  background: linear-gradient(180deg, #e8eaee 0%, #a9aeb6 55%, #71767e 100%);
  box-shadow: inset 0 6px 14px rgba(255,255,255,.3);
}
.p-3 .podium-bar {
  height: 104px;
  background: linear-gradient(180deg, #eda173 0%, #c56f33 55%, #8a4a1d 100%);
  box-shadow: inset 0 6px 14px rgba(255,255,255,.25);
}
.p-4 .podium-bar, .p-5 .podium-bar {
  background: linear-gradient(180deg, #4a4f57 0%, #33373d 60%, #22252a 100%);
  box-shadow: inset 0 6px 14px rgba(255,255,255,.12);
}
.p-4 .podium-bar { height: 82px; }
.p-5 .podium-bar { height: 64px; }

.podium-place {
  font-size: 44px; font-weight: 900; line-height: 1; margin-top: 8px;
  color: rgba(255,255,255,.92); text-shadow: 0 2px 0 rgba(0,0,0,.28);
}
.p-1 .podium-place { font-size: 58px; color: #fff; text-shadow: 0 3px 0 rgba(122,84,0,.55), 0 0 24px rgba(255,255,255,.65); }

.confetti-spray {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100%;
  pointer-events: none; overflow: visible; z-index: 2;
}
.confetti-spray i {
  position: absolute; bottom: 12px; display: block; border-radius: 2px;
  opacity: 0; transform: translate(0, 0) rotate(0);
  animation: confettiBurst 2.2s linear infinite;
  box-shadow: 0 0 6px rgba(255,255,255,.35);
}
@keyframes confettiBurst {
  0%   { transform: translate(0, 26px) rotate(0deg); opacity: 0; }
  8%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

.podium-col.empty .podium-avatar {
  background: transparent; color: var(--muted); border: 2px dashed var(--border);
  box-shadow: none; font-weight: 700;
}
.podium-col.empty .podium-bar { opacity: .45; filter: saturate(.4); }
.podium-col.empty .podium-name, .podium-col.empty .podium-leads { color: var(--muted); }

@media (max-width: 900px) {
  .podium-stage { gap: 8px; }
  .podium-bar { width: 76px; }
  .podium-place { font-size: 34px; }
  .p-1 .podium-place { font-size: 44px; }
  .podium-top { max-width: 92px; }
  .podium-name { max-width: 92px; }
}
@media (max-width: 560px) {
  .podium-stage { gap: 5px; padding: 20px 4px 0; }
  .podium-bar { width: 58px; border-radius: 9px 9px 0 0; }
  .p-1 .podium-bar { height: 132px; }
  .p-2 .podium-bar { height: 104px; }
  .p-3 .podium-bar { height: 86px; }
  .p-4 .podium-bar { height: 68px; }
  .p-5 .podium-bar { height: 54px; }
  .podium-place { font-size: 24px; margin-top: 5px; }
  .p-1 .podium-place { font-size: 32px; }
  .podium-avatar { width: 30px; height: 30px; font-size: 11px; }
  .podium-name { font-size: 9px; max-width: 74px; }
  .podium-leads { font-size: 8px; }
  .crown { width: 26px; height: 18px; }
}

.table-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-actions .search { min-width: 170px; }
@media (max-width: 640px) {
  .table-actions { width: 100%; }
  .table-actions .search { flex: 1; }
}

.net-ic {
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  flex: 0 0 auto;
}
.net-ic-imonetitize { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAPASURBVHgBzZpNTttAFIDfmzhBdEOOELYVbeEEOIKSdFW6q1RKiFRgCZwAcwJgVSEW+eEAaTcFh0qkJyBA94QbZEUlAp7Oc36aFP/MJE6cbxH87++Nxx77PRC6yV3GQdMyYkoHxNnOcsv6Bquvd8CHJfN4F4AboAByyJvpjSxNZ87e5sR5dZX9tc7Uye83wIUoQMKe57x7uzhIUE6t74kgQDYIcYbqw59op2GQR/Y4WnrHQQJm/5I88KqIXnpHNygIoXLgtx3JN+6jycqHbL29LP/urGYhXwMFmOg2iVbLB4YFVt1rvZN8m8ZT40788dy/GwaMzQfR8m0WzaNdBmi4rfeS/3iqJyYwdgGSXZbQRADbHuvpJAfw9FQACQKRR/n+T9BNPOuyrgqPj0nIzkldzjDkCc1xKWINkC1D9tXQ5ZdLenwCo6V+5AnmstyATy/vQIIF8ygziPzUZPSiZ8xRxDmARuM7SEDyEcC82/phyxNOAdRl+n1o8hxojKm2Z58HwPnYyovjGoV0eQdjD0loBaGpHiRM+WKqvEfT+WSFjj1H704IJze8d0teEy9u09CHvNi59nAfmxum/P8wkERGXtMiupM8MfUilgtanpDqQotnx+8Z8Lz7Fk35HwtfHB+99muyuAigiJe8XsrFo5ONfakAGIJHy0nII66BIhLyFyi8pLuQy2lClaf5AQIIX57oM4DxkCf6CGB85AnFAHzkzaX9fuSBY74feUIhAG/5VXNRZCRgG1QR8oW0mXVa5SdPSAZg+cojMANUGVCekBoHyqlN10/KMOWJgcaBsOWJvgMIT56+/v7lnZRfp4kw5ZuJMzuNWacMoPIVGIr86ddEbLJxKStPtDKAhtL3wNDkMeKTUumV70a6C4UlL3LM2+fp9UO39VIBrJpLGaRUiyoDtzxfO09vemYFZe+BBKgSgLzX+NNmwO8Bt3OPRp4IPoARyhPBBjBieSK4AEKQJ4IJICR54vljlKo1VK3syo9y5BXxYzgeAbFeTJmuz+kYi86DR0rG4lD9md7wTyZTKaxZQe2m/nwkto25LkbjXzBOFK4yopqU71km3hqcuxD6VxlHCrU+OvcAt3tgForXORgHmsX3kmMhkrE6s8tJTtDHefH61r50YUDiJzdbEIlcglsdT5QC6B6gj3HD94BugQ4LzhO+24hGxtYlugWF2uxYQA26MjPN7Mclono6JGx4M9vdvIlXZmgQoSCkyqohQ45J+DxzRTPYs4oeV5HIVutfXgaqHgYMSVNNrCKK74fdg+xflRpnlfCJHz4AAAAASUVORK5CYII="); }
.net-ic-trafee { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAHIElEQVR42q1Xa4xUZxl+3vf7vnNmZncRsBaDMdBWS1wKuOwuaanVNCSmtSQ2Yv8ICIqpbZRq0nRTaqmF1irGiBiJSZUEfkBZ9kfDJfVSUtHGUExm6bCsmy3W1FZAiFwWZ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