/* Portal Login Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Wrapper */
.portal-wrapper {
    display: grid;
    grid-template-columns: 45% 55%;
    width: 100%;
    min-height: 100vh;
    background: white;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

/* Left Side - Branding */
.portal-branding {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.portal-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.5; }
}

.branding-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.branding-logo {
    width: 180px;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.branding-content h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.2em;
    margin-bottom: 50px;
    opacity: 0.95;
    font-weight: 300;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 60px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.1em;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.feature-icon {
    font-size: 2em;
}

/* Right Side - Login Section */
.portal-login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: #fafafa;
}

.login-container {
    width: 100%;
    max-width: 480px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    font-size: 2.2em;
    color: #1e3a8a;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    color: #6b7280;
    font-size: 1em;
}

/* Login Tabs */
.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 35px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.tab-icon {
    font-size: 1.3em;
}

/* Portal Forms */
.portal-form {
    display: none;
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.portal-form.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 0.95em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    font-size: 1.2em;
    color: #6b7280;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 50px 14px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1em;
    color: #1f2937;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #1e3a8a;
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 1.2em;
    color: #6b7280;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: #1e3a8a;
    transform: scale(1.1);
}

.eye-icon {
    display: block;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #4b5563;
    font-size: 0.95em;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1e3a8a;
}

.forgot-link {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: #10b981;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-arrow {
    font-size: 1.3em;
    transition: transform 0.3s ease;
}

.login-btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Login Footer */
.login-footer {
    margin-top: 30px;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.footer-links p {
    color: #6b7280;
    font-size: 0.95em;
}

.link-primary {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.link-primary:hover {
    color: #10b981;
    text-decoration: underline;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: #f3f4f6;
    color: #1e3a8a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.back-to-home:hover {
    background: white;
    border-color: #1e3a8a;
    transform: translateX(-5px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .portal-wrapper {
        grid-template-columns: 40% 60%;
    }
    
    .branding-logo {
        width: 150px;
    }
    
    .branding-content h1 {
        font-size: 2em;
    }
}

@media (max-width: 992px) {
    .portal-wrapper {
        grid-template-columns: 1fr;
    }
    
    .portal-branding {
        display: none;
    }
    
    .portal-login-section {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .portal-login-section {
        padding: 30px 20px;
    }
    
    .login-container {
        max-width: 100%;
    }
    
    .login-header h2 {
        font-size: 1.8em;
    }
    
    .portal-form {
        padding: 25px 20px;
    }
    
    .tab-btn {
        padding: 12px 15px;
        font-size: 0.9em;
    }
    
    .tab-icon {
        font-size: 1.2em;
    }
}

@media (max-width: 600px) {
    .login-header h2 {
        font-size: 1.5em;
    }
    
    .login-header p {
        font-size: 0.9em;
    }
    
    .portal-form {
        padding: 20px 15px;
    }
    
    .input-wrapper input {
        padding: 12px 45px 12px 45px;
        font-size: 0.95em;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .login-btn {
        padding: 14px 25px;
        font-size: 1em;
    }
    
    .footer-links {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .portal-login-section {
        padding: 20px 15px;
    }
    
    .login-tabs {
        gap: 8px;
        padding: 6px;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 0.85em;
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-icon {
        font-size: 1.5em;
    }
    
    .portal-form {
        padding: 18px 12px;
    }
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::after {
    content: '⏳';
    margin-left: 10px;
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error Messages */
.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #dc2626;
    font-size: 0.9em;
    display: none;
}

.error-message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Messages */
.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #10b981;
    font-size: 0.9em;
    display: none;
}

.success-message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

/* Help Text */
.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #6b7280;
    font-style: italic;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 15px;
    margin-bottom: 20px;
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.strength-text {
    font-size: 0.9em;
    font-weight: 500;
    transition: color 0.3s ease;
}

