:root {
  --theme-primary: #c13b0a;
  --theme-rgb: 193, 59, 10;
  --theme-bright: #f56819;
  --theme-hover: #9e300a;
  --theme-dark: #7e280d;
  --theme-body: #fff8f3;
  --theme-glow: #ffe3cf;
  --theme-soft: #fff0e5;
  --theme-border: #efd9cb;
  --theme-text: #34251e;
  --theme-muted: #756052;
  --bs-primary: var(--theme-primary);
  --bs-primary-rgb: var(--theme-rgb);
  --bs-link-color: var(--theme-primary);
  --bs-link-hover-color: var(--theme-dark);
  --bs-body-color: var(--theme-text);
  --bs-body-bg: var(--theme-body);
  --bs-border-color: var(--theme-border);
}

:root[data-theme="green"] {
  --theme-primary: #187044;
  --theme-rgb: 24, 112, 68;
  --theme-bright: #36a86e;
  --theme-hover: #125834;
  --theme-dark: #0d472a;
  --theme-body: #f4faf6;
  --theme-glow: #d7efdf;
  --theme-soft: #e9f5ed;
  --theme-border: #cce2d3;
  --theme-text: #21392c;
  --theme-muted: #536d5e;
}

:root[data-theme="gold"] {
  --theme-primary: #8a6208;
  --theme-rgb: 138, 98, 8;
  --theme-bright: #d5a62a;
  --theme-hover: #705007;
  --theme-dark: #563d06;
  --theme-body: #fffbef;
  --theme-glow: #f5e6af;
  --theme-soft: #fbf2d4;
  --theme-border: #e8d9aa;
  --theme-text: #3b3220;
  --theme-muted: #716344;
}

body {
  background: radial-gradient(ellipse at top right, var(--theme-glow) 0, transparent 55%), var(--theme-body);
  min-height: 100vh;
}

.container { max-width: 1200px; }

.navbar.bg-dark {
  background: linear-gradient(110deg, var(--theme-dark), var(--theme-primary) 65%, var(--theme-hover)) !important;
  box-shadow: 0 4px 18px rgba(var(--theme-rgb), .18);
}

.navbar-brand { font-weight: 800; letter-spacing: .035em; }
.navbar-dark .navbar-nav .nav-link { color: #fff; }
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus { color: #fff; text-decoration: underline; }

h1, h2, h3, h4, h5 { color: var(--theme-dark); font-weight: 700; }
.text-muted { color: var(--theme-muted) !important; }

.card {
  border: 1px solid var(--theme-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(var(--theme-rgb), .06);
}

.card strong { color: var(--theme-hover); font-variant-numeric: tabular-nums; }
.card .fs-4 { font-size: clamp(1.1rem, 1.8vw, 1.5rem) !important; overflow-wrap: anywhere; }
.row.g-3 > div > .card { border-top: 4px solid var(--theme-bright); gap: .6rem; }
.row.g-3 > div:first-child > .card {
  background: linear-gradient(120deg, var(--theme-dark), var(--theme-primary));
  border-color: var(--theme-hover);
  color: #fff;
}
.row.g-3 > div:first-child > .card strong { color: #fff; }

.btn { font-weight: 600; border-radius: 10px; }
.btn-primary, .btn-success {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--theme-primary);
  --bs-btn-border-color: var(--theme-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--theme-hover);
  --bs-btn-hover-border-color: var(--theme-hover);
  --bs-btn-focus-shadow-rgb: var(--theme-rgb);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--theme-dark);
  --bs-btn-active-border-color: var(--theme-dark);
  --bs-btn-disabled-bg: var(--theme-primary);
  --bs-btn-disabled-border-color: var(--theme-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--theme-primary);
  --bs-btn-border-color: var(--theme-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--theme-primary);
  --bs-btn-hover-border-color: var(--theme-primary);
  --bs-btn-focus-shadow-rgb: var(--theme-rgb);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--theme-hover);
  --bs-btn-active-border-color: var(--theme-hover);
}

.btn-group[aria-label="Switch dashboard account"] {
  padding: 5px;
  border: 1px solid var(--theme-border);
  border-radius: 14px;
  background: #fff;
}
.btn-group[aria-label="Switch dashboard account"] > .btn {
  border-radius: 9px !important;
  border: 0;
  padding: .65rem 1rem;
}

.form-control, .form-select { border-color: var(--theme-border); border-radius: 9px; }
.form-control:focus, .form-select:focus {
  border-color: var(--theme-bright);
  box-shadow: 0 0 0 .25rem rgba(var(--theme-rgb), .18);
}
.form-control[readonly] { background: var(--theme-soft); color: var(--theme-hover); font-weight: 700; }
.form-text { color: var(--theme-muted); }

.progress { height: 20px; border-radius: 10px; background: var(--theme-soft); }
.progress-bar { background: linear-gradient(90deg, var(--theme-dark), var(--theme-primary)); font-weight: 700; }

.table-responsive { border: 1px solid var(--theme-border); border-radius: 12px; background: #fff; }
.table { --bs-table-color: var(--theme-text); --bs-table-border-color: var(--theme-border); margin-bottom: 0; }
.table thead th { background: var(--theme-soft); color: var(--theme-dark); white-space: nowrap; }
.table-sm td, .table-sm th { padding: .85rem .75rem; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }

.alert-info { color: var(--theme-dark); background: var(--theme-soft); border-color: var(--theme-border); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--theme-dark); outline-offset: 3px; }
.theme-picker { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .6rem; margin-bottom: 1.25rem; }
.theme-picker .form-select { width: auto; min-width: 155px; background-color: #fff; }

@media (max-width: 575px) {
  .container { padding-right: 16px; padding-left: 16px; }
  .btn-group[aria-label="Switch dashboard account"] { width: 100%; }
  .btn-group[aria-label="Switch dashboard account"] > .btn { padding: .65rem .5rem; }
}
.withdrawal-form-disabled {
  filter: grayscale(1);
}

.withdrawal-form-disabled fieldset {
  opacity: 0.6;
}

.landing-page { max-width: 1040px; margin: 0 auto; }
.landing-hero { padding: clamp(2rem, 6vw, 4.5rem) 0 3rem; }
.landing-eyebrow {
  display: inline-block;
  padding: .5rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: var(--theme-soft);
  color: var(--theme-dark);
  font-size: .85rem;
  font-weight: 600;
}
.landing-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.2; margin-bottom: 1.25rem; }
.landing-hero h1 span { overflow-wrap: anywhere; }
.landing-hero .lead { max-width: 640px; margin: 0 auto 1.75rem; }
.landing-tiers { padding-bottom: 2rem; }
.landing-tier { border-top: 4px solid var(--theme-bright); }
.landing-tier .card-body { padding: clamp(1.25rem, 3vw, 2rem); }
.landing-amount { font-size: clamp(1.65rem, 3vw, 2.25rem); font-weight: 800; color: var(--theme-dark); overflow-wrap: anywhere; }
.landing-rates { margin-bottom: 1.75rem; }
.landing-rates > div { padding: .85rem 0; border-top: 1px solid var(--theme-border); }
.landing-rates dt { font-size: .9rem; font-weight: 400; color: var(--theme-muted); margin-bottom: .25rem; }
.landing-rates dd { margin: 0; font-weight: 700; color: var(--theme-dark); }
