﻿/* Orion Auth - Fluent sober (PME friendly)
   Scoped to body.orion-auth + theming driven by html[data-theme]
*/

.orion-auth {
    /* --- Orion brand (stable) --- */
    --orion-brand-blue: #1f3a5f;
    --orion-brand-green: #00561b;
    /* Layout */
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* =========================================================
   THEME TOKENS (from your Fluent green palettes)
   The JS sets: <html data-theme="light|dark">
   ========================================================= */

html[data-theme="light"] .orion-auth {
    /* Fluent neutrals (light) */
    --bg: #fafafa; /* colorNeutralBackground2 */
    --surface: #ffffff; /* colorNeutralBackground1 */
    --surface-2: #ffffff;
    --border: #d1d1d1; /* colorNeutralStroke1 */
    --border-2: #e0e0e0; /* colorNeutralStroke2 */
    --text: #242424; /* colorNeutralForeground1 */
    --muted: #616161; /* colorNeutralForeground3 */
    /* Fluent brand (green) */
    --accent: #3d7442; /* colorBrandBackground */
    --accent-hover: #286732; /* colorBrandBackgroundHover */
    --accent-pressed: #0c3e16; /* colorBrandBackgroundPressed */
    --accent-weak: rgba(61, 116, 66, 0.18);
    /* Errors (Fluent red-ish) */
    --danger-text: #991b1b;
    --danger-border: rgba(188, 47, 50, 0.45); /* colorPaletteRedForeground1-ish */
    --danger-bg: rgba(253, 246, 246, 1.0); /* colorPaletteRedBackground1 */
    /* Header band */
    --header-bg: rgba(31, 58, 95, 0.10); /* Orion blue tint */
    --header-border: rgba(31, 58, 95, 0.18);
    /* Focus ring */
    --focus: 0 0 0 3px var(--accent-weak);
    /* Radius / shadow */
    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    /* Small strokes for chips/footer */
    --stroke-subtle: rgba(0, 0, 0, 0.10);
    --fill-subtle: rgba(0, 0, 0, 0.03);
}

html[data-theme="dark"] .orion-auth {
    /* Fluent neutrals (dark) */
    --bg: #1f1f1f; /* colorNeutralBackground2 */
    --surface: #292929; /* colorNeutralBackground1 */
    --surface-2: #2f2f2f;
    --border: #525252; /* colorNeutralStroke2 */
    --border-2: #666666; /* colorNeutralStroke1 */
    --text: #ffffff; /* colorNeutralForeground1 */
    --muted: #adadad; /* colorNeutralForeground3 */
    /* Fluent brand (green) */
    --accent: #286732; /* colorBrandBackground */
    --accent-hover: #3d7442; /* colorBrandBackgroundHover */
    --accent-pressed: #0c3e16; /* colorBrandBackgroundPressed */
    --accent-weak: rgba(40, 103, 50, 0.28);
    /* Errors */
    --danger-text: #f5b4b6;
    --danger-border: rgba(227, 125, 128, 0.55); /* colorPaletteRedForeground1 */
    --danger-bg: rgba(63, 16, 17, 0.85); /* colorPaletteRedBackground1 */
    /* Header band */
    --header-bg: rgba(31, 58, 95, 0.22);
    --header-border: rgba(255, 255, 255, 0.10);
    /* Focus ring */
    --focus: 0 0 0 3px var(--accent-weak);
    /* Radius / shadow */
    --radius: 10px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --stroke-subtle: rgba(255, 255, 255, 0.12);
    --fill-subtle: rgba(255, 255, 255, 0.05);
}

/* =========================================================
   PAGE LAYOUT
   ========================================================= */

.orion-auth .auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.orion-auth .auth-backdrop {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: center;
}

@media (min-width: 980px) {
    .orion-auth .auth-backdrop {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 28px;
    }
}

/* Left column (hero) */
.orion-auth .auth-hero {
    display: none;
}

@media (min-width: 980px) {
    .orion-auth .auth-hero {
        display: block;
        padding: 22px 8px;
    }
}

.orion-auth .auth-hero h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    letter-spacing: 0.2px;
}

.orion-auth .auth-hero p {
    margin: 0 0 18px 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.orion-auth .auth-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.orion-auth .auth-chip {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--stroke-subtle);
    background: var(--fill-subtle);
    color: var(--muted);
    font-size: 13px;
}

/* =========================================================
   CARD
   ========================================================= */

.orion-auth .auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.orion-auth .auth-card-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
}

.orion-auth .auth-logo {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 30px;
    background: var(--orion-brand-blue);
}

.orion-auth .auth-brand {
    display: grid;
}

.orion-auth .auth-brand-title {
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 24px;
    line-height: 1.05;
}

.orion-auth .auth-brand-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-top: 2px;
}

.orion-auth .auth-card-body {
    padding: 16px 18px 18px 18px;
}

.orion-auth .auth-h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 2px 0 10px 0;
}

.orion-auth .auth-help {
    margin: 0 0 14px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

/* =========================================================
   FORM CONTROLS
   ========================================================= */

.orion-auth .auth-form {
    display: grid;
    gap: 12px;
}

.orion-auth .auth-field {
    display: grid;
    gap: 6px;
}

.orion-auth .auth-label {
    font-size: 13px;
    font-weight: 650;
}

.orion-auth .auth-input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--surface-2);
    color: var(--text);
}

    .orion-auth .auth-input:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: var(--focus);
    }

.orion-auth .auth-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.orion-auth .auth-small {
    color: var(--muted);
    font-size: 12.5px;
}

.orion-auth .auth-btn {
    height: 36px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

    .orion-auth .auth-btn:hover {
        background: var(--accent-hover);
        border-color: var(--accent-hover);
    }

    .orion-auth .auth-btn:active {
        background: var(--accent-pressed);
        border-color: var(--accent-pressed);
    }

    .orion-auth .auth-btn:focus {
        outline: none;
        box-shadow: var(--focus);
    }

.orion-auth .auth-errors {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger-text);
    font-size: 13px;
    line-height: 1.4;
}

.orion-auth .auth-footer {
    padding: 12px 18px 14px 18px;
    border-top: 1px solid var(--stroke-subtle);
    color: var(--muted);
    font-size: 12.5px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Privacy note in hero */
.orion-auth .privacy-note {
    margin-top: 28px;
    max-width: 420px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

    .orion-auth .privacy-note h3 {
        font-size: 13px;
        font-weight: 700;
        margin: 0 0 6px 0;
        color: var(--text);
    }

/* =========================================================
   THEME TOGGLE BUTTON
   ========================================================= */

.orion-auth .theme-toggle {
    position: fixed;
    right: 14px;
    bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

    .orion-auth .theme-toggle:hover {
        border-color: var(--border-2);
    }

    .orion-auth .theme-toggle:focus {
        outline: none;
        box-shadow: var(--focus);
    }
