:root {
    --gold: #C9A227;
    --gold-light: #E8D48B;
    --gold-dark: #9A7B1A;
    --midnight: #0D1B2A;
    --midnight-light: #1B2D45;
    --velvet: #8B1A1A;
    --cream: #F5F0E1;
    --text: #2C2C2C;
    --text-light: #6B7280;
    --white: #FFFFFF;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body { height: 100%; }

.auth-body {
    font-family: var(--font-body);
    background: var(--midnight);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ── Shell ── */
.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ── Brand panel ── */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.auth-brand-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
}

.auth-brand-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(13, 27, 42, 0.55) 0%, rgba(13, 27, 42, 0.75) 50%, rgba(13, 27, 42, 0.92) 100%),
        linear-gradient(135deg, rgba(74, 20, 140, 0.25), rgba(139, 26, 26, 0.2));
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
    width: 100%;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--white);
    text-decoration: none;
}

.auth-brand-logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--gold);
}

.auth-brand-logo span {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
}

.auth-quote {
    margin: auto 0;
    padding: 2rem 0;
}

.auth-quote p {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-style: italic;
    line-height: 1.45;
    color: var(--cream);
    margin-bottom: 1rem;
}

.auth-quote cite {
    font-style: normal;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
}

.auth-brand-footer {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(245, 240, 225, 0.5);
}

/* ── Form panel ── */
.auth-panel {
    display: flex;
    flex-direction: column;
    background: var(--white);
    padding: 2rem 2.5rem;
    overflow-y: auto;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
    align-self: flex-start;
}

.auth-back svg {
    width: 16px;
    height: 16px;
}

.auth-back:hover {
    color: var(--gold-dark);
}

.auth-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--midnight);
    margin-bottom: 0.5rem;
}

.auth-form-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* ── Alerts ── */
.auth-form-wrap .alert {
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-form-wrap .alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.auth-form-wrap .alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* ── Form fields ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--midnight);
    margin-bottom: 0.4rem;
}

.auth-field input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: #FAFAFA;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-field input::placeholder {
    color: #9CA3AF;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.12);
}

.auth-submit {
    margin-top: 0.5rem;
    padding: 0.95rem 1.5rem;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    color: var(--midnight);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.35);
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(201, 162, 39, 0.45);
}

.auth-switch {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--velvet);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: 220px;
    }

    .auth-quote {
        display: none;
    }

    .auth-brand-content {
        padding: 1.5rem;
    }

    .auth-brand-footer {
        display: none;
    }

    .auth-panel {
        padding: 1.5rem;
    }

    .auth-form-wrap {
        padding-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .auth-form-header h1 {
        font-size: 1.65rem;
    }
}
