/* =========================================================
   Virtual F&I — Design Tokens
   All scoped .razor.css files reference these variables.
   ========================================================= */
:root {
    /* Backgrounds */
    --bg-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;

    /* Text */
    --text-100: #f1f5f9;
    --text-200: #e2e8f0;
    --text-300: #cbd5e1;
    --text-400: #94a3b8;

    /* Borders */
    --border: rgba(30, 41, 59, 0.8);
    --border-strong: #334155;

    /* Blue */
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;

    /* Indigo */
    --indigo-300: #a5b4fc;
    --indigo-400: #818cf8;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;

    /* Emerald */
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;

    /* Amber */
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;

    /* Purple / Pink */
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --pink-500: #ec4899;

    /* Rose */
    --rose-300: #fda4af;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
}

/* Reset & base */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-950);
    color: var(--text-100);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
}

button {
    font-family: inherit;
}

a { color: inherit; }

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--slate-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-600);
}

/* =========================================================
   Login page — centered card, dark surface, raised shadow
   ========================================================= */
body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.10), transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(99, 102, 241, 0.10), transparent 50%),
        var(--bg-950);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--slate-900);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 40px 36px 32px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 20px 50px -12px rgba(0, 0, 0, 0.7),
        0 8px 16px -8px rgba(0, 0, 0, 0.5);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue-500), var(--indigo-500));
    color: var(--text-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.45);
}

.login-brand-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-100);
    letter-spacing: 0.2px;
}

.login-heading {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-100);
    margin-bottom: 8px;
}

.login-sub {
    font-size: 14px;
    color: var(--text-400);
    line-height: 1.5;
    margin-bottom: 24px;
}

.login-error {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: var(--rose-300);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-200);
}

.login-field input {
    background: var(--slate-800);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-100);
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-field input:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.login-field input::placeholder {
    color: var(--slate-500);
}

.login-submit {
    margin-top: 8px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(180deg, var(--blue-500), var(--blue-600));
    color: var(--text-100);
    border: 1px solid var(--blue-600);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 6px 14px -4px rgba(37, 99, 235, 0.55);
    transition: transform 0.05s, box-shadow 0.15s, background 0.15s;
}

.login-submit:hover {
    background: linear-gradient(180deg, var(--blue-400), var(--blue-500));
}

.login-submit:active {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 3px 8px -4px rgba(37, 99, 235, 0.5);
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.login-submit .spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 9999px;
    animation: vfi-spin 0.7s linear infinite;
}

.login-submit.is-loading .spinner {
    display: inline-block;
}

.login-submit.is-loading {
    cursor: wait;
    opacity: 0.85;
}

@keyframes vfi-spin {
    to { transform: rotate(360deg); }
}
