/* style.css — TRON Panel: dark navy sidebar + light content */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e6eaf1;
  --border-strong: #d5dce6;

  --text: #0f172a;
  --text-2: #475569;
  --muted: #8494ab;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eef4ff;
  --green: #059669;
  --green-soft: #e7f7f0;
  --amber: #b45309;
  --amber-soft: #fdf4e3;
  --red: #dc2626;
  --red-soft: #fdeded;
  --purple: #7c3aed;
  --cyan: #0891b2;

  /* dark navy sidebar / wallet card */
  --navy: #0b1739;
  --navy-2: #101f47;
  --navy-line: rgba(255, 255, 255, .09);
  --navy-text: #cbd6ea;
  --navy-muted: #7e8fb0;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 2px 6px rgba(15, 23, 42, .07);
  --shadow-lg: 0 14px 34px rgba(15, 23, 42, .12);
  --sidebar-w: 258px;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; color: var(--text-2); }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* --------------------------------- brand -------------------------------- */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.01em;
  color: #fff;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(140deg, #2f6bff, #1b3fae);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .4);
}
.brand-mark svg { width: 17px; height: 17px; }

/* ------------------------------- form bits ------------------------------- */

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 550; color: var(--text-2); margin-bottom: 6px; }

.input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:hover { border-color: #c2ccda; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .13); }
.input::placeholder { color: #a7b1c2; }
.input.mono { font-family: var(--mono); font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: var(--shadow-sm);
  transition: background .12s, border-color .12s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: #c2ccda; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red-soft); border-color: #f5c9c6; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }

/* ghost button used inside the dark sidebar */
.btn-ghost {
  background: rgba(255, 255, 255, .07);
  border-color: var(--navy-line);
  color: var(--navy-text);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .2); color: #fff; }

.link-btn { background: none; border: 0; color: var(--accent); font-size: 13px; font-weight: 550; padding: 0; }
.link-btn:hover { text-decoration: underline; }

.mini-select {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12.5px;
  font-weight: 550;
  outline: none;
}
.mini-select:focus { border-color: var(--accent); }

/* --------------------------------- alerts -------------------------------- */

.alert {
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 15px;
  border: 1px solid transparent;
}
.alert-error { background: var(--red-soft); border-color: #f6cecb; color: #a4231d; }
.alert-ok { background: var(--green-soft); border-color: #b6e6d2; color: #05603a; }
.alert-info { background: var(--accent-soft); border-color: #d3e2fd; color: #1a4ba8; }
.alert a { color: inherit; text-decoration: underline; }

/* ------------------------------- login page ------------------------------ */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(1000px 600px at 50% -10%, #16295c, var(--navy) 55%, #060e24 100%);
}

.login-card {
  width: 100%;
  max-width: 384px;
  background: var(--surface);
  border-radius: 16px;
  padding: 30px 28px;
  box-shadow: 0 24px 60px rgba(3, 10, 30, .5);
}
.login-card .brand { color: var(--text); }
.login-card h1 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; margin: 22px 0 5px; }
.login-card .sub { color: var(--text-2); font-size: 13.5px; margin: 0 0 22px; }
.login-card .btn-primary { margin-top: 4px; padding: 10px; }

.login-hint {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

/* -------------------------------- layout -------------------------------- */

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

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  color: var(--navy-text);
  background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 45%, #071029 100%);
  overflow: hidden;
}

/* soft wave decoration at the bottom of the sidebar */
.sidebar::after {
  content: "";
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -60px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47, 107, 255, .28), transparent 70%);
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }

.sidebar .brand { padding: 2px 8px 22px; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--navy-muted);
  font-size: 13.5px;
  font-weight: 550;
  text-align: left;
  transition: background .14s, color .14s;
}
.nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav button.active {
  background: linear-gradient(100deg, #2f6bff, #1e46c4);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(47, 107, 255, .35);
}

.nav .ico { width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.nav .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-foot {
  border: 1px solid var(--navy-line);
  background: rgba(255, 255, 255, .04);
  border-radius: 12px;
  padding: 12px;
}
.sidebar-foot .who { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--navy-muted); padding-bottom: 10px; }
.sidebar-foot .who b { color: #fff; font-size: 13.5px; font-weight: 600; }

.dot-live {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

/* -------------------------------- topbar -------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  height: 64px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-title { display: none; font-size: 16px; font-weight: 650; margin: 0; flex: 1; }

.search {
  position: relative;
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
}
.search-ico { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%;
  padding: 9px 74px 9px 36px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.search input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.search input::placeholder { color: #a7b1c2; }
.search kbd {
  position: absolute;
  right: 8px;
  font: 500 11px var(--font);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 2px 7px;
}

.topbar-actions { display: flex; align-items: center; gap: 9px; position: relative; }

.net-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  white-space: nowrap;
}
.net-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.net-pill.live::before { box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }

.icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 17px; height: 17px; }

.bell-dot {
  position: absolute;
  top: 6px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid #fff;
}

.avatar-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 22px;
  padding: 3px 7px 3px 3px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.avatar-btn:hover { background: var(--surface-2); }

.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #2f6bff, #1b3fae);
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
  text-transform: uppercase;
}

.menu {
  position: absolute;
  top: 44px;
  right: 0;
  min-width: 186px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 50;
}
.menu-head { font-size: 12px; color: var(--muted); padding: 7px 10px 9px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
.menu-head b { display: block; color: var(--text); font-size: 13.5px; }
.menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}
.menu button:hover { background: var(--surface-3); color: var(--text); }
.menu button.danger { color: var(--red); }
.menu button.danger:hover { background: var(--red-soft); }

.hamburger {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  border-radius: 9px;
  padding: 6px 8px;
  line-height: 0;
}

.content { padding: 22px 24px 40px; max-width: 1560px; }

.backdrop { display: none; position: fixed; inset: 0; background: rgba(11, 23, 57, .45); z-index: 35; }
.backdrop.show { display: block; }

/* ------------------------------- page head ------------------------------- */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-head h1 { font-size: 27px; font-weight: 680; letter-spacing: -.03em; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--text-2); font-size: 13.5px; }

.net-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 300px;
  max-width: 520px;
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid #dbe6fb;
  background: linear-gradient(105deg, #eef3ff 0%, #f3f0ff 55%, #eef7ff 100%);
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.5;
}
.net-banner .banner-mark {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, #2f6bff, #1b3fae);
  color: #fff;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .35);
}
.net-banner .banner-mark svg { width: 19px; height: 19px; }
.net-banner a { color: #1d4ed8; text-decoration: underline; }
.net-banner.warn { border-color: #f3d9b5; background: linear-gradient(105deg, #fdf5e8, #fff9f0); color: #8a4b09; }
.net-banner.warn .banner-mark { background: linear-gradient(140deg, #f59e0b, #b45309); box-shadow: 0 5px 14px rgba(245, 158, 11, .35); }

/* ---------------------------------- kpis --------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 17px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s;
}
.stat:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.stat-top { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.stat-ico {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  color: #fff;
}
.stat-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-ico.blue { background: linear-gradient(140deg, #3b82f6, #2563eb); }
.stat-ico.green { background: linear-gradient(140deg, #34d399, #059669); }
.stat-ico.purple { background: linear-gradient(140deg, #a78bfa, #7c3aed); }
.stat-ico.cyan { background: linear-gradient(140deg, #38bdf8, #0891b2); }
.stat-ico.amber { background: linear-gradient(140deg, #fbbf24, #d97706); }

.stat-label { font-size: 13px; font-weight: 600; color: var(--text-2); }

.stat-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.stat .value {
  font-size: 26px;
  font-weight: 680;
  letter-spacing: -.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat .value .unit { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 5px; }
.stat .spark { width: 84px; height: 34px; flex: none; opacity: .95; }

/* --------------------------------- cards -------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 640; letter-spacing: -.01em; flex: 1; }
.card-body { padding: 18px; }

.head-ico {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}
.head-ico svg { width: 16px; height: 16px; }
.head-ico.amber { background: var(--amber-soft); color: #d97706; }
.head-ico.blue { background: var(--accent-soft); color: var(--accent); }

/* dashboard 3-column area */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) 306px;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}
.dash-grid > .card { margin: 0; }
.rail { display: flex; flex-direction: column; gap: 16px; }
.rail .card { margin: 0; }

/* -------------------------- dark wallet card ---------------------------- */

.wallet-dark {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  padding: 17px;
  color: #fff;
  background: linear-gradient(140deg, #16295c 0%, #0f2350 35%, #0b1739 100%);
}
.wallet-dark + .wallet-dark { margin-top: 13px; }

/* the wallet currently shown on the dashboard gets a ring */
.wallet-dark.is-active { box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(37, 99, 235, .22); }

.wd-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.wd-btns { display: inline-flex; gap: 8px; }

.btn-activate {
  border: 1px solid rgba(147, 180, 255, .45);
  background: rgba(37, 99, 235, .22);
  color: #bfd3ff;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 550;
}
.btn-activate:hover { background: rgba(37, 99, 235, .4); color: #fff; }

.wallet-dark::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -22px;
  width: 190px;
  height: 190px;
  background: radial-gradient(closest-side, rgba(47, 107, 255, .35), transparent 70%);
  pointer-events: none;
}
.wallet-dark .wd-logo {
  position: absolute;
  right: 16px;
  top: 42px;
  width: 96px;
  height: 96px;
  color: rgba(120, 165, 255, .22);
  pointer-events: none;
}
.wallet-dark > * { position: relative; z-index: 1; }

.wallet-dark .wd-name { font-size: 14.5px; font-weight: 640; }

.wallet-dark .addr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--navy-line);
  border-radius: 9px;
  padding: 8px 10px;
  max-width: 100%;
}
.wallet-dark .addr-row span {
  font-family: var(--mono);
  font-size: 12px;
  color: #dbe6ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.copy-btn {
  border: 0;
  background: none;
  color: var(--navy-muted);
  padding: 2px;
  line-height: 0;
  border-radius: 5px;
  flex: none;
}
.copy-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.copy-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.wallet-dark .bal {
  font-size: 29px;
  font-weight: 680;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.wallet-dark .bal .unit { font-size: 14px; font-weight: 600; color: var(--navy-muted); letter-spacing: 0; margin-left: 5px; }

.wallet-dark .wd-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--navy-muted);
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--navy-line);
}
.wallet-dark .wd-meta span { display: inline-flex; align-items: center; gap: 6px; }
.wallet-dark .wd-meta b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.wallet-dark .wd-meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }

.wallet-dark .wd-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; }
.wallet-dark .wd-foot a { color: #93b4ff; font-size: 13px; }
.wallet-dark .wd-added { font-size: 11.5px; color: var(--navy-muted); margin-top: 9px; }

.btn-remove {
  border: 1px solid rgba(248, 113, 113, .45);
  background: rgba(220, 38, 38, .16);
  color: #fca5a5;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 550;
  box-shadow: none;
}
.btn-remove:hover { background: rgba(220, 38, 38, .3); color: #fff; }

/* ------------------------------ chart card ------------------------------- */

.chart-lead { display: flex; align-items: baseline; gap: 11px; flex-wrap: wrap; }
.chart-lead .big {
  font-size: 27px;
  font-weight: 680;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.chart-lead .big .unit { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.chart-lead .delta { font-size: 12.5px; font-weight: 620; }
.chart-lead .delta.up { color: var(--green); }
.chart-lead .delta.down { color: var(--red); }
.chart-note { font-size: 12.5px; color: var(--muted); margin: 3px 0 14px; }

.line-chart { width: 100%; height: 190px; display: block; }
.line-chart .grid { stroke: var(--border); stroke-width: 1; }
.line-chart .axis { font-size: 10.5px; fill: var(--muted); font-family: var(--font); }
.line-chart .line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.line-chart .dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }

/* ------------------------------ quick actions ---------------------------- */

.actions { display: flex; flex-direction: column; gap: 9px; padding: 14px; }
.actions button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text);
  text-align: left;
  transition: border-color .13s, background .13s, transform .13s;
}
.actions button:hover { border-color: #bfd3f6; background: var(--accent-soft); transform: translateX(2px); }
.actions button svg { width: 17px; height: 17px; flex: none; color: var(--accent); }
.actions .chev { margin-left: auto; color: var(--muted); font-size: 17px; line-height: 1; }

/* ------------------------------ network info ----------------------------- */

.info-list { padding: 6px 18px 16px; }
.info-list .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.info-list .row:last-of-type { border-bottom: 0; }
.info-list .row span { color: var(--muted); }
.info-list .row b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* --------------------------------- promo --------------------------------- */

.promo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(135deg, #16295c 0%, #0b1739 55%, #091329 100%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.promo::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(closest-side, rgba(47, 107, 255, .4), transparent 70%);
}
.promo > * { position: relative; z-index: 1; }
.promo-mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, #3b82f6, #1b3fae);
  color: #fff;
}
.promo-mark svg { width: 21px; height: 21px; }
.promo b { display: block; font-size: 16px; font-weight: 680; letter-spacing: -.01em; }
.promo span { font-size: 12.5px; color: #93a6c9; }

/* -------------------------------- tables -------------------------------- */

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }

th, td { padding: 11px 18px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
th {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: var(--surface-2);
}
td { color: var(--text-2); font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge.green { color: var(--green); border-color: #b6e6d2; background: var(--green-soft); }
.badge.amber { color: var(--amber); border-color: #f0dcb8; background: var(--amber-soft); }
.badge.red { color: var(--red); border-color: #f6cecb; background: var(--red-soft); }
.badge.dark { background: rgba(52, 211, 153, .16); border-color: rgba(52, 211, 153, .4); color: #6ee7b7; }
.badge.blue { background: rgba(59, 130, 246, .22); border-color: rgba(147, 180, 255, .5); color: #bfd3ff; }

/* --------------------------- wallets page cards -------------------------- */

.wallet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 15px; }

.preview {
  margin-top: 13px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 12px 13px;
  background: var(--surface-2);
}
.preview.ok { border-color: #b6e6d2; background: var(--green-soft); }
.preview.bad { border-color: #f6cecb; background: var(--red-soft); }
.preview .k { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.preview.ok .k { color: #05603a; }
.preview.bad .k { color: #a4231d; }
.preview .v { font-family: var(--mono); font-size: 13px; word-break: break-all; margin-top: 5px; color: var(--text); }

/* -------------------------------- spinner -------------------------------- */

.spinner {
  width: 15px; height: 15px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------- responsive ------------------------------ */

.mob-only { display: none; }

@media (max-width: 1300px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rail { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .rail > * { flex: 1; min-width: 260px; }
}

@media (max-width: 900px) {
  .desk-only { display: none; }
  .mob-only { display: grid; }

  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .hamburger { display: block; }

  .search { display: none; }
  .topbar-title { display: block; }
  .topbar { padding: 0 16px; height: 58px; }
  .btn-text { display: none; }
  .net-pill { padding: 5px 10px; }

  .content { padding: 16px 16px 32px; }

  /* heading and banner should not squeeze each other */
  .page-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .page-head h1 { font-size: 22px; }
  .net-banner { min-width: 0; max-width: none; width: 100%; }

  .dash-grid { grid-template-columns: 1fr; }
  .rail { flex-direction: column; }
  .rail > * { min-width: 0; }

  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 21px; }
  .stat .spark { width: 58px; height: 28px; }

  .wallet-grid { grid-template-columns: 1fr; }
  th, td { padding: 10px 14px; }
}

@media (max-width: 620px) {
  /* on small screens the network pill already shows inside the banner */
  .net-pill { display: none; }
  .topbar { gap: 8px; }
  .topbar-title { font-size: 15px; }
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-ico { width: 32px; height: 32px; border-radius: 9px; }
  .stat .spark { display: none; }
  .card-body { padding: 14px; }
  .card-head { padding: 13px 14px; }
  .info-list { padding: 4px 14px 12px; }
  .actions { padding: 12px; }
  th, td { padding: 9px 12px; }
  .login-card { padding: 26px 20px; }
  .wallet-dark .bal { font-size: 25px; }
}
