/* ==========================================================================
   WJFlow — Design tokens
   Light é o padrão; dark é aplicado via [data-theme="dark"] no <html>.
   ========================================================================== */

:root {
    color-scheme: light;

    /* Superfícies */
    --bg:            #F7F8FA;
    --surface:       #FFFFFF;
    --surface-2:     #F2F4F7;
    --surface-3:     #EAECF0;
    --input-bg:      #FFFFFF;
    --overlay:       rgba(16, 24, 40, .45);
    --topbar-bg:     rgba(247, 248, 250, .78);

    /* Bordas */
    --border:        #E4E7EC;
    --border-strong: #D0D5DD;

    /* Texto */
    --text:          #101828;
    --text-2:        #475467;
    --text-3:        #98A2B3;
    --text-inverse:  #FFFFFF;

    /* Marca */
    --brand-50:      #EEF2FF;
    --brand-100:     #E0E5FF;
    --brand-500:     #5B6CFF;
    --brand-600:     #4B57F0;
    --brand-700:     #3B44C9;
    --ring:          rgba(91, 108, 255, .35);

    /* Semânticas: bg / fg / border */
    --success-bg:    #ECFDF3;  --success-fg: #067647;  --success-border: #ABEFC6;  --success-dot: #17B26A;
    --warning-bg:    #FFFAEB;  --warning-fg: #B54708;  --warning-border: #FEDF89;  --warning-dot: #F79009;
    --danger-bg:     #FEF3F2;  --danger-fg:  #B42318;  --danger-border:  #FECDCA;  --danger-dot:  #F04438;
    --info-bg:       #EFF8FF;  --info-fg:    #175CD3;  --info-border:    #B2DDFF;  --info-dot:    #2E90FA;
    --neutral-bg:    #F2F4F7;  --neutral-fg: #344054;  --neutral-border: #E4E7EC;  --neutral-dot: #98A2B3;

    /* Sidebar (escura nos dois temas) */
    --sb-bg:         #0B0D12;
    --sb-hover:      #161922;
    --sb-active:     #1C2030;
    --sb-text:       #A1A7B3;
    --sb-text-strong:#F2F4F7;
    --sb-muted:      #5D6472;
    --sb-border:     #1F2330;

    /* Tipografia */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
    --fs-xs:   12px;
    --fs-sm:   13px;
    --fs-base: 14px;
    --fs-md:   16px;
    --fs-lg:   18px;
    --fs-xl:   24px;

    /* Raios */
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-full: 999px;

    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
    --shadow-lg: 0 12px 24px -6px rgba(16, 24, 40, .12), 0 4px 8px -4px rgba(16, 24, 40, .06);
    --shadow-xl: 0 24px 48px -12px rgba(16, 24, 40, .22);

    /* Movimento */
    --dur:  150ms;
    --ease: cubic-bezier(.2, 0, 0, 1);

    /* Layout */
    --sidebar-w:      240px;
    --sidebar-w-mini: 64px;
    --topbar-h:       56px;
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg:            #0B0D12;
    --surface:       #12151C;
    --surface-2:     #181C25;
    --surface-3:     #1F2430;
    --input-bg:      #0F1218;
    --overlay:       rgba(0, 0, 0, .6);
    --topbar-bg:     rgba(11, 13, 18, .72);

    --border:        #232836;
    --border-strong: #2E3444;

    --text:          #E6E8EC;
    --text-2:        #A1A7B3;
    --text-3:        #6B7280;

    --brand-50:      #1A1F3D;
    --brand-100:     #232A52;
    --brand-500:     #7480FF;
    --brand-600:     #6E7BFF;
    --brand-700:     #A9B1FF;
    --ring:          rgba(110, 123, 255, .45);

    --success-bg: #0B2A1C;  --success-fg: #47CD89;  --success-border: #10462D;  --success-dot: #17B26A;
    --warning-bg: #2B1F06;  --warning-fg: #FDB022;  --warning-border: #4E3609;  --warning-dot: #F79009;
    --danger-bg:  #2D1111;  --danger-fg:  #F97066;  --danger-border:  #55160C;  --danger-dot:  #F04438;
    --info-bg:    #0B1F3A;  --info-fg:    #53B1FD;  --info-border:    #102A56;  --info-dot:    #2E90FA;
    --neutral-bg: #1C2030;  --neutral-fg: #C5CAD3;  --neutral-border: #2A3040;  --neutral-dot: #6B7280;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .45);
    --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, .5);
    --shadow-lg: 0 12px 28px -6px rgba(0, 0, 0, .6);
    --shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, .7);
}

@media (prefers-reduced-motion: reduce) {
    :root { --dur: 0ms; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
