:root {
  --bg: #0a0b0f;
  --bg-2: #0e1016;
  --sidebar: #0e1016;
  --panel: #14161f;
  --panel-2: #1a1d28;
  --panel-3: #20242f;
  --text: #eef1f8;
  --muted: #8b94a8;
  --muted-2: #5f6878;
  --border: #232735;
  --accent: #4f8cff;
  --accent-2: #3b6fe0;
  --ok: #22c98b;
  --warn: #f5b740;
  --danger: #ff5d6c;
  --grad-orange: linear-gradient(135deg, #ffb02e 0%, #ff6a2c 55%, #ff5170 100%);
  --grad-blue: linear-gradient(135deg, #3a7bff 0%, #2f5bd6 100%);
  --grad-green: linear-gradient(135deg, #14c98b 0%, #0f9e8e 100%);
  --grad-purple: linear-gradient(135deg, #9b6bff 0%, #7b3ff0 100%);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(79,140,255,.08), transparent 60%), var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- layout ---------- */
.layout { min-height: 100vh; }
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 252px;
  background: linear-gradient(180deg, #11131b, #0c0e14);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 14px; z-index: 20;
}
.main { margin-left: 252px; padding: 26px 30px 60px; max-width: 1180px; }
.layout.no-sidebar .main { margin: 0 auto; padding: 40px 20px; max-width: 560px; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 12px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-size: 19px; background: var(--grad-blue); box-shadow: 0 6px 16px rgba(58,123,255,.4);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: .2px; }
.brand-tag { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ---------- user chip ---------- */
.userchip {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px;
}
.userchip .avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  font-weight: 700; text-transform: uppercase; background: var(--grad-purple); color: #fff;
}
.userchip .uname { font-weight: 600; font-size: 13px; }
.userchip .ubal { font-size: 12px; color: var(--ok); margin-top: 1px; }
.userchip .logout { margin-left: auto; color: var(--muted); font-size: 17px; padding: 4px; }
.userchip .logout:hover { color: var(--danger); }

/* ---------- nav ---------- */
.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 11px;
  color: var(--muted); font-weight: 500; font-size: 14px; transition: .15s;
}
.nav a .ic { width: 20px; text-align: center; font-size: 15px; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(79,140,255,.18), rgba(79,140,255,.04)); color: #fff; box-shadow: inset 0 0 0 1px rgba(79,140,255,.25); }
.nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); padding: 14px 13px 5px; }
.side-foot { margin-top: auto; padding: 10px 13px; }
.side-foot a { color: var(--muted); font-size: 13px; }
.side-foot a:hover { color: var(--text); }

/* ---------- headings ---------- */
h1.page-title { font-size: 23px; font-weight: 800; margin: 4px 0 22px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin: 26px 0 13px; }
.section-title .dot { color: var(--accent); }

/* ---------- hero (rating) ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 24px 26px;
  background: var(--grad-orange); color: #fff; max-width: 430px; box-shadow: 0 14px 34px rgba(255,106,44,.32);
}
.hero .trophy {
  position: absolute; top: 18px; right: 20px; width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: 40px;
}
.hero .rank { position: absolute; top: 90px; right: 44px; background: #fff; color: #ff6a2c; font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.hero .hlabel { font-size: 13px; opacity: .92; display: flex; align-items: center; gap: 6px; }
.hero .hamount { font-size: 33px; font-weight: 800; margin: 7px 0 2px; letter-spacing: .3px; }
.hero .hsub { font-size: 13px; opacity: .92; margin-top: 12px; max-width: 80%; line-height: 1.4; }

/* ---------- stat cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat {
  position: relative; overflow: hidden; border-radius: 18px; padding: 20px 22px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; min-height: 104px; box-shadow: var(--shadow);
}
.stat.blue { background: var(--grad-blue); }
.stat.green { background: var(--grad-green); }
.stat.purple { background: var(--grad-purple); }
.stat .label { font-size: 13px; opacity: .9; font-weight: 500; }
.stat .value { font-size: 27px; font-weight: 800; margin-top: 7px; }
.stat .ic { font-size: 40px; opacity: .35; }
/* neutral stat (admin) */
.stat.flat { background: var(--panel); border: 1px solid var(--border); color: var(--text); display: block; min-height: 0; }
.stat.flat .label { color: var(--muted); }
.stat.flat .value { font-size: 22px; }

/* ---------- card ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 20px; margin-bottom: 18px; }
.card.narrow { max-width: 520px; margin: 0 auto; }
.card h2 { font-size: 15px; font-weight: 700; margin: 0 0 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- pills ---------- */
.pills { display: inline-flex; gap: 6px; background: var(--panel-2); padding: 5px; border-radius: 12px; flex-wrap: wrap; }
.pill { padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; border: none; cursor: pointer; transition: .15s; }
.pill:hover { color: var(--text); }
.pill.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(79,140,255,.4); }

/* ---------- lists ---------- */
.list .lrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--border); }
.list .lrow:last-child { border-bottom: none; }
.list .lrow .nm { color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .lrow .vl { font-weight: 700; color: var(--ok); white-space: nowrap; }
.muted { color: var(--muted); }
.empty { color: var(--muted-2); font-size: 13px; padding: 8px 2px; }

/* ---------- chart ---------- */
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* ---------- forms ---------- */
input, select, textarea {
  width: 100%; font: inherit; padding: 11px 13px; border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text); outline: none;
}
input::placeholder { color: var(--muted-2); }
input:focus, select:focus { border-color: var(--accent); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
button, .btn {
  font: inherit; font-weight: 700; cursor: pointer; border: none; border-radius: 11px;
  padding: 11px 18px; background: var(--accent); color: #fff; transition: .15s; display: inline-block;
}
button:hover, .btn:hover { filter: brightness(1.08); }
button.success, .btn.success { background: var(--ok); }
button.danger, .btn.danger { background: var(--danger); }
button.ghost, .btn.ghost { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.inline-form { display: inline-flex; gap: 8px; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: var(--panel-3); color: var(--muted); }
.badge.ok { background: rgba(34,201,139,.15); color: var(--ok); }
.badge.warn { background: rgba(245,183,64,.15); color: var(--warn); }
.badge.danger { background: rgba(255,93,108,.15); color: var(--danger); }
.badge.accent { background: rgba(79,140,255,.15); color: var(--accent); }

/* ---------- table ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.tbl tr:hover td { background: rgba(255,255,255,.02); }
.tbl a.btn { padding: 6px 12px; font-size: 12px; }

/* ---------- auth ---------- */
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 20px; margin-bottom: 18px; }
.auth-brand .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-blue); display: grid; place-items: center; }
.error { background: rgba(255,93,108,.12); color: var(--danger); padding: 10px 13px; border-radius: 11px; font-size: 13px; }

canvas { width: 100% !important; }

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; height: auto; flex-direction: column; }
  .main { margin-left: 0; padding: 20px 16px 40px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-sep { width: 100%; padding-top: 8px; }
  .hero { max-width: none; }
}

/* ===================== landing page ===================== */
.lp-wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.lp-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 30px; background: rgba(10,11,15,.72); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.lp-logo { display: flex; align-items: center; gap: 10px; }
.lp-logo b { font-size: 16px; }
.lp-logo i { display: block; font-size: 11px; color: var(--muted); font-style: normal; margin-top: 1px; }
.lp-navlinks { display: flex; gap: 26px; }
.lp-navlinks a { color: var(--muted); font-size: 14px; font-weight: 500; }
.lp-navlinks a:hover { color: var(--text); }
.lp-navcta { display: flex; gap: 10px; }

.lp-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; padding: 64px 0 44px; }
.lp-hero-text h1 { font-size: 46px; line-height: 1.08; font-weight: 800; letter-spacing: -.5px; margin: 0 0 18px; }
.grad { background: linear-gradient(135deg,#5fa0ff,#7b3ff0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-sub { font-size: 17px; color: var(--muted); line-height: 1.55; max-width: 520px; margin: 0 0 28px; }
.lp-actions { display: flex; align-items: center; gap: 22px; margin-bottom: 24px; flex-wrap: wrap; }
.lp-big { padding: 15px 26px; font-size: 16px; border-radius: 13px; box-shadow: 0 12px 26px rgba(79,140,255,.42); }
.lp-link { color: var(--accent); font-weight: 600; }
.lp-trust { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

.lp-hero-mock { position: relative; }
.mock-card { background: #13151d; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.mock-stats { width: 262px; margin-left: auto; padding: 14px 16px; position: relative; z-index: 2; }
.mock-dots i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; background: #3a3f4c; }
.mock-dots i:nth-child(1){ background:#ff5f57; } .mock-dots i:nth-child(2){ background:#febc2e; } .mock-dots i:nth-child(3){ background:#28c840; }
.mock-title { font-weight: 700; font-size: 14px; margin: 10px 0 12px; }
.mock-stat-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 5px 0; }
.mock-stat-row b { margin-left: auto; color: var(--text); }
.mock-stat-tot { display: flex; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; font-weight: 700; font-size: 14px; }
.mock-stat-tot b { margin-left: auto; }
.d { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.d.blue { background: #4f8cff; } .d.red { background: #ff5d6c; } .d.green { background: #22c98b; }
.mock-chart { padding: 16px; margin-top: -16px; }
.mock-chead { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.mock-chips i { font-style: normal; font-size: 11px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); margin-left: 5px; }
.mock-chips i.on { background: #fff; color: #14161f; border-color: #fff; }
.mock-svg { width: 100%; height: 150px; display: block; }
.mock-cbadge { font-size: 12px; color: var(--muted); margin-top: 10px; }
.mock-cbadge b { color: var(--text); }

.lp-section { padding: 54px 0; }
.lp-h2 { text-align: center; font-size: 30px; font-weight: 800; margin: 0 0 8px; }
.lp-h2sub { text-align: center; color: var(--muted); margin: 0 0 32px; }
.lp-sources { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.source-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 22px 10px; text-align: center; font-weight: 600; font-size: 14px; transition: .15s; }
.source-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.src-ic { font-size: 30px; margin-bottom: 10px; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 26px; }
.step-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--panel-2); margin-bottom: 14px; }
.step-card h3 { margin: 0 0 8px; font-size: 17px; }
.step-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }
.lp-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.faq-item { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.faq-item b { display: block; margin-bottom: 6px; }
.faq-item p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.5; }
.lp-cta-band { text-align: center; background: var(--grad-blue); border-radius: 24px; padding: 48px 20px; margin: 20px auto 60px; box-shadow: 0 18px 40px rgba(58,123,255,.32); }
.lp-cta-band h2 { font-size: 28px; margin: 0 0 8px; }
.lp-cta-band p { opacity: .92; margin: 0 0 22px; }
.lp-cta-band .btn { background: #fff; color: #1b2233; }
.lp-foot { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 13px; }
.lp-foot-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .lp-nav { padding: 12px 18px; }
  .lp-navlinks { display: none; }
  .lp-hero { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
  .lp-hero-text h1 { font-size: 33px; }
  .lp-sources { grid-template-columns: repeat(3, 1fr); }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-faq { grid-template-columns: 1fr; }
}

/* ===================== typography (Montserrat) ===================== */
body { font-family: "Montserrat", -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.2px; }
.brand-name, .page-title, .lp-hero-text h1, .lp-h2, .hero .hamount,
.stat .value, .lp-cta-band h2, .auth-brand, .mock-stat-tot, .hero .trophy + .hlabel {
  font-weight: 800; letter-spacing: -.4px;
}
button, .btn, .pill, .nav a, .source-card { font-weight: 600; }
.stat .value, .hero .hamount { letter-spacing: -.6px; }

/* ===================== SVG icons ===================== */
svg.i { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
/* brand logo squares: white glyph on gradient */
.brand .logo svg, .lp-logo .logo svg, .auth-brand .logo svg, .lp-foot-brand .logo svg { color: #fff; }
.lp-foot-brand { display: inline-flex; align-items: center; gap: 8px; }
.lp-foot-brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--grad-blue); display: grid; place-items: center; }
/* sidebar */
.userchip .logout { display: inline-flex; align-items: center; }
.nav a .ic { display: inline-flex; align-items: center; width: auto; }
/* section titles + card headers: accent icon */
.section-title .dot { display: inline-flex; align-items: center; }
.card h2 svg.i { color: var(--accent); vertical-align: -4px; margin-right: 8px; }
.chart-head h2 svg.i { color: var(--accent); vertical-align: -4px; margin-right: 8px; }
/* gradient stat-card icon */
.stat .ic { display: flex; align-items: center; justify-content: center; }
.stat .ic svg { width: 40px; height: 40px; opacity: .9; }
/* hero */
.hero .trophy svg { color: #fff; }
.hero .hlabel { align-items: center; }
.hero .hlabel svg.i { vertical-align: -3px; margin-right: 6px; opacity: .95; }
.page-title svg.i { vertical-align: -4px; margin-right: 8px; color: var(--accent); }
/* buttons with leading icon */
.btn svg.i, button svg.i { vertical-align: -4px; margin-right: 7px; }
/* landing */
.lp-trust span { display: inline-flex; align-items: center; }
.lp-trust svg.i { color: var(--accent); margin-right: 6px; }
.src-ic { display: flex; justify-content: center; }
.src-ic svg { width: 34px; height: 34px; }
.step-ic svg.i { color: var(--accent); }
.lp-navlinks a { display: inline-flex; align-items: center; gap: 6px; }
