/* ==========================================================================
   AurumBet design system — premium dark gaming UI
   Palette: bg #050503 · surface #121311 · surface2 #1B1C19 · gold #F1A706
            ember #BD401B · violet #6765B4 · text #F1F1F1 · muted #A5A3A1
   ========================================================================== */
:root {
  --bg: #050503;
  --surface: #121311;
  --surface2: #1B1C19;
  --surface3: #242522;
  --gold: #F1A706;
  --gold-soft: rgba(241, 167, 6, .14);
  --ember: #BD401B;
  --violet: #6765B4;
  --text: #F1F1F1;
  --muted: #A5A3A1;
  --border: #2a2b27;
  --green: #3fb96f;
  --red: #e2574b;
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 232px;
  --topbar-h: 62px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: none; filter: brightness(1.12); }
img { max-width: 100%; }
h1,h2,h3,h4 { line-height: 1.25; margin: 0 0 .5em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:28px}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--radius-sm); padding: 10px 18px; font-size: 14px;
  font-weight: 600; cursor: pointer; transition: transform .12s ease, filter .12s ease, background .12s ease;
  color: #101010; background: linear-gradient(180deg, #ffc233, var(--gold)); text-decoration: none;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ember { background: linear-gradient(180deg, #e05a2d, var(--ember)); color: #fff; }
.btn-violet { background: linear-gradient(180deg, #7d7bd0, var(--violet)); color: #fff; }
.btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-danger { background: linear-gradient(180deg, #e2574b, #a33028); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 13px 26px; font-size: 15.5px; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 14px; }
label.form-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; letter-spacing: .02em; }
.form-control, select.form-control, textarea.form-control {
  width: 100%; background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14.5px; transition: border-color .12s;
}
.form-control:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.form-check input { margin-top: 3px; accent-color: var(--gold); }
.field-error { color: #ff9d94; font-size: 12.5px; margin-top: 4px; }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0; font-size: 14px; border: 1px solid; }
.alert-success { background: #0f2418; border-color: #245c38; color: #9fe3b8; }
.alert-error { background: #2a1210; border-color: #6d2a22; color: #ffb0a6; }
.alert-info { background: #141a2e; border-color: #2c3a68; color: #aebef5; }
.alert-warning { background: #2b2107; border-color: #6d5410; color: #ffd77a; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); position: sticky; top: 0; height: 100vh;
  background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; overflow-y: auto; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #171100; font-size: 19px;
  background: conic-gradient(from 210deg, #ffd666, var(--gold), #8a5a00, #ffd666); box-shadow: 0 4px 14px rgba(241,167,6,.35);
}
.brand-name { font-weight: 800; letter-spacing: .04em; font-size: 18px; }
.brand-name span { color: var(--gold); }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 14px 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: #d9d7d2; font-size: 14px; font-weight: 500; margin-bottom: 2px; transition: background .12s, color .12s;
}
.nav-link .ico { width: 20px; text-align: center; opacity: .9; }
.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { background: var(--gold-soft); color: var(--gold); font-weight: 700; }
.nav-link .badge { margin-left: auto; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; background: rgba(5,5,3,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.search { flex: 1; max-width: 420px; position: relative; }
.search input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 16px 9px 38px; color: var(--text); font-size: 13.5px;
}
.search input:focus { border-color: var(--gold); outline: none; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--gold-soft); color: var(--gold);
  border: 1px solid rgba(241,167,6,.4); padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
}
.icon-btn {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text); cursor: pointer; font-size: 15px;
}
.icon-btn:hover { border-color: var(--gold); }
.badge {
  display: inline-block; min-width: 18px; text-align: center; background: var(--ember); color: #fff;
  font-size: 11px; padding: 1px 6px; border-radius: 999px; font-weight: 700;
}
.badge-gold { background: var(--gold); color: #171100; }
.badge-green { background: #1d5c38; color: #b9f0cf; }
.badge-violet { background: rgba(103,101,180,.25); color: #b7b5ef; }
.badge-muted { background: var(--surface3); color: var(--muted); }

.content { padding: 22px 18px 60px; flex: 1; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 800; margin: 0; }
.page-title .accent { color: var(--gold); }

/* ---------- Cards & panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 18px;
}
.panel-tight { padding: 12px; }
.panel-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.stat { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 4px; }
.stat .v.gold { color: var(--gold); }

/* ---------- Banners ---------- */
.hero { border-radius: var(--radius); overflow: hidden; position: relative; padding: 40px 34px; margin-bottom: 18px; border: 1px solid var(--border); }
.hero h2 { font-size: 30px; font-weight: 800; margin-bottom: 8px; max-width: 560px; }
.hero p { color: rgba(255,255,255,.82); max-width: 480px; margin: 0 0 18px; }
.hero-gold { background: radial-gradient(1200px 400px at 85% 20%, rgba(241,167,6,.5), transparent 60%), linear-gradient(120deg, #241a04, #121311 70%); }
.hero-ember { background: radial-gradient(1000px 380px at 80% 10%, rgba(189,64,27,.55), transparent 60%), linear-gradient(120deg, #200c06, #121311 70%); }
.hero-violet { background: radial-gradient(1000px 380px at 85% 15%, rgba(103,101,180,.55), transparent 60%), linear-gradient(120deg, #14132b, #121311 70%); }
.hero-slate { background: radial-gradient(1000px 380px at 85% 15%, rgba(120,130,140,.4), transparent 60%), linear-gradient(120deg, #16181a, #121311 70%); }

/* ---------- Game cards ---------- */
.grid { display: grid; gap: 14px; }
.grid-games { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.game-card {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface2);
  border: 1px solid var(--border); transition: transform .16s ease, border-color .16s ease, box-shadow .16s;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(241,167,6,.55); box-shadow: var(--shadow); }
.game-cover { aspect-ratio: 4/5; display: grid; place-items: center; position: relative; overflow: hidden; background: var(--surface2); }
.game-cover .game-cover-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-cover::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(5,5,3,.04) 20%, rgba(5,5,3,.82) 100%); pointer-events: none; }
.game-cover .cover-status { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 7px; border-radius: 999px; background: rgba(7,9,10,.8); border: 1px solid rgba(255,255,255,.16); color: #e7e1d3; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.game-cover .cover-status.is-demo { color: var(--gold); border-color: rgba(241,167,6,.45); }
.game-cover .cover-title { position: absolute; z-index: 1; bottom: 10px; left: 12px; right: 12px; font-weight: 800; font-size: 15px; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.game-detail-art { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.game-guide { margin-top: 22px; }
.game-guide ol { padding-left: 22px; }
.game-guide li { margin: 8px 0; color: var(--muted); line-height: 1.55; }
.game-guide .guide-note { border-left: 3px solid var(--gold); padding-left: 12px; }
.game-info { padding: 10px 12px; }
.game-info .provider { color: var(--muted); font-size: 12px; }
.game-hover {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 8px; background: rgba(5,5,3,.62);
  opacity: 0; transition: opacity .16s; backdrop-filter: blur(2px);
}
.game-card:hover .game-hover, .game-card:focus-within .game-hover { opacity: 1; }
.fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 999px;
  background: rgba(5,5,3,.65); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-size: 14px;
}
.fav-btn.on { color: var(--gold); border-color: var(--gold); }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Sports ---------- */
.event-card {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px; transition: border-color .12s;
}
.event-card:hover { border-color: rgba(241,167,6,.5); }
.event-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.live-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--red); display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.odds-row { display: flex; gap: 8px; }
.odd-btn {
  min-width: 74px; text-align: center; background: var(--surface3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; transition: border-color .12s, background .12s;
}
.odd-btn:hover { border-color: var(--gold); }
.odd-btn.sel { border-color: var(--gold); background: var(--gold-soft); }
.odd-btn .lbl { font-size: 11px; color: var(--muted); display: block; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odd-btn .val { font-weight: 800; color: var(--gold); }
.market-group { margin-bottom: 18px; }
.market-title { font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Bet slip ---------- */
.slip {
  position: fixed; right: 18px; bottom: 18px; width: 330px; max-height: 70vh; overflow: auto; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.slip-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; position: sticky; top: 0; background: var(--surface); }
.slip-body { padding: 12px 14px; }
.slip-leg { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.slip-leg .rm { color: var(--muted); cursor: pointer; border: 0; background: none; }
.slip-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid #1e1f1c; vertical-align: middle; }
.table tr:hover td { background: rgba(255,255,255,.015); }
.status { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; display: inline-block; text-transform: uppercase; letter-spacing: .04em; }
.st-green { background: rgba(63,185,111,.14); color: #7fe0a6; }
.st-gold { background: var(--gold-soft); color: var(--gold); }
.st-red { background: rgba(226,87,75,.14); color: #ff9d94; }
.st-muted { background: var(--surface3); color: var(--muted); }
.st-violet { background: rgba(103,101,180,.18); color: #b7b5ef; }

/* ---------- Tabs & filters ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  padding: 8px 16px; border-radius: 999px; background: var(--surface2); color: var(--muted);
  border: 1px solid var(--border); font-size: 13px; font-weight: 600;
}
.tab:hover { color: var(--text); border-color: #3a3b36; }
.tab.active { background: var(--gold); color: #171100; border-color: var(--gold); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .form-control { width: auto; min-width: 150px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.pg-link {
  min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 8px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; color: var(--text); font-size: 13.5px;
}
.pg-link.active { background: var(--gold); color: #171100; border-color: var(--gold); font-weight: 700; }

/* ---------- Auth & install ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px;
  background: radial-gradient(900px 500px at 50% -10%, rgba(241,167,6,.14), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 34px; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; padding-bottom: 22px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 34px 18px; color: var(--muted); font-size: 13px; }
.footer a { color: var(--muted); margin-right: 16px; }
.footer a:hover { color: var(--gold); }
.footer .cols { display: flex; gap: 30px; flex-wrap: wrap; margin-bottom: 18px; }
.rg-strip { display:flex; gap: 12px; align-items:center; margin-top: 16px; padding: 10px 14px; background: var(--surface2); border-radius: 10px; border: 1px solid var(--border); }

/* ---------- Demo / sample notices ---------- */
.sample-banner {
  display: flex; gap: 10px; align-items: center; background: rgba(103,101,180,.12);
  border: 1px solid rgba(103,101,180,.45); color: #c5c3f2; border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
.demo-chip { background: rgba(103,101,180,.2); color: #c5c3f2; border: 1px solid rgba(103,101,180,.5);
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }

/* ---------- Mobile nav ---------- */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(18,19,17,.97); border-top: 1px solid var(--border); backdrop-filter: blur(8px);
}
.mobile-nav .items { display: flex; }
.mobile-nav a { flex: 1; text-align: center; padding: 9px 4px 11px; color: var(--muted); font-size: 10.5px; }
.mobile-nav a .ico { display: block; font-size: 18px; margin-bottom: 2px; }
.mobile-nav a.active { color: var(--gold); }
.hamburger { display: none; }

/* ---------- Empty / loading states ---------- */
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .big { font-size: 38px; margin-bottom: 8px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--surface3); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Progress ---------- */
.progress { background: var(--surface3); border-radius: 999px; height: 10px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, #8a5a00, var(--gold)); border-radius: 999px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .sidebar { display: none; }
  .hamburger { display: grid; }
  .mobile-nav { display: block; }
  body { padding-bottom: 64px; }
  .slip { position: static; width: auto; margin: 16px 0; max-height: none; }
}
@media (max-width: 640px) {
  .hero { padding: 26px 20px; }
  .hero h2 { font-size: 22px; }
  .grid-games { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
  .form-row { grid-template-columns: 1fr; }
  .page-title { font-size: 20px; }
  .container { padding: 0 12px; }
  .content { padding: 16px 12px 40px; }
  .search { max-width: none; }
  .topbar { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* ---- Engagement: winners ticker, power-hour banner, cash-out ---- */
.alert-gold { background: #2b2107; border-color: #6d5410; color: #ffd77a; }
.winners-ticker { display:flex; align-items:center; gap:10px; background:var(--surface2); border:1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 14px; overflow: hidden; }
.winners-ticker .ticker-label { font-size: 18px; }
.winners-ticker .ticker-view { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size: 13.5px; color: var(--muted); }
.winners-ticker .ticker-view strong { color: var(--gold); }
.lang-switch { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lang-switch a { color: var(--muted); text-decoration: none; padding: 2px 3px; border-radius: 4px; }
.lang-switch a.on { color: var(--gold); font-weight: 600; }

/* ==========================================================================
   Browser-default purge — every control, scrollbar and affordance is themed.
   Nothing renders as a raw OS/browser widget.
   ========================================================================== */

/* ---------- Selection ---------- */
::selection { background: var(--gold); color: #171100; }
::-moz-selection { background: var(--gold); color: #171100; }

/* ---------- Scrollbars (page, panels, tables, tickers — everything) ---------- */
html { scrollbar-width: thin; scrollbar-color: #3a3b36 var(--bg); }
::-webkit-scrollbar { width: 10px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); border-left: 1px solid var(--border); }
::-webkit-scrollbar-track:horizontal { border-left: 0; border-top: 1px solid var(--border); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3f403a, #2c2d29);
  border-radius: 99px; border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #8a6a1f, #5d4a14); }
::-webkit-scrollbar-thumb:active { background: var(--gold); }
::-webkit-scrollbar-corner { background: var(--bg); }
.table-wrap::-webkit-scrollbar, pre::-webkit-scrollbar, .winners-ticker ::-webkit-scrollbar { height: 7px; }
.table-wrap, pre { scrollbar-width: thin; scrollbar-color: #3a3b36 transparent; }

/* ---------- Selects: native arrow replaced by themed chevron ---------- */
select, select.form-control {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23F1A706' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px; cursor: pointer;
}
select.form-control:disabled { opacity: .5; cursor: not-allowed; }
option { background: var(--surface2); color: var(--text); }

/* ---------- Checkboxes: themed boxes with gold tick ---------- */
input[type="checkbox"] {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; flex: 0 0 18px; margin: 0; cursor: pointer;
  background: var(--surface2); border: 1.5px solid #3d3e39; border-radius: 5px;
  display: inline-grid; place-content: center; transition: background .12s, border-color .12s;
}
input[type="checkbox"]:hover { border-color: var(--gold); }
input[type="checkbox"]::before {
  content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform .12s ease-in-out;
  clip-path: polygon(14% 44%, 0 62%, 40% 100%, 100% 16%, 84% 2%, 38% 70%);
  background: #171100;
}
input[type="checkbox"]:checked { background: linear-gradient(180deg, #ffc233, var(--gold)); border-color: var(--gold); }
input[type="checkbox"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Radios: themed rings with gold dot ---------- */
input[type="radio"] {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; flex: 0 0 18px; margin: 0; cursor: pointer;
  background: var(--surface2); border: 1.5px solid #3d3e39; border-radius: 50%;
  display: inline-grid; place-content: center; transition: border-color .12s;
}
input[type="radio"]:hover { border-color: var(--gold); }
input[type="radio"]::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; transform: scale(0);
  transition: transform .12s ease-in-out; background: linear-gradient(180deg, #ffc233, var(--gold));
}
input[type="radio"]:checked { border-color: var(--gold); }
input[type="radio"]:checked::before { transform: scale(1); }
input[type="radio"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.form-check { align-items: center; }
.form-check input { margin-top: 0; }

/* ---------- Number inputs: strip native spinners ---------- */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ---------- File picker: themed button, no native chrome ---------- */
input[type="file"].form-control { padding: 8px 10px; cursor: pointer; }
input[type="file"]::file-selector-button {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #ffc233, var(--gold)); color: #171100;
  font: 600 13px/1 inherit; padding: 8px 14px; margin-right: 12px; border-radius: 8px;
  transition: filter .12s;
}
input[type="file"]::file-selector-button:hover { filter: brightness(1.08); }
input[type="file"]::-webkit-file-upload-button { -webkit-appearance: none; }

/* ---------- Date & datetime pickers: themed indicators ---------- */
input[type="date"].form-control, input[type="datetime-local"].form-control { cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: .9; border-radius: 6px; padding: 2px;
  filter: invert(72%) sepia(88%) saturate(1200%) hue-rotate(359deg) brightness(102%) contrast(96%);
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: 1; background: var(--gold-soft); }

/* ---------- Range sliders: themed track + gold thumb ---------- */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px;
  background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold) var(--fill, 50%), var(--surface3) var(--fill, 50%));
  border: 1px solid var(--border);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%;
  background: linear-gradient(180deg, #ffc233, var(--gold)); border: 2px solid #171100;
  box-shadow: 0 2px 8px rgba(0,0,0,.5); transition: transform .12s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--surface3); border: 1px solid var(--border); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--gold); }
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid #171100;
  background: linear-gradient(180deg, #ffc233, var(--gold)); box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* ---------- Autofill: keep dark theme, kill the yellow/white flash ---------- */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus,
textarea:-webkit-autofill, select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--surface2) inset;
  -webkit-text-fill-color: var(--text); caret-color: var(--text);
  border-color: var(--gold); transition: background-color 9999s ease-in-out 0s;
}

/* ---------- Textareas & misc text inputs ---------- */
textarea.form-control { resize: vertical; min-height: 90px; }
textarea::-webkit-resizer { display: none; }
input::placeholder, textarea::placeholder { color: #6d6c68; }

/* ---------- Details/summary (if used): themed marker ---------- */
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "▸"; color: var(--gold); margin-right: 8px; display: inline-block; transition: transform .15s; }
details[open] summary::before { transform: rotate(90deg); }
