/* ==========================================================================
   Procmone design tokens: the only place colors, type, radii, shadows, and
   density are defined (ADR 0002, "shadcn clean padat"). Every page loads this
   file first; feature stylesheets use var(--...) and never redefine :root.

   Visual language: shadcn/ui new-york-v4, Neutral. Density: the size="sm"
   scale (32px controls, 36px table rows) because the app is table-heavy.
   Breakpoints (media queries cannot read custom properties):
     sm 640px, md 768px, lg 1024px, xl 1280px. Below md the sidebar is a sheet.
   ========================================================================== */

/* Inter is self-hosted (wwwroot/vendor/inter, OFL): same type offline and no
   third-party requests. */
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../../vendor/inter/inter-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../../vendor/inter/inter-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: light;

    /* ---- Color: shadcn Neutral ---------------------------------------- */
    --background: #ffffff;
    --foreground: #0a0a0a;
    --card: #ffffff;
    --card-foreground: #0a0a0a;
    --popover: #ffffff;
    --popover-foreground: #0a0a0a;
    --primary: #171717;
    --primary-foreground: #fafafa;
    --secondary: #f5f5f5;
    --secondary-foreground: #171717;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --accent: #f5f5f5;
    --accent-foreground: #171717;
    --destructive: #dc2626;             /* red-600, as shadcn */
    --destructive-foreground: #fafafa;
    --border: #e5e5e5;
    --input: #e5e5e5;
    /* Darker than shadcn's neutral-400 so the 1px focus line keeps 3:1
       against white (WCAG 1.4.11); the halo around it stays soft. */
    --ring: #737373;

    /* Neutral steps for tables, tabs, facets, and secondary text. */
    --muted-subtle: #fafafa;            /* row hover, quiet fills */
    --muted-foreground-strong: #525252; /* secondary text, AA on --muted */
    --muted-foreground-subtle: #a3a3a3; /* scrollbars, neutral dots */
    --table-foreground: #262626;
    --border-subtle: #ededed;
    --border-strong: #d4d4d4;

    /* Status: the core color for dots and lines, soft for cells and rows,
       strong for text on soft. */
    --success: #22c55e;
    --success-soft: #f0fdf4;
    --success-border: #bbf7d0;
    --success-strong: #166534;
    --warning: #f59e0b;
    --warning-soft: #fffbeb;
    --warning-border: #fde68a;
    --warning-strong: #92400e;
    --destructive-soft: #fef2f2;
    --destructive-soft-hover: #fee2e2;
    --destructive-border: #fecaca;
    --destructive-strong: #991b1b;
    /* Summary target meters use the same three. */
    --on-target: var(--success);
    --at-risk: var(--warning);
    --below-target: #ef4444;

    /* Charts: muted so a chart is never the loudest block on a monochrome
       page. summary-chart-theme.js reads these through getComputedStyle. */
    --chart-1: #4f6d8a;
    --chart-2: #7fa89c;
    --chart-3: #c7a35f;
    --chart-4: #b87e76;
    --chart-5: #8a86ad;
    --chart-6: #6f96ad;
    --chart-7: #93a06a;
    --chart-8: #b99478;
    --chart-9: #a58aa6;
    --chart-10: #8c8782;

    /* ---- Type ------------------------------------------------------------ */
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --text-xs: 12px;     /* badges, captions */
    --text-sm: 13px;     /* controls, table cells, dense UI */
    --text-base: 14px;   /* body, long text, detail forms */
    --text-lg: 16px;     /* dialog and card titles */
    --text-xl: 18px;
    --text-2xl: 24px;    /* page titles, stat values */
    --text-3xl: 30px;    /* the dashboard's headline number (shadcn text-3xl) */

    /* ---- Radius: shadcn scale on a 10px base ------------------------------ */
    --radius: 0.625rem;                     /* 10px: cards, panels */
    --radius-sm: calc(var(--radius) * 0.6); /*  6px: controls, badges' inner parts */
    --radius-md: calc(var(--radius) * 0.8); /*  8px */
    --radius-lg: var(--radius);             /* 10px */
    --radius-xl: calc(var(--radius) * 1.4); /* 14px: dialogs, sheets */

    /* ---- Shadow: Tailwind v4 scale ---------------------------------------- */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
    --shadow-lift: 0 1px 2px 0 rgb(0 0 0 / .05), 0 24px 48px -24px rgb(0 0 0 / .18); /* landing cards */
    --overlay: rgb(0 0 0 / .5);
    --focus-halo: 0 0 0 4px color-mix(in srgb, var(--ring) 30%, transparent);

    /* ---- Density: shadcn size="sm" ---------------------------------------- */
    --control-height: 32px;     /* buttons, inputs, selects */
    --control-height-sm: 28px;  /* controls inside toolbars and table cells */
    --control-height-lg: 36px;
    --control-padding-x: 12px;
    --control-font: var(--text-sm);
    --input-font: var(--text-sm);
    --row-height: 36px;
    --table-header-height: 36px;
    --table-cell-padding-x: 8px;
    --table-font: var(--text-sm);
    --card-padding: 16px;
    --badge-height: 20px;
    --dialog-padding: 20px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;

    /* Sidebar (app-sidebar.css) */
    --sidebar-width: 240px;
    --sidebar-foreground: #525252;

    /* Motion */
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --duration-fast: 120ms;
    --duration: 200ms;
}

/* Touch screens: larger hit areas and 16px inputs (smaller input text makes
   iOS zoom in), without loosening the desktop density. */
@media (pointer: coarse) {
    :root {
        --control-height: 40px;
        --control-height-sm: 36px;
        --control-height-lg: 44px;
        --row-height: 44px;
        --input-font: 16px;
    }
}

/* shadcn focus: a 1px ring line plus a soft halo. The transparent-free outline
   also shows in forced-colors mode. */
:focus-visible {
    outline: 1px solid var(--ring);
    outline-offset: 0;
    box-shadow: var(--focus-halo);
}
