/* ============================================================
   OF Finance Design System — Colors & Typography
   Modern Crypto Platform, 2026
   Brand: #D3A85D (gold) · #0D2539 (navy) · #ffffff (white)
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Base Color Tokens ────────────────────────────────────── */
:root {
  /* Brand palette */
  --gold:          #D3A85D;
  --gold-dim:      #A07A3A;
  --gold-bright:   #E8C47A;
  --gold-subtle:   rgba(211, 168, 93, 0.12);
  --gold-border:   rgba(211, 168, 93, 0.18);

  --navy:          #0D2539;
  --navy-deep:     #061520;
  --navy-light:    #0F2E47;
  --navy-mid:      #152F47;
  --navy-muted:    #1A3A54;
  --navy-surface:  #112236;

  /* Foreground */
  --fg1:           #FFFFFF;
  --fg2:           rgba(255, 255, 255, 0.65);
  --fg3:           rgba(255, 255, 255, 0.35);
  --fg-inverse:    #0D2539;

  /* Semantic / Status */
  --success:       #2ECC71;
  --success-dim:   rgba(46, 204, 113, 0.14);
  --warning:       #F39C12;
  --warning-dim:   rgba(243, 156, 18, 0.14);
  --danger:        #E74C3C;
  --danger-dim:    rgba(231, 76, 60, 0.14);
  --info:          #3498DB;
  --info-dim:      rgba(52, 152, 219, 0.14);

  /* Surfaces */
  --bg-app:        #061520;
  --bg-sidebar:    #0A1E30;
  --bg-card:       #0D2539;
  --bg-card-hover: #0F2E47;
  --bg-input:      #0A1E30;
  --bg-modal:      rgba(6, 21, 32, 0.92);
  --bg-overlay:    rgba(6, 21, 32, 0.72);

  /* Borders */
  --border-gold:   rgba(211, 168, 93, 0.18);
  --border-white:  rgba(255, 255, 255, 0.08);
  --border-input:  rgba(255, 255, 255, 0.1);
  --border-focus:  #D3A85D;
  --border-divider: rgba(255, 255, 255, 0.06);

  /* Shadows */
  --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.32);
  --shadow-raised: 0 8px 32px rgba(0, 0, 0, 0.40);
  --shadow-modal:  0 16px 48px rgba(0, 0, 0, 0.56);
  --shadow-gold:   0 0 20px rgba(211, 168, 93, 0.28);

  /* Corner Radii */
  --radius-sm:     6px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-xl:     16px;
  --radius-pill:   999px;
  --radius-circle: 50%;

  /* Spacing (4px base) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Motion */
  --ease-default:  cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 300ms;

  /* Typography families */
  --font-display: 'Sora', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Type scale */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   16px;
  --text-lg:   18px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  30px;
  --text-4xl:  36px;
  --text-5xl:  48px;
  --text-6xl:  60px;

  /* Topbar / Sidebar layout */
  --topbar-h:    64px;
  --sidebar-w:   310px;
}

/* ── Semantic Typography Roles ────────────────────────────── */

/* Display — hero numerics, big stat numbers */
.display-hero {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg1);
}

/* Section / page title */
h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg1);
}

/* Card / section heading */
h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--fg1);
}

/* Component heading */
h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--fg1);
}

/* Sub-section / widget title */
h4, .h4 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg1);
}

/* Small label headings */
h5, .h5 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg1);
}

h6, .h6 {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.4;
  color: var(--fg1);
}

/* Body text */
p, .body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--fg2);
}

/* Small body */
.body-sm {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.55;
  color: var(--fg2);
}

/* ALL CAPS label / badge text */
.label-caps {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg3);
}

/* Stat / metric number */
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}

/* Wallet address / tx hash */
code, .mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gold-bright);
  background: var(--gold-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ── Global Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--fg1);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}
a:hover { color: var(--gold-bright); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-default);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

/* Primary — gold fill */
.btn--base, .btn--primary {
  background: var(--gold);
  color: var(--fg-inverse);
  border-color: var(--gold);
}
.btn--base:hover, .btn--primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: var(--shadow-gold);
}

/* Secondary — gold outline */
.btn--secondary {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn--secondary:hover {
  background: var(--gold);
  color: var(--fg-inverse);
}

/* Dark / ghost */
.btn--dark {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg2);
  border-color: var(--border-white);
}
.btn--dark:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg1);
}

/* Danger */
.btn--danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn--danger:hover { background: #c0392b; }

/* Sizes */
.btn--sm  { padding: 6px 14px; font-size: var(--text-xs); }
.btn--lg  { padding: 14px 28px; font-size: var(--text-md); border-radius: var(--radius-lg); }
.btn--smd { padding: 8px 18px;  font-size: var(--text-sm); }
.btn--block { width: 100%; }

/* Disabled */
.btn:disabled, .btn.disabled-button {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  color: var(--fg1);
}
.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
  transition: all var(--duration-base) var(--ease-default);
}

/* ── Form Inputs ──────────────────────────────────────────── */
.form-control, .form--control {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--fg1);
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default);
}
.form-control:focus, .form--control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(211, 168, 93, 0.15);
}
.form-control::placeholder { color: var(--fg3); }

.form-label, label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fg2);
  margin-bottom: var(--space-1);
  display: block;
}

/* ── Badges & Pills ───────────────────────────────────────── */
.badge {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.badge--gold    { background: var(--gold-subtle); color: var(--gold); border: 1px solid var(--gold-border); }
.badge--success { background: var(--success-dim); color: var(--success); }
.badge--warning { background: var(--warning-dim); color: var(--warning); }
.badge--danger  { background: var(--danger-dim);  color: var(--danger); }
.badge--info    { background: var(--info-dim);    color: var(--info); }

/* Status pills (sidebar menu badges) */
.pill { border-radius: var(--radius-pill); padding: 3px 9px; font-size: var(--text-xs); font-weight: 700; }
.green--bg--show  { background: var(--success-dim); color: var(--success); }
.orange--bg--show { background: var(--warning-dim); color: var(--warning); }
.red--bg--show    { background: var(--danger-dim);  color: var(--danger); }

/* ── Color Utilities ──────────────────────────────────────── */
.text--base, .text--gold   { color: var(--gold) !important; }
.text--success             { color: var(--success) !important; }
.text--warning             { color: var(--warning) !important; }
.text--danger              { color: var(--danger) !important; }
.text--info                { color: var(--info) !important; }
.text--muted               { color: var(--fg3) !important; }

.bg--base   { background: var(--gold) !important; }
.bg--light  { background: var(--navy-surface) !important; }
.bg--lights { background: var(--navy-surface) !important; }
.bg--dark   { background: var(--bg-app) !important; }

/* Legacy color classes from existing codebase */
.green--with--bold  { color: var(--success) !important; font-weight: 700; }
.orange--with--bold { color: var(--warning) !important; font-weight: 700; }
.red--with--bold    { color: var(--danger) !important;  font-weight: 700; }
.label-color-black  { color: var(--fg2) !important; }
.label-color-green  { color: var(--success) !important; }

/* ── Dashboard Layout ─────────────────────────────────────── */
.dashboard-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-divider);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  padding: var(--space-6);
  z-index: 100;
}

.dashboard-nav {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-divider);
  position: sticky;
  top: 0;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Sidebar menu */
.sidebar-menu { list-style: none; padding: 0; margin: var(--space-6) 0; }
.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--fg2);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-default);
}
.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  background: var(--gold-subtle);
  color: var(--gold);
}
.sidebar-menu li a img { width: 18px; height: 18px; opacity: 0.55; filter: invert(1); }
.sidebar-menu li a:hover img,
.sidebar-menu li a.active img { opacity: 1; filter: invert(1) sepia(1) saturate(2) hue-rotate(5deg); }

/* ── Tables ───────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-divider);
  text-align: left;
}
td {
  font-size: var(--text-sm);
  color: var(--fg2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-divider);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(211, 168, 93, 0.04); }

/* ── Modals ───────────────────────────────────────────────── */
.modal-content {
  background: var(--navy-mid);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  color: var(--fg1);
}
.modal-header {
  border-bottom: 1px solid var(--border-divider);
  padding: var(--space-6);
}
.modal-body { padding: var(--space-6); }
.modal-footer {
  border-top: 1px solid var(--border-divider);
  padding: var(--space-4) var(--space-6);
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.border--success { border: 1px solid var(--success) !important; background: var(--success-dim); }
.border--warning { border: 1px solid var(--warning) !important; background: var(--warning-dim); }
.border--danger  { border: 1px solid var(--danger)  !important; background: var(--danger-dim); }
.border--info    { border: 1px solid var(--info)    !important; background: var(--info-dim); }

/* ── Dividers ─────────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border-divider); margin: var(--space-4) 0; }

/* ── Scrollbar (Webkit) ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-app); }
::-webkit-scrollbar-thumb { background: rgba(211, 168, 93, 0.3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
