/* Modern Login Page Styles */
:root {
    --primary-color: #1E73C9;
    --primary-dark: #14204A;
    --primary-light: #e8f0fe;
    --secondary-color: #2FA84F;
    --accent-color: #FF6B35;
    --text-dark: #1a202c;
    --text-light: #718096;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
}

/* Main Layout */
.login-page-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.login-page-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23e2e8f0' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.6;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* Left Panel - Branding */
.login-brand-panel {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    border-radius: var(--radius);
    padding: 3rem;
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.brand-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    position: relative;
    z-index: 2;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.brand-features li i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Right Panel - Login Form */
.login-form-panel {
    background: white;
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    height: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.required-note {
    background: var(--primary-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Enhanced Form Styles */
#login.cmp_form {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.form-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.form-divider span {
    padding: 0 1rem;
}

/* Modern Input Fields */
.field-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.field-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.field-group .label {
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-group .required {
    color: #ef4444;
    font-weight: bold;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
    z-index: 10;
}

.input-with-icon input {
    width: 100%;
    padding: 0.375rem 1rem 0.375rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-dark);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 115, 201, 0.1);
}

.input-with-icon input::placeholder {
    color: #a0aec0;
}

/* Password Field Specific */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    z-index: 10;
}

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

/* Remember & Forgot Password */
.remember-forgot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.remember-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s;
}

.remember-checkbox input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.remember-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.remember-checkbox span {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Error Messages */
.pkpscreenreader {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pkp_form_error {
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.95rem;
}



/* Buttons */
.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    height: 52px;
}

.btn-secondary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

/* Social Login */
.social-login {
    margin-top: 2rem;
}

.social-login-title {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    position: relative;
}

.social-login-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border-color);
}

.social-login-title::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border-color);
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-social:hover {
    background: var(--bg-light);
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

.btn-social i {
    font-size: 1.1rem;
}

/* Recaptcha & Altcha */
.recaptcha_wrapper,
.altcha_wrapper {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .login-brand-panel {
        padding: 2rem;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .login-form-panel {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .login-page-wrapper {
        padding: 1rem;
    }
    
    .login-brand-panel,
    .login-form-panel {
        padding: 1.5rem;
    }
    
    .brand-title {
        font-size: 1.75rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .remember-forgot-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-brand-panel,
.login-form-panel {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus States for Accessibility */
input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .login-page-wrapper {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .login-form-panel {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .field-group label,
    .field-group .label,
    .remember-checkbox span {
        color: #e2e8f0;
    }
    
    .input-with-icon input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .input-with-icon input::placeholder {
        color: #a0aec0;
    }
    
    .btn-social {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .btn-social:hover {
        background: #5a6578;
    }
}