/* ── sw-login.css ─────────────────────────────
   Login surface styles.
   Variables from variables.css are available.
   ──────────────────────────────────────────── */

/* ── Layout ──────────────────────────────────── */
.login-shell { display: flex; flex-direction: column; height: 100vh; }
.login-main  { display: flex; flex: 1; min-height: 0; }

/* ── Hero Panel (left) ─────────────────────── */
.login-hero {
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    padding: 4rem 3.5rem; position: relative; overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 30% 40%, rgba(108,159,255,0.06), transparent),
        radial-gradient(ellipse 60% 50% at 70% 70%, rgba(167,139,250,0.05), transparent),
        var(--bg);
}
.login-hero-grid {
    position: absolute; inset: -50%;
    background-image:
        linear-gradient(rgba(108,159,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108,159,255,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    animation: loginGridDrift 30s linear infinite;
    pointer-events: none;
}
.login-hero-orb {
    position: absolute; width: 320px; height: 320px; bottom: -80px; right: -60px;
    background: radial-gradient(circle, rgba(167,139,250,0.08), transparent 70%);
    border-radius: 50%; pointer-events: none;
}
.login-hero-content { position: relative; z-index: 1; max-width: 520px; }

.login-hero-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 1.5rem; }
.login-hero-brand-icon { width: 40px; height: 40px; }
.login-hero-brand-text { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.login-hero-brand-text .hl { color: var(--accent); }

.login-hero h1 {
    font-size: 2.4rem; font-weight: 700; line-height: 1.15;
    letter-spacing: -0.03em; margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-2) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.login-hero-sub {
    font-size: 1.05rem; color: var(--text-2); line-height: 1.6;
    margin-bottom: 2.5rem; max-width: 440px;
}
.login-hero-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.login-hero-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; background: var(--bg-surface);
    border-radius: 100px; font-size: 0.8rem; font-weight: 500;
    transition: all 0.15s;
}
.login-hero-pill.ac { border: 1px solid rgba(108,159,255,0.2); color: var(--accent); }
.login-hero-pill.pu { border: 1px solid rgba(167,139,250,0.2); color: var(--purple); }
.login-hero-pill-icon { font-size: 0.95rem; line-height: 1; }

.login-hero-version {
    margin-top: 3rem; font-size: 0.72rem; font-family: var(--mono);
    color: var(--text-3); letter-spacing: 0.04em;
}

/* ── Auth Panel (right) ────────────────────── */
.login-auth-panel {
    width: 440px; flex-shrink: 0; display: flex; align-items: center;
    justify-content: center; padding: 2rem; background: var(--bg-surface);
    border-left: 1px solid var(--border); overflow-y: auto;
}
.login-auth-inner { width: 100%; max-width: 340px; }

.login-auth-heading { margin-bottom: 2rem; }
.login-auth-heading h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.login-auth-heading p { font-size: 0.85rem; color: var(--text-3); }

.login-auth-tabs { display: flex; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.login-auth-tab {
    flex: 1; background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text-3); padding: 10px 0; cursor: pointer; font-family: var(--font);
    font-size: 0.85rem; font-weight: 500; transition: color 0.15s;
}
.login-auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.login-auth-tab:hover  { color: var(--text-2); }

.login-form-field { margin-bottom: 16px; }
.login-form-field label {
    display: block; font-size: 13px; font-weight: 500;
    color: var(--text-2); margin-bottom: 6px;
}
.login-form-field input {
    width: 100%; box-sizing: border-box; background: var(--input-bg);
    border: 1px solid var(--border); color: var(--text);
    padding: 10px 14px; border-radius: 10px; font-size: 14px; font-family: var(--font);
    outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.login-form-field input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}

.login-auth-error {
    color: var(--danger); font-size: 0.78rem; margin: 0 0 0.5rem;
}
.login-auth-error.success { color: var(--success); }

.login-btn {
    width: 100%; background: var(--accent); color: #fff; border: none;
    padding: 10px 18px; font-size: 14px; border-radius: 10px; cursor: pointer;
    font-family: var(--font); font-weight: 600; letter-spacing: -0.01em;
    transition: all 0.18s; margin-top: 1.5rem;
}
.login-btn:hover    { background: var(--accent-hover); }
.login-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.login-btn--link {
    display: block; text-align: center; text-decoration: none;
}

.login-auth-footer {
    margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
    text-align: center;
}
.login-auth-footer p { font-size: 0.75rem; color: var(--text-3); line-height: 1.6; }

/* ── Banner ─────────────────────────────────── */
.login-banner {
    text-align: center; font-size: 11px; font-weight: 700;
    letter-spacing: 1.2px; padding: 3px 0; text-transform: uppercase; flex-shrink: 0;
}

/* ── SSO panel description ──────────────────── */
.login-sso-desc {
    color: var(--text-2); font-size: 0.9rem; margin-bottom: 1.5rem;
}

/* ── Animations ─────────────────────────────── */
@keyframes loginGridDrift { to { transform: translate(48px, 48px); } }
@keyframes loginFadeUp   { to { opacity: 1; transform: translateY(0); } }

.login-anim {
    opacity: 0; transform: translateY(12px);
    animation: loginFadeUp 0.5s ease forwards;
}
.login-anim-1 { animation-delay: .05s; }
.login-anim-2 { animation-delay: .12s; }
.login-anim-3 { animation-delay: .19s; }
.login-anim-4 { animation-delay: .26s; }
.login-anim-5 { animation-delay: .33s; }
.login-anim-a1 { animation-delay: .15s; }
.login-anim-a2 { animation-delay: .22s; }
.login-anim-a3 { animation-delay: .29s; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
    .login-hero { display: none; }
    .login-auth-panel { width: 100%; border-left: none; }
}
