/*
 * Shiftflow's palette, in one place (M7-04).
 *
 * Three surfaces read this file: the public page, the employee screens — including the copy a
 * phone keeps for offline and the offline page itself — and the panel, which reads it through
 * the Vite build (`resources/css/filament/admin/theme.css` imports it, and `app.css` maps it
 * into Tailwind's `@theme`). It sits under `public/` because two of those three have no build
 * step and the offline page must render from the cache without one.
 *
 * Only tokens live here. Every selector belongs to the surface that needs it.
 *
 * The two brand values are taken from the mark itself (`public/icons/icon-512.png`): the ink
 * square every screen is drawn on, and the amber minute hand. `--brand-amber-ink` is the same
 * amber darkened to amber-700, because 500 does not read as text on a light page.
 */

:root {
    color-scheme: light;

    /* The mark. */
    --brand-ink: #111827;
    --brand-amber: #f59e0b;
    --brand-amber-ink: #b45309;
    --brand-ring: #ffffff;

    /* Ink, lines and surfaces. */
    --ink: var(--brand-ink);
    --ink-soft: #4b5563;
    --ink-faint: #6b7280;
    --line: #e5e7eb;
    --surface: #ffffff;
    --page: #f3f4f6;
    --danger: #b91c1c;

    /* The one accent: the mark's amber, and the tints it sits in. */
    --accent: var(--brand-amber-ink);
    --accent-ink: var(--brand-amber-ink);
    --accent-soft: #fffbeb;
    --accent-line: #fde68a;

    /* The one button. */
    --button-bg: var(--brand-ink);
    --button-ink: #ffffff;
    --button-bg-hover: #1f2937;

    /* The three kinds of hour the product knows, in the two strengths each is used at.

       `--kind-*` is the roster grid's highlighter: the cell itself is the colour you type into,
       so it is a step stronger, and it stays light in dark mode on purpose (a highlighter on
       paper). `--tint-*` is the pale version — the sample strip and chips — and follows the
       scheme. A screen picks one pair; it does not invent a fourth shade. */
    --kind-worked: #dbeafe;
    --kind-worked-ink: #1e40af;
    --kind-leave: #dcfce7;
    --kind-leave-ink: #166534;
    --kind-unpaid: #fef3c7;
    --kind-unpaid-ink: #92400e;

    --tint-worked: #eaf1fe;
    --tint-worked-ink: #1d4ed8;
    --tint-leave: #e8f6ec;
    --tint-leave-ink: #15803d;
    --tint-unpaid: #fdf3e3;
    --tint-unpaid-ink: #b45309;

    /* A band that is cool rather than white — used once, to separate the answers. */
    --cool: #f7f9fc;

    /* The two washes behind the hero: warm at the top-left, cool at the top-right. They are
       tints of the brand and of the worked-kind blue, not new colours. */
    --wash-warm: rgb(245 158 11 / 0.18);
    --wash-cool: rgb(29 78 216 / 0.09);

    /* Notices: a saved page, a flash after a POST. */
    --notice-bg: #fef3c7;
    --notice-line: #fcd34d;
    --notice-ink: #92400e;

    /* Type and shape, so a card in the panel and a card on the phone agree. */
    --font-sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;
    --radius-card: 14px;
    --radius-control: 12px;
    --radius-pill: 999px;
}

/*
 * A forecourt phone in the sun and a desk at night both read this file. The brand values do
 * not move; the inks, lines and tints invert around them.
 */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --ink: #f3f4f6;
        --ink-soft: #d1d5db;
        --ink-faint: #9ca3af;
        --line: #374151;
        --surface: #1f2937;
        --page: #111827;
        --danger: #f87171;

        --accent-ink: #fbbf24;
        --accent-soft: #292524;
        --accent-line: #78350f;

        --button-bg: #f3f4f6;
        --button-ink: #111827;
        --button-bg-hover: #e5e7eb;

        --notice-bg: #292524;
        --notice-line: #78350f;
        --notice-ink: #fbbf24;

        /* The pale kinds, darkened to sit on a night surface rather than glowing on it. The
           highlighter pair above does not move: a roster cell stays a light square in either
           scheme, the same way a real highlighter does. */
        --tint-worked: #1e2a44;
        --tint-worked-ink: #93b4fd;
        --tint-leave: #16301f;
        --tint-leave-ink: #86efac;
        --tint-unpaid: #33260f;
        --tint-unpaid-ink: #fcd34d;

        --cool: #182130;

        --wash-warm: rgb(245 158 11 / 0.10);
        --wash-cool: rgb(147 180 253 / 0.08);
    }
}
