body.login-body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 45%),
                radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 52%),
                #0f172a;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-shell {
    width: min(1040px, 92vw);
    background: rgba(248, 250, 252, 0.98);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
    border-radius: 28px;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.login-panel {
    padding: 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: #ffffff;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.brand-eyebrow {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #2563eb;
}

.login-brand h1 {
    margin: 6px 0 4px;
    font-size: 2rem;
    color: #0f172a;
}

.brand-subtitle {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
}

.input-icon input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-icon input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

.input-icon input.is-invalid {
    border-color: rgba(220, 38, 38, 0.45);
    background: rgba(254, 242, 242, 0.9);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.95rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
}

.toggle-password:hover {
    color: #2563eb;
}

/* Ensure the input reserves space for the eye icon */
.password-field input {
    padding-right: 44px;
}

.form-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #64748b;
}

.remember-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-toggle input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.link-forgot {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.link-forgot:hover {
    text-decoration: underline;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    padding: 12px 18px;
    border-radius: 12px;
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -6px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(254, 226, 226, 0.9));
    color: #b91c1c;
    font-size: 0.92rem;
    line-height: 1.45;
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.08);
}

.login-error[hidden] {
    display: none;
}

.login-error i {
    margin-top: 1px;
    color: #dc2626;
}

.signup-hint {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
}

.signup-hint a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.reset-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}

.reset-overlay:not([hidden]) {
    display: flex;
}

.reset-card {
    width: min(480px, 92vw);
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reset-card h2 {
    margin: 0;
    font-size: 1.35rem;
    color: #0f172a;
}

.reset-card p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
}

.reset-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reset-field label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.reset-field input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 0.95rem;
}

.reset-error {
    color: #b91c1c;
    font-size: 0.85rem;
    min-height: 18px;
}

.reset-actions {
    display: flex;
    justify-content: flex-end;
}

.signup-hint a:hover {
    text-decoration: underline;
}

.login-hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.85));
    color: #f8fafc;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.hero-content h2 {
    margin: 0 0 18px;
    font-size: 1.8rem;
    line-height: 1.3;
}

.hero-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-content li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.hero-content li i {
    color: #bbf7d0;
}

.hero-illustration {
    align-self: center;
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #1e293b;
    background: rgba(248, 250, 252, 0.9);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
}

.hero-illustration i {
    font-size: 2.6rem;
}

.hero-illustration .pulse {
    position: absolute;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(248, 250, 252, 0.4);
    animation: pulse 3.2s ease-in-out infinite;
}

.hero-illustration .pulse.delayed {
    animation-delay: 1.2s;
}

@keyframes pulse {
    from {
        transform: scale(1);
        opacity: 0.85;
    }
    to {
        transform: scale(1.45);
        opacity: 0;
    }
}

@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-panel {
        padding: 36px 28px;
    }

    .login-hero {
        padding: 40px 28px 48px;
    }
}
