:root {
  --bg: #000;
  --panel: #0e0e0e;
  --line: rgba(255,255,255,.1);
  --line-soft: rgba(255,255,255,.05);
  --text: #fff;
  --muted: #a3a3a3;
  --faint: #737373;
  --accent: #fce10a;
  --green: #34d399;
  --blue: #60a5fa;
  --red: #f87171;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; }
.is-hidden { display: none !important; }
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(252,225,10,.08), transparent 28%),
    #050505;
  padding: 22px;
}
.login-panel {
  width: min(400px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14,14,14,.96);
  padding: 22px;
}
.login-brand {
  margin-bottom: 4px;
}
.login-panel h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1;
}
.login-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.login-form {
  display: grid;
  gap: 13px;
}
.login-form .dash-btn {
  width: 100%;
}
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.auth-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}
.auth-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #000;
}
.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  background:
    radial-gradient(circle at 18% 0%, rgba(252,225,10,.07), transparent 24%),
    #050505;
}
.dashboard-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(8,8,8,.96);
  padding: 18px 14px;
}
.dashboard-brand {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  padding: 9px;
}
.dashboard-brand img { width: 38px; height: 38px; border-radius: 8px; object-fit: contain; background: #000; }
.dashboard-brand strong { display: block; font-size: 14px; font-weight: 900; }
.dashboard-brand strong span { color: var(--accent); }
.dashboard-brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 700; }
.dashboard-nav { display: grid; gap: 18px; margin-top: 18px; }
.nav-group p {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.dashboard-nav button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 0 10px;
  text-align: left;
}
.dashboard-nav button span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(255,255,255,.035);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}
.dashboard-nav button:hover,
.dashboard-nav button.active {
  border-color: rgba(252,225,10,.35);
  background: rgba(252,225,10,.1);
  color: #fff;
}
.dashboard-main { min-width: 0; }
.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7,7,7,.9);
  backdrop-filter: blur(16px);
  padding: 18px 26px;
}
.dashboard-topbar h1 { margin: 8px 0 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.05; }
.dashboard-topbar p, .dash-card p, .dash-copy { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.topbar-actions, .dash-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dashboard-content { display: grid; gap: 18px; padding: 22px 26px 34px; }
.dash-grid { display: grid; gap: 16px; }
.dash-grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14,14,14,.94);
  padding: 18px;
}
.dash-card.stat { position: relative; overflow: hidden; min-height: 132px; }
.dash-card.stat:after {
  content: "";
  position: absolute;
  inset: auto 16px 14px 16px;
  height: 3px;
  border-radius: 4px;
  background: rgba(255,255,255,.08);
}
.dash-card.stat.accent:after { background: var(--accent); }
.dash-card.stat.green:after { background: var(--green); }
.dash-card.stat.blue:after { background: var(--blue); }
.dash-card.stat.red:after { background: var(--red); }
.dash-card.stat span { color: var(--muted); font-size: 12px; font-weight: 900; }
.dash-card.stat strong { display: block; margin-top: 12px; font-size: 34px; line-height: 1; }
.dash-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.dash-card h3 { margin: 0; font-size: 16px; }
.dash-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 0 8px;
  white-space: nowrap;
}
.dash-badge.success { border-color: rgba(52,211,153,.25); background: rgba(52,211,153,.1); color: var(--green); }
.dash-badge.warning { border-color: rgba(252,225,10,.28); background: rgba(252,225,10,.1); color: var(--accent); }
.dash-badge.danger { border-color: rgba(248,113,113,.28); background: rgba(248,113,113,.1); color: var(--red); }
.dash-badge.neutral { border-color: var(--line); background: rgba(255,255,255,.04); color: #d4d4d4; }
.dash-btn, .dash-icon-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  padding: 0 13px;
}
.dash-icon-btn { width: 38px; padding: 0; color: var(--accent); font-size: 22px; }
.dash-btn.primary { border-color: var(--accent); background: var(--accent); color: #000; }
.mobile-menu { display: none; }
.dash-table-wrap { width: 100%; overflow-x: auto; }
.dash-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.dash-table th, .dash-table td { border-bottom: 1px solid var(--line-soft); color: #e5e5e5; font-size: 12px; padding: 12px 10px; text-align: left; }
.dash-table th { color: var(--faint); font-weight: 900; text-transform: uppercase; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.dash-field { display: grid; gap: 7px; }
.dash-field.wide { grid-column: 1 / -1; }
.dash-field span { color: var(--muted); font-size: 12px; font-weight: 900; }
.dash-field input, .dash-field select, .dash-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #060606;
  color: #fff;
  font-size: 13px;
  padding: 11px 12px;
  outline: none;
}
.dash-field textarea { resize: vertical; }
.dash-field input:focus, .dash-field select:focus, .dash-field textarea:focus { border-color: rgba(252,225,10,.55); }
.dash-alert {
  border: 1px solid rgba(252,225,10,.28);
  border-radius: 8px;
  background: rgba(252,225,10,.08);
  color: #f8e969;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  padding: 14px 16px;
}
.dash-alert.neutral {
  border-color: var(--line);
  background: rgba(255,255,255,.04);
  color: #d4d4d4;
}
.dash-alert.success {
  border-color: rgba(52,211,153,.25);
  background: rgba(52,211,153,.08);
  color: var(--green);
}
.dash-alert.danger {
  border-color: rgba(248,113,113,.28);
  background: rgba(248,113,113,.08);
  color: var(--red);
}
.dash-chart {
  height: 260px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    #070707;
  background-size: 34px 34px;
  padding: 16px;
}
.dash-chart svg { width: 100%; height: 100%; }
.log-panel { display: grid; gap: 8px; }
.log-panel code {
  display: block;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #050505;
  color: #d4d4d4;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px;
  white-space: normal;
}
.modal-preview { display: grid; place-items: center; min-height: 310px; }
.modal-box { width: min(420px, 100%); border: 1px solid var(--line); border-radius: 8px; background: #070707; padding: 20px; }
.modal-box h3 { margin-top: 12px; }
.settings-list { display: grid; gap: 10px; }
.switch-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
}
.switch-row input { accent-color: var(--accent); width: 18px; height: 18px; }
@media (max-width: 1180px) {
  .dashboard-shell { grid-template-columns: 1fr; }
  .dashboard-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform .18s ease;
  }
  .dashboard-sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }
  .dash-grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dashboard-topbar { align-items: flex-start; flex-direction: column; padding: 16px; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .dashboard-content { padding: 16px; }
  .dash-grid.stats, .dash-grid.two, .dash-form-grid { grid-template-columns: 1fr; }
  .dash-card { padding: 15px; }
  .dash-card-head { align-items: flex-start; flex-direction: column; }
}
