:root {
    --login-primary: #1e3a5f;
    --login-accent: #7367f0;
    --login-accent-light: #9e95f5;
    --login-gold: #c9a227;
    --login-surface: rgba(255, 255, 255, 0.92);
    --login-shadow: 0 25px 50px -12px rgba(30, 58, 95, 0.25);
}

* { box-sizing: border-box; }

body.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    background: #0f172a;
    overflow-x: hidden;
}

.login-shell {
    min-height: 100vh;
    display: flex;
}

/* —— Brand panel —— */
.login-brand {
    flex: 1 1 48%;
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d6a9f 45%, #7367f0 100%);
}

@media (min-width: 992px) {
    .login-brand { display: flex; }
}

.login-brand__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    animation: loginFloat 8s ease-in-out infinite;
}

.login-brand__blob--1 {
    width: 320px; height: 320px;
    background: #c9a227;
    top: -80px; right: -60px;
    animation-delay: 0s;
}

.login-brand__blob--2 {
    width: 260px; height: 260px;
    background: #00cfe8;
    bottom: 10%; left: -40px;
    animation-delay: -3s;
}

.login-brand__blob--3 {
    width: 180px; height: 180px;
    background: #fff;
    top: 40%; right: 20%;
    opacity: 0.15;
    animation-delay: -5s;
}

@keyframes loginFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -25px) scale(1.05); }
}

.login-brand__content {
    position: relative;
    z-index: 2;
    max-width: 420px;
    animation: loginFadeUp 0.8s ease-out both;
}

.login-brand__logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
    animation: loginPulse 3s ease-in-out infinite;
}

@keyframes loginPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.login-brand__title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.login-brand__subtitle {
    font-size: 1rem;
    opacity: 0.88;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.login-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0;
    font-size: 0.95rem;
    opacity: 0;
    animation: loginFadeUp 0.6s ease-out forwards;
}

.login-features li:nth-child(1) { animation-delay: 0.2s; }
.login-features li:nth-child(2) { animation-delay: 0.35s; }
.login-features li:nth-child(3) { animation-delay: 0.5s; }

.login-features__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* —— Form panel —— */
.login-form-panel {
    flex: 1 1 52%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: linear-gradient(180deg, #f0f4f8 0%, #e8eef5 100%);
    position: relative;
}

.login-form-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(115,103,240,.08) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(30,58,95,.06) 0%, transparent 50%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--login-surface);
    border-radius: 20px;
    box-shadow: var(--login-shadow);
    padding: 2rem 2rem 1.75rem;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.8);
    animation: loginCardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.login-card__mobile-logo {
    display: block;
    text-align: center;
    margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
    .login-card__mobile-logo { display: none; }
}

.login-card__mobile-logo img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.login-card__header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--login-primary);
    margin: 0 0 0.35rem;
}

.login-card__header p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.login-input-group {
    position: relative;
    margin-bottom: 1.1rem;
}

.login-input-group__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.15rem;
    z-index: 2;
    transition: color 0.2s;
}

.login-input-group .form-control {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input-group .form-control:focus {
    border-color: var(--login-accent);
    box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.15);
}

.login-input-group:focus-within .login-input-group__icon {
    color: var(--login-accent);
}

.login-input-group__toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    z-index: 2;
    line-height: 1;
}

.login-input-group__toggle:hover { color: var(--login-accent); }

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.login-options label {
    margin: 0;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.login-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--login-primary), var(--login-accent));
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(115, 103, 240, 0.35);
}

.login-btn:active:not(:disabled) { transform: translateY(0); }

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

.login-btn .la-spinner { animation: spin 0.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.login-alert {
    border-radius: 12px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    animation: loginFadeUp 0.4s ease-out;
}

.login-recaptcha {
    margin-bottom: 1.25rem;
    transform-origin: left top;
}

.login-recaptcha-note {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.login-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.login-badge-secure {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    margin-bottom: 1rem;
}
