/* =========================================================
   A Capital — Theme System (Light + Dark)
   Unified design tokens. Toggle via [data-theme] on <html>.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* Make Inter the default everywhere; defeats inline `Arial !important`
   when this stylesheet (or menu-theme.css) is loaded after the inline
   <style> in each page. */
html,
body,
button,
input,
select,
textarea,
*,
*::before,
*::after{
  font-family: "Inter", "Helvetica Neue", Arial, Helvetica, sans-serif !important;
  -webkit-font-feature-settings: "cv11", "ss01", "ss03";
          font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================== DARK (default) ================== */
:root,
:root[data-theme="dark"]{
  /* Surfaces */
  --bg:            #0e0e0e;
  --bg-soft:       #131313;
  --surface:       #171717;
  --surface-2:     #1e1e1e;
  --surface-3:     #252525;
  --surface-hover: #222222;

  /* Text */
  --text:          #f4f4f4;
  --text-2:        #d3d3d3;
  --muted:         #a1a1a1;
  --muted-2:       #727272;

  /* Borders & rings */
  --line:          rgba(161,161,161,.10);
  --line-strong:   rgba(161,161,161,.18);
  --ring:          rgba(255,255,255,.30);

  /* Civic gold (refined) */
  --gold:          #e6e6e6;
  --gold-2:        #ffffff;
  --gold-soft:     rgba(255,255,255,.10);
  --gold-soft-2:   rgba(255,255,255,.16);
  --gold-glow:     rgba(255,255,255,.22);

  /* Accent (calm indigo for non-gold callouts) */
  --indigo:        #d0d0d0;
  --indigo-soft:   rgba(255,255,255,.12);

  /* Semantic */
  --success:       #34d399;
  --success-soft:  rgba(52,211,153,.12);
  --danger:        #f87171;
  --danger-soft:   rgba(248,113,113,.12);
  --warning:       #fbbf24;
  --warning-soft:  rgba(251,191,36,.12);
  --info:          #dedede;
  --info-soft:     rgba(255,255,255,.12);

  /* Inputs */
  --input-bg:      #151515;
  --input-bg-2:    #1b1b1b;
  --input-line:    rgba(161,161,161,.16);

  /* Shadows */
  --shadow-sm:     0 1px 2px rgba(0,0,0,.30);
  --shadow:        0 10px 24px rgba(0,0,0,.30);
  --shadow-lg:     0 20px 48px rgba(0,0,0,.40);
  --shadow-glow:   0 0 0 1px rgba(255,255,255,.04), 0 4px 14px rgba(0,0,0,.28);

  /* Radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;
  --r-pill:999px;

  /* Misc */
  --backdrop:      rgba(7,7,7,.60);
  --scheme:        dark;
  color-scheme:    dark;
}

/* ================== LIGHT ================== */
:root[data-theme="light"]{
  --bg:            #f6f7fb;
  --bg-soft:       #f1f1f1;
  --surface:       #ffffff;
  --surface-2:     #f6f6f6;
  --surface-3:     #ededed;
  --surface-hover: #f4f4f4;

  --text:          #171717;
  --text-2:        #3f3f3f;
  --muted:         #727272;
  --muted-2:       #a1a1a1;

  --line:          rgba(23,23,23,.08);
  --line-strong:   rgba(23,23,23,.14);
  --ring:          rgba(180,135,15,.35);

  --gold:          #ffffff;
  --gold-2:        #ffffff;
  --gold-soft:     rgba(255,255,255,.10);
  --gold-soft-2:   rgba(255,255,255,.16);
  --gold-glow:     rgba(255,255,255,.22);

  --indigo:        #bdbdbd;
  --indigo-soft:   rgba(255,255,255,.10);

  --success:       #16a34a;
  --success-soft:  rgba(22,163,74,.12);
  --danger:        #dc2626;
  --danger-soft:   rgba(220,38,38,.10);
  --warning:       #d97706;
  --warning-soft:  rgba(217,119,6,.12);
  --info:          #c8c8c8;
  --info-soft:     rgba(255,255,255,.10);

  --input-bg:      #ffffff;
  --input-bg-2:    #f7f9fd;
  --input-line:    rgba(23,23,23,.12);

  --shadow-sm:     0 1px 2px rgba(23,23,23,.06);
  --shadow:        0 10px 24px rgba(23,23,23,.08);
  --shadow-lg:     0 20px 48px rgba(23,23,23,.12);
  --shadow-glow:   0 0 0 1px rgba(23,23,23,.04), 0 4px 14px rgba(23,23,23,.06);

  --backdrop:      rgba(23,23,23,.32);
  --scheme:        light;
  color-scheme:    light;
}

/* ================== BATEU BET ================== */
:root[data-theme="bateu"]{
  /* Surfaces — marrom-vinho escuro da BateuBet */
  --bg:            #1b0916;
  --bg-soft:       #1f0b1a;
  --surface:       #250d1f;
  --surface-2:     #2e1028;
  --surface-3:     #371330;
  --surface-hover: #311426;

  /* Text */
  --text:          #ffffff;
  --text-2:        #f0d8e8;
  --muted:         #bf9ab5;
  --muted-2:       #8a6880;

  /* Borders */
  --line:          rgba(255,255,255,.14);
  --line-strong:   rgba(255,255,255,.26);
  --ring:          rgba(255,255,255,.38);

  /* Acento rosa/magenta da BateuBet (substitui o ouro) */
  --gold:          #ffffff;
  --gold-2:        #ffffff;
  --gold-soft:     rgba(255,255,255,.10);
  --gold-soft-2:   rgba(255,255,255,.18);
  --gold-glow:     rgba(255,255,255,.30);

  /* Acento secundário — amarelo do botão "Entrar" */
  --indigo:        #f5c107;
  --indigo-soft:   rgba(245,193,7,.12);

  /* Semantic */
  --success:       #34d399;
  --success-soft:  rgba(52,211,153,.12);
  --danger:        #f87171;
  --danger-soft:   rgba(248,113,113,.12);
  --warning:       #fbbf24;
  --warning-soft:  rgba(251,191,36,.12);
  --info:          #dedede;
  --info-soft:     rgba(255,255,255,.12);

  /* Inputs */
  --input-bg:      #160714;
  --input-bg-2:    #1e0a1a;
  --input-line:    rgba(255,255,255,.18);

  /* Shadows */
  --shadow-sm:     0 1px 2px rgba(0,0,0,.40);
  --shadow:        0 10px 24px rgba(0,0,0,.45);
  --shadow-lg:     0 20px 48px rgba(0,0,0,.55);
  --shadow-glow:   0 0 0 1px rgba(255,255,255,.03), 0 4px 14px rgba(0,0,0,.38);

  /* Radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;
  --r-pill:999px;

  /* Misc */
  --backdrop:      rgba(10,2,8,.65);
  --scheme:        dark;
  color-scheme:    dark;
}

/* ================== Smooth theme transition ================== */
html.theme-ready *,
html.theme-ready *::before,
html.theme-ready *::after{
  transition:
    background-color .25s ease,
    border-color .25s ease,
    color .25s ease,
    box-shadow .25s ease,
    fill .25s ease,
    stroke .25s ease;
}
html.theme-ready img,
html.theme-ready video,
html.theme-ready canvas,
html.theme-ready svg{ transition:none; }
@media (prefers-reduced-motion: reduce){
  html.theme-ready *,
  html.theme-ready *::before,
  html.theme-ready *::after{ transition:none; }
}

/* ================== Theme toggle button ================== */
.th-toggle{
  --th-size: 40px;
  width: var(--th-size);
  height: var(--th-size);
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
}
.th-toggle:hover{
  background: var(--surface-2);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}
.th-toggle:active{ transform: translateY(0); }
.th-toggle:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px var(--gold-soft-2);
  border-color: var(--gold);
}
.th-toggle .th-ic{
  width: 18px;
  height: 18px;
  display: block;
}
.th-toggle .th-ic.sun{ display: none; }
.th-toggle .th-ic.moon{ display: block; }
:root[data-theme="light"] .th-toggle .th-ic.sun{ display: block; }
:root[data-theme="light"] .th-toggle .th-ic.moon{ display: none; }

/* Floating variant for auth pages */
.th-toggle-float{
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  --th-size: 42px;
}

/* Compact variant for sidebars */
.th-toggle-compact{
  --th-size: 28px;
  border-radius: 8px;
  box-shadow: none;
}
.th-toggle-compact .th-ic{ width: 14px; height: 14px; }

/* ================== Image filters per theme ================== */
:root[data-theme="light"] .invert-on-light{
  filter: invert(1) hue-rotate(180deg);
}
:root[data-theme="dark"] .invert-on-dark{
  filter: invert(1) hue-rotate(180deg);
}

/* Hide brand logo variant by theme */
.brand-only-dark{ display: inline-block; }
.brand-only-light{ display: none; }
:root[data-theme="light"] .brand-only-dark{ display: none; }
:root[data-theme="light"] .brand-only-light{ display: inline-block; }

/* ================== Scrollbar ================== */
*::-webkit-scrollbar{ width: 6px; height: 6px; }
*::-webkit-scrollbar-track{ background: transparent; }
*::-webkit-scrollbar-thumb{
  background: var(--line-strong);
  border-radius: var(--r-pill);
}
*::-webkit-scrollbar-thumb:hover{ background: var(--muted); }

/* ================== Selection ================== */
::selection{ background: var(--gold-soft-2); color: var(--text); }
