/* ═══════════════════════════════════════════════════════════════
   Capital Sterling — CRYPTO RECOVERY SOLUTIONS
   Client Recovery Dashboard
   Grid-based sidebar layout · data density + quick scanning.
   Light + dark themes driven by html[data-theme] (same key as the
   rest of the platform: "capital-sterling-theme").
   ═══════════════════════════════════════════════════════════════ */

/* ── RECOVERY DESIGN TOKENS (scoped) ─────────────────────────── */
:root, html[data-theme="light"] {
  --rd-bg:        #eef1f6;
  --rd-bg-soft:   #f6f8fa;
  --rd-panel:     #ffffff;
  --rd-panel-2:   #f7f9fc;
  --rd-panel-3:   #f0f3f9;
  --rd-line:      rgba(15, 23, 42, 0.08);
  --rd-line-2:    rgba(15, 23, 42, 0.14);
  --rd-text:      #0f172a;
  --rd-muted:     #667085;
  --rd-dim:       #98a2b3;
  --rd-green:     #16a34a;
  --rd-green-2:   #22c55e;
  --rd-green-dim: rgba(34, 197, 94, 0.12);
  --rd-blue:      #2563eb;
  --rd-blue-dim:  rgba(37, 99, 235, 0.10);
  --rd-cyan:      #0891b2;
  --rd-orange:    #d0810b;
  --rd-orange-dim: rgba(217, 129, 11, 0.12);
  --rd-red:       #e5484d;
  --rd-red-dim:   rgba(229, 72, 77, 0.10);
  --rd-track:     #e4e9f2;
  --rd-shadow:    0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --rd-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --rd-topbar:    rgba(255, 255, 255, 0.82);
  --rd-sidebar:   #fff;
}

html[data-theme="dark"] {
  --rd-bg:        #0d1117;
  --rd-bg-soft:   #0d1117;
  --rd-panel:     #161b22;
  --rd-panel-2:   #1a212a;
  --rd-panel-3:   #1f2833;
  --rd-line:      rgba(255, 255, 255, 0.07);
  --rd-line-2:    rgba(255, 255, 255, 0.12);
  --rd-text:      #e6edf3;
  --rd-muted:     #8b949e;
  --rd-dim:       #5c6773;
  --rd-blue:      #388bfd;
  --rd-blue-dim:  rgba(56, 139, 253, 0.14);
  --rd-green:     #3fb950;
  --rd-green-2:   #39d353;
  --rd-green-dim: rgba(63, 185, 80, 0.14);
  --rd-cyan:      #00c9db;
  --rd-orange:    #f0a028;
  --rd-orange-dim: rgba(240, 160, 40, 0.14);
  --rd-red:       #f85149;
  --rd-red-dim:   rgba(248, 81, 73, 0.14);
  --rd-track:     #21262d;
  --rd-shadow:    0 1px 2px rgba(0,0,0,0.4), 0 10px 30px rgba(0,0,0,0.35);
  --rd-shadow-lg: 0 16px 48px rgba(0,0,0,0.55);
  --rd-topbar:    rgba(13, 17, 23, 0.82);
  --rd-sidebar:   #0f141b;
}

/* ── Recovery dashboard shell ────────────────────────────────── */
body {
  background: var(--rd-bg);
  color: var(--rd-text);
  font-family: 'DM Sans', var(--sans), system-ui, sans-serif;
}

.rd-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* ═══════════════════ TOP NAVIGATION BAR ═══════════════════ */
.rd-topbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; gap: 1.5rem;
  height: 68px; padding: 0 2rem;
  background: var(--rd-topbar);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--rd-line);
}

.rd-brand { display: flex; align-items: center; gap: 0.8rem; min-width: 220px; }
.rd-brand .rd-hex {
  width: 40px; height: 40px; flex-shrink: 0;
  color: var(--rd-blue);
  filter: drop-shadow(0 0 10px var(--rd-blue-dim));
}
.rd-brand-title {
  font-family: var(--mono);
  font-size: 0.74rem; font-weight: 800;
  letter-spacing: 0.16em; line-height: 1.28;
  color: var(--rd-text); text-transform: uppercase;
}
.rd-brand-title span { color: var(--rd-blue); }

.rd-nav { display: flex; gap: 0.25rem; margin: 0 auto; }
.rd-nav a {
  padding: 0.45rem 0.95rem; border-radius: 8px;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--rd-muted); transition: all .18s ease;
}
.rd-nav a:hover { color: var(--rd-text); background: var(--rd-bg-soft); }
.rd-nav a.active { color: var(--rd-blue); background: var(--rd-blue-dim); }

.rd-actions { display: flex; align-items: center; gap: 0.9rem; min-width: 160px; justify-content: flex-end; }
.rd-theme {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rd-panel); border: 1px solid var(--rd-line);
  color: var(--rd-muted); cursor: pointer; transition: all .2s ease;
}
.rd-theme:hover { color: var(--rd-blue); border-color: var(--rd-blue); transform: rotate(14deg); }
.rd-theme i { font-size: 1rem; }
[data-theme="light"] .rd-theme .bi-moon-stars { display: inline; }
[data-theme="light"] .rd-theme .bi-sun { display: none; }
[data-theme="dark"]  .rd-theme .bi-moon-stars { display: none; }
[data-theme="dark"]  .rd-theme .bi-sun { display: inline; }

.rd-user-wrap { position: relative; }
.rd-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rd-blue), var(--rd-blue));
  color: #fff; font-family: var(--mono); font-weight: 700; font-size: 0.8rem;
  box-shadow: 0 0 0 2px var(--rd-panel), 0 0 0 3.5px var(--rd-line-2);
  cursor: pointer; user-select: none; transition: box-shadow .2s ease;
}
.rd-avatar:hover { box-shadow: 0 0 0 2px var(--rd-panel), 0 0 0 3.5px var(--rd-blue); }
.rd-drop {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 210px; padding: 0.4rem;
  background: var(--rd-panel); border: 1px solid var(--rd-line);
  border-radius: 12px; box-shadow: var(--rd-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s ease; z-index: 1200;
}
.rd-user-wrap.open .rd-drop { opacity: 1; visibility: visible; transform: translateY(0); }
.rd-drop-head { padding: 0.6rem 0.75rem 0.65rem; border-bottom: 1px solid var(--rd-line); margin-bottom: 0.3rem; }
.rd-drop-head b { display: block; font-size: 0.85rem; }
.rd-drop-head small { color: var(--rd-muted); font-size: 0.72rem; }
.rd-drop a {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.75rem; border-radius: 8px;
  color: var(--rd-text); font-size: 0.82rem; transition: background .15s ease;
}
.rd-drop a i { color: var(--rd-muted); font-size: 0.95rem; width: 16px; }
.rd-drop a:hover { background: var(--rd-panel-2); }
.rd-drop a.logout { color: var(--rd-red); }
.rd-drop a.logout i { color: var(--rd-red); }

/* ═══════════════════ BODY: SIDEBAR + MAIN ═══════════════════ */
.rd-body { display: flex; flex: 1; align-items: stretch; }

/* ── LEFT SIDEBAR (identity & support hub) ── */
.rd-sidebar {
  width: 284px; min-width: 284px; flex-shrink: 0;
  background: var(--rd-sidebar);
  border-right: 1px solid var(--rd-line);
  display: flex; flex-direction: column;
  height: calc(100vh - 68px);
  position: sticky; top: 68px;
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rd-line-2) transparent;
}
.rd-sidebar::-webkit-scrollbar { width: 4px; }
.rd-sidebar::-webkit-scrollbar-thumb { background: var(--rd-line-2); border-radius: 4px; }

.rd-side-block { padding: 1.1rem 1.15rem; border-bottom: 1px solid var(--rd-line); }
.rd-side-label {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--rd-dim); margin-bottom: 0.7rem; display: flex; align-items: center; gap: 0.4rem;
}
.rd-side-label i { color: var(--rd-blue); font-size: 0.8rem; }

/* identity */
.rd-identity { display: flex; align-items: center; gap: 0.75rem; }
.rd-identity .rd-avatar { width: 46px; height: 46px; font-size: 0.95rem; border-radius: 14px; }
.rd-identity-name { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.rd-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-top: 0.25rem; padding: 0.16rem 0.5rem;
  background: var(--rd-green-dim); color: var(--rd-green);
  border-radius: 20px; font-family: var(--mono);
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.rd-badge i { font-size: 0.6rem; }

/* key/value rows */
.rd-kv { display: flex; flex-direction: column; gap: 0.55rem; }
.rd-kv .row { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.rd-kv .k { color: var(--rd-dim); font-size: 0.72rem; }
.rd-kv .v { font-family: var(--mono); font-size: 0.74rem; font-weight: 600; text-align: right; word-break: break-all; }
.rd-kv .v.green { color: var(--rd-green); }
.rd-kv .v.blue { color: var(--rd-blue); }

/* consultant */
.rd-consult { display: flex; align-items: center; gap: 0.7rem; }
.rd-consult .av {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--rd-blue-dim); color: var(--rd-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; position: relative;
}
.rd-consult .av::after {
  content: ''; position: absolute; right: -3px; bottom: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rd-green); border: 2px solid var(--rd-sidebar);
}
.rd-consult .who b { display: block; font-size: 0.83rem; }
.rd-consult .who span { font-family: var(--mono); font-size: 0.66rem; color: var(--rd-green); }

/* beneficiary (address/iban) */
.rd-copy { display: flex; flex-direction: column; gap: 0.75rem; }
.rd-copy .box {
  background: var(--rd-bg-soft); border: 1px solid var(--rd-line);
  border-radius: 10px; padding: 0.55rem 0.7rem;
}
.rd-copy .box .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.3rem; }
.rd-copy .box .top span { font-size: 0.66rem; color: var(--rd-dim); text-transform: uppercase; letter-spacing: 0.07em; font-family: var(--mono); }
.rd-copy-btn {
  border: none; background: transparent; color: var(--rd-muted); cursor: pointer;
  font-size: 0.85rem; transition: color .15s ease;
}
.rd-copy-btn:hover { color: var(--rd-blue); }
.rd-copy .box code {
  font-family: var(--mono); font-size: 0.7rem; color: var(--rd-text);
  display: block; word-break: break-all; line-height: 1.35;
}

/* financials summary strip */
.rd-fin { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.rd-fin .fin { background: var(--rd-bg-soft); border: 1px solid var(--rd-line); border-radius: 10px; padding: 0.55rem 0.7rem; }
.rd-fin .fin .l { font-size: 0.62rem; color: var(--rd-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.rd-fin .fin .n { font-family: var(--mono); font-size: 0.86rem; font-weight: 700; margin-top: 0.15rem; }
.rd-fin .fin.g .n { color: var(--rd-green); }
.rd-fin .fin.r .n { color: var(--rd-red); }
.rd-fin .fin.b .n { color: var(--rd-blue); }

/* live support button */
.rd-support-wrap { margin-top: auto; padding: 1rem 1.15rem 1.25rem; }
.rd-support {
  width: 100%; padding: 0.85rem 1rem;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  background: linear-gradient(135deg, var(--rd-green), var(--rd-green-2));
  color: #04130a; font-family: var(--mono); font-weight: 800;
  font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(63, 185, 80, 0.22);
  transition: transform .18s ease, box-shadow .18s ease;
}
.rd-support:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(63, 185, 80, 0.3); }
.rd-chat-note {
  display: none; margin-top: 0.7rem; padding: 0.7rem 0.8rem;
  background: var(--rd-green-dim); color: var(--rd-green);
  border: 1px solid rgba(63,185,80,0.25); border-radius: 10px;
  font-size: 0.76rem; line-height: 1.45;
}
.rd-chat-note.show { display: block; animation: rdPop .22s ease; }

/* ═══════════════════ MAIN CONTENT ═══════════════════ */
.rd-main {
  flex: 1; min-width: 0;
  padding: 1.6rem 1.9rem 2.4rem;
  display: flex; flex-direction: column; gap: 1.4rem;
}

.rd-panel {
  background: var(--rd-panel);
  border: 1px solid var(--rd-line);
  border-radius: 16px;
  box-shadow: var(--rd-shadow);
}

/* ── TOP SUMMARY CARDS ── */
.rd-summary { display: grid; grid-template-columns: 1.15fr 1.6fr 1.15fr; gap: 1.2rem; }

.rd-card { padding: 1.25rem 1.35rem; position: relative; overflow: hidden; }
.rd-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.85rem; font-family: var(--mono);
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--rd-muted);
}
.rd-card-head .meta { display: flex; align-items: center; gap: 0.4rem; }

/* ── Card 1 : total recovered balance ── */
.rd-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.rd-hero-label { font-size: 0.72rem; color: var(--rd-muted); text-transform: uppercase; letter-spacing: 0.09em; font-family: var(--mono); }
.rd-hero-num {
  font-family: 'JetBrains Mono', var(--mono), monospace;
  font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em;
  color: var(--rd-text); line-height: 1.1; margin-top: 0.35rem;
}
.rd-hero-num em { font-style: normal; font-size: 1.35rem; color: var(--rd-dim); margin-left: 0.2rem; }
.rd-hero-sub { margin-top: 0.55rem; font-size: 0.77rem; color: var(--rd-muted); }
.rd-hero-sub b { color: var(--rd-text); }

/* USDT coin */
.rd-coin {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 32% 28%, #6ee7b7, #0f9d58 68%, #0b7a45);
  color: #fff; font-family: var(--mono); font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 0 0 5px rgba(15,157,88,0.12), 0 8px 22px rgba(15,157,88,0.3);
}
.rd-coin small { position: absolute; font-size: 0.4rem; }

.rd-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 0.9rem; padding: 0.32rem 0.7rem;
  background: var(--rd-green-dim); color: var(--rd-green);
  border-radius: 20px; font-family: var(--mono);
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em;
}
.rd-pill .up { animation: rdRise 1.6s ease infinite; }
@keyframes rdRise { 0%,100%{opacity:1;transform:translateY(0)} 50%{opacity:.6;transform:translateY(-2px)} }

/* ── Card 2 : appreciation chart ── */
.rd-chart-wrap { position: relative; height: 236px; margin-top: 0.3rem; }
.rd-chart-tag {
  position: absolute; right: 10px; bottom: 18px; z-index: 5;
  display: flex; flex-direction: column; align-items: flex-end;
  background: var(--rd-blue); color: #fff;
  padding: 0.5rem 0.85rem; border-radius: 10px;
  box-shadow: 0 10px 26px var(--rd-blue-dim), 0 6px 18px rgba(0,0,0,0.18);
}
.rd-chart-tag b { font-family: var(--mono); font-size: 0.9rem; font-weight: 800; line-height: 1.2; }
.rd-chart-tag span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; opacity: .9; }

/* ── Card 3 : notifications feed ── */
.rd-feed { display: flex; flex-direction: column; gap: 0.35rem; }
.rd-feed-item {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.6rem 0.55rem; border-radius: 10px;
  transition: background .16s ease;
}
.rd-feed-item:hover { background: var(--rd-panel-2); }
.rd-feed-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; color: #fff;
}
.rd-feed-ico.green { background: linear-gradient(135deg, var(--rd-green-2), var(--rd-green)); box-shadow: 0 4px 12px var(--rd-green-dim); }
.rd-feed-ico.blue { background: linear-gradient(135deg, #4db2ff, var(--rd-blue)); box-shadow: 0 4px 12px var(--rd-blue-dim); }
.rd-feed-ico.orange { background: linear-gradient(135deg, #ffb45c, var(--rd-orange)); box-shadow: 0 4px 12px var(--rd-orange-dim); }
.rd-feed-body { flex: 1; min-width: 0; }
.rd-feed-body p { font-size: 0.82rem; line-height: 1.35; color: var(--rd-text); }
.rd-feed-body p b { font-family: var(--mono); font-weight: 700; }
.rd-feed-body time { font-family: var(--mono); font-size: 0.62rem; color: var(--rd-dim); }

/* ── MID METRICS GRID ── */
.rd-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.rd-metric { padding: 1.25rem 1.35rem; position: relative; overflow: hidden; }
.rd-metric-head {
  display: flex; align-items: center; gap: 0.45rem;
  font-family: var(--mono); font-size: 0.64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--rd-muted);
  margin-bottom: 0.9rem;
}
.rd-metric-head i { color: var(--rd-blue); font-size: 0.85rem; }
.rd-metric-num { font-family: 'JetBrains Mono', var(--mono), monospace; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.rd-metric-sub { font-size: 0.76rem; color: var(--rd-muted); margin-top: 0.4rem; line-height: 1.4; }
.rd-metric-sub b { color: var(--rd-blue); font-family: var(--mono); font-weight: 700; }

/* radial progress */
.rd-ring {
  --val: 71;
  width: 118px; height: 118px; margin: 0 auto;
  border-radius: 50%; position: relative;
  background: conic-gradient(var(--rd-blue) calc(var(--val)*1%), var(--rd-track) 0);
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 6px 18px var(--rd-blue-dim));
}
.rd-ring::before {
  content: ''; position: absolute; inset: 11px;
  border-radius: 50%; background: var(--rd-panel);
}
.rd-ring .center { position: relative; z-index: 1; text-align: center; }
.rd-ring .center b { font-family: var(--mono); font-size: 1.45rem; font-weight: 800; color: var(--rd-blue); }
.rd-ring .center small { display: block; font-family: var(--mono); font-size: 0.58rem; color: var(--rd-muted); letter-spacing: 0.05em; }
.rd-stage {
  text-align: center; margin-top: 0.85rem;
  font-family: var(--mono); font-size: 0.68rem; color: var(--rd-muted);
}
.rd-stage b { color: var(--rd-blue); font-weight: 700; }

/* mini progress bar */
.rd-bar { height: 6px; border-radius: 6px; background: var(--rd-track); margin-top: 0.85rem; overflow: hidden; }
.rd-bar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--rd-blue), var(--rd-cyan)); }

/* clearance */
.rd-clear { display: flex; align-items: center; gap: 0.9rem; }
.rd-clear .day-num {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--rd-blue-dim); color: var(--rd-blue);
  font-family: var(--mono);
}
.rd-clear .day-num b { font-size: 1.15rem; font-weight: 800; line-height: 1; }
.rd-clear .day-num small { font-size: 0.52rem; letter-spacing: 0.06em; }
.rd-clear .who b { display: block; font-family: var(--mono); font-size: 0.86rem; }
.rd-clear .who span { font-size: 0.72rem; color: var(--rd-muted); }

/* ═══════════════════ CASE HISTORY TABLE ═══════════════════ */
.rd-table-card { padding: 0.25rem 0 0.6rem; overflow: hidden; }
.rd-table-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.4rem 0.9rem;
}
.rd-table-head h3 { font-family: var(--mono); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.rd-table-head .sum { font-family: var(--mono); font-size: 0.66rem; color: var(--rd-dim); text-transform: uppercase; letter-spacing: 0.07em; }

.rd-table-scroll { overflow-x: auto; }
.rd-table { width: 100%; border-collapse: collapse; font-family: var(--mono); }
.rd-table thead th {
  text-align: left; padding: 0.7rem 1.4rem;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--rd-dim); background: var(--rd-panel-2);
  border-top: 1px solid var(--rd-line); border-bottom: 1px solid var(--rd-line);
  white-space: nowrap;
}
.rd-table tbody td {
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid var(--rd-line);
  font-size: 0.76rem; color: var(--rd-text); vertical-align: middle;
}
.rd-table tbody tr { transition: background .14s ease; }
.rd-table tbody tr:hover { background: var(--rd-panel-2); }
.rd-table tbody tr:last-child td { border-bottom: none; }

.rd-coin-cell { display: flex; align-items: center; gap: 0.55rem; }
.rd-coin-cell .coin {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.52rem; color: #fff;
}
.rd-coin-cell .coin.btc  { background: linear-gradient(135deg, #f7a23b, #f7931a); }
.rd-coin-cell .coin.eth  { background: linear-gradient(135deg, #6f8cff, #3f60e8); }
.rd-coin-cell .coin.usdt { background: linear-gradient(135deg, #4fd47a, #25854a); }
.rd-coin-cell .coin.ltc  { background: linear-gradient(135deg, #6f6f6f, #3d3d3d); }
.rd-coin-cell .coin.bnb  { background: linear-gradient(135deg, #f0b90b, #c4970a); }
.rd-coin-cell b { font-size: 0.76rem; font-weight: 700; }
.rd-coin-cell span { display: block; font-size: 0.62rem; color: var(--rd-dim); }

.rd-table .amount { font-weight: 700; }
.rd-table .num { font-family: var(--mono); }
.rd-table .amount.g { color: var(--rd-green); }
.rd-table .amount.r { color: var(--rd-red); }

/* status badges */
.rd-status-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.28rem 0.65rem; border-radius: 20px;
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  white-space: nowrap;
}
.rd-status-badge.success { background: var(--rd-green-dim); color: var(--rd-green); }
.rd-status-badge.progress { background: var(--rd-blue-dim); color: var(--rd-blue); }
.rd-status-badge.failed { background: var(--rd-red-dim); color: var(--rd-red); }
.rd-status-badge.progress i { display: inline-block; font-size: 0.7rem; animation: rd-spin 1.2s linear infinite; }
@keyframes rd-spin { to { transform: rotate(360deg); } }
@keyframes rdPop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.rd-table-actions { display: flex; align-items: center; gap: 0.35rem; }
.rd-link { font-size: 0.72rem; font-weight: 600; color: var(--rd-blue); background: none; border: none; cursor: pointer; font-family: var(--mono); }
.rd-link:hover { text-decoration: underline; }
.rd-dots {
  width: 30px; height: 30px; border-radius: 8px; position: relative;
  border: 1px solid transparent; background: transparent;
  color: var(--rd-muted); cursor: pointer; font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.rd-dots:hover { background: var(--rd-panel-2); color: var(--rd-text); border-color: var(--rd-line); }
.rd-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 900;
  min-width: 168px; padding: 0.35rem; background: var(--rd-panel);
  border: 1px solid var(--rd-line); border-radius: 10px;
  box-shadow: var(--rd-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all .16s ease;
}
.rd-dots.open .rd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.rd-menu button, .rd-menu a {
  display: flex; width: 100%; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.7rem; border: none; background: transparent;
  color: var(--rd-text); font-size: 0.78rem; cursor: pointer;
  border-radius: 8px; font-family: var(--sans);
  transition: background .14s ease;
}
.rd-menu button:hover, .rd-menu a:hover { background: var(--rd-panel-2); }
.rd-menu button i { color: var(--rd-muted); width: 15px; }
.rd-menu a.danger, .rd-menu button.danger { color: var(--rd-red); }
.rd-menu a.danger i, .rd-menu button.danger i { color: var(--rd-red); }

/* mobile burger */
.rd-burger { display: none; }

/* toast */
.rd-toast {
  position: fixed; bottom: 1.6rem; left: 50%; transform: translate(-50%, 20px);
  background: var(--rd-text); color: var(--rd-panel);
  padding: 0.7rem 1.1rem; border-radius: 10px; font-size: 0.8rem;
  box-shadow: var(--rd-shadow-lg); opacity: 0; visibility: hidden;
  transition: all .25s ease; z-index: 3000;
}
.rd-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ── FOOTER BAR ── */
.rd-foot {
  margin-top: auto; padding: 0.85rem 1.4rem;
  border-top: 1px solid var(--rd-line); display: flex;
  align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 0.62rem; color: var(--rd-dim);
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 1280px) {
  .rd-summary { grid-template-columns: 1fr 1fr; }
  .rd-chart-card { grid-column: 1 / -1; }
  .rd-summary .rd-feed-card { grid-column: 1 / -1; }
  .rd-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .rd-nav { display: none; }
  .rd-actions { min-width: 0; }
  .rd-brand { min-width: 0; }
}
@media (max-width: 900px) {
  .rd-body { flex-direction: column; }
  .rd-sidebar {
    width: 100%; min-width: 0; height: auto; position: static;
    max-height: none; display: none;
    border-right: none; border-bottom: 1px solid var(--rd-line);
  }
  .rd-sidebar.open { display: flex; }
  .rd-burger { display: inline-flex; }
  .rd-main { padding: 1.1rem 0.9rem 2rem; }
}
@media (max-width: 720px) {
  .rd-summary, .rd-metrics { grid-template-columns: 1fr; }
  .rd-chart-card, .rd-summary .rd-feed-card { grid-column: auto; }
  .rd-topbar { padding: 0 1rem; gap: 0.8rem; }
  .rd-brand-title { font-size: 0.62rem; }
  .rd-hero-num { font-size: 2rem; }
}