/**
 * Local theme overrides for Auth Service.
 *
 * tokens.css is vendored from LhamacorpLabs/design-system and must not be
 * hand-edited. This file is loaded right after it and re-points the shared
 * variables at this app's look (neutral surfaces, near-black primary
 * actions, a single cobalt brand accent), and adds the app-only tokens
 * the stylesheets use. Delete a variable here to fall back to the shared
 * design-system value.
 */

:root {
    --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

    /* App surfaces */
    --app-bg: #f7f7f8;
    --card-bg: #ffffff;
    --sidebar-bg: #fbfbfc;
    --border-subtle: #eeeef1;
    --overlay: rgba(14, 14, 18, 0.36);
    --code-bg: #0e0e12;
    --code-border: #2a2a33;
    --code-text: #e4e4e9;
    --code-muted: #8a8a96;
    --code-header: #8ea4ff;
    --code-payload: #f0b3e2;

    /* Shared design-system tokens, re-pointed */
    --surface: #fbfbfc;
    --surface-hover: #f4f4f6;
    --surface-alt: #eeeef1;
    --panel-bg: #fbfbfc;

    --text-primary: #111114;
    --text-secondary: #5b5b66;
    --text-muted: #6b6b76;
    --text-faint: #a1a1aa;

    --accent: #111114;
    --accent-hover: #2a2a30;
    --accent-contrast: #ffffff;
    --accent-subtle: rgba(17, 17, 20, 0.05);
    --accent-shadow: rgba(17, 17, 20, 0.12);

    /* Brand accent: focus, selection, active nav, avatars, progress */
    --brand: #2e5bff;
    --brand-hover: #1d3fd1;
    --brand-contrast: #ffffff;
    --brand-subtle: #eef1ff;
    --brand-tint: #f5f7ff;
    --brand-text: #2342c9;

    --border: #e6e6ea;
    --border-hover: #d4d4da;
    --border-focus: #2e5bff;
    --focus-ring: rgba(46, 91, 255, 0.18);
    --input-bg: #ffffff;

    --success: #12a06e;
    --success-bg: #e8f6ef;
    --success-text: #0f6e4e;
    --success-border: rgba(18, 160, 110, 0.25);
    --error-bg: #fef0f0;
    --error-text: #b42318;
    --error-border: rgba(229, 72, 77, 0.3);
    --danger: #d92d20;
    --danger-hover: #b42318;
    --warning: #e08a00;
    --warning-text: #8a4b00;
    --warning-bg: #fff4e5;
    --warning-border: rgba(224, 138, 0, 0.3);

    --shadow-sm: 0 1px 2px rgba(17, 17, 20, 0.04);
    --shadow-md: 0 1px 2px rgba(17, 17, 20, 0.04), 0 12px 32px rgba(17, 17, 20, 0.06);
    --shadow-lg: 0 24px 64px rgba(14, 14, 18, 0.24), 0 0 0 1px rgba(14, 14, 18, 0.06);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 16px;

    /* Role chips */
    --role-admin-bg: #eef1ff;     --role-admin-fg: #2342c9;
    --role-user-bg: #f1f1f3;      --role-user-fg: #3f3f46;
    --role-moderator-bg: #fff4e5; --role-moderator-fg: #9a4a00;
    --role-service-bg: #e8f6f4;   --role-service-fg: #0b6559;
    --role-system-bg: #f4ecff;    --role-system-fg: #6a2bc2;
    --role-vpn-bg: #eaf4ff;       --role-vpn-fg: #0b5cad;
    --role-tester-bg: #fdeef3;    --role-tester-fg: #a3164a;
}

:root[data-theme='dark'] {
    --app-bg: #0b0b0e;
    --card-bg: #141418;
    --sidebar-bg: #0f0f13;
    --border-subtle: #1f1f26;
    --overlay: rgba(0, 0, 0, 0.6);
    --code-bg: #000000;
    --code-border: #23232b;

    --surface: #18181d;
    --surface-hover: #1e1e24;
    --surface-alt: #26262e;
    --panel-bg: #141418;

    --text-primary: #ededf0;
    --text-secondary: #a1a1aa;
    --text-muted: #8b8b96;
    --text-faint: #5b5b66;

    --accent: #ffffff;
    --accent-hover: #e4e4e7;
    --accent-contrast: #0b0b0e;
    --accent-subtle: rgba(255, 255, 255, 0.06);
    --accent-shadow: rgba(255, 255, 255, 0.1);

    --brand: #5b7cff;
    --brand-hover: #7c97ff;
    --brand-contrast: #ffffff;
    --brand-subtle: rgba(46, 91, 255, 0.18);
    --brand-tint: rgba(46, 91, 255, 0.1);
    --brand-text: #a9b9ff;

    --border: #26262e;
    --border-hover: #34343e;
    --border-focus: #5b7cff;
    --focus-ring: rgba(91, 124, 255, 0.28);
    --input-bg: #0f0f13;

    --success: #34d399;
    --success-bg: rgba(18, 160, 110, 0.16);
    --success-text: #4ade9f;
    --success-border: rgba(52, 211, 153, 0.28);
    --error-bg: rgba(248, 113, 113, 0.12);
    --error-text: #f87171;
    --error-border: rgba(248, 113, 113, 0.3);
    --danger: #f87171;
    --danger-hover: #fca5a5;
    --warning: #f0b429;
    --warning-text: #f0b429;
    --warning-bg: rgba(240, 180, 41, 0.14);
    --warning-border: rgba(240, 180, 41, 0.3);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);

    --role-admin-bg: rgba(46, 91, 255, 0.18);   --role-admin-fg: #a9b9ff;
    --role-user-bg: #1f1f26;                    --role-user-fg: #d4d4d8;
    --role-moderator-bg: rgba(224, 138, 0, 0.16); --role-moderator-fg: #fbbf6a;
    --role-service-bg: rgba(13, 148, 136, 0.18); --role-service-fg: #5eead4;
    --role-system-bg: rgba(124, 58, 237, 0.2);  --role-system-fg: #c4a5ff;
    --role-vpn-bg: rgba(14, 116, 220, 0.2);     --role-vpn-fg: #8cc8ff;
    --role-tester-bg: rgba(219, 39, 119, 0.18); --role-tester-fg: #f9a8d4;
}
