@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --sp-primary: #5b5fc7;
    --sp-primary-dark: #4a4eb5;
    --sp-teal: #0d9488;
    --sp-text: #1e293b;
    --sp-text-muted: #64748b;
    --sp-border: #e4e9f0;
    --sp-radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #f0f3f9;
}

.sp-login-page { min-height: 100vh; display: flex; }

.sp-login-brand {
    flex: 1.1;
    display: none;
    background: linear-gradient(145deg, #eef0ff 0%, #e6f7f5 50%, #eff6ff 100%);
    position: relative;
    overflow: hidden;
}

@media (min-width: 992px) {
    .sp-login-brand { display: flex; align-items: center; justify-content: center; padding: 48px; }
}

.sp-login-brand::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    top: -80px; right: -80px;
    background: radial-gradient(circle, rgba(91,95,199,0.15), transparent 70%);
    border-radius: 50%;
}

.sp-login-brand-content { position: relative; max-width: 400px; }

.sp-login-brand-logo {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--sp-border);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(91,95,199,0.12);
}

.sp-login-brand-logo img { width: 44px; height: 44px; border-radius: 10px; }

.sp-login-brand h1 {
    font-size: 36px; font-weight: 800; color: var(--sp-text);
    margin-bottom: 12px; letter-spacing: -0.03em;
}

.sp-login-brand h1 span { color: var(--sp-primary); }

.sp-login-brand > .sp-login-brand-content > p {
    color: var(--sp-text-muted); font-size: 15px; line-height: 1.7; margin-bottom: 32px;
}

.sp-login-features { display: flex; flex-direction: column; gap: 10px; }

.sp-login-feature {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; background: #fff;
    border: 1px solid var(--sp-border); border-radius: 11px;
    font-size: 13px; font-weight: 500; color: var(--sp-text);
}

.sp-login-feature-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--sp-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}

.sp-login-form-side {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 32px 24px; background: #fff;
}

.sp-login-card {
    width: 100%; max-width: 380px;
    padding: 8px 4px;
}

.sp-login-mobile-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
@media (min-width: 992px) { .sp-login-mobile-logo { display: none; } }
.sp-login-mobile-logo img { width: 36px; height: 36px; border-radius: 8px; }
.sp-login-mobile-logo span { font-size: 18px; font-weight: 800; }

.sp-login-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.sp-login-subtitle { color: var(--sp-text-muted); font-size: 13px; margin-bottom: 24px; }

.sp-form-group { margin-bottom: 16px; }
.sp-form-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; display: block; }
.sp-input-wrap { position: relative; }
.sp-input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; }
.sp-form-input {
    width: 100%; padding: 11px 12px 11px 40px;
    border: 1.5px solid var(--sp-border); border-radius: 10px;
    font-size: 13px; font-family: inherit; background: #f8fafc;
}
.sp-form-input:focus { outline: none; border-color: var(--sp-primary); background: #fff; box-shadow: 0 0 0 3px rgba(91,95,199,0.1); }
.sp-field-error { color: #ef4444; font-size: 11px; margin-top: 4px; display: block; }
.sp-form-row { margin-bottom: 18px; }
.sp-checkbox-wrap { display: flex; align-items: center; gap: 7px; }
.sp-checkbox-wrap label { font-size: 12px; color: var(--sp-text-muted); }
.sp-error-banner { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 10px 12px; border-radius: 9px; font-size: 12px; margin-bottom: 14px; }

.sp-btn-login {
    width: 100%; padding: 12px;
    background: var(--sp-primary); color: #fff; border: none;
    border-radius: 10px; font-size: 14px; font-weight: 700;
    font-family: inherit; cursor: pointer;
    box-shadow: 0 4px 14px rgba(91,95,199,0.3);
    transition: all 0.2s;
}
.sp-btn-login:hover { background: var(--sp-primary-dark); transform: translateY(-1px); }

.sp-login-footer { text-align: center; margin-top: 20px; font-size: 11px; color: var(--sp-text-muted); }
.sp-toggle-password { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 14px; }

#global-loader { background: rgba(15,23,42,0.4); backdrop-filter: blur(4px); position: fixed; inset: 0; z-index: 9999; }
.sp-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; }
.sp-loader-ring { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.2); border-top-color: var(--sp-primary); border-radius: 50%; animation: sp-spin 0.7s linear infinite; }
.sp-loader-text { color: #fff; font-size: 12px; font-weight: 600; }
@keyframes sp-spin { to { transform: rotate(360deg); } }
