:root {
  --bg: #0b0f14;
  --panel: #121821;
  --panel2: #182030;
  --line: #243044;
  --text: #e8eef7;
  --muted: #8fa3bf;
  --accent: #3d8bfd;
  --good: #2ecc71;
  --warn: #f5a623;
  --bad: #ff5c7a;
  --pink: #ff6b9d;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2740 0%, transparent 50%),
              radial-gradient(900px 500px at 100% 0%, #2a1530 0%, transparent 45%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 24px; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.brand span { color: var(--accent); }
.muted { color: var(--muted); font-size: 13px; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.card .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.card .value { font-size: 28px; font-weight: 700; margin-top: 8px; }
.card .sub { margin-top: 6px; color: var(--muted); font-size: 12px; }
.row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 1000px) { .row { grid-template-columns: 1fr; } }
.chart-box { height: 300px; position: relative; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
h2 { font-size: 16px; margin: 0 0 14px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; background: #21314d; color: #9ec1ff;
}
.badge.ok { background: #173528; color: #7dffa8; }
.badge.warn { background: #3a2a12; color: #ffd28a; }
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.login {
  width: 100%; max-width: 380px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px;
}
.login h1 { margin: 0 0 8px; font-size: 22px; }
.login p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #0d131c; color: var(--text);
  margin-bottom: 14px; outline: none;
}
input:focus { border-color: var(--accent); }
button, .btn {
  display: inline-block; border: 0; border-radius: 10px;
  background: var(--accent); color: white; padding: 11px 16px;
  font-weight: 600; cursor: pointer; width: 100%;
}
.error {
  background: #3a1520; color: #ff9bb0; padding: 10px 12px;
  border-radius: 10px; margin-bottom: 14px; font-size: 13px;
}
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-item { display: grid; grid-template-columns: 110px 1fr 50px; gap: 10px; align-items: center; }
.bar {
  height: 10px; background: #1b2636; border-radius: 999px; overflow: hidden;
}
.bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--pink));
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }