/* ===== AUTHENTICATION STYLES ===== */
.auth-wrapper {
    max-width: 650px;
    margin: 40px auto;
}

.auth-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 45px 40px 40px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.auth-card.login-card {
    max-width: 500px;
    margin: 0 auto;
}

/* ===== AUTH HEADER ===== */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, #003366, #1a4a7a);
    color: #fbb72c;
    border-radius: 50%;
    font-size: 2em;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.auth-icon.login-icon {
    background: linear-gradient(135deg, #1a4a7a, #003366);
}

.auth-icon.forgot-icon {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.auth-icon.reset-icon {
    background: linear-gradient(135deg, #27ae60, #1e8449);
}

.auth-header h3 {
    font-size: 1.8em;
    font-weight: 700;
    color: #003366;
    margin: 0 0 8px 0;
}

.auth-header p {
    font-size: 0.95em;
    color: #888;
    margin: 0;
}

/* ===== ALERT MESSAGES ===== */
.alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.alert-error,
.alert-danger {
    background: #fce4ec;
    border-color: #d93025;
    color: #c62828;
}

.alert-warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.alert-info {
    background: #e3f2fd;
    border-color: #1a73e8;
    color: #0d47a1;
}

.alert i {
    font-size: 1.2em;
}

/* ===== AUTH FORM ===== */
.auth-form {
    margin-top: 5px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    display: block;
    margin-bottom: 5px;
}

.auth-form .form-group label i {
    color: #fbb72c;
    width: 20px;
    margin-right: 4px;
}

.auth-form .form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 11px 15px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    width: 100%;
    background: #fafafa;
}

.auth-form .form-control:focus {
    border-color: #fbb72c;
    box-shadow: 0 0 0 3px rgba(251, 183, 44, 0.12);
    background: #ffffff;
}

.auth-form .form-control.error {
    border-color: #d93025;
}

.auth-form .help-text {
    display: block;
    font-size: 0.75em;
    color: #888;
    margin-top: 4px;
}

.required {
    color: #d93025;
    font-weight: 700;
}

/* ===== PASSWORD INPUT ===== */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.toggle-password:hover {
    color: #003366;
}

/* ===== PASSWORD STRENGTH ===== */
.password-strength {
    margin: 10px 0 18px;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.strength-progress {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: all 0.4s ease;
    background: #ddd;
}

.strength-text {
    font-size: 0.75em;
    color: #888;
    margin-top: 4px;
    display: block;
}

/* ===== LOGIN OPTIONS ===== */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me label {
    font-size: 0.85em;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #fbb72c;
}

.forgot-link {
    font-size: 0.85em;
    color: #fbb72c;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

/* ===== BUTTONS ===== */
.login-btn,
.register-btn,
.reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 30px;
    background: linear-gradient(135deg, #fbb72c, #f5a623);
    color: #003366;
    border: none;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.login-btn:hover,
.register-btn:hover,
.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(251, 183, 44, 0.4);
    background: linear-gradient(135deg, #f5a623, #e6951a);
}

.login-btn:active,
.register-btn:active,
.reset-btn:active {
    transform: scale(0.97);
}

/* ===== AUTH NAVIGATION (Multi-step) ===== */
.auth-navigation {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 25px;
    justify-content: space-between;
}

.prev-step-btn,
.next-step-btn,
.submit-btn {
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.prev-step-btn {
    background: #f0f2f5;
    color: #666;
}

.prev-step-btn:hover {
    background: #e0e0e0;
}

.next-step-btn {
    background: #003366;
    color: #ffffff;
}

.next-step-btn:hover {
    background: #1a4a7a;
    transform: translateX(3px);
}

.submit-btn {
    background: #fbb72c;
    color: #003366;
}

.submit-btn:hover {
    background: #e6a520;
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(251, 183, 44, 0.3);
}

/* ===== AUTH FOOTER ===== */
.auth-footer {
    text-align: center;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-footer p {
    font-size: 0.9em;
    color: #888;
    margin: 0;
}

.auth-link {
    color: #fbb72c;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: #003366;
    text-decoration: underline;
}

/* ===== DEMO CREDENTIALS ===== */
.demo-credentials {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.demo-credentials p {
    color: #999;
    font-size: 0.8em;
    margin: 0;
}

/* ===== SECURITY QUESTIONS ===== */
.security-questions {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.security-question-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* ===== TERMS & CONDITIONS ===== */
.terms-content {
    margin: 10px 0 15px;
}

.terms-scroll {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.terms-scroll h6 {
    font-size: 0.9em;
    font-weight: 700;
    color: #003366;
    margin: 10px 0 4px;
}

.terms-scroll h6:first-child {
    margin-top: 0;
}

.terms-scroll p {
    font-size: 0.85em;
    color: #555;
    line-height: 1.6;
    margin: 0 0 8px;
}

.terms-checkbox {
    margin: 15px 0 10px;
}

.terms-checkbox label {
    font-size: 0.85em;
    color: #555;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #fbb72c;
}

.terms-checkbox label a {
    color: #003366;
    font-weight: 600;
    text-decoration: none;
}

.terms-checkbox label a:hover {
    color: #fbb72c;
    text-decoration: underline;
}

/* ===== CONFIRMATION ===== */
.confirmation-content {
    text-align: center;
    padding: 10px 0;
}

.confirmation-icon {
    font-size: 3.5em;
    color: #4caf50;
    margin-bottom: 10px;
}

.confirmation-content h4 {
    font-size: 1.4em;
    font-weight: 700;
    color: #003366;
    margin: 0 0 8px 0;
}

.confirmation-content > p {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 20px;
}

.confirmation-summary {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 18px 20px;
    text-align: left;
    margin-bottom: 18px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 0.85em;
    color: #888;
}

.summary-value {
    font-size: 0.85em;
    font-weight: 600;
    color: #003366;
}

.confirmation-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #e8f0fe;
    padding: 12px 15px;
    border-radius: 8px;
}

.confirmation-note i {
    color: #1a73e8;
    font-size: 1.2em;
    margin-top: 2px;
}

.confirmation-note p {
    font-size: 0.85em;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* ===== MODAL (Terms) ===== */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    background: #003366;
    color: #ffffff;
    padding: 18px 25px;
    border-radius: 12px 12px 0 0;
}

.modal-header .close {
    color: #ffffff;
    opacity: 0.7;
    transition: all 0.3s ease;
    font-size: 1.8em;
}

.modal-header .close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-title {
    font-weight: 700;
}

.terms-body {
    padding: 25px;
}

.terms-body h5 {
    font-size: 1em;
    font-weight: 700;
    color: #003366;
    margin: 15px 0 5px;
}

.terms-body h5:first-child {
    margin-top: 0;
}

.terms-body p {
    font-size: 0.9em;
    color: #555;
    line-height: 1.6;
    margin: 0 0 10px;
}

.modal-footer .btn-close {
    padding: 8px 25px;
    background: #f0f2f5;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.modal-footer .btn-close:hover {
    background: #e0e0e0;
}

/* ===== RESPONSIVE ===== */
@media(max-width: 768px) {
    .auth-card {
        padding: 30px 20px 25px;
        margin: 0 10px;
    }
    
    .auth-header h3 {
        font-size: 1.4em;
    }
    
    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6em;
    }
    
    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .auth-navigation {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .auth-navigation button {
        flex: 1;
        min-width: 100px;
        text-align: center;
        justify-content: center;
        font-size: 0.8em;
        padding: 8px 15px;
    }
    
    .confirmation-summary {
        padding: 15px;
    }
    
    .summary-row {
        flex-direction: column;
        gap: 2px;
    }
    
    .terms-scroll {
        max-height: 150px;
    }
    
    .security-questions,
    .security-question-container {
        padding: 12px;
    }
}

@media(max-width: 480px) {
    .auth-card {
        padding: 20px 15px;
    }
    
    .auth-header h3 {
        font-size: 1.2em;
    }
    
    .auth-header p {
        font-size: 0.8em;
    }
    
    .auth-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3em;
    }
    
    .auth-form .form-control {
        font-size: 0.85em;
        padding: 9px 12px;
    }
    
    .login-btn,
    .register-btn,
    .reset-btn {
        font-size: 0.85em;
        padding: 11px 20px;
    }
    
    .alert {
        font-size: 0.85em;
        padding: 10px 14px;
    }
    
    .auth-navigation button {
        font-size: 0.7em;
        padding: 6px 12px;
        min-width: 80px;
    }
    
    .confirmation-icon {
        font-size: 2.5em;
    }
    
    .confirmation-content h4 {
        font-size: 1.1em;
    }
    
    .terms-scroll {
        max-height: 120px;
        padding: 10px;
    }
    
    .terms-scroll p {
        font-size: 0.8em;
    }
    
    .terms-checkbox label {
        font-size: 0.75em;
    }
}