/* Login page (no Tailwind dependency)
   Scoped via .auth-login to avoid leaking styles site-wide. */

:root {
    --auth-bg: #FDFDFC;
    --auth-text: #1b1b18;

    --auth-card-bg: #ffffff;
    --auth-border: #e3e3e0;

    --auth-accent: #f53003;
    --auth-accent-hover: #d4270b;

    --auth-error-bg: #fef2f2;
    --auth-error-border: #fecaca;
    --auth-error-text: #b91c1c;

    --auth-radius-lg: 0.5rem;
    --auth-radius-md: 0.375rem;

    /* Mirrors Tailwind shadow-lg */
    --auth-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10);

    /* Matches app.css font stack */
    --auth-font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}

@media (prefers-color-scheme: dark) {
    :root {
        --auth-bg: #0a0a0a;
        --auth-text: #EDEDEC;

        --auth-card-bg: #161615;
        --auth-border: #3E3E3A;

        --auth-error-bg: #1D0002;
        --auth-error-border: #F53003;
        --auth-error-text: #FF4433;
    }
}

.auth-login {
    color-scheme: light dark;
    min-height: 100vh;
    margin: 0;
    padding: 1.5rem; /* ~p-6 */

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--auth-bg);
    color: var(--auth-text);
    font-family: var(--auth-font-sans);
}

.auth-container {
    width: 100%;
    max-width: 28rem; /* ~max-w-md */
}

.auth-card {
    background-color: var(--auth-card-bg);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow-lg);
    padding: 2rem; /* ~p-8 */
}

.auth-title {
    margin: 0 0 1.5rem 0; /* ~mb-6 */
    text-align: center;
    font-size: 1.875rem; /* ~text-3xl */
    line-height: 2.25rem;
    font-weight: 700;
}

.auth-errors {
    background-color: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    border-radius: var(--auth-radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem; /* ~mb-6 */
}

.auth-error-item {
    margin: 0;
    color: var(--auth-error-text);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

/* Mirrors Tailwind space-y-4 */
.auth-form > * + * {
    margin-top: 1rem;
}

.auth-label {
    display: block;
    font-size: 16px;
    line-height: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.auth-input {
    width: 100%;
    padding: 1rem 1rem; /* ~py-2 px-4 */

    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);

    background-color: var(--auth-card-bg);
    color: inherit;

    box-sizing: border-box;
    font-size: 16px;
}

@media (prefers-color-scheme: dark) {
    .auth-input {
        background-color: #0a0a0a;
    }
}

.auth-input::placeholder {
    color: rgba(27, 27, 24, 0.65);
}

@media (prefers-color-scheme: dark) {
    .auth-input::placeholder {
        color: #A1A09A;
    }
}

.auth-input:focus,
.auth-input:focus-visible {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 2px rgba(245, 48, 3, 0.35);
}

.auth-submit {
    width: 100%;
    border: 0;
    border-radius: var(--auth-radius-md);

    background-color: var(--auth-accent);
    color: #ffffff;

    font-weight: 500;
    padding: 0.8rem 1rem;

    cursor: pointer;
    transition: background-color 150ms ease;
    font-size: 16px;
}

.auth-submit:hover {
    background-color: var(--auth-accent-hover);
}

.auth-submit:focus,
.auth-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(245, 48, 3, 0.35);
}
