/* ============================================================
   AAROGYOM - Login & Registration Page Styles
   login.css
   ============================================================ */

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-blue) 0%, #0d2d6b 60%, rgba(230,93,10,0.85) 100%);
    display: flex;
    flex-direction: column;       /* ← FIX: stack card + footer link vertically */
    align-items: center;
    justify-content: center;
    padding: 80px 1rem 100px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(230,93,10,0.2), transparent 65%);
    border-radius: 50%;
    animation: pulse 5s ease-in-out infinite;
}
.login-page::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.05), transparent 65%);
    border-radius: 50%;
}

/* ── Auth Card ─────────────────────────────────────────── */
.auth-card {
    background: white;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 2;
    /* Visible top accent so card stands out from dark blue background */
    border-top: 5px solid var(--primary-orange);
}

.auth-header {
    background: linear-gradient(135deg, var(--dark-blue), var(--mid-blue));
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    color: white;
}
.auth-logo { height: 50px; width: auto; object-fit: contain; margin-bottom: 0.5rem; }
.auth-brand { font-weight: 800; font-size: 1.3rem; letter-spacing: 1.5px; margin: 0; }
.auth-tagline { font-size: 0.75rem; opacity: 0.65; letter-spacing: 1px; text-transform: uppercase; margin: 0; }

/* ── Tab Switcher ──────────────────────────────────────── */
.auth-tabs {
    display: flex;
    padding: 0 2rem;
    gap: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #eee;
}
.auth-tab {
    flex: 1;
    padding: 14px 0;
    text-align: center;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted-custom);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}
.auth-tab.active {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}
.auth-tab:hover { color: var(--primary-orange); }

/* ── Auth Body ─────────────────────────────────────────── */
.auth-body { padding: 2rem; }

.tab-pane-auth { display: none; }
.tab-pane-auth.active { display: block; animation: fadeIn 0.35s ease; }

/* ── OTP Section ───────────────────────────────────────── */
.otp-section { display: none; }
.otp-section.show { display: block; animation: fadeInUp 0.4s ease; }

.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 1.2rem 0; }
.otp-input {
    width: 50px; height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    color: var(--dark-blue);
    transition: all 0.3s ease;
    caret-color: var(--primary-orange);
}
.otp-input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(230,93,10,0.15);
    outline: none;
}
.otp-input.filled { border-color: var(--primary-orange); background: rgba(230,93,10,0.04); }

.otp-timer { font-size: 0.82rem; color: var(--text-muted-custom); text-align: center; }
.otp-timer span { color: var(--primary-orange); font-weight: 700; }
.resend-link {
    color: var(--primary-orange);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.82rem;
    display: none;
}
.resend-link.show { display: inline; }

/* ── Alert boxes ───────────────────────────────────────── */
.auth-alert {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: none;
    align-items: center;
    gap: 10px;
}
.auth-alert.show { display: flex; }
.auth-alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.auth-alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Divider ───────────────────────────────────────────── */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 1.2rem 0;
    color: #ccc; font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: #eee;
}

/* ── Register extra ────────────────────────────────────── */
.optional-badge {
    font-size: 0.72rem;
    color: var(--text-muted-custom);
    font-weight: 400;
    margin-left: 5px;
}
.sponsor-hint {
    font-size: 0.78rem;
    color: var(--text-muted-custom);
    margin-top: 4px;
}

/* ── Footer link under card ────────────────────────────── */
.auth-footer-link { text-align: center; margin-top: 1.5rem; }
.auth-footer-link a { color: rgba(255,255,255,0.75); font-size: 0.85rem; text-decoration: none; }
.auth-footer-link a:hover { color: white; }

@media (max-width: 480px) {
    .auth-card { border-radius: 20px; }
    .auth-body { padding: 1.5rem; }
    .otp-input { width: 42px; height: 48px; font-size: 1.2rem; }
}

/* ============================================================
   DOCTOR REGISTRATION PAGE STYLES (doctor-register.css inline)
   ============================================================ */
.doctor-reg-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1628 0%, #0d2d6b 100%);
    display: flex;
    flex-direction: column;       /* ← FIX: stack card + footer link vertically */
    align-items: center;
    justify-content: center;
    padding: 80px 1rem 100px;
    position: relative;
}
.doctor-reg-card {
    background: white;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 2;
}
.doctor-reg-header {
    background: linear-gradient(135deg, #0a2351, #0d3a8a);
    padding: 2rem;
    text-align: center;
    color: white;
    border-bottom: 3px solid var(--primary-orange);
}
.doctor-reg-header .badge-private {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(230,93,10,0.2);
    border: 1px solid rgba(230,93,10,0.4);
    color: var(--light-orange);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.8rem;
}
.doctor-reg-body { padding: 2rem; }

.commission-hint { font-size: 0.78rem; color: var(--text-muted-custom); margin-top: 4px; }

/* ============================================================
   BOOTSTRAP 5 FORM VALIDATION STYLES (ADDED)
   ============================================================ */

/* Form Control Validation Styles */
.form-control.is-valid,
.was-validated .form-control:valid {
    border-color: #198754 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linecap='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-valid:focus,
.was-validated .form-control:valid:focus {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.form-control.is-invalid:focus,
.was-validated .form-control:invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Input Group Validation */
.input-group .form-control.is-valid {
    border-left: none;
}

.input-group .form-control.is-invalid {
    border-left: none;
}

.input-group-text {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input-group:has(.form-control.is-valid) .input-group-text {
    border-color: #198754 !important;
    color: #198754;
}

.input-group:has(.form-control.is-invalid) .input-group-text {
    border-color: #dc3545 !important;
    color: #dc3545;
}

/* Bootstrap Alert Styles (Overriding existing auth-alert) */
.alert {
    border-radius: 12px;
    border: none;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0a3622;
    border-left: 4px solid #198754;
}

.alert-danger {
    background-color: #f8d7da;
    color: #58151c;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
    border-left: 4px solid #0dcaf0;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
    border-left: 4px solid #ffc107;
}

/* Alert dismissible button styling */
.alert-dismissible .btn-close {
    padding: 1rem;
}

.alert-dismissible .btn-close:focus {
    box-shadow: none;
}

/* Invalid Feedback Styling */
.invalid-feedback {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: #dc3545;
}

/* Sponsor Info Styling */
#sponsorInfo {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

#sponsorInfo i {
    margin-right: 0.25rem;
}

.text-success {
    color: #198754 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

/* Form Label Styling */
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* Required field indicator */
.text-danger {
    font-size: 0.85rem;
}

/* Button loading state */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Animation for alerts */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert {
    animation: slideInDown 0.3s ease;
}

/* Responsive adjustments for validation icons */
@media (max-width: 480px) {
    .form-control.is-valid,
    .form-control.is-invalid {
        background-position: right calc(0.375em + 0.1875rem) center;
        background-size: calc(0.5em + 0.375rem) calc(0.5em + 0.375rem);
    }
    
    .otp-input {
        width: 42px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .alert {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Custom focus ring for better accessibility */
.form-control:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 0.2rem rgba(230, 93, 10, 0.25);
    outline: none;
}

/* Smooth transitions for form controls */
.form-control {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Auth Alert Container spacing */
.auth-alert {
    min-height: 60px;
}

/* Ensure proper spacing for validation messages */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    margin-bottom: 0;
}