/* Boiling Flask design tokens (spec 11.1). The ONLY stylesheet allowed to hold raw colours:
 * app.css uses var(--bf-*) exclusively. One theme ("Sunset", spec 11.2); a later shade or dark
 * mode is a second block that redefines these variables, the component rules do not change. */

:root {
    /* Brand and surfaces */
    --bf-primary: #E8793F;
    --bf-primary-hover: #B5521E;          /* links and hover text: 4.5:1+ on white */
    --bf-primary-soft: #FEF2EA;           /* sidebar panel, selected rows */
    --bf-primary-soft-strong: #FCE4D4;    /* hover on soft surfaces */
    --bf-bg: #F4F6EF;                     /* warm grey-green page */
    --bf-surface: #FFFFFF;
    --bf-lock-scrim: rgba(31, 36, 48, .55);  /* veil over a deactivated shop */
    --bf-paper: #FBF6E6;                  /* login card over the desert scene */
    --bf-paper-field: #FFFDF6;            /* input fill on the paper card */
    --bf-ochre: #C9A23C;                  /* desert ochre: borders over the scene */
    --bf-ochre-deep: #6B5A22;             /* tint of the paper card's shadow */
    --bf-surface-muted: #F8FAF4;          /* list header band */
    --bf-row-hover: #F3F6EC;              /* soft sage row hover */
    --bf-border: #E3E6DA;

    /* Text */
    --bf-text: #1F2430;
    --bf-text-muted: #7A8090;
    --bf-text-label: #6E645C;             /* small uppercase labels (5.8:1 on white) */

    /* Feedback */
    --bf-success: #1A8A4A;
    --bf-success-soft: #E6F6EC;
    --bf-warning: #9A5B00;
    --bf-warning-soft: #FFF1DC;
    --bf-danger: #C62828;
    --bf-danger-soft: #FDE8E8;

    /* Job card status: progressive sage greens */
    --bf-status-open: #E5EEDE;
    --bf-status-open-text: #2F4A24;
    --bf-status-assigned: #C8DCBC;
    --bf-status-assigned-text: #2F4A24;
    --bf-status-progress: #9DC08B;
    --bf-status-progress-text: #233A1A;
    --bf-status-done: #4F7D3C;
    --bf-status-done-text: #FFFFFF;
    --bf-status-cancel: #F6E7E5;
    --bf-status-cancel-text: #9B3A30;
    --bf-status-idle: #ECE7E2;
    --bf-status-idle-text: #6E645C;
    --bf-status-current-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);

    /* Radius */
    --bf-radius-sm: 8px;
    --bf-radius-md: 12px;
    --bf-radius-lg: 16px;
    --bf-radius-pill: 999px;

    /* Shadows */
    --bf-shadow-hairline: 0 1px 3px rgba(30, 30, 40, .04);
    --bf-shadow-card: 0 4px 16px rgba(30, 30, 40, .05);
    --bf-shadow-hover: 0 8px 24px rgba(30, 30, 40, .09);
    --bf-shadow-raised: 0 14px 44px rgba(30, 30, 40, .12);

    /* Spacing and shell sizes */
    --bf-space-page: 24px;
    --bf-space-card: 24px;
    --bf-space-gap: 16px;
    --bf-navbar-height: 52px;
    --bf-sidebar-width: 232px;
    --bf-sidebar-width-collapsed: 64px;

    /* ---- Derived tokens (builder's choices on top of 11.1; still the one place for colour) ---- */
    --bf-on-primary: #FFFFFF;                                                       /* text on brand orange */
    --bf-on-danger: #FFFFFF;                                                        /* text on the locked bar */
    --bf-radius-btn: 10px;
    --bf-shadow-primary: 0 3px 8px color-mix(in srgb, var(--bf-primary) 30%, transparent);
    --bf-focus-ring: 0 0 0 3px color-mix(in srgb, var(--bf-primary) 18%, transparent);
    --bf-backdrop: rgba(31, 36, 48, .38);                                           /* modal and phone menu scrim */
    --bf-danger-border: color-mix(in srgb, var(--bf-danger) 22%, transparent);
    --bf-warning-border: color-mix(in srgb, var(--bf-warning) 22%, transparent);
    --bf-success-border: color-mix(in srgb, var(--bf-success) 22%, transparent);
    --bf-sidebar-edge: color-mix(in srgb, var(--bf-primary) 45%, transparent);      /* collapse strip on hover */

    /* Calendar load (calendar spec 3): the date cell carries the colour, cards stay white. */
    --bf-load-free: var(--bf-surface);                                              /* 0 unfinished cards */
    --bf-load-ok: var(--bf-success-soft);                                           /* 1 to 2 */
    --bf-load-full: var(--bf-warning-soft);                                         /* 3 or more */
    --bf-load-past: var(--bf-status-idle);                                          /* days before today */

    /* Login over the desert scene */
    --bf-login-glow: color-mix(in srgb, var(--bf-primary) 18%, transparent);
    --bf-login-card-bg: color-mix(in srgb, var(--bf-paper) 90%, transparent);
    --bf-login-card-border: color-mix(in srgb, var(--bf-ochre) 22%, transparent);
    --bf-login-card-shadow: 0 18px 40px -16px color-mix(in srgb, var(--bf-ochre-deep) 38%, transparent);
    --bf-login-field-bg: color-mix(in srgb, var(--bf-paper-field) 85%, transparent);
    --bf-login-field-border: color-mix(in srgb, var(--bf-ochre) 28%, var(--bf-border));
    --bf-login-scene-opacity: .45;
    --bf-smoke: #E39B95;                                                             /* the RV's exhaust plume: mostly pink (6 of 8 puffs), */
    --bf-smoke-violet: #8E5CC9;                                                      /* with one violet puff */
    --bf-smoke-mint: #5FBF7E;                                                        /* and one mint puff */
    --bf-mask-solid: #000000;                                                        /* opaque stop for mask fades */

    /* PDF receipts (receipt.css): black on white, whatever the screen theme */
    --bf-print-ink: #000000;
    --bf-print-paper: #FFFFFF;
    --bf-print-rule: #8A8A8A;                                                        /* box borders and thin rules */

    /* Type and motion (spec 11.4): system fonts only, Inter when installed locally */
    --bf-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bf-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --bf-ease: cubic-bezier(.2, .7, .3, 1);
    --bf-fast: .15s;
    --bf-slow: .2s;
}

/* Phones: tighter page gutter and card padding so content keeps usable width. */
@media (max-width: 767.98px) {
    :root {
        --bf-space-page: 12px;
        --bf-space-card: 16px;
    }
}
