/* ===== LOGIN PAGE — GLASS CARD, MATCHED TO STITCH EXPORT ===== */

.login-main {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--color-white);
    padding: var(--spacing-xl) var(--spacing-md);
    box-sizing: border-box;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}
.login-orb-1 { top: -10%; right: -5%; width: 420px; height: 420px; background: rgba(196,139,132,0.25); }
.login-orb-2 { bottom: -10%; left: -5%; width: 340px; height: 340px; background: rgba(248,229,231,0.6); }

.login-container {
    max-width: 1020px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xl);
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.login-brand-panel { max-width: 380px; flex: 1 1 340px; }

.login-brand-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}
.login-brand-sub {
    font-size: var(--font-size-sm);
    color: var(--color-accent);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
    max-width: 340px;
}
.login-brand-visual {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 4 / 3.3;
    border-radius: 24px;
    background-color: var(--color-secondary);
    /* A second background layer here used to point at images/login-hero.jpg. That
       file has never existed in static/images/, so it 404'd on every login page
       load — and it sat beneath an opaque gradient with blend-mode normal, so it
       was invisible even in principle. Removed: collectstatic's manifest storage
       fails hard on a missing asset reference, which is how it finally surfaced.
       Note: do not write the filename inside a CSS url() call even in a comment —
       Django's post-processor matches url() with a regex that does not skip
       comments, so a commented-out reference still breaks collectstatic. */
    background-image:
        linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
}

@media (max-width: 900px) { .login-brand-panel { display: none; } }

.login-panel { width: 100%; max-width: 420px; flex: 1 1 380px; }

.glass-panel {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(196,139,132,0.15);
}

.login-card {
    padding: 40px 36px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    box-sizing: border-box;
}

.login-title { font-size: 26px; font-weight: 700; color: var(--color-text); margin-bottom: 4px; }
.login-subtitle { font-size: var(--font-size-sm); color: var(--color-accent); margin-bottom: var(--spacing-lg); }

.login-divider {
    display: flex;
    align-items: center;
    margin: var(--spacing-lg) 0;
    color: var(--color-accent);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.login-divider::before, .login-divider::after { content: ""; flex: 1; border-top: 1px solid var(--color-secondary); }
.login-divider span { padding: 0 var(--spacing-md); }

.login-form { display: flex; flex-direction: column; gap: var(--spacing-lg); }

.floating-group { position: relative; }
.floating-group input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-secondary);
    padding: 12px 0;
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    color: var(--color-text);
    box-sizing: border-box;
}
.floating-group input:focus { outline: none; border-bottom: 2px solid var(--color-primary); }

.floating-group label {
    position: absolute;
    left: 0;
    top: 12px;
    font-size: var(--font-size-base);
    color: var(--color-accent);
    pointer-events: none;
    transition: 0.2s ease all;
    background: transparent;
}

/* Float the label up: on focus, on typed value (placeholder-shown fallback), or JS-applied .has-value */
.floating-group input:focus ~ label,
.floating-group input:not(:placeholder-shown) ~ label,
.floating-group.has-value label {
    top: -14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
}

.login-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.remember-me { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-accent); cursor: pointer; }
.remember-me input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--color-primary); }
.forgot-link { font-size: 13px; color: var(--color-primary); font-weight: 600; }
.forgot-link:hover { text-decoration: underline; }

.btn-signin {
    width: 100%;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.btn-signin:hover { opacity: 0.9; }

.login-footer-text { text-align: center; margin-top: var(--spacing-lg); font-size: var(--font-size-sm); color: var(--color-accent); }
.login-footer-text a { color: var(--color-primary); font-weight: 700; }

.login-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--spacing-md);
    font-size: 13px;
    color: var(--color-accent);
}
.login-back-link:hover { color: var(--color-primary); }
.login-back-link .material-symbols-outlined { font-size: 18px; }

.login-copyright {
    position: relative;
    z-index: 2;
    margin-top: var(--spacing-lg);
    text-align: center;
    font-size: 12px;
    color: var(--color-accent);
    opacity: 0.7;
}

.btn-google {
    border-radius: 16px;
}

.field-error { display: block; color: #C0392B; font-size: 12px; margin-top: 4px; }
/* ===== MOBILE: LOGIN =====
   Less to do here than on signup. `.login-brand-panel` is already dropped at
   900px near the top of this file, so the decorative column is gone and the
   card already runs full width — this block is the touch-target, type-scale
   and button-parity pass, matched to the signup treatment in style.css.

   Band is 767.98px for the same reason as everywhere else in this codebase:
   `max-width: 768px` is inclusive and 768 is a checkpoint that has to keep
   measuring what it measured before.

   Last in the file so it outranks the definitions above at equal specificity. */
@media (max-width: 767.98px) {

    /* 36px a side inside a 288px viewport left the fields at 214px. */
    .login-card {
        padding: var(--spacing-lg) var(--spacing-md);
        border-radius: 20px;
    }

    /* 26px against signup's 24px, for no reason other than the two pages were
       built separately. */
    .login-title {
        font-size: 24px;
        line-height: 1.25;
    }

    .login-subtitle {
        font-size: var(--font-size-sm);
    }

    /* 12px padding on a 16px line came to 43px, one under the target. The
       floating label is positioned against the input's top edge, so growing
       the box from min-height leaves the label where it belongs. */
    .floating-group input {
        min-height: 44px;
    }

    /* Remember-me and Forgot-password sit on one row at 13px. The row already
       wraps; this keeps each side a real touch target when it does. */
    .remember-me,
    .forgot-link {
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    /* .btn-google rendered 60px tall against .btn-signin's 47px, so the
       secondary action was the biggest control on the page — and .btn-signin
       was set in 13px uppercase, small for the primary CTA. Both to 48px, and
       the label up to the same 16px the rest of the form uses. */
    .btn-signin,
    .btn-google {
        width: 100%;
        height: 48px;
        min-height: 48px;
        padding: 0 var(--spacing-md);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: var(--font-size-base);
        white-space: nowrap;
    }

    .btn-signin {
        letter-spacing: 0.04em;
    }

    /* Both are single-line links under the card; 44px each keeps them tappable
       without changing the stack. */
    .login-footer-text a,
    .login-back-link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .login-back-link {
        display: flex;
        justify-content: center;
    }
}
