/* ==========================================================
   SGC — Design Tokens
   Sistema dark-first, denso em dados, tipografia DM Sans/DM Mono.
   ========================================================== */

:root {
    /* Cor — base */
    --bg-base:        #0E1116;
    --bg-surface:     #161B22;
    --bg-surface-2:   #1C232D;
    --bg-surface-3:   #232C38;
    --border-subtle:  #2A323D;
    --border-strong:  #3A4452;

    /* Cor — texto */
    --text-primary:   #E6E9EF;
    --text-secondary: #8B96A5;
    --text-muted:     #5C6675;

    /* Cor — accent operacional */
    --accent:         #3B82F6;
    --accent-hover:   #5B95F8;
    --accent-soft:    rgba(59, 130, 246, 0.12);

    /* Cor — estados semânticos */
    --success:        #22C55E;
    --success-soft:   rgba(34, 197, 94, 0.12);
    --warning:        #F59E0B;
    --warning-soft:   rgba(245, 158, 11, 0.12);
    --danger:         #EF4444;
    --danger-soft:    rgba(239, 68, 68, 0.12);

    /* Tipografia */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'DM Mono', 'SF Mono', Consolas, monospace;
    --font-display: 'Syne', var(--font-sans);

    /* Layout */
    --sidebar-width: 248px;
    --sidebar-width-collapsed: 72px;
    --topbar-height: 64px;
    --footer-height: 44px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    /* Sombra */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

    /* Transição */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 140ms;
    --duration-base: 220ms;
}

html[data-theme="light"] {
    /* Cor — base */
    --bg-base:        #F3F4F6; /* Cinza claro suave */
    --bg-surface:     #FFFFFF; /* Branco para cartões e tabelas */
    --bg-surface-2:   #F9FAFB; /* Cinza alternativo suave */
    --bg-surface-3:   #E5E7EB; /* Hover e itens ativos */
    --border-subtle:  #E5E7EB; /* Borda leve */
    --border-strong:  #D1D5DB; /* Borda mais forte */

    /* Cor — texto */
    --text-primary:   #111827; /* Cinza muito escuro para texto principal */
    --text-secondary: #4B5563; /* Cinza médio */
    --text-muted:     #9CA3AF; /* Cinza claro */

    /* Cor — accent operacional (Ajustado para contraste em fundo claro) */
    --accent:         #2563EB; /* Azul royal */
    --accent-hover:   #1D4ED8;
    --accent-soft:    rgba(37, 99, 235, 0.08);

    /* Cor — estados semânticos */
    --success:        #16A34A;
    --success-soft:   rgba(22, 163, 74, 0.08);
    --warning:        #D97706;
    --warning-soft:   rgba(217, 119, 6, 0.08);
    --danger:         #DC2626;
    --danger-soft:    rgba(220, 38, 38, 0.08);

    /* Sombra (Mais suaves no tema claro) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Suporte a redução de movimento */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
