/* ==========================================================================
   BillEase Design System — 1. Tokens
   Single source of truth for colour, type, spacing, radius, elevation and
   motion. Never hard-code these values in page CSS; reference the variables.
   Business themes (themes section) only swap the primary/accent family.
   ========================================================================== */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/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("../fonts/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 {
    /* Brand (default theme: Modern Blue) */
    --app-primary: #2f5bea;
    --app-primary-hover: #244bd0;
    --app-primary-rgb: 47, 91, 234;
    --app-on-primary: #ffffff;
    --app-primary-container: #e3eaff;
    --app-on-primary-container: #0f2a7a;
    --app-secondary: #56607a;
    --app-secondary-container: #e7eaf2;
    --app-accent: #00a3a3;
    --app-accent-container: #d8f4f2;

    /* Neutrals */
    --app-background: #f4f6fb;
    --app-surface: #ffffff;
    --app-surface-variant: #f0f3f9;
    --app-surface-sunken: #e9edf5;
    --app-text: #151b2c;
    --app-text-muted: #5d6679;
    --app-text-subtle: #8a93a6;
    --app-border: #e2e7f0;
    --app-border-strong: #cfd6e3;
    --app-scrim: rgba(12, 17, 32, 0.46);

    /* Status semantics: success = green, pending = amber, error = red, info = blue, inactive = grey */
    --app-success: #15924f;
    --app-success-container: #dcf5e6;
    --app-on-success-container: #0b5a30;
    --app-warning: #c27803;
    --app-warning-container: #fff1d6;
    --app-on-warning-container: #7a4a00;
    --app-error: #d93636;
    --app-error-container: #fde4e4;
    --app-on-error-container: #8e1c1c;
    --app-info: #1f6fe0;
    --app-info-container: #dfeeff;
    --app-on-info-container: #0f3f86;
    --app-inactive: #7b8496;
    --app-inactive-container: #eceff4;

    /* Typography */
    --app-font: "Inter", "Roboto", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans Devanagari", sans-serif;
    --app-font-mono: ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, monospace;
    --fs-display: 28px;
    --fs-title: 22px;       /* app page title */
    --fs-section: 18px;     /* section title */
    --fs-card-title: 16px;  /* card title */
    --fs-body: 15px;
    --fs-body-sm: 14px;
    --fs-support: 13px;
    --fs-caption: 12px;
    --lh-tight: 1.25;
    --lh-body: 1.5;

    /* Spacing scale */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;

    /* Radius scale */
    --r-xs: 10px;
    --r-sm: 14px;
    --r-md: 18px;
    --r-lg: 22px;
    --r-xl: 28px;
    --r-full: 999px;

    /* Elevation */
    --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.04);
    --shadow-medium: 0 4px 14px rgba(16, 24, 40, 0.08), 0 1px 3px rgba(16, 24, 40, 0.05);
    --shadow-floating: 0 12px 32px rgba(16, 24, 40, 0.16), 0 2px 6px rgba(16, 24, 40, 0.06);

    /* Motion */
    --ease-standard: cubic-bezier(0.2, 0, 0, 1);
    --ease-emphasized: cubic-bezier(0.3, 0, 0, 1);
    --dur-fast: 150ms;
    --dur-base: 200ms;
    --dur-slow: 250ms;

    /* Layout */
    --topbar-h: 60px;
    --bottom-nav-h: 68px;
    --sidebar-w: 256px;
    --page-pad: 16px;
    --content-max: 1180px;
    --content-form-max: 760px;
    --content-narrow-max: 560px;
    --control-h: 48px;
    --tap: 44px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);

    color-scheme: light;
}

/* ------------------------------------------------------------------------
   Business themes. Only the brand family changes; neutrals and status
   colours stay fixed so the admin app keeps its readability.
   ------------------------------------------------------------------------ */
:root[data-theme="gold"] {
    --app-primary: #9a6b00;
    --app-primary-hover: #845b00;
    --app-primary-rgb: 154, 107, 0;
    --app-primary-container: #fbeccb;
    --app-on-primary-container: #4a3300;
    --app-accent: #1c1b1f;
    --app-accent-container: #efe7da;
}

:root[data-theme="green"] {
    --app-primary: #16804a;
    --app-primary-hover: #106b3d;
    --app-primary-rgb: 22, 128, 74;
    --app-primary-container: #d6f3e2;
    --app-on-primary-container: #0a4428;
    --app-accent: #f28c28;
    --app-accent-container: #ffe9d3;
}

:root[data-theme="electronics"] {
    --app-primary: #0a6fd1;
    --app-primary-hover: #075eb3;
    --app-primary-rgb: 10, 111, 209;
    --app-primary-container: #d9ecff;
    --app-on-primary-container: #043768;
    --app-accent: #11b3d6;
    --app-accent-container: #d6f5fb;
}

:root[data-theme="teal"] {
    --app-primary: #0d8580;
    --app-primary-hover: #0a706c;
    --app-primary-rgb: 13, 133, 128;
    --app-primary-container: #d2f1ee;
    --app-on-primary-container: #033f3c;
    --app-accent: #2f80ed;
    --app-accent-container: #e0ecff;
}

:root[data-theme="purple"] {
    --app-primary: #7440cf;
    --app-primary-hover: #6333b6;
    --app-primary-rgb: 116, 64, 207;
    --app-primary-container: #ece2ff;
    --app-on-primary-container: #33126e;
    --app-accent: #e0457b;
    --app-accent-container: #fde1ea;
}
