/* ERP Login Page - Modern Split Screen Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --erp-primary: #6366f1;
    --erp-primary-dark: #4f46e5;
    --erp-blue: #3b82f6;
    --erp-purple: #7c3aed;
    --erp-navy: #1e293b;
    --erp-text: #334155;
    --erp-text-muted: #64748b;
    --erp-input-bg: #ffffff;
    --erp-input-border: #e8ecf4;
    --erp-card-bg: #ffffff;
    --erp-right-bg: linear-gradient(160deg, #f5f3ff 0%, #eef2ff 40%, #e8f0fe 100%);
    --erp-gradient: linear-gradient(90deg, #6366f1 0%, #3b82f6 100%);
    --erp-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
    --erp-radius: 24px;
    --erp-input-radius: 12px;
    --erp-link: #6366f1;
    --erp-secondary-bg: #ffffff;
    --erp-secondary-border: #e2e8f0;
    --erp-secondary-text: #1e293b;
    --erp-divider-color: #e2e8f0;
}

[data-theme="dark"] {
    --erp-navy: #f1f5f9;
    --erp-text: #e2e8f0;
    --erp-text-muted: #94a3b8;
    --erp-input-bg: #0f172a;
    --erp-input-border: #334155;
    --erp-card-bg: #1e293b;
    --erp-right-bg: linear-gradient(160deg, #0f172a 0%, #1e293b 42%, #172554 100%);
    --erp-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    --erp-link: #a5b4fc;
    --erp-secondary-bg: rgba(15, 23, 42, 0.65);
    --erp-secondary-border: #475569;
    --erp-secondary-text: #e2e8f0;
    --erp-divider-color: #334155;
    color-scheme: dark;
}

[data-theme="dark"] body {
    background: #0f172a;
}

[data-theme="dark"] .erp-login-card {
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(129, 140, 248, 0.06);
}

[data-theme="dark"] .erp-card-illustration {
    width: 104px;
    height: 104px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.35) 0%, rgba(59, 130, 246, 0.18) 100%);
    border: 1px solid rgba(129, 140, 248, 0.28);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.22);
}

[data-theme="dark"] .erp-school-illustration {
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

[data-theme="dark"] .erp-form-group label {
    color: #e2e8f0;
}

[data-theme="dark"] .erp-input-wrap input {
    background: var(--erp-input-bg);
    border-color: var(--erp-input-border);
    color: #f8fafc;
}

[data-theme="dark"] .erp-input-wrap input::placeholder {
    color: #64748b;
}

[data-theme="dark"] .erp-input-wrap input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.18);
    background: #0b1220;
}

[data-theme="dark"] .erp-input-wrap .input-icon,
[data-theme="dark"] .erp-toggle-pwd {
    color: #94a3b8;
}

[data-theme="dark"] .erp-forgot-link {
    color: #a5b4fc;
}

[data-theme="dark"] .erp-forgot-link:hover {
    color: #c7d2fe;
}

[data-theme="dark"] .erp-checkbox {
    color: #94a3b8;
}

[data-theme="dark"] .erp-divider::before,
[data-theme="dark"] .erp-divider::after {
    background: var(--erp-divider-color);
}

[data-theme="dark"] .erp-btn-secondary {
    background: var(--erp-secondary-bg);
    border-color: var(--erp-secondary-border);
    color: var(--erp-secondary-text);
}

[data-theme="dark"] .erp-btn-secondary:hover {
    background: rgba(51, 65, 85, 0.85);
    border-color: #818cf8;
    color: #e0e7ff;
}

[data-theme="dark"] .erp-btn-secondary i {
    color: #a5b4fc;
}

[data-theme="dark"] .erp-card-footer a {
    color: #a5b4fc;
}

[data-theme="dark"] .erp-theme-toggle,
[data-theme="dark"] .erp-lang-select {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    color: #e2e8f0;
}

[data-theme="dark"] .erp-lang-select select {
    color: #e2e8f0;
}

[data-theme="dark"] .erp-trust-item strong {
    color: #e2e8f0;
}

[data-theme="dark"] .erp-captcha-row input {
    background: var(--erp-input-bg);
    border: 1px solid var(--erp-input-border);
    color: #f8fafc;
}

[data-theme="dark"] .erp-login-left::before {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 27, 75, 0.78) 50%, rgba(23, 37, 84, 0.7) 100%);
}

[data-theme="dark"] .erp-alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

[data-theme="dark"] .erp-alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: none;
    color: #fca5a5;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.erp-login-page {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

/* ===== LEFT PANEL ===== */
.erp-login-left {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 40px 48px;
    background-size: cover;
    background-position: center;
    color: #fff;
    min-height: 100vh;
    min-height: 100dvh;
}

.erp-login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 27, 75, 0.55) 50%, rgba(37, 99, 235, 0.35) 100%);
    z-index: 0;
}

.erp-login-left > * {
    position: relative;
    z-index: 1;
}

.erp-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    align-self: center;
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.erp-brand-text {
    text-align: left;
}

.erp-left-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 0;
}

.erp-brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.erp-brand-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.erp-brand-text p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
}

.erp-hero {
    width: 100%;
    max-width: 480px;
    margin: 0 0 28px;
    text-align: center;
}

.erp-hero h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.erp-hero h2 .highlight {
    background: linear-gradient(90deg, #a78bfa, #818cf8, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.erp-hero p {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.erp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.erp-feature-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 12px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.erp-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.erp-feature-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.erp-feature-icon-wrap i {
    font-size: 1.25rem;
    line-height: 1;
}

.erp-feature-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.erp-feature-label span {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.erp-security-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: none;
    border-radius: 16px;
    padding: 16px 20px;
    max-width: 400px;
    width: 100%;
    align-self: center;
}

.erp-security-badge .badge-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.erp-security-badge strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
}

.erp-security-badge small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
}

/* ===== RIGHT PANEL ===== */
.erp-login-right {
    flex: 1;
    min-width: 480px;
    background: var(--erp-right-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 48px;
    position: relative;
    overflow: hidden;
}

.erp-login-right::before,
.erp-login-right::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.erp-login-right::before {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.25) 0%, transparent 70%);
    top: -80px;
    right: -60px;
}

.erp-login-right::after {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.2) 0%, transparent 70%);
    bottom: -60px;
    left: -40px;
}

.erp-login-right > * {
    position: relative;
    z-index: 1;
}

.erp-utility-bar {
    position: absolute;
    top: 24px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.erp-theme-toggle {
    display: flex;
    background: var(--erp-card-bg);
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(59, 89, 223, 0.1);
    border: none;
}

.erp-theme-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--erp-text-muted);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.erp-theme-btn.active {
    background: var(--erp-gradient);
    color: #fff;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.erp-lang-select {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--erp-card-bg);
    border: none;
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--erp-text);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(59, 89, 223, 0.1);
}

.erp-lang-select select {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    cursor: pointer;
    outline: none;
    padding-right: 4px;
}

.erp-lang-select i.fa-globe {
    color: var(--erp-link);
}

.erp-lang-chevron {
    font-size: 0.65rem;
    color: var(--erp-text-muted);
    margin-left: -4px;
}

/* ===== LOGIN CARD ===== */
.erp-login-card {
    background: var(--erp-card-bg);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow);
    padding: 36px 36px 28px;
    width: 100%;
    max-width: 440px;
    margin-top: 40px;
    border: none;
}

.erp-card-illustration {
    text-align: center;
    margin-bottom: 12px;
}

.erp-school-illustration {
    width: 100px;
    height: auto;
    display: inline-block;
    object-fit: contain;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
}

.erp-login-card h3 {
    text-align: center;
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--erp-navy);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.erp-login-card .welcome-sub {
    text-align: center;
    font-size: 0.875rem;
    color: var(--erp-text-muted);
    margin-bottom: 28px;
}

.erp-form-group {
    margin-bottom: 20px;
}

.erp-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--erp-navy);
    margin-bottom: 8px;
}

.erp-input-wrap {
    position: relative;
}

.erp-input-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--erp-text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.erp-input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 44px;
    border: 1.5px solid var(--erp-input-border);
    border-radius: var(--erp-input-radius);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--erp-navy);
    background: var(--erp-input-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.erp-input-wrap input::placeholder {
    color: #94a3b8;
}

.erp-input-wrap input:focus {
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.erp-input-wrap input.input-error {
    border-color: #ef4444;
    animation: erp-shake 0.4s ease;
}

.erp-toggle-pwd {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--erp-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
}

.erp-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.erp-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--erp-text-muted);
    cursor: pointer;
}

.erp-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--erp-link);
    cursor: pointer;
}

.erp-forgot-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--erp-link);
    text-decoration: none;
    transition: color 0.2s;
}

.erp-forgot-link:hover {
    color: var(--erp-primary-dark);
    text-decoration: underline;
}

.erp-btn-primary {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: var(--erp-input-radius);
    background: var(--erp-gradient);
    color: #fff;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
}

.erp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.erp-btn-primary:active {
    transform: translateY(0);
}

.erp-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--erp-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.erp-divider::before,
.erp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--erp-divider-color);
}

.erp-btn-secondary {
    width: 100%;
    height: 50px;
    border: 1.5px solid var(--erp-secondary-border);
    border-radius: var(--erp-input-radius);
    background: var(--erp-secondary-bg);
    color: var(--erp-secondary-text);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
}

.erp-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--erp-link);
    text-decoration: none;
}

.erp-btn-secondary i {
    color: var(--erp-link);
    font-size: 1rem;
}

.erp-card-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.8125rem;
    color: var(--erp-text-muted);
}

.erp-card-footer a {
    color: var(--erp-link);
    font-weight: 700;
    text-decoration: none;
}

.erp-card-footer a:hover {
    text-decoration: underline;
}

.erp-staff-link-wrap {
    text-align: center;
    margin-top: 16px;
    width: 100%;
    max-width: 440px;
}

.erp-staff-link-text {
    font-size: 0.8125rem;
    color: var(--erp-text-muted);
    text-decoration: none;
}

.erp-staff-link-text a {
    color: var(--erp-link);
    font-weight: 600;
    text-decoration: none;
}

.erp-staff-link-text a:hover {
    text-decoration: underline;
}

/* ===== TRUST BADGES ===== */
.erp-trust-badges {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    width: 100%;
    max-width: 440px;
    justify-content: center;
}

.erp-trust-item {
    text-align: center;
    flex: 1;
}

.erp-trust-item .trust-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 8px;
}

.erp-trust-item strong {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--erp-navy);
    line-height: 1.35;
}

.erp-trust-item small {
    display: block;
    font-size: 0.625rem;
    color: var(--erp-text-muted);
    line-height: 1.35;
    margin-top: 2px;
}

/* ===== ALERTS & CAPTCHA ===== */
.erp-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.8125rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.erp-alert-danger {
    background: #fef2f2;
    border: none;
    color: #991b1b;
}

.erp-alert-success {
    background: #f0fdf4;
    border: none;
    color: #166534;
}

.erp-captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.erp-captcha-row .captcha-img {
    flex: 1;
}

.erp-captcha-row input {
    flex: 1;
    height: 48px;
    padding: 0 14px;
    border: none;
    border-radius: var(--erp-input-radius);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    background: var(--erp-input-bg);
}

.erp-captcha-refresh {
    cursor: pointer;
    color: var(--erp-link);
    font-size: 1.1rem;
    padding: 8px;
}

@keyframes erp-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

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

.erp-login-card {
    animation: erp-fadeIn 0.6s ease-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .erp-login-page {
        flex-direction: column;
    }

    .erp-login-left {
        min-height: auto;
        padding: 32px 24px;
    }

    .erp-left-center {
        padding: 16px 0;
        max-width: 100%;
    }

    .erp-hero {
        margin: 0 0 20px;
    }

    .erp-features-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
    }

    .erp-security-badge {
        display: none;
    }

    .erp-login-right {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        padding: 24px 20px 40px;
    }

    .erp-login-card {
        margin-top: 56px;
    }

    .erp-trust-badges {
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .erp-features-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    .erp-feature-card {
        min-height: 120px;
        padding: 16px 10px 14px;
    }

    .erp-login-card {
        padding: 28px 20px 24px;
    }

    .erp-utility-bar {
        top: 16px;
        right: 16px;
    }

    .erp-trust-badges {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .erp-brand {
        flex-direction: column;
    }

    .erp-brand-text {
        text-align: center;
    }

    .erp-left-center {
        padding: 12px 0 20px;
    }
}

@media (max-width: 480px) {
    .erp-brand-text h1 {
        font-size: 1.15rem;
    }

    .erp-hero h2 {
        font-size: 1.5rem;
    }
}
