/*
 * GUARDIAN GT — Design System
 * Extracted from Stitch Enterprise Ledger DESIGN.md
 * Material Design 3 tokens adapted for SAP-style enterprise UI
 */

/* ──────────────────────────────────────────────── */
/* CSS Custom Properties (Design Tokens)            */
/* ──────────────────────────────────────────────── */
:root {
    /* Primary palette */
    --primary: #003d71;
    --primary-container: #005499;
    --on-primary: #ffffff;
    --on-primary-container: #a5c9ff;
    --primary-fixed: #d4e3ff;
    --primary-fixed-dim: #a4c9ff;
    --surface-tint: #1b60a5;

    /* Secondary palette */
    --secondary: #53606c;
    --secondary-container: #d4e1ef;
    --on-secondary: #ffffff;
    --on-secondary-container: #576470;
    --secondary-fixed: #d7e4f2;

    /* Tertiary */
    --tertiary: #003c75;
    --tertiary-container: #00539e;

    /* Surface palette */
    --surface: #f7f9fc;
    --surface-bright: #f7f9fc;
    --surface-dim: #d8dadd;
    --surface-container: #eceef1;
    --surface-container-low: #f2f4f7;
    --surface-container-high: #e6e8eb;
    --surface-container-highest: #e0e3e6;
    --surface-container-lowest: #ffffff;
    --surface-variant: #e0e3e6;
    --on-surface: #191c1e;
    --on-surface-variant: #424751;
    --background: #f7f9fc;

    /* Status colors (PRD states) */
    --status-preliminar: #E97B10;
    --status-creado: #2E7D32;
    --status-cancelado: #D32F2F;

    /* Error */
    --error: #ba1a1a;
    --error-container: #ffdad6;

    /* Outline */
    --outline: #727782;
    --outline-variant: #c2c6d2;

    /* SAP Toolbar */
    --sap-toolbar-bg: #354A5F;

    /* Layout tokens */
    --table-header: #F2F2F2;
    --border-subtle: #DEE2E6;

    /* Spacing tokens */
    --toolbar-height: 48px;
    --sidebar-width: 240px;
    --gutter: 16px;
    --form-row-gap: 20px;
    --table-cell-padding: 10px 12px;
    --input-padding: 8px 12px;

    /* Border radius */
    --radius-sm: 0.125rem;
    --radius-md: 0.25rem;
    --radius-lg: 0.5rem;
    --radius-full: 0.75rem;
}

/* ──────────────────────────────────────────────── */
/* Typography Scale                                 */
/* ──────────────────────────────────────────────── */
.text-headline-lg {
    font-size: 24px;
    line-height: 30px;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
}
.text-headline-md {
    font-size: 20px;
    line-height: 25px;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
}
.text-body-lg {
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    font-family: Arial, Helvetica, sans-serif;
}
.text-body-md {
    font-size: 14px;
    line-height: 17.5px;
    font-weight: 400;
    font-family: Arial, Helvetica, sans-serif;
}
.text-label-md {
    font-size: 12px;
    line-height: 15px;
    letter-spacing: 0.02em;
    font-weight: 700;
    font-family: Arial, Helvetica, sans-serif;
}
.text-data-mono {
    font-size: 13px;
    line-height: 16.25px;
    font-weight: 400;
    font-family: 'Courier New', Courier, monospace;
}

/* ──────────────────────────────────────────────── */
/* Global Reset & Base                              */
/* ──────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 17.5px;
    color: var(--on-surface);
    background: var(--surface-bright);
    overflow: hidden;
    height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ──────────────────────────────────────────────── */
/* Scrollbar (SAP Enterprise)                       */
/* ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* ──────────────────────────────────────────────── */
/* Material Symbols                                 */
/* ──────────────────────────────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
    vertical-align: middle;
    font-size: 18px;
}

/* ──────────────────────────────────────────────── */
/* Utilities                                        */
/* ──────────────────────────────────────────────── */
.color-primary { color: var(--primary); }
.color-secondary { color: var(--secondary); }
.color-error { color: var(--error); }
.color-success { color: var(--status-creado); }
.color-warning { color: var(--status-preliminar); }
.bg-primary { background-color: var(--primary); }
.bg-surface { background-color: var(--surface); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
