/* =========================================================
   auth.css — Authentication pages styling
   Classic treatment (Fraunces serif + ivory + deep-green accent),
   matching the marketing site's redesign — this is the bridge
   between the public site and the app, so it gets the same look.
   Self-contained design system, same as the marketing site: its
   own tokens below, deliberately not touching the app-wide
   --color-* tokens in main.css used everywhere post-login.
   ========================================================= */

:root {
    --auth-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --auth-ink: #1c1a17;
    --auth-ink-soft: #5c574e;
    --auth-ivory: #faf7f2;
    --auth-border: #e2dccd;
    --auth-accent: #234d3a;
    --auth-accent-soft: #2f6349;
    --auth-accent-tint: #eaf1ec;
}

/* ── Wrapper ─────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-ivory);
    padding: var(--space-6);
}

/* ── Card ─────────────────────────────────────── */
.auth-card {
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 6px;
    padding: var(--space-8);
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    animation: authCardIn 0.3s ease-out;
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card.register-card {
    max-width: 580px;
}

/* ── Logo ─────────────────────────────────────── */
.auth-logo {
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-logo-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    background: var(--auth-accent);
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--auth-serif);
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: var(--space-3);
}
.auth-logo-icon::before { content: 'S'; }

.auth-logo h1 {
    font-family: var(--auth-serif);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--auth-ink);
    letter-spacing: -0.01em;
}

.auth-logo h1 span {
    color: var(--auth-ink-soft);
    font-weight: 400;
}

.auth-logo p {
    color: var(--auth-ink-soft);
    font-size: var(--text-sm);
    margin-top: 4px;
}

/* ── Headings ─────────────────────────────────── */
.auth-title {
    font-family: var(--auth-serif);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--auth-ink);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    color: var(--auth-ink-soft);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}

/* ── Form Groups ──────────────────────────────── */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-ink-soft);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--auth-border);
    border-radius: 4px;
    font-size: var(--text-base);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: var(--auth-ivory);
    color: var(--auth-ink);
    min-height: 46px;
    font-family: var(--font-main);
}

.form-control:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-tint);
    background: #fff;
}

.form-control-wrap {
    position: relative;
}

.form-control-wrap .form-control {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--auth-ink-soft);
    cursor: pointer;
    font-size: 1.05rem;
    padding: 0;
}

.password-toggle:hover {
    color: var(--auth-accent);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: -2px;
    border-radius: 4px;
}

.form-control.is-invalid {
    border-color: #8a3b30;
    box-shadow: 0 0 0 3px #f7ece9;
}

.invalid-feedback {
    color: #8a3b30;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

/* ── Form grid (register) ─────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* ── Section divider ──────────────────────────── */
.form-divider {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--auth-accent);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin: var(--space-6) 0 var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--auth-border);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ── Remember row ─────────────────────────────── */
.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    color: var(--auth-ink-soft);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-accent);
    cursor: pointer;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    font-family: var(--font-main);
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--auth-accent);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--auth-accent-soft);
}

/* ── Alerts ───────────────────────────────────── */
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: 4px;
    border-left: 3px solid;
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
}

.alert-success {
    background: var(--auth-accent-tint);
    border-color: var(--auth-accent);
    color: var(--auth-accent);
}

.alert-danger {
    background: #f7ece9;
    border-color: #8a3b30;
    color: #8a3b30;
}

.alert-info {
    background: var(--auth-accent-tint);
    border-color: var(--auth-accent);
    color: var(--auth-accent);
}

/* ── Footer ───────────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: var(--space-6);
    font-size: var(--text-sm);
    color: var(--auth-ink-soft);
}

.auth-footer a {
    color: var(--auth-accent);
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--auth-accent-soft);
    text-decoration: underline;
}
