/*!
 * POPNIX AUTH: design tokens shared by the login, account and error pages (themes/popnix/common).
 * Same palette, type and motion as POPNIX Cloud (popnix_cloud assets/css/cloud.css, palette v2 2026-10-30):
 * ONE flat accent (POP cobalt), ink neutrals, a theme-invariant night deck for the art, FC Vision 400/500/700.
 * Rules: tokens only in the theme CSS (no raw hex twice) · no gradient on a control · no coloured glow · no coloured bars
 * · every animation has a prefers-reduced-motion fallback.
 */
:root,
[data-theme="light"] {
    --px-accent: #1a62d5;
    --px-accent-deep: #17448c;
    --px-accent-rgb: 26, 98, 213;
    --px-accent-text: #1854b4;
    --px-accent-soft: rgba(26, 98, 213, .085);

    --px-bg: #f4f5f7;
    --px-surface: #ffffff;
    --px-surface-2: #f8f9fa;
    --px-surface-3: #eef0f3;
    --px-border: #e3e6ea;
    --px-border-strong: #cdd2d9;
    --px-input-border: #8c95a3;
    --px-text: #12161c;
    --px-text-2: #353c46;
    --px-muted: #5f6875;
    --px-faint: #98a0ab;
    --px-placeholder: #6b7480;
    --px-hover: rgba(18, 22, 28, .045);
    --px-press: rgba(18, 22, 28, .08);

    --px-ok: #12a150;   --px-ok-rgb: 18, 161, 80;   --px-ok-text: #0b7a3b;   --px-ok-soft: #e3f6ea;
    --px-warn: #e8930c; --px-warn-rgb: 232, 147, 12; --px-warn-text: #a35f00; --px-warn-soft: #fdf1dc;
    --px-crit: #e03b3b; --px-crit-rgb: 224, 59, 59;  --px-crit-text: #b42323; --px-crit-soft: #fde6e6;
    --px-info: #0e8fc2; --px-info-rgb: 14, 143, 194; --px-info-text: #0a6d94; --px-info-soft: #e1f2fa;

    --px-shadow-xs: 0 1px 2px rgba(18, 22, 28, .05);
    --px-shadow-sm: 0 1px 2px rgba(18, 22, 28, .04), 0 3px 10px -6px rgba(18, 22, 28, .08);
    --px-shadow-md: 0 2px 6px rgba(18, 22, 28, .05), 0 12px 28px -12px rgba(18, 22, 28, .16);
    --px-shadow-lg: 0 8px 20px rgba(18, 22, 28, .06), 0 28px 64px -18px rgba(18, 22, 28, .24);
    --px-ring: 0 0 0 3px rgba(var(--px-accent-rgb), .28);

    /* the night deck: theme-INVARIANT, never overridden in dark mode */
    --px-night-0: #05080d;
    --px-night-1: #0a0f17;
    --px-night-2: #0f1622;
    --px-night-3: #182235;
    --px-night-text: #e9eef6;
    --px-night-muted: #9aa6b8;
    --px-night-line: rgba(160, 180, 210, .16);
    --px-night-sodium: #ffb547;
    --px-night-led: #3ddc84;

    --px-r-xl: 1.1rem;
    --px-r-lg: .8rem;
    --px-r-md: .55rem;
    --px-r-sm: .38rem;
    --px-r-pill: 999px;
    --px-control-h: 2.95rem;
    --px-control-h-sm: 2.2rem;
    --px-on-accent: #ffffff;

    /* Google's sign-in button follows Google's branding rules, not the kit (same values as POPNIX Cloud) */
    --px-google-bg: #ffffff;
    --px-google-bg-hover: #f1f3f4;
    --px-google-border: #747775;
    --px-google-text: #1f1f1f;

    --px-ease: cubic-bezier(.16, 1, .3, 1);
    --px-ease-pop: cubic-bezier(.34, 1.56, .64, 1);
    --px-ease-io: cubic-bezier(.65, 0, .35, 1);
    --px-dur-micro: .18s;
    --px-dur-in: .42s;

    --px-font: "fc-vision", system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif;
    color-scheme: light;
}

/* staff realm: amber accent, like the POPNIX Cloud admin portal */
.px-staff {
    --px-accent: #d97706;
    --px-accent-deep: #92400e;
    --px-accent-rgb: 217, 119, 6;
    --px-accent-text: #a35f00;
    --px-accent-soft: rgba(217, 119, 6, .1);
    --px-on-accent: #1c1300;
}

[data-theme="dark"] {
    --px-accent: #5f94ef;
    --px-accent-deep: #2c74e8;
    --px-accent-rgb: 95, 148, 239;
    --px-accent-text: #92b6f5;
    --px-accent-soft: rgba(95, 148, 239, .15);

    --px-bg: #0b0e13;
    --px-surface: #12161d;
    --px-surface-2: #0f1318;
    --px-surface-3: #1a1f28;
    --px-border: rgba(160, 170, 185, .14);
    --px-border-strong: rgba(160, 170, 185, .26);
    --px-input-border: rgba(160, 170, 185, .38);
    --px-text: #e8ebf0;
    --px-text-2: #c3c9d2;
    --px-muted: #8f98a6;
    --px-faint: #66707e;
    --px-placeholder: #7d8694;
    --px-hover: rgba(160, 170, 185, .08);
    --px-press: rgba(160, 170, 185, .14);

    --px-ok-text: #5fd690;   --px-ok-soft: rgba(18, 161, 80, .17);
    --px-warn-text: #ffc266; --px-warn-soft: rgba(232, 147, 12, .17);
    --px-crit-text: #ff8a8a; --px-crit-soft: rgba(224, 59, 59, .18);
    --px-info-text: #6cc8ee; --px-info-soft: rgba(14, 143, 194, .18);

    --px-shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --px-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 16px -8px rgba(0, 0, 0, .5);
    --px-shadow-md: 0 2px 6px rgba(0, 0, 0, .3), 0 16px 36px -14px rgba(0, 0, 0, .62);
    --px-shadow-lg: 0 10px 24px rgba(0, 0, 0, .35), 0 30px 70px -20px rgba(0, 0, 0, .75);
    --px-ring: 0 0 0 3px rgba(var(--px-accent-rgb), .34);
    --px-google-bg: #131314;
    --px-google-bg-hover: #202124;
    --px-google-border: #8e918f;
    --px-google-text: #e3e3e3;
    color-scheme: dark;
}
[data-theme="dark"] .px-staff,
.px-staff[data-theme="dark"] {
    --px-accent: #f59e0b;
    --px-accent-rgb: 245, 158, 11;
    --px-accent-deep: #d97706;
    --px-accent-text: #fbbf24;
    --px-accent-soft: rgba(245, 158, 11, .15);
}
