/* ==========================================================
   Dark Navy + Gold + Cyan theme
   Loaded after AdminLTE in layouts/adminlte & layouts/auth.
   ========================================================== */
:root {
  --bg:        #0a1029;
  --surface:   #121a3a;
  --surface-2: #1a2350;
  --border:    #2a3566;
  --gold:      #f5c451;
  --gold-2:    #d4a017;
  --cyan:      #29b6f6;
  --text:      #e6e9f5;
  --muted:     #8b93b8;
  --gold-grad: linear-gradient(135deg, #ffd977 0%, #f5c451 45%, #d4a017 100%);
  /* faint dot/network decoration shown on the right side of cards */
  --card-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 120' width='240' height='120'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' x2='1' y1='0' y2='0'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='0'/%3E%3Cstop offset='.55' stop-color='%23fff' stop-opacity='.85'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='1'/%3E%3C/linearGradient%3E%3Cmask id='m'%3E%3Crect width='240' height='120' fill='url%28%23f%29'/%3E%3C/mask%3E%3C/defs%3E%3Cg mask='url%28%23m%29'%3E%3Cg fill='%238fa4e8' fill-opacity='.16'%3E%3Ccircle cx='4' cy='4' r='0.79'/%3E%3Ccircle cx='32' cy='5' r='1.05'/%3E%3Ccircle cx='40' cy='5' r='0.96'/%3E%3Ccircle cx='56' cy='4' r='0.95'/%3E%3Ccircle cx='100' cy='5' r='1.05'/%3E%3Ccircle cx='114' cy='7' r='1.22'/%3E%3Ccircle cx='126' cy='8' r='0.77'/%3E%3Ccircle cx='149' cy='6' r='1.05'/%3E%3Ccircle cx='164' cy='4' r='1.13'/%3E%3Ccircle cx='186' cy='7' r='1.02'/%3E%3Ccircle cx='209' cy='5' r='0.88'/%3E%3Ccircle cx='223' cy='6' r='0.88'/%3E%3Ccircle cx='4' cy='20' r='1.29'/%3E%3Ccircle cx='17' cy='19' r='1.15'/%3E%3Ccircle cx='28' cy='20' r='1.28'/%3E%3Ccircle cx='68' cy='19' r='1.12'/%3E%3Ccircle cx='90' cy='19' r='1.2'/%3E%3Ccircle cx='114' cy='20' r='1.14'/%3E%3Ccircle cx='150' cy='16' r='0.93'/%3E%3Ccircle cx='175' cy='16' r='1.07'/%3E%3Ccircle cx='185' cy='19' r='0.87'/%3E%3Ccircle cx='196' cy='17' r='1.22'/%3E%3Ccircle cx='209' cy='19' r='1.03'/%3E%3Ccircle cx='234' cy='19' r='0.95'/%3E%3Ccircle cx='17' cy='29' r='0.81'/%3E%3Ccircle cx='29' cy='30' r='1.2'/%3E%3Ccircle cx='44' cy='30' r='0.79'/%3E%3Ccircle cx='68' cy='32' r='0.78'/%3E%3Ccircle cx='104' cy='31' r='1.22'/%3E%3Ccircle cx='115' cy='31' r='0.94'/%3E%3Ccircle cx='125' cy='31' r='0.74'/%3E%3Ccircle cx='136' cy='28' r='0.9'/%3E%3Ccircle cx='148' cy='30' r='0.79'/%3E%3Ccircle cx='175' cy='29' r='0.82'/%3E%3Ccircle cx='223' cy='31' r='0.77'/%3E%3Ccircle cx='233' cy='28' r='0.89'/%3E%3Ccircle cx='32' cy='40' r='1.12'/%3E%3Ccircle cx='42' cy='41' r='1.27'/%3E%3Ccircle cx='88' cy='42' r='1.09'/%3E%3Ccircle cx='102' cy='41' r='1.24'/%3E%3Ccircle cx='114' cy='41' r='1.17'/%3E%3Ccircle cx='163' cy='41' r='0.84'/%3E%3Ccircle cx='172' cy='40' r='1.0'/%3E%3Ccircle cx='200' cy='42' r='0.82'/%3E%3Ccircle cx='210' cy='42' r='1.26'/%3E%3Ccircle cx='223' cy='41' r='0.76'/%3E%3Ccircle cx='236' cy='40' r='0.99'/%3E%3Ccircle cx='4' cy='52' r='1.09'/%3E%3Ccircle cx='54' cy='52' r='0.81'/%3E%3Ccircle cx='88' cy='53' r='0.94'/%3E%3Ccircle cx='101' cy='56' r='0.78'/%3E%3Ccircle cx='139' cy='54' r='1.2'/%3E%3Ccircle cx='148' cy='52' r='1.03'/%3E%3Ccircle cx='185' cy='55' r='1.15'/%3E%3Ccircle cx='208' cy='54' r='1.22'/%3E%3Ccircle cx='224' cy='54' r='1.0'/%3E%3Ccircle cx='233' cy='52' r='0.95'/%3E%3Ccircle cx='20' cy='68' r='0.97'/%3E%3Ccircle cx='32' cy='65' r='1.25'/%3E%3Ccircle cx='40' cy='67' r='1.01'/%3E%3Ccircle cx='92' cy='64' r='0.78'/%3E%3Ccircle cx='116' cy='67' r='1.01'/%3E%3Ccircle cx='137' cy='65' r='1.04'/%3E%3Ccircle cx='152' cy='67' r='1.16'/%3E%3Ccircle cx='200' cy='68' r='1.07'/%3E%3Ccircle cx='211' cy='68' r='1.12'/%3E%3Ccircle cx='221' cy='68' r='0.99'/%3E%3Ccircle cx='17' cy='79' r='1.04'/%3E%3Ccircle cx='31' cy='78' r='0.77'/%3E%3Ccircle cx='40' cy='77' r='0.84'/%3E%3Ccircle cx='90' cy='77' r='1.13'/%3E%3Ccircle cx='103' cy='77' r='0.78'/%3E%3Ccircle cx='125' cy='77' r='1.23'/%3E%3Ccircle cx='140' cy='79' r='0.96'/%3E%3Ccircle cx='150' cy='76' r='0.82'/%3E%3Ccircle cx='175' cy='76' r='1.03'/%3E%3Ccircle cx='186' cy='80' r='1.01'/%3E%3Ccircle cx='209' cy='76' r='1.25'/%3E%3Ccircle cx='221' cy='78' r='0.86'/%3E%3Ccircle cx='56' cy='92' r='1.02'/%3E%3Ccircle cx='66' cy='88' r='0.9'/%3E%3Ccircle cx='90' cy='88' r='1.24'/%3E%3Ccircle cx='124' cy='90' r='1.21'/%3E%3Ccircle cx='152' cy='91' r='0.9'/%3E%3Ccircle cx='176' cy='89' r='0.78'/%3E%3Ccircle cx='210' cy='90' r='0.81'/%3E%3Ccircle cx='223' cy='92' r='0.82'/%3E%3Ccircle cx='6' cy='100' r='1.18'/%3E%3Ccircle cx='20' cy='101' r='1.14'/%3E%3Ccircle cx='31' cy='100' r='0.85'/%3E%3Ccircle cx='80' cy='102' r='1.23'/%3E%3Ccircle cx='113' cy='103' r='1.2'/%3E%3Ccircle cx='162' cy='103' r='1.08'/%3E%3Ccircle cx='175' cy='104' r='0.75'/%3E%3Ccircle cx='198' cy='100' r='0.85'/%3E%3Ccircle cx='211' cy='100' r='0.79'/%3E%3Ccircle cx='224' cy='102' r='1.28'/%3E%3Ccircle cx='234' cy='101' r='1.28'/%3E%3Ccircle cx='7' cy='112' r='0.7'/%3E%3Ccircle cx='17' cy='113' r='1.0'/%3E%3Ccircle cx='30' cy='112' r='0.7'/%3E%3Ccircle cx='43' cy='112' r='1.05'/%3E%3Ccircle cx='52' cy='116' r='1.08'/%3E%3Ccircle cx='92' cy='115' r='1.24'/%3E%3Ccircle cx='128' cy='113' r='0.87'/%3E%3Ccircle cx='140' cy='115' r='1.2'/%3E%3Ccircle cx='176' cy='116' r='1.01'/%3E%3C/g%3E%3Cg stroke='%238fa4e8' stroke-opacity='.14' stroke-width='.8'%3E%3Cline x1='120' y1='28' x2='150' y2='62'/%3E%3Cline x1='120' y1='28' x2='176' y2='22'/%3E%3Cline x1='150' y1='62' x2='176' y2='22'/%3E%3Cline x1='150' y1='62' x2='198' y2='74'/%3E%3Cline x1='176' y1='22' x2='222' y2='40'/%3E%3Cline x1='198' y1='74' x2='222' y2='40'/%3E%3Cline x1='198' y1='74' x2='168' y2='100'/%3E%3Cline x1='198' y1='74' x2='214' y2='104'/%3E%3Cline x1='168' y1='100' x2='136' y2='96'/%3E%3Cline x1='150' y1='62' x2='136' y2='96'/%3E%3Cline x1='136' y1='96' x2='104' y2='70'/%3E%3Cline x1='120' y1='28' x2='104' y2='70'/%3E%3Cline x1='168' y1='100' x2='214' y2='104'/%3E%3C/g%3E%3Cg fill='%23a9b8f0' fill-opacity='.28'%3E%3Ccircle cx='120' cy='28' r='2.4'/%3E%3Ccircle cx='150' cy='62' r='2.4'/%3E%3Ccircle cx='176' cy='22' r='2.4'/%3E%3Ccircle cx='198' cy='74' r='2.4'/%3E%3Ccircle cx='222' cy='40' r='2.4'/%3E%3Ccircle cx='168' cy='100' r='2.4'/%3E%3Ccircle cx='214' cy='104' r='2.4'/%3E%3Ccircle cx='136' cy='96' r='2.4'/%3E%3Ccircle cx='104' cy='70' r='2.4'/%3E%3C/g%3E%3Ccircle cx='176' cy='22' r='2.8' fill='%2329b6f6' fill-opacity='.45'/%3E%3Ccircle cx='198' cy='74' r='2.6' fill='%23f5c451' fill-opacity='.4'/%3E%3C/g%3E%3C/svg%3E");
  /* tileable faint dot/network texture for the page background */
  --bg-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cg fill='%238fa4e8' fill-opacity='.13'%3E%3Ccircle cx='40' cy='292' r='1.1'/%3E%3Ccircle cx='104' cy='141' r='0.9'/%3E%3Ccircle cx='47' cy='162' r='0.9'/%3E%3Ccircle cx='10' cy='212' r='0.7'/%3E%3Ccircle cx='71' cy='129' r='1.1'/%3E%3Ccircle cx='54' cy='8' r='0.7'/%3E%3Ccircle cx='241' cy='252' r='0.7'/%3E%3Ccircle cx='289' cy='99' r='0.9'/%3E%3Ccircle cx='263' cy='100' r='1.1'/%3E%3Ccircle cx='70' cy='217' r='1.1'/%3E%3Ccircle cx='199' cy='62' r='0.9'/%3E%3Ccircle cx='218' cy='111' r='0.7'/%3E%3Ccircle cx='141' cy='306' r='0.9'/%3E%3Ccircle cx='13' cy='110' r='0.7'/%3E%3Ccircle cx='204' cy='311' r='1.1'/%3E%3Ccircle cx='298' cy='54' r='0.7'/%3E%3Ccircle cx='77' cy='112' r='0.9'/%3E%3Ccircle cx='135' cy='7' r='1.1'/%3E%3Ccircle cx='171' cy='154' r='0.9'/%3E%3Ccircle cx='40' cy='41' r='0.7'/%3E%3Ccircle cx='109' cy='301' r='1.1'/%3E%3Ccircle cx='127' cy='10' r='1.1'/%3E%3Ccircle cx='191' cy='193' r='1.1'/%3E%3Ccircle cx='235' cy='68' r='1.1'/%3E%3Ccircle cx='250' cy='297' r='0.7'/%3E%3Ccircle cx='200' cy='96' r='1.1'/%3E%3Ccircle cx='81' cy='162' r='0.7'/%3E%3Ccircle cx='315' cy='130' r='1.1'/%3E%3Ccircle cx='100' cy='84' r='1.1'/%3E%3Ccircle cx='286' cy='103' r='1.1'/%3E%3Ccircle cx='201' cy='250' r='1.1'/%3E%3Ccircle cx='43' cy='218' r='0.7'/%3E%3Ccircle cx='56' cy='58' r='0.7'/%3E%3Ccircle cx='265' cy='133' r='0.7'/%3E%3Ccircle cx='203' cy='134' r='0.9'/%3E%3Ccircle cx='308' cy='254' r='0.9'/%3E%3Ccircle cx='269' cy='92' r='1.1'/%3E%3Ccircle cx='38' cy='67' r='0.7'/%3E%3Ccircle cx='248' cy='289' r='1.1'/%3E%3Ccircle cx='317' cy='40' r='0.9'/%3E%3Ccircle cx='111' cy='107' r='1.1'/%3E%3Ccircle cx='11' cy='38' r='0.9'/%3E%3Ccircle cx='213' cy='231' r='0.7'/%3E%3Ccircle cx='33' cy='26' r='0.7'/%3E%3Ccircle cx='147' cy='191' r='1.1'/%3E%3Ccircle cx='295' cy='70' r='0.7'/%3E%3Ccircle cx='188' cy='73' r='0.9'/%3E%3Ccircle cx='172' cy='270' r='1.1'/%3E%3Ccircle cx='74' cy='305' r='0.7'/%3E%3Ccircle cx='12' cy='246' r='0.9'/%3E%3Ccircle cx='162' cy='20' r='0.7'/%3E%3Ccircle cx='309' cy='41' r='0.9'/%3E%3Ccircle cx='37' cy='162' r='0.9'/%3E%3Ccircle cx='72' cy='40' r='0.7'/%3E%3Ccircle cx='234' cy='282' r='0.9'/%3E%3Ccircle cx='25' cy='69' r='0.9'/%3E%3Ccircle cx='183' cy='46' r='1.1'/%3E%3Ccircle cx='245' cy='42' r='0.9'/%3E%3Ccircle cx='18' cy='258' r='1.1'/%3E%3Ccircle cx='10' cy='198' r='0.9'/%3E%3Ccircle cx='301' cy='9' r='1.1'/%3E%3Ccircle cx='39' cy='44' r='0.7'/%3E%3Ccircle cx='62' cy='134' r='0.9'/%3E%3Ccircle cx='172' cy='201' r='1.1'/%3E%3Ccircle cx='300' cy='237' r='0.9'/%3E%3Ccircle cx='239' cy='280' r='0.7'/%3E%3Ccircle cx='268' cy='266' r='0.7'/%3E%3Ccircle cx='161' cy='310' r='0.7'/%3E%3Ccircle cx='249' cy='14' r='0.7'/%3E%3Ccircle cx='60' cy='257' r='1.1'/%3E%3C/g%3E%3Cg stroke='%238fa4e8' stroke-opacity='.10' stroke-width='.8'%3E%3Cline x1='247' y1='302' x2='254' y2='247'/%3E%3Cline x1='139' y1='31' x2='221' y2='71'/%3E%3Cline x1='110' y1='278' x2='64' y2='244'/%3E%3Cline x1='276' y1='113' x2='253' y2='183'/%3E%3Cline x1='64' y1='244' x2='23' y2='286'/%3E%3Cline x1='304' y1='71' x2='221' y2='71'/%3E%3Cline x1='276' y1='113' x2='221' y2='71'/%3E%3Cline x1='171' y1='88' x2='221' y2='71'/%3E%3Cline x1='48' y1='46' x2='139' y2='31'/%3E%3Cline x1='34' y1='113' x2='139' y2='31'/%3E%3Cline x1='276' y1='113' x2='304' y2='71'/%3E%3Cline x1='254' y1='247' x2='253' y2='183'/%3E%3Cline x1='110' y1='278' x2='23' y2='286'/%3E%3Cline x1='48' y1='46' x2='34' y2='113'/%3E%3Cline x1='171' y1='88' x2='139' y2='31'/%3E%3Cline x1='247' y1='302' x2='166' y2='271'/%3E%3Cline x1='110' y1='278' x2='166' y2='271'/%3E%3C/g%3E%3Cg fill='%23a9b8f0' fill-opacity='.22'%3E%3Ccircle cx='247' cy='302' r='2'/%3E%3Ccircle cx='254' cy='247' r='2'/%3E%3Ccircle cx='276' cy='113' r='1.6'/%3E%3Ccircle cx='110' cy='278' r='1.6'/%3E%3Ccircle cx='64' cy='244' r='2.4'/%3E%3Ccircle cx='171' cy='88' r='1.6'/%3E%3Ccircle cx='23' cy='286' r='1.6'/%3E%3Ccircle cx='48' cy='46' r='1.6'/%3E%3Ccircle cx='34' cy='113' r='1.6'/%3E%3Ccircle cx='139' cy='31' r='2'/%3E%3Ccircle cx='253' cy='183' r='2'/%3E%3Ccircle cx='166' cy='271' r='2.4'/%3E%3Ccircle cx='304' cy='71' r='2'/%3E%3Ccircle cx='221' cy='71' r='2'/%3E%3C/g%3E%3Ccircle cx='276' cy='113' r='2.6' fill='%2329b6f6' fill-opacity='.35'/%3E%3Ccircle cx='48' cy='46' r='2.4' fill='%23f5c451' fill-opacity='.3'/%3E%3C/svg%3E");
  --card-pattern-bg: var(--card-pattern) right center / auto 100% no-repeat;
}

body {
  background: var(--bg);
  color: var(--text);
}
.wrapper,
.content-wrapper {
  background:
    var(--bg-pattern) 0 0 / 320px 320px repeat,
    radial-gradient(1200px 500px at 85% -10%, rgba(41,182,246,.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(245,196,81,.06), transparent 60%),
    var(--bg) !important;
}

a { color: var(--cyan); }
a:hover { color: #6fd0ff; }
h1, h2, h3, h4, h5, h6 { color: var(--text); }
hr { border-top-color: var(--border); }
.text-muted { color: var(--muted) !important; }
.text-dark  { color: var(--text) !important; }
.text-primary { color: var(--cyan) !important; }
.text-gold, .text-warning { color: var(--gold) !important; }
.text-info { color: var(--cyan) !important; }
.main-footer { background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--card-pattern-bg), var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
}
/* no decoration inside table cards (dots live on the page background instead) */
.card:has(.table), .card:has(table) { background: var(--surface); }
.card > .card-header:first-child { border-radius: 10px 10px 0 0; }
.card-header .card-title,
.card-title { color: var(--gold); font-weight: 700; }
.card-header .card-tools .btn-tool { color: var(--muted); }
.card-footer { background: rgba(255,255,255,.02); border-top: 1px solid var(--border); }
.bg-white, .bg-light { background-color: var(--surface) !important; color: var(--text); }
.border, .border-top, .border-bottom { border-color: var(--border) !important; }

/* AdminLTE small-box / info-box */
.small-box, .info-box {
  background: var(--card-pattern-bg), var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
}
.small-box h3, .info-box-number { color: var(--cyan); }
.small-box p, .info-box-text { color: var(--gold); font-weight: 600; }
.small-box .icon > i { color: rgba(245,196,81,.25); }
.info-box-icon { border-radius: 50% !important; border: 2px solid var(--gold); background: transparent !important; color: var(--gold) !important; }

/* ---------- Tables ---------- */
.table { color: var(--text); }
.table th, .table td { border-color: var(--border) !important; }
.table thead th {
  color: var(--gold);
  border-bottom: 1px solid var(--border) !important;
  background: rgba(245,196,81,.05);
}
.table-striped tbody tr:nth-of-type(odd) { background: rgba(255,255,255,.025); }
.table-hover tbody tr:hover { background: rgba(41,182,246,.07); color: var(--text); }
.table-bordered, .table-bordered th, .table-bordered td { border-color: var(--border) !important; }
.thead-light th, .table .thead-light th { background: var(--surface-2) !important; color: var(--gold) !important; border-color: var(--border) !important; }
.table-light, .table-light > td, .table-light > th { background: var(--surface-2) !important; color: var(--text); }

/* ---------- Forms ---------- */
label { color: var(--text); }
.form-control,
.custom-select,
.custom-file-label,
select.form-control {
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.form-control:focus,
.custom-select:focus {
  background-color: var(--surface-2);
  color: var(--text);
  border-color: var(--cyan);
  box-shadow: 0 0 0 .2rem rgba(41,182,246,.18);
}
.form-control::placeholder { color: var(--muted); }
.form-control:disabled, .form-control[readonly] { background-color: #151d42; color: var(--muted); }
select.form-control option { background: var(--surface); color: var(--text); }
.input-group-text { background: var(--surface); border-color: var(--border); color: var(--gold); }
.custom-control-label::before { background-color: var(--surface-2); border-color: var(--border); }
.form-text { color: var(--muted) !important; }

/* ---------- Buttons ---------- */
.btn-primary, .btn-brand {
  background: var(--gold-grad) !important;
  border: 0 !important;
  color: #1a1400 !important;
  font-weight: 700;
}
.btn-primary:hover, .btn-brand:hover { filter: brightness(1.07); }
.btn-info {
  background: var(--cyan) !important; border-color: var(--cyan) !important; color: #04203a !important; font-weight: 600;
}
.btn-secondary, .btn-default, .btn-light {
  background: var(--surface-2) !important; border: 1px solid var(--border) !important; color: var(--text) !important;
}
.btn-outline-primary { color: var(--gold); border-color: var(--gold); }
.btn-outline-primary:hover { background: var(--gold); color: #1a1400; }
.btn-outline-light { color: var(--text); border-color: var(--border); }
.btn-outline-light:hover { background: var(--gold); border-color: var(--gold); color: #1a1400; }
.btn-outline-secondary { color: var(--muted); border-color: var(--border); }
.btn-outline-secondary:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Modals / dropdowns / lists ---------- */
.modal-content {
  background: var(--card-pattern-bg), var(--surface);
  color: var(--text);
  border: 1px solid var(--border) !important;
  border-top: 3px solid var(--gold) !important;
  border-radius: 14px;
}
.modal-header {
  background: transparent !important;
  color: var(--gold) !important;
  border-bottom: 1px solid var(--border);
}
.modal-header .modal-title { color: var(--gold); font-weight: 700; }
.modal-footer { border-top: 1px solid var(--border); }
.close, .modal-header .close { color: var(--text) !important; text-shadow: none; opacity: .8; }
.dropdown-menu { background: var(--surface); border: 1px solid var(--border); }
.dropdown-item { color: var(--text); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-2); color: var(--cyan); }
.dropdown-divider { border-top-color: var(--border); }
.list-group-item { background: var(--surface); border-color: var(--border); color: var(--text); }
.list-group-item.active { background: rgba(41,182,246,.15); border-color: var(--cyan); color: var(--cyan); }

/* ---------- Pagination / nav tabs ---------- */
.page-link { background: var(--surface); border-color: var(--border); color: var(--cyan); }
.page-link:hover { background: var(--surface-2); border-color: var(--border); color: var(--gold); }
.page-item.active .page-link { background: var(--gold-grad); border-color: var(--gold); color: #1a1400; }
.page-item.disabled .page-link { background: var(--surface); border-color: var(--border); color: var(--muted); }
.nav-tabs { border-bottom-color: var(--border); }
.nav-tabs .nav-link { color: var(--muted); }
.nav-tabs .nav-link.active { background: var(--surface); color: var(--gold); border-color: var(--border) var(--border) var(--surface); }
.nav-pills:not(.nav-sidebar) .nav-link.active { background: var(--gold-grad); color: #1a1400; }

/* ---------- Alerts / badges ---------- */
.alert { border-radius: 10px; }
.alert-info    { background: rgba(41,182,246,.12); border: 1px solid rgba(41,182,246,.4); color: #9fdcfb; }
.alert-success { background: rgba(32,201,151,.12); border: 1px solid rgba(32,201,151,.4); color: #8ee6c6; }
.alert-warning { background: rgba(245,196,81,.12); border: 1px solid rgba(245,196,81,.4); color: var(--gold); }
.alert-danger  { background: rgba(239,83,80,.12);  border: 1px solid rgba(239,83,80,.4);  color: #ff9e9b; }
.alert-secondary, .alert-light { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.badge-primary { background: var(--gold); color: #1a1400; }
.badge-info    { background: var(--cyan); color: #04203a; }
.badge-light   { background: var(--surface-2); color: var(--text); }

/* ---------- Icon badge (gold ring) — reusable ---------- */
.icon-ring {
  width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 30% 30%, #1d2858, #0d1433);
  box-shadow: 0 0 0 3px rgba(245,196,81,.08), 0 4px 14px rgba(0,0,0,.4);
  color: var(--cyan); font-size: 1.3rem;
}

/* ---------- Misc ---------- */
.content-header h1 { color: var(--gold) !important; }
.overlay-wrapper .overlay, .card .overlay { background: rgba(10,16,41,.7); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a4682; }

/* ---------- Binary tree (d3 SVG) ---------- */
#tree-canvas path.link { stroke: rgba(245,196,81,.45); }
#tree-canvas text { fill: var(--text); }
#tree-canvas text.node-code { fill: var(--muted); }
#tree-canvas g.node.is-highlighted circle { stroke: var(--cyan); }

/* ---------- Downline / My Team list ---------- */
.dl-levels { display:flex; gap:.5rem; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:.5rem; }
.dl-level {
    flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
    width:2.4rem; height:2.4rem; border-radius:999px; font-size:.85rem; font-weight:700;
    text-decoration:none; border:1px solid var(--border); background:var(--surface-2); color:var(--text);
}
.dl-level:hover { color: var(--gold); }
.dl-level.active { background:var(--gold-grad); color:#1a1400; border-color:transparent; }

.dl-head { display:flex; align-items:center; gap:.75rem; padding:.9rem 1rem; border-bottom:1px solid var(--border); }
.dl-head-bar { width:26px; height:2px; background:var(--gold); border-radius:2px; flex-shrink:0; }
.dl-head-title { margin:0; font-size:1.1rem; font-weight:700; color:var(--gold); flex:1; min-width:0; }
.dl-count {
    min-width:38px; height:38px; padding:0 .5rem; border-radius:999px; flex-shrink:0;
    display:inline-flex; align-items:center; justify-content:center;
    border:2px solid var(--gold); background:#0d1433; color:var(--cyan); font-weight:800;
}

.dl-table { margin:0; }
.dl-table thead th {
    font-size:.72rem !important; letter-spacing:.08em; text-transform:uppercase; white-space:nowrap;
}
.dl-table td { vertical-align:middle !important; white-space:nowrap; }
.dl-user { display:flex; align-items:center; gap:.55rem; min-width:0; }
.dl-avatar {
    width:34px; height:34px; border-radius:50%; flex-shrink:0;
    display:inline-flex; align-items:center; justify-content:center;
    border:1.5px solid var(--gold); background:#0d1433; color:var(--gold);
    font-size:.72rem; font-weight:700;
}
.dl-name { font-weight:600; color:var(--text); max-width:120px; overflow:hidden; text-overflow:ellipsis; }
.dl-sponsor { display:inline-block; max-width:110px; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; color:var(--text); }
.dl-rank {
    display:inline-block; padding:.18rem .7rem; border-radius:999px; font-size:.75rem; font-weight:600;
    background:var(--gold-grad); color:#1a1400;
}
.dl-rank.is-starter { background:rgba(245,196,81,.12); border:1px solid var(--gold); color:var(--gold); }
.dl-joined { text-align:right; line-height:1.25; }
.dl-joined .d { color:var(--muted); font-size:.8rem; }
.dl-joined .t { color:var(--text); font-size:.78rem; }

@media (max-width: 480px) {
    .dl-avatar { width:28px; height:28px; font-size:.62rem; }
    .dl-name { max-width:80px; }
    .dl-sponsor { max-width:72px; }
    .dl-rank { padding:.14rem .5rem; font-size:.68rem; }
}

/* toastr: keep readable on dark */
#toast-container > div { box-shadow: 0 6px 20px rgba(0,0,0,.5); opacity: .97; }
