/* ===== Login / Welcome ===== */

.auth-scene {
    min-height: calc(100vh - var(--nav-h, 60px) - 90px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem 3rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background:
        linear-gradient(145deg, rgba(255, 250, 235, 0.55) 0%, transparent 42%),
        linear-gradient(to bottom, #f7f1e3, #faf6eb 55%, #f3ead6);
    border-radius: 16px;
    padding: 2.25rem 2rem 2rem;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(201, 169, 89, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b774a, var(--gold, #c9a959), #8b774a);
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-brand i {
    font-size: 2rem;
    color: #8b774a;
    margin-bottom: 0.5rem;
    display: block;
}

.auth-brand .auth-title {
    font-family: var(--font-story, 'Crimson Text', Georgia, serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink, #2c1810);
    margin: 0 0 0.25rem;
}

.auth-brand .auth-sub {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-muted, #6a5a4a);
}

.auth-card h4 {
    font-family: var(--font-story, 'Crimson Text', Georgia, serif);
    color: var(--ink, #2c1810);
    font-weight: 700;
    font-size: 1.35rem;
    margin: 0 0 1.15rem;
    text-align: center;
}

.auth-card label {
    display: block;
    color: var(--ink-soft, #5a4a3a);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card .signup-box-input {
    background: #fff;
    border: 1px solid rgba(139, 119, 74, 0.28);
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    color: var(--ink, #2c1810);
    font-size: 0.95rem;
    width: 100%;
    margin-bottom: 0.9rem;
    font-family: var(--font-ui, 'Cabin', sans-serif);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus,
.auth-card .signup-box-input:focus {
    outline: none;
    border-color: var(--gold, #c9a959);
    box-shadow: 0 0 0 3px rgba(201, 169, 89, 0.18);
}

.auth-card input[type="checkbox"] {
    margin-right: 0.4rem;
    vertical-align: middle;
}

.auth-card #show-password + label,
.auth-card label[for="show-password"] {
    display: inline;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--ink-muted, #6a5a4a);
}

.login-box-submit-button,
.signup-box-submit-button {
    width: 100%;
    background: #2c1810 !important;
    color: #f5f0e1 !important;
    font-family: var(--font-ui, 'Cabin', sans-serif);
    font-weight: 600;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.8rem 1.5rem !important;
    cursor: pointer;
    margin-top: 0.35rem;
    transition: background 0.2s, box-shadow 0.2s !important;
}

.login-box-submit-button:hover,
.signup-box-submit-button:hover {
    background: #4a3222 !important;
    box-shadow: 0 4px 14px rgba(44, 24, 16, 0.25);
}

.auth-card .auth-links {
    text-align: center;
    margin: 0.85rem 0 0;
    font-size: 0.9rem;
}

.auth-card .auth-links a {
    color: #8b6a30;
    font-weight: 600;
}

.auth-card .auth-links a:hover {
    color: #2c1810;
}

/* Welcome (already logged in) */

.welcome-card {
    width: 100%;
    max-width: 480px;
    text-align: center;
    padding: 2.5rem 2rem;
}

.welcome-card h3 {
    font-family: var(--font-story, 'Crimson Text', Georgia, serif);
    font-size: 1.65rem;
    color: var(--ink, #2c1810);
    margin: 0 0 0.35rem;
}

.welcome-card .welcome-email {
    color: var(--ink-muted, #6a5a4a);
    font-size: 0.95rem;
    margin: 0 0 1.75rem;
    word-break: break-all;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.welcome-actions a.button,
.welcome-actions .button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-family: var(--font-ui, 'Cabin', sans-serif);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.welcome-actions a.button:not(.alert) {
    background: #2c1810;
    color: #f5f0e1 !important;
}

.welcome-actions a.button:not(.alert):hover {
    background: #4a3222;
    color: #fff !important;
}

.welcome-actions a.button.author-cta {
    background: var(--gold, #c9a959);
    color: #1a1a2e !important;
}

.welcome-actions a.button.author-cta:hover {
    background: #b8983f;
    color: #1a1a2e !important;
}

.welcome-actions a.button.alert {
    background: transparent;
    color: #8b3a3a !important;
    border: 1px solid rgba(139, 58, 58, 0.35);
}

.welcome-actions a.button.alert:hover {
    background: rgba(139, 26, 26, 0.08);
    color: #6b1a1a !important;
}

/* Legacy selectors still used in markup */

.login-page {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-box {
    /* fall through to auth-card styles when both classes applied */
}

@media screen and (max-width: 480px) {
    .auth-card {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 12px;
    }
}
