:root {
  --bg:       #0a0a0f;
  --bg2:      #111118;
  --bg3:      #16161f;
  --border:   #222235;
  --gold:     #FFD700;
  --gold2:    #b8960c;
  --green:    #57F287;
  --red:      #ED4245;
  --blue:     #5865F2;
  --text:     #e2e2e8;
  --muted:    #555570;
  --sidebar-w:220px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo .brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
}

.sidebar-logo .sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

nav { flex: 1; padding: 16px 0; }

nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  border-left: 3px solid transparent;
}

nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
nav a.active { color: var(--gold); border-left-color: var(--gold); background: rgba(255,215,0,.05); }
nav a .icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.bot-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.online  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.offline { background: var(--red);   box-shadow: 0 0 6px var(--red); }

/* ── Main ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 { font-size: 20px; font-weight: 600; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logout-btn {
  padding: 6px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  transition: all .15s;
}

.logout-btn:hover { color: var(--text); border-color: var(--gold); }

.content { padding: 28px 32px; flex: 1; }

/* ── Stat cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 10px;
  padding: 18px 20px;
}

.stat-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-card .sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.stat-card.green { border-top-color: var(--green); }
.stat-card.red   { border-top-color: var(--red); }
.stat-card.blue  { border-top-color: var(--blue); }

/* ── Sections ── */
.section { margin-bottom: 32px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.see-all {
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 500;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tbody tr:hover td { background: rgba(255,255,255,.025); }

/* ── Multiple colors ── */
.text-gold   { color: var(--gold); font-weight: 700; }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--muted); }

/* ── Status badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.badge-active  { background: rgba(87,242,135,.12); color: var(--green); }
.badge-closed  { background: rgba(255,255,255,.06); color: var(--muted); }
.badge-online  { background: rgba(87,242,135,.12); color: var(--green); }
.badge-offline { background: rgba(237,66,69,.12);  color: var(--red); }

/* ── Token symbol ── */
.token-name { font-weight: 600; color: var(--text); }
.token-addr { font-size: 11px; color: var(--muted); font-family: monospace; }

/* ── Chart ── */
.chart-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.chart-title { font-size: 13px; font-weight: 600; margin-bottom: 16px; color: var(--text); }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; }

.tab {
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
}

.tab.active { background: rgba(255,215,0,.1); color: var(--gold); border-color: var(--gold2); }
.tab:hover:not(.active) { color: var(--text); }

/* ── Pagination ── */
.pagination { display: flex; gap: 8px; margin-top: 20px; align-items: center; }

.page-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg2);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  transition: all .15s;
}

.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.current { background: rgba(255,215,0,.1); border-color: var(--gold2); color: var(--gold); }
.page-info { color: var(--muted); font-size: 12px; margin-left: auto; }

/* ── Progress bars ── */
.progress-wrap { margin-bottom: 14px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 12px; }
.progress-label .name { color: var(--muted); }
.progress-label .val  { color: var(--text); font-weight: 600; }

.progress-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gold);
  transition: width .3s;
}

.progress-fill.green { background: var(--green); }
.progress-fill.red   { background: var(--red); }
.progress-fill.blue  { background: var(--blue); }

/* ── Status page grid ── */
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

@media (max-width: 900px) { .status-grid { grid-template-columns: 1fr; } }

.info-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.info-box h3 { font-size: 13px; font-weight: 600; margin-bottom: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }

.info-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-row .key { color: var(--muted); }
.info-row .val { color: var(--text); font-weight: 500; }

/* ── Login ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-box {
  width: 360px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 12px;
  padding: 36px 32px;
}

.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .brand { font-size: 22px; font-weight: 800; color: var(--gold); letter-spacing: 2px; }
.login-logo .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}

.form-control:focus { border-color: var(--gold); }

.btn-primary {
  width: 100%;
  padding: 11px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: 4px;
}

.btn-primary:hover { opacity: .88; }

.error-msg { color: var(--red); font-size: 12px; margin-bottom: 14px; text-align: center; }

/* ── Milestones ── */
.milestones { display: flex; flex-wrap: wrap; gap: 4px; }

.milestone {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255,215,0,.1);
  color: var(--gold);
  font-weight: 600;
}

/* ── Links ── */
a.ds-link { color: var(--blue); text-decoration: none; font-size: 12px; }
a.ds-link:hover { text-decoration: underline; }

/* ── Loading skeleton ── */
.loading { color: var(--muted); font-size: 12px; font-style: italic; }
