/* ===========================
   LOGIN PAGE STYLES
   =========================== */

.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--light);
    display: block !important;
    overflow: hidden;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary);
}

.hidden {
    display: none !important;
}

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

/* ===========================
   LEFT PANEL - BRANDING
   =========================== */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Decorative background pattern */
.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(30deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%, rgba(255, 255, 255, 0.05)),
        linear-gradient(150deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%, rgba(255, 255, 255, 0.05));
    background-size: 80px 140px;
    opacity: 0.3;
}

.login-branding {
    position: relative;
    z-index: 1;
    color: white;
    max-width: 500px;
}

.brand-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-description {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.brand-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===========================
   RIGHT PANEL - LOGIN FORM
   =========================== */
.login-right {
    flex: 1;
    background: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--gray);
}

/* Form Styles */
.login-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

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

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 1.5px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f9fafb;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--dark);
}

.checkbox-input {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-text {
    user-select: none;
}

/* Buttons */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

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

.btn-login svg {
    transition: transform 0.3s;
}

.btn-login:hover svg {
    transform: translateX(4px);
}

/* Divider */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    background: white;
    padding: 0 1rem;
    font-size: 0.85rem;
    color: var(--gray);
    position: relative;
    z-index: 1;
}

/* SSO Button */
.btn-sso {
    width: 100%;
    padding: 0.875rem;
    background: white;
    color: var(--dark);
    border: 1.5px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sso:not(:disabled):hover {
    border-color: var(--primary);
    background: #f9fafb;
}

.btn-sso:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Alerts */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Footer */
.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--gray);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
}

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

    .login-left {
        padding: 3rem 2rem;
        min-height: 40vh;
    }

    .brand-title {
        font-size: 2rem;
    }

    .brand-description {
        font-size: 1rem;
    }

    .login-right {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 2rem 1.5rem;
    }

    .brand-title {
        font-size: 1.75rem;
    }

    .login-form-container {
        padding: 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}