@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@500;600;700;800;900&display=swap");
/* Standalone auth — professional full-page (sign-in / sign-up); fonts loaded in HTML */
:root {
    --auth-black: #050505;
    --auth-black-soft: #0a0a0a;
    --auth-surface: rgba(14, 14, 16, 0.85);
    --auth-text: #f4f4f5;
    --auth-muted: #8a8a93;
    --auth-orange: #ff4500;
    --auth-orange-dim: rgba(255, 69, 0, 0.15);
    --auth-line: rgba(244, 244, 245, 0.1);
    --auth-glow: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 69, 0, 0.22), transparent 70%);
}

html[data-theme="light"] {
    color-scheme: light;
    --auth-black: #f4f4f6;
    --auth-black-soft: #ececee;
    --auth-surface: rgba(255, 255, 255, 0.92);
    --auth-text: #0c0c0e;
    --auth-muted: #5c5d66;
    --auth-orange: #e04000;
    --auth-orange-dim: rgba(224, 64, 0, 0.12);
    --auth-line: rgba(12, 12, 14, 0.12);
    --auth-glow: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(224, 64, 0, 0.18), transparent 70%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    min-height: 100%;
}

body.auth-standalone {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--auth-black);
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Ambient background */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--auth-glow), var(--auth-black);
    pointer-events: none;
}

.auth-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--auth-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--auth-line) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
}

.auth-frame {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Top bar */
.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.auth-brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.03em;
    color: var(--auth-text);
    text-decoration: none;
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

.auth-brand span {
    color: var(--auth-orange);
}

.auth-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-link-quiet {
    font-size: 0.8125rem;
    color: var(--auth-muted);
    text-decoration: none;
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

.auth-link-quiet:hover {
    color: var(--auth-orange);
}

/* Center column */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 3rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.25rem 2rem 2rem;
    border-radius: 16px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 24px 48px -12px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
}

html[data-theme="light"] .auth-card {
    box-shadow:
        0 0 0 1px rgba(12, 12, 14, 0.06) inset,
        0 20px 40px -16px rgba(12, 12, 14, 0.12);
}

.auth-eyebrow {
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--auth-orange);
    margin: 0 0 0.5rem;
}

.auth-title {
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.auth-lead {
    font-size: 0.9rem;
    color: var(--auth-muted);
    line-height: 1.5;
    margin: 0 0 1.75rem;
}

/* Google */
.auth-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--auth-line);
    background: var(--auth-black-soft);
    color: var(--auth-text);
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

html[data-theme="light"] .auth-btn-google {
    background: #fff;
    border-color: rgba(12, 12, 14, 0.12);
}

.auth-btn-google:hover {
    border-color: var(--auth-orange);
    background: var(--auth-orange-dim);
}

.auth-btn-google:focus-visible {
    outline: 2px solid var(--auth-orange);
    outline-offset: 2px;
}

.auth-btn-google svg {
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.35rem 0 1.25rem;
    color: var(--auth-muted);
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

.auth-error {
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    font-size: 0.75rem;
    color: var(--auth-orange);
    margin: 0 0 1rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    background: var(--auth-orange-dim);
    border: 1px solid rgba(255, 69, 0, 0.25);
}

.auth-error[hidden] {
    display: none !important;
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-label {
    display: block;
    font-size: 0.7rem;
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    color: var(--auth-muted);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--auth-line);
    background: var(--auth-black);
    color: var(--auth-text);
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    font-size: 0.85rem;
}

html[data-theme="light"] .auth-input {
    background: #fff;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-orange);
    box-shadow: 0 0 0 3px var(--auth-orange-dim);
}

.auth-submit {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--auth-orange) 0%, #cc3700 100%);
    color: #fff;
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
}

.auth-submit:hover {
    filter: brightness(1.08);
}

.auth-submit:active {
    transform: scale(0.99);
}

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-foot {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-foot a {
    color: var(--auth-orange);
    text-decoration: none;
    font-weight: 500;
}

.auth-foot a:hover {
    text-decoration: underline;
}

.auth-hint {
    margin-top: 1.25rem;
    font-size: 0.65rem;
    color: var(--auth-muted);
    line-height: 1.5;
    font-family: "Nunito Sans", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

.auth-hint code {
    font-size: 0.62rem;
    word-break: break-all;
}

/* Theme toggle — reuse landing pattern */
.auth-theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    background: transparent;
    color: var(--auth-text);
    cursor: pointer;
}

.auth-theme-btn:hover {
    color: var(--auth-orange);
    border-color: var(--auth-orange);
}

.theme-toggle-icon--sun {
    display: none;
}
html[data-theme="light"] .theme-toggle-icon--moon {
    display: none;
}
html[data-theme="light"] .theme-toggle-icon--sun {
    display: block;
}

@media (max-width: 560px) {
    .auth-topbar {
        padding: 0.85rem max(1rem, env(safe-area-inset-right, 0px)) 0.75rem max(1rem, env(safe-area-inset-left, 0px));
    }

    .auth-brand {
        font-size: 1rem;
    }

    .auth-topbar-right {
        gap: 0.45rem;
    }

    .auth-link-quiet {
        display: none;
    }

    .auth-theme-btn {
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 8px;
    }

    .auth-main {
        align-items: flex-start;
        padding: 1rem max(1rem, env(safe-area-inset-right, 0px)) calc(2rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    }

    .auth-card {
        max-width: none;
        padding: 1.5rem 1.15rem 1.35rem;
        border-radius: 14px;
    }

    .auth-title {
        font-size: 1.45rem;
    }

    .auth-lead {
        margin-bottom: 1.35rem;
        font-size: 0.86rem;
    }

    .auth-input,
    .auth-submit,
    .auth-btn-google {
        min-height: 44px;
        font-size: 16px;
    }

    .auth-submit {
        font-size: 0.78rem;
    }
}

.auth-eligibility { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; font-size: 14px; line-height: 1.5; }
.auth-eligibility input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; }
