/* ============================================================
   SBSVolei — Design System unificado
   Carregado em todas as páginas. Não duplicar tokens em <style>
   inline. Sobrescritas devem usar var(--token).
   ============================================================ */

:root {
  /* CORES — paleta única */
  --gold:        #F5C518;
  --gold-hover:  #FFD43B;
  --gold-press:  #C9A010;

  --bg:          #07101F;
  --surface:     #0E1E36;
  --surface-2:   #142849;
  --surface-3:   #1A2F55;
  --border:      rgba(245,197,24,.10);
  --border-hi:   rgba(245,197,24,.22);

  --text:        #F1F5FB;
  --text-mute:   #B0C2D6;
  --text-faint:  #8DA4BD;

  --green:       #2ECC71;
  --green-soft:  rgba(46,204,113,.12);
  --red:         #EF4444;
  --red-soft:    rgba(239,68,68,.12);
  --warn:        #F59E0B;
  --warn-soft:   rgba(245,158,11,.12);
  --info:        #60A5FA;
  --info-soft:   rgba(96,165,250,.12);

  /* Compatibilidade com tokens antigos do código existente */
  --navy:        var(--bg);
  --mid:         var(--surface);
  --card:        var(--surface);
  --gd:          var(--gold-press);
  --gold-dark:   var(--gold-press);
  --navy-mid:    var(--surface);
  --navy-light:  var(--surface-3);
  --gray:        var(--text-faint);
  --white:       var(--text);

  /* TIPOGRAFIA */
  --font-display: 'Bebas Neue', system-ui, sans-serif;
  --font-ui:      'Outfit', system-ui, sans-serif;
  --font-mono:    'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  /* ESCALA */
  --t-xs:   .75rem;   /* 12 */
  --t-sm:   .875rem;  /* 14 */
  --t-base: 1rem;     /* 16 */
  --t-lg:   1.25rem;  /* 20 */
  --t-xl:   1.563rem; /* 25 */
  --t-2xl:  2rem;     /* 32 */
  --t-3xl:  3rem;     /* 48 */

  /* ESPAÇAMENTO */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px;  --s-8: 64px;

  /* FORMA */
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 100px;

  /* SOMBRAS */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.25);
  --shadow:    0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.45);
  --glow-gold: 0 0 24px rgba(245,197,24,.18);

  /* MOVIMENTO */
  --t-fast: 150ms;
  --t-base-anim: 250ms;
}

/* ── FOCO global ── */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── TIPOGRAFIA base ── */
html { font-size: 16px; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── BOTÕES utilitários ── */
.t-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-ui); font-weight: 700; font-size: var(--t-sm);
  border: none; border-radius: var(--r); cursor: pointer;
  padding: 10px 18px;
  transition: transform var(--t-fast), background var(--t-fast), opacity var(--t-fast);
  text-decoration: none; line-height: 1; min-height: 40px;
}
.t-btn:active { transform: translateY(1px); }
.t-btn:disabled { opacity: .45; pointer-events: none; }
.t-btn-primary { background: var(--gold); color: var(--bg); box-shadow: var(--glow-gold); }
.t-btn-primary:hover { background: var(--gold-hover); transform: translateY(-2px); }
.t-btn-ghost { background: rgba(245,197,24,.1); color: var(--gold); border: 1px solid var(--border-hi); }
.t-btn-ghost:hover { background: rgba(245,197,24,.18); }
.t-btn-danger { background: rgba(239,68,68,.12); color: #ff8585; border: 1px solid rgba(239,68,68,.28); }
.t-btn-danger:hover { background: rgba(239,68,68,.22); }
.t-btn-sm { padding: 6px 12px; font-size: var(--t-xs); min-height: 30px; }

/* ── BADGES ── */
.t-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: var(--r-pill);
  font-size: .68rem; font-weight: 700; line-height: 1.4;
}
.t-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.t-badge-ok      { background: var(--green-soft); color: var(--green); }
.t-badge-warn    { background: var(--warn-soft);  color: var(--warn); }
.t-badge-info    { background: var(--info-soft);  color: var(--info); }
.t-badge-danger  { background: var(--red-soft);   color: #ff8585; }
.t-badge-muted   { background: rgba(176,194,214,.1); color: var(--text-mute); }
.t-badge-gold    { background: rgba(245,197,24,.12); color: var(--gold); }

/* ── INPUTS unificados ── */
.t-input, .t-select, .t-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 11px 14px;
  color: var(--text); font-family: var(--font-ui); font-size: var(--t-sm);
  outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.t-input:focus, .t-select:focus, .t-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,197,24,.15);
}
.t-input::placeholder, .t-textarea::placeholder { color: rgba(141,164,189,.55); }
.t-label {
  display: block; font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 6px;
}

/* ── CARD utilitário ── */
.t-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
}

/* ── TOAST animação compartilhada ── */
@keyframes t-toast-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── ACESSIBILIDADE ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── MOBILE ── */
@media (max-width: 640px) {
  html { font-size: 15px; }
  .t-btn { min-height: 44px; padding: 12px 18px; }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-press); }
