/* ==========================================================================
   Login page — page-specific styling
   Requires theme.css.
   ========================================================================== */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 20px;
}

/* Decorative floating glyphs (soft, subtle) */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(ellipse 800px 400px at 15% -10%, rgba(193, 95, 60, 0.09) 0%, transparent 60%),
        radial-gradient(ellipse 600px 500px at 110% 110%, rgba(193, 95, 60, 0.07) 0%, transparent 60%);
}
[data-theme="dark"] body::after {
    background-image:
        radial-gradient(ellipse 800px 400px at 15% -10%, rgba(218, 119, 86, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 600px 500px at 110% 110%, rgba(218, 119, 86, 0.10) 0%, transparent 60%);
}

/* Top-right theme toggle (absolute) */
.top-bar {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 10;
    display: flex; gap: 10px; align-items: center;
}

/* Main wrapper */
.login-wrap {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Top brand block */
.login-header {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo {
    display: inline-flex;
    margin-bottom: 18px;
}
.login-title {
    font-size: clamp(30px, 5vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}
.login-title .italic { font-style: italic; color: var(--accent); }
.login-sub {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0;
}

/* Card */
.login-card {
    padding: 30px 28px 26px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    animation: riseIn 0.55s var(--ease) 0.05s both;
}
@keyframes riseIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: -6px;
}
.login-meta a {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
}
.login-meta a:hover { color: var(--accent); }

/* Divider with centered label */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0 -2px;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.divider span {
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-subtle);
    font-weight: 600;
}

/* Footer inside card */
.login-fineprint {
    text-align: center;
    font-size: 11.5px;
    color: var(--text-subtle);
    margin: 4px 0 0;
    line-height: 1.5;
}

/* App-level footer */
.login-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-subtle);
}
.login-footer a { color: var(--text-muted); }
.login-footer a:hover { color: var(--accent); }

/* Submit button loading state */
.btn.is-loading {
    position: relative;
    color: transparent !important;
}
.btn.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
