* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body.login-bg {
    background: linear-gradient(135deg, #0056a3 0%, #0a2351 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 20px;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Mobile: Stack vertically */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        border-radius: 10px;
    }
    
    .brand-section, .login-section {
        width: 100% !important;
    }
}

/* Tablet: Start side-by-side */
@media (min-width: 769px) {
    .container {
        flex-direction: row;
        min-height: 700px;
    }
    
    .brand-section {
        width: 55%;
    }
    
    .login-section {
        width: 45%;
    }
}

.brand-section {
    background: linear-gradient(135deg, #0056a3 0%, #0a2351 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.login-section {
    padding: 40px;
    background: #f8fafc;
}

.login-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* Responsive inputs */
.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: #0056a3;
    box-shadow: 0 0 0 3px rgba(0, 86, 163, 0.1);
    outline: none;
}

/* Buttons that work on mobile */
.login-btn, .signup-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn {
    background: linear-gradient(to right, #0056a3, #0a2351);
    color: white;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 86, 163, 0.2);
}

/* Touch-friendly sizes for mobile */
@media (max-width: 480px) {
    .login-btn, .signup-btn, .input-group input {
        padding: 18px; /* Larger touch targets */
    }
    
    .container {
        margin: 10px;
        padding: 15px;
    }
}/*ENHANCED LOGIN PAGE STYLES  */

/* Password container with toggle button */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    padding-right: 50px !important;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #0056a3;
}

/* Error and Success States */
.input-group.error input {
    border-color: #dc2626 !important;
    background-color: #fef2f2;
}

.input-group.success input {
    border-color: #10b981 !important;
    background-color: #f0fdf4;
}

.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.input-group.error .error-message {
    display: block;
}

.success-message {
    background-color: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    margin: 15px 0;
    display: none;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.5s ease;
}

.success-message.show {
    display: flex;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Form Cards */
.form-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.form-card h3 {
    color: #0a2351;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

/* Row layout for half-width inputs */
.row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.half {
    flex: 1;
}

/* Terms Agreement */
.terms-agreement {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8fafc;
    border-radius: 10px;
    font-size: 14px;
}

/* Custom Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    padding-left: 30px;
    user-select: none;
}

.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #e2e8f0;
    border-radius: 5px;
    transition: all 0.3s;
}

.checkbox:hover .checkmark {
    background-color: #cbd5e0;
}

.checkbox input:checked ~ .checkmark {
    background-color: #0056a3;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Password Reset Specific */
.reset-step {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.security-note {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.security-note i {
    color: #1976d2;
    font-size: 20px;
}

/* Code Inputs */
.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.code-input {
    width: 50px !important;
    height: 60px !important;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
}

.code-input:focus {
    border-color: #0056a3;
    box-shadow: 0 0 0 3px rgba(0, 86, 163, 0.1);
    outline: none;
}

.timer {
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    color: #666;
}

.timer i {
    margin-right: 5px;
}

#countdown {
    font-weight: bold;
    color: #dc2626;
}

/* Password Strength */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 5px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background-color: #dc2626;
    transition: width 0.3s, background-color 0.3s;
}

.strength-text {
    font-size: 12px;
    color: #666;
}

/* Back to Login Link */
.back-to-login {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.back-to-login a {
    color: #0056a3;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.back-to-login a:hover {
    color: #0a2351;
}

/* Button States */
.login-btn:disabled,
.signup-submit-btn:disabled,
.reset-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn:disabled:hover,
.signup-submit-btn:disabled:hover,
.reset-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Micro-interactions */
input, button {
    transition: all 0.3s ease !important;
}

button:hover {
    transform: translateY(-2px);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        gap: 0;
    }
    
    .half {
        width: 100%;
    }
    
    .code-input {
        width: 40px !important;
        height: 50px !important;
    }
    
    .form-card {
        padding: 20px;
    }
}

/* Forgot password link */
.forgot-link {
    color: #0056a3;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: #0a2351;
    text-decoration: underline;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
