/* Unified Auth Layout — hothouse ledger, matching public pages */
:root {
    --font-display: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-brand: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
    --font-mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --paper: #f3eee2;
    --surface: #fffdf6;
    --text-2: #4a544c;
    --border: #e4ddca;
    --border-strong: #d3c9b2;
    --bg-subtle: #f3eee2;
}

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background-color: var(--paper);
    background-image:
        radial-gradient(720px 360px at 85% -5%, rgba(184, 230, 99, 0.08), transparent 60%),
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(31, 42, 36, 0.045) 27px 28px);
    position: relative;
}
/* Botanical watermark — the leaf mark, softly */
.auth-page::before {
    content: '';
    position: absolute;
    right: -120px; bottom: -140px;
    width: 420px; height: 420px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M60 6 C 92 28, 102 72, 60 114 C 18 72, 28 28, 60 6 Z' fill='%239ed54a' opacity='0.06'/%3E%3C/svg%3E") no-repeat center / contain;
    pointer-events: none;
}

.auth-brand {
    font-family: var(--font-brand);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--pine-950);
    text-decoration: none;
    margin-bottom: 2.5rem;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
}
.auth-brand:hover {
    opacity: 0.8;
}
.auth-brand .brand-g {
    position: relative;
    display: inline-block;
}
.auth-brand .brand-g::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(75% + 0.02em);
    transform: translateX(-50%);
    width: 0.5em;
    height: 0.4em;
    background: var(--leaf-400);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-strong);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px; /* Slightly narrower for cleaner look */
    box-shadow: 0 10px 40px -10px rgba(31, 42, 36, 0.08); /* Softer shadow */
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-header h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--pine-950);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.auth-header p {
    color: var(--text-2);
    font-size: 0.9375rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 0.5rem;
    display: block;
}

.forgot-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    font-weight: 500;
    margin-top: 0.4rem;
    padding: 0.25rem 0;
}
.forgot-link:hover {
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    padding: 0.875rem;
    background: var(--leaf-400);
    color: var(--leaf-ink);
    border: 1px solid var(--leaf-400);
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    margin-top: 0.5rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.2;
}
.btn-auth:hover {
    background: var(--leaf-300);
    border-color: var(--leaf-300);
    color: var(--leaf-ink);
    transform: translateY(-1px);
}
.btn-auth:focus-visible {
    outline: 2px solid var(--pine-700);
    outline-offset: 2px;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-2);
}
.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.auth-footer a:hover {
    text-decoration: underline;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-2);
}
.form-check-input {
    margin-top: 0.25rem;
}
.terms-link {
    color: var(--primary);
    text-decoration: underline;
}

/* Password visibility toggle */
.password-field { position: relative; }
.password-field .form-control { padding-right: 2.75rem; }
.password-toggle {
    position: absolute; top: 50%; right: 0.5rem; transform: translateY(-50%);
    background: transparent; border: none; color: var(--text-2);
    cursor: pointer; padding: 0.375rem; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem; transition: color 0.15s ease;
}
.password-toggle:hover { color: var(--pine-700); }
.password-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Auth State Messages (for reset complete, etc.) */
.auth-state {
    text-align: center;
    padding: 1rem 0;
}
.auth-icon, .invalid-icon {
    font-size: 3.5rem;
    color: var(--pine-700);
    margin-bottom: 1.5rem;
}
.auth-icon.success {
    color: var(--success);
}
.invalid-icon {
    color: var(--danger);
}
.auth-state h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--pine-950);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.auth-state-message {
    font-size: 1rem;
    color: var(--text-1);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.5rem;
        border: none;
        box-shadow: none;
    }
    .auth-brand {
        margin-bottom: 1.5rem;
    }
}