/*
 * DachOS Dashboard — Design Tokens (v2 · redesign 2026-07)
 * Direção: "ledger de operador editorial" — neutro sage, evergreen como
 * único acento, semânticos separados, serifada humanista nos números-herói.
 * Tokens usam os mesmos nomes do sistema anterior; só o valor muda,
 * pra que o cascade atinja base.css / components.css / *.css legadas.
 */

:root {
    /* ------------------------------------------------------------------ */
    /* Color Palette — Dark Theme (default)                               */
    /* Neutros sage com viés sutil verde, não cinza puro.                 */
    /* ------------------------------------------------------------------ */

    /* Backgrounds */
    --bg-primary:       #0E1210;
    --bg-secondary:     #171B18;
    --bg-tertiary:      #1E231F;
    --bg-input:         #131715;
    --bg-hover:         #1E231F;
    --bg-active:        #262B26;
    --bg-overlay:       rgba(5, 8, 6, 0.66);

    /* Borders */
    --border:           #262B26;
    --border-light:     #1F2420;
    --border-focus:     #4CB799;

    /* Text */
    --text-primary:     #ECEDE8;
    --text-secondary:   #98988F;
    --text-muted:       #6B6E66;
    --text-link:        #4CB799;

    /* Accent — Evergreen (único acento de marca / ação) */
    --accent:           #4CB799;
    --accent-hover:     #6ACFB2;
    --accent-subtle:    rgba(76, 183, 153, 0.15);

    /* Semantic — separados do acento */
    --success:          #4CB799;
    --success-hover:    #6ACFB2;
    --success-bg:       rgba(76, 183, 153, 0.14);

    --warning:          #D69946;
    --warning-hover:    #E5AB5F;
    --warning-bg:       rgba(214, 153, 70, 0.14);

    --error:            #E06663;
    --error-hover:      #EA817F;
    --error-bg:         rgba(224, 102, 99, 0.14);

    --running:          #7BA6D6;
    --running-bg:       rgba(123, 166, 214, 0.14);

    --purple:           #B49AE0;
    --purple-bg:        rgba(180, 154, 224, 0.14);

    /* Execute button — mesma família do acento */
    --execute:          #0E7A5F;
    --execute-hover:    #109878;
    --execute-border:   #4CB799;
    --execute-glow:     rgba(76, 183, 153, 0.35);

    /* ------------------------------------------------------------------ */
    /* Typography                                                         */
    /* ------------------------------------------------------------------ */
    --font-ui:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
    --font-serif:   'Source Serif 4', 'Source Serif Pro', 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --text-xs:    0.75rem;      /* 12px */
    --text-sm:    0.8125rem;    /* 13px */
    --text-base:  0.875rem;     /* 14px */
    --text-md:    1rem;         /* 16px */
    --text-lg:    1.25rem;      /* 20px */
    --text-xl:    1.5rem;       /* 24px */
    --text-2xl:   2rem;         /* 32px */
    --text-3xl:   2.5rem;       /* 40px */

    --weight-regular:   400;
    --weight-medium:    500;
    --weight-semibold:  600;
    --weight-bold:      700;

    --line-height:       1.55;
    --line-height-tight: 1.2;
    --line-height-heading: 1.15;
    --letter-spacing-heading: -0.02em;

    /* ------------------------------------------------------------------ */
    /* Spacing Scale                                                      */
    /* ------------------------------------------------------------------ */
    --space-0:   0;
    --space-1:   0.25rem;    /*  4px */
    --space-2:   0.5rem;     /*  8px */
    --space-3:   0.75rem;    /* 12px */
    --space-4:   1rem;       /* 16px */
    --space-5:   1.25rem;    /* 20px */
    --space-6:   1.5rem;     /* 24px */
    --space-8:   2rem;       /* 32px */
    --space-10:  2.5rem;     /* 40px */
    --space-12:  3rem;       /* 48px */
    --space-16:  4rem;       /* 64px */

    /* ------------------------------------------------------------------ */
    /* Border Radius                                                      */
    /* ------------------------------------------------------------------ */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-2xl:  20px;
    --radius-full: 9999px;

    /* ------------------------------------------------------------------ */
    /* Shadows                                                            */
    /* ------------------------------------------------------------------ */
    --shadow-sm:  0 1px 0 rgba(0, 0, 0, 0.30), 0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow-md:  0 1px 0 rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.40);
    --shadow-lg:  0 1px 0 rgba(0, 0, 0, 0.40), 0 18px 50px rgba(0, 0, 0, 0.50);
    --shadow-xl:  0 1px 0 rgba(0, 0, 0, 0.45), 0 28px 70px rgba(0, 0, 0, 0.60);
    --shadow-glow-blue:   0 0 20px rgba(76, 183, 153, 0.16);
    --shadow-glow-green:  0 0 20px rgba(76, 183, 153, 0.18);
    --shadow-glow-red:    0 0 20px rgba(224, 102, 99, 0.16);

    /* ------------------------------------------------------------------ */
    /* Transitions                                                        */
    /* ------------------------------------------------------------------ */
    --transition-fast:   150ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: 220ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow:   360ms cubic-bezier(0.16, 1, 0.3, 1);

    /* ------------------------------------------------------------------ */
    /* Layout                                                             */
    /* ------------------------------------------------------------------ */
    --header-height:      60px;
    --footer-height:      40px;
    --content-max-width:  100%;
    --content-padding:    28px;
    --sidebar-width:      380px;
}

/* ====================================================================== */
/* Light Theme                                                             */
/* Neutros: bone com viés sage sutil, superfície branca pura              */
/* ====================================================================== */
[data-theme="light"] {
    /* Backgrounds */
    --bg-primary:       #F3F4F0;
    --bg-secondary:     #FFFFFF;
    --bg-tertiary:      #FAFAF6;
    --bg-input:         #FFFFFF;
    --bg-hover:         #ECEEE7;
    --bg-active:        #E1E4DA;
    --bg-overlay:       rgba(20, 22, 20, 0.28);

    /* Borders */
    --border:           #DFE1D8;
    --border-light:     #E9EBE3;
    --border-focus:     #0B5E4A;

    /* Text */
    --text-primary:     #141614;
    --text-secondary:   #5F625B;
    --text-muted:       #8A8D84;
    --text-link:        #0B5E4A;

    /* Accent — Evergreen escuro pra contraste AAA sobre bg claro */
    --accent:           #0B5E4A;
    --accent-hover:     #094C3B;
    --accent-subtle:    rgba(11, 94, 74, 0.10);

    /* Semantic */
    --success:          #0B5E4A;
    --success-hover:    #094C3B;
    --success-bg:       rgba(11, 94, 74, 0.10);

    --warning:          #B0721F;
    --warning-hover:    #8F5B14;
    --warning-bg:       rgba(176, 114, 31, 0.10);

    --error:            #B22A2A;
    --error-hover:      #8F1E1E;
    --error-bg:         rgba(178, 42, 42, 0.10);

    --running:          #3A6BA5;
    --running-bg:       rgba(58, 107, 165, 0.10);

    --purple:           #6E4CB0;
    --purple-bg:        rgba(110, 76, 176, 0.10);

    /* Execute */
    --execute:          #0B5E4A;
    --execute-hover:    #094C3B;
    --execute-border:   #0B5E4A;
    --execute-glow:     rgba(11, 94, 74, 0.20);

    /* Shadows */
    --shadow-sm:  0 1px 0 rgba(20, 22, 20, 0.04), 0 1px 2px rgba(20, 22, 20, 0.04);
    --shadow-md:  0 1px 0 rgba(20, 22, 20, 0.05), 0 4px 14px rgba(20, 22, 20, 0.06);
    --shadow-lg:  0 1px 0 rgba(20, 22, 20, 0.06), 0 14px 40px rgba(20, 22, 20, 0.08);
    --shadow-xl:  0 1px 0 rgba(20, 22, 20, 0.08), 0 22px 60px rgba(20, 22, 20, 0.12);
    --shadow-glow-blue:   0 0 20px rgba(11, 94, 74, 0.10);
    --shadow-glow-green:  0 0 20px rgba(11, 94, 74, 0.12);
    --shadow-glow-red:    0 0 20px rgba(178, 42, 42, 0.10);
}
