/* =================================================================
   DentiGo Custom CSS
   Organized into sections. Dark-mode overrides are placed directly
   after the base rule they override, for easy maintainability.

   SECTIONS:
     01  Background & Preloader
     02  Shared Components (Avatars, Badges, Action Buttons)
     03  Typography & Utilities
     04  Pagination & Tables
     05  Forms & Search
     06  Schedule Module
     07  Profile Module
     08  Promotions Module
     09  Appointment / Booking Module
     10  Clinical Notes & Medical History
     11  Notification & Activity Log Dropdown
     12  User Account Dropdown
     13  Dashboard Metric Cards & Pulse Animations
     14  Doctor Reports Page
     15  Miscellaneous Utilities
================================================================= */

/* ─────────────────────────────────────────────────────────────
   01  BACKGROUND & PRELOADER
───────────────────────────────────────────────────────────── */
.dentigo-bg-decoration {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.dentigo-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.dentigo-bg-blob-top {
    top: -10%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: rgba(64, 224, 208, 0.12);
}

.dentigo-bg-blob-bottom {
    bottom: -5%;
    left: -5%;
    width: 40%;
    height: 40%;
    background: rgba(141, 214, 218, 0.07);
}

.dentigo-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.04;
    mix-blend-mode: overlay;
}

/* --- Preloader Styles --- */
#dentigo-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.2s ease;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-tooth {
    font-size: 3rem;
    color: #00796b;
    animation: pulse 1.8s infinite ease-in-out;
    will-change: transform;
}

.loader-bar {
    width: 150px;
    height: 4px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-progress {
    width: 40%;
    height: 100%;
    background: #00796b;
    position: absolute;
    left: 0;
    animation: slide 1.5s infinite linear;
    will-change: transform;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
}

@keyframes slide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(250%);
    }
}

/* ─────────────────────────────────────────────────────────────
   02  SHARED COMPONENTS — Avatars, Badges, Action Buttons
───────────────────────────────────────────────────────────── */

/* Avatars */
.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.patient-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.dark-mode .avatar-sm,
body.dark-mode .patient-avatar {
    border-color: #334155;
}

/* Specialized Badges */
.specialization-badge {
    background-color: rgba(0, 121, 107, 0.08);
    color: #00796b;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid rgba(0, 121, 107, 0.18);
    font-weight: 600;
    display: inline-block;
}

body.dark-mode .specialization-badge {
    background-color: rgba(45, 212, 191, 0.12) !important;
    color: #2dd4bf !important;
    border: 1px solid rgba(45, 212, 191, 0.25) !important;
}

/* Medical Record Number (MRN) Badge */
.medical-record-badge {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4338ca;
    /* High contrast Indigo-700 */
    background-color: rgba(67, 56, 202, 0.06);
    border: 1px dashed rgba(67, 56, 202, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    display: inline-block;
}

body.dark-mode .medical-record-badge {
    color: #818cf8;
    /* High contrast Indigo-400 for dark mode */
    background-color: rgba(129, 140, 248, 0.12);
    border-color: rgba(129, 140, 248, 0.4);
}

.schedule-badge {
    background: #e0f2fe;
    color: #0369a1 !important;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

body.dark-mode .schedule-badge {
    background: rgba(14, 165, 233, 0.2) !important;
    color: #38bdf8 !important;
}

.appointment-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 600;
    color: #0ea5e9;
    background: #e0f2fe;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

/* Status Badges Overrides */
.badge-confirmed {
    background-color: #f3e8ff !important;
    color: #9333ea !important;
    font-weight: 600;
}

.badge-completed {
    background-color: #e0f2fe !important;
    color: #0ea5e9 !important;
    font-weight: 600;
}

.badge-cancelled {
    background-color: #fee2e2 !important;
    color: #ef4444 !important;
    font-weight: 600;
}

.badge-in-progress {
    background-color: #d1fae5 !important;
    color: #10b981 !important;
    font-weight: 600;
}

.badge-waiting {
    background-color: #fef9c3 !important;
    color: #854d0e !important;
    font-weight: 600;
}

.badge-pending {
    background-color: #ffedd5 !important;
    color: #ea580c !important;
    font-weight: 600;
}

.badge-paid {
    background-color: #dcfce7 !important;
    color: #16a34a !important;
    font-weight: 600;
}

.badge-unpaid {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    font-weight: 600;
}

.badge-partial {
    background-color: #fef3c7 !important;
    color: #d97706 !important;
    font-weight: 600;
}

/* Dark mode badge overrides */
body.dark-mode .badge-confirmed {
    background-color: rgba(168, 85, 247, 0.15) !important;
    color: #c084fc !important;
}

body.dark-mode .badge-completed {
    background-color: rgba(14, 165, 233, 0.15) !important;
    color: #38bdf8 !important;
}

body.dark-mode .badge-cancelled {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

body.dark-mode .badge-in-progress {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
}

body.dark-mode .badge-waiting {
    background-color: rgba(234, 179, 8, 0.15) !important;
    color: #fde047 !important;
}

body.dark-mode .badge-pending {
    background-color: rgba(249, 115, 22, 0.15) !important;
    color: #fdba74 !important;
}

body.dark-mode .badge-paid {
    background-color: rgba(22, 163, 74, 0.15) !important;
    color: #4ade80 !important;
}

body.dark-mode .badge-unpaid {
    background-color: rgba(220, 38, 38, 0.15) !important;
    color: #f87171 !important;
}

body.dark-mode .badge-partial {
    background-color: rgba(217, 119, 6, 0.15) !important;
    color: #fcd34d !important;
}

/* Action Buttons */
.btn-action,
.btn-icon {
    position: relative;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.2s ease;
}

.btn-action:hover,
.btn-icon:hover {
    background: #e0f2fe;
    color: #00796b;
}

.btn-view {
    background: #e0f2fe;
    color: #0369a1;
}

.btn-edit {
    background: #fef9c3;
    color: #92400e;
}

.btn-delete {
    background: #fff1f2;
    color: #e11d48;
}

.btn-medical {
    background: #e0fdfa;
    color: #0d9488;
}

.btn-begin {
    background: #d1fae5;
    color: #059669;
}

.btn-begin:hover {
    background: #059669 !important;
    color: #ffffff !important;
}

.btn-end {
    background: #f3e8ff;
    color: #7c3aed;
}

.btn-end:hover {
    background: #7c3aed !important;
    color: #ffffff !important;
}


/* ─────────────────────────────────────────────────────────────
   04  PAGINATION & TABLES
───────────────────────────────────────────────────────────── */

/* Pagination Styling Shared */
.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 3px;
    border: 1px solid var(--border-soft);
    color: var(--primary-color);
    padding: 8px 14px;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

body.dark-mode .pagination .page-link {
    background-color: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

/* ─────────────────────────────────────────────────────────────
   03  TYPOGRAPHY & UTILITIES
───────────────────────────────────────────────────────────── */

.extra-small {
    font-size: 0.75rem;
}

.notes-preview {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;


    border-radius: 12px;
}

/* Profile Image Frame */
.profile-img-frame {
    border-color: #ffffff !important;
    background-color: #ffffff !important;
}

body.dark-mode .profile-img-frame {
    border-color: #1e293b !important;
    background-color: #1e293b !important;
}

.logo-square {
    display: none !important;
}

.sidebar.collapsed .logo-full {
    display: none !important;
}

.sidebar.collapsed .logo-square {
    display: block !important;
    height: 35px !important;
    margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────────
   06  SCHEDULE MODULE
───────────────────────────────────────────────────────────── */

/* Weekly Schedule Grid Styles */
.weekly-schedule-container {
    overflow-y: auto;
    max-height: 70vh;
    padding-right: 5px;
}

.weekly-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.day-column {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.03) 0%, rgba(13, 148, 136, 0.08) 100%);
    border-radius: 16px;
    padding: 15px;
    border: 1px solid rgba(13, 148, 136, 0.15);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.day-name {
    font-weight: 800;
    color: #1e293b;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}


.schedule-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.schedule-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #00796b;
}

.schedule-time-box {
    background: #f0fdfa;
    color: #0d9488;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-xs {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.no-practice-placeholder {
    text-align: center;
    padding: 30px 10px;
    color: #94a3b8;
    font-size: 0.75rem;
    font-style: italic;
    border: 2px dashed #f1f5f9;
    border-radius: 12px;
}

/* Dark Mode Overrides for Schedule */
body.dark-mode .day-column {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.05) 0%, rgba(13, 148, 136, 0.15) 100%);
    border-color: rgba(13, 148, 136, 0.25);
}

body.dark-mode .day-header {
    border-bottom-color: rgba(13, 148, 136, 0.2);
}

body.dark-mode .day-name {
    color: #2dd4bf;
}

body.dark-mode .schedule-card {
    background: #1e293b;
    border-color: #435066;
    /* More subtle border for cards */
}

body.dark-mode .schedule-time-box {
    background: rgba(13, 148, 136, 0.1);
    color: #2dd4bf;
}

body.dark-mode .no-practice-placeholder {
    border-color: #334155;
}

/* ─────────────────────────────────────────────────────────────
   07  PROFILE MODULE
───────────────────────────────────────────────────────────── */
.profile-modal-body {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 20px;
}

.profile-header-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    height: 60px;
    position: relative;
}

.profile-content-wrapper {
    padding: 1.5rem;
    margin-top: -10px;
}

.profile-avatar-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 1.5rem;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.profile-info-card {
    background-color: #f8fafc;
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.profile-info-icon {
    width: 38px;
    height: 38px;
    background-color: #ffffff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

/* --- Stepper Styles --- */
.apt-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
    padding: 0 10px;
}

.apt-stepper::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.stepper-item-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    width: 60px;
}

.stepper-item {
    background: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    color: #94a3b8;
    font-weight: 800;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
}

.stepper-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.5px;
    text-align: center;
    transition: all 0.3s ease;
}

.stepper-item-wrapper.active .stepper-item {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 5px rgba(0, 121, 107, 0.15);
}

.stepper-item-wrapper.active .stepper-label {
    color: var(--primary-color);
}

.stepper-item-wrapper.completed .stepper-item {
    border-color: var(--primary-color);
    background: #ffffff;
    color: var(--primary-color);
}

.stepper-item-wrapper.completed .stepper-label {
    color: #64748b;
}

body.dark-mode .stepper-item {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .apt-stepper::before {
    background: #334155;
}

body.dark-mode .stepper-item-wrapper.completed .stepper-item {
    background: #1e293b;
}

/* Selection Cards for Multi-Step */
.clinic-select-card,
.doctor-select-card {
    transition: all 0.3s ease;
    background: #ffffff;
    cursor: pointer;
    border: 2px solid #f1f5f9 !important;
    position: relative;
    overflow: hidden;
}

.clinic-select-card:hover,
.doctor-select-card:hover {
    border-color: var(--primary-color) !important;
    transform: translateY(-2px);
}

label:has(input[type="radio"]:checked) {
    border-color: var(--primary-color) !important;
    background: rgba(0, 121, 107, 0.04) !important;
    box-shadow: 0 8px 15px rgba(0, 121, 107, 0.08);
}

label:has(input[type="radio"]:checked)::after {
    content: '\f058';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary-color);
    font-size: 1rem;
}

.patient-result-item {
    border-left: 4px solid transparent !important;
    transition: all 0.2s ease;
    background-color: var(--glass-bg, #ffffff) !important;
    color: var(--text-dark, #334155) !important;
    border-bottom: 1px solid var(--border-soft, #f1f5f9) !important;
}

.patient-result-item:last-child {
    border-bottom: none !important;
}

.patient-result-item:hover {
    background-color: var(--border-soft, #f1f5f9) !important;
    color: var(--text-dark, #334155) !important;
}

.patient-result-item.active {
    border-left-color: var(--primary-color, #00796b) !important;
    background-color: rgba(0, 121, 107, 0.08) !important;
    color: var(--primary-color, #00796b) !important;
}

body.dark-mode .patient-result-item {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

body.dark-mode .patient-result-item:hover {
    background-color: #334155 !important;
}

body.dark-mode .patient-result-item.active {
    background-color: rgba(0, 121, 107, 0.15) !important;
    color: #ffffff !important;
}

#patientSearchResults {
    border-color: var(--border-soft, #e2e8f0) !important;
}

body.dark-mode #patientSearchResults {
    border-color: #334155 !important;
}

body.dark-mode .clinic-select-card,
body.dark-mode .doctor-select-card {
    background: #1e293b;
    border-color: #334155 !important;
}

body.dark-mode label:has(input[type="radio"]:checked) {
    background: rgba(0, 121, 107, 0.1) !important;
}

.search-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(0, 121, 107, 0.1);
}

body.dark-mode .search-bar {
    background: #1e293b;
    border-color: #334155 !important;
}

.summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.summary-item {
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    height: 100%;
}

body.dark-mode .summary-card {
    background: #0f172a;
    border-color: #1e293b;
}

body.dark-mode .summary-item {
    background: #1e293b;
}

.profile-side-card {
    height: 100%;
    padding: 1.5rem;
    border-radius: 1.5rem;
    background-color: rgba(0, 121, 107, 0.05);
    border: 1px solid rgba(0, 121, 107, 0.1);
}

/* Theme Overrides for Profile */
body.dark-mode .profile-avatar-img {
    border-color: #1e293b;
    background-color: #1e293b;
}

body.dark-mode .profile-info-card {
    background-color: #0f172a;
    border-color: #1e293b;
}

body.dark-mode .profile-info-icon {
    background-color: #1e293b;
    box-shadow: none;
}

body.dark-mode .profile-side-card {
    background-color: rgba(30, 41, 59, 0.5);
    border-color: #1e293b;
}

/* ─────────────────────────────────────────────────────────────
   08  PROMOTIONS MODULE
───────────────────────────────────────────────────────────── */
.promo-card {
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    height: 100%;
    background: #fff;
}

.promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 121, 107, 0.1);
    border-color: var(--primary-color);
}

.promo-code-badge {
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    letter-spacing: 1px;
    font-weight: 700;
    background: rgba(0, 121, 107, 0.05);
    color: var(--primary-color);
    border: 1px dashed var(--primary-color);
}

.status-badge-active {
    background: #e6f4ea;
    color: #1e7e34;
}

.status-badge-inactive {
    background: #feeaef;
    color: #d63384;
}

.card-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: none;
}

.btn-edit-promo {
    background: #fff9db;
    color: #f08c00;
}

.btn-edit-promo:hover {
    background: #f08c00;
    color: #fff;
}

.btn-delete-promo {
    background: #fff5f5;
    color: #fa5252;
}

.btn-delete-promo:hover {
    background: #fa5252;
    color: #fff;
}

.promo-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Dark Mode Overrides for Promotions */
body.dark-mode .promo-card {
    background-color: #1e293b;
    border-color: #334155;
}

body.dark-mode .promo-code-badge {
    background: rgba(0, 121, 107, 0.15);
}

body.dark-mode .status-badge-active {
    background: rgba(30, 126, 52, 0.15);
    color: #2ecc71;
}

body.dark-mode .status-badge-inactive {
    background: rgba(214, 51, 132, 0.15);
    color: #f87171;
}

body.dark-mode .btn-edit-promo {
    background: rgba(240, 140, 0, 0.15);
}

body.dark-mode .btn-delete-promo {
    background: rgba(250, 82, 82, 0.15);
}






/* ─────────────────────────────────────────────────────────────
   09  APPOINTMENT / BOOKING MODULE
───────────────────────────────────────────────────────────── */

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-header {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 8px;
}

.user-dropdown-menu .dropdown-item {
    border-radius: 12px;
    padding: 10px 15px;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #475569;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.user-dropdown-menu .dropdown-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 10px;
    margin-right: 12px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

[dir="rtl"] .user-dropdown-menu .dropdown-item i {
    margin-right: 0;
    margin-left: 12px;
}

.user-dropdown-menu .dropdown-item:hover {
    background: rgba(0, 121, 107, 0.08);
    color: var(--primary-color);
}

.user-dropdown-menu .dropdown-item:hover i {
    background: var(--primary-color);
    color: #fff;
}

.user-dropdown-menu .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.user-dropdown-menu .dropdown-item.text-danger:hover i {
    background: #ef4444;
    color: #fff;
}

/* Dark Mode Overrides for User Dropdown */
body.dark-mode .user-dropdown-menu {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .user-dropdown-header {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .user-dropdown-menu .dropdown-item {
    color: #cbd5e1;
}

body.dark-mode .user-dropdown-menu .dropdown-item i {
    background: #334155;
    color: #94a3b8;
}

body.dark-mode .header-user-name {
    color: #f1f5f9 !important;
}


.icon-glass {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
}

body.dark-mode .icon-glass {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.02);
}

.stat-value {
    font-size: 2rem;
    letter-spacing: -1px;
    color: var(--stat-value);
}

.stat-label {
    color: var(--stat-label);
}

/* Icon Color Adaptations */
.icon-p-primary {
    color: #0f766e !important;
}

.icon-p-info {
    color: #0369a1 !important;
}

.icon-p-purple {
    color: #7e22ce !important;
}

.icon-p-success {
    color: #15803d !important;
}

body.dark-mode .icon-p-primary {
    color: #5eead4 !important;
}

body.dark-mode .icon-p-info {
    color: #7dd3fc !important;
}

body.dark-mode .icon-p-purple {
    color: #d8b4fe !important;
}

body.dark-mode .icon-p-success {
    color: #86efac !important;
}

/* Ping Animation for Online Badge */
.pulse-online {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
}

.pulse-online::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #10b981;
    opacity: 0.75;
    animation: ping-pulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-online::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #10b981;
}


.pulse-blue {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
}

.pulse-blue::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #1282be;
    opacity: 0.75;
    animation: ping-pulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-blue::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #1282be;
}

.pulse-purple {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
}

.pulse-purple::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #a855f7;
    opacity: 0.75;
    animation: ping-pulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-purple::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #a855f7;
}

.pulse-orange {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
}
.pulse-orange::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    background-color: #f97316;
    opacity: 0.75;
    animation: ping-pulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.pulse-orange::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    background-color: #f97316;
}

@keyframes ping-pulse {

    75%,
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.pulse-red {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
}

.pulse-red::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #ef4444;
    opacity: 0.75;
    animation: ping-pulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-red::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #ef4444;
}

/* ─────────────────────────────────────────────────────────────
   05  FORMS, SEARCH & CUSTOM BUTTONS
───────────────────────────────────────────────────────────── */

/* Custom Outline Primary Button (Teal/Green) */
.btn-outline-primary-custom {
    border: 1.5px solid var(--primary-color, #00796b) !important;
    color: var(--primary-color, #00796b) !important;
    background-color: #ffffff !important;
}

.btn-outline-primary-custom:hover {
    background-color: var(--primary-color, #00796b) !important;
    color: #ffffff !important;
}

body.dark-mode .btn-outline-primary-custom {
    background-color: #1e293b !important;
}

/* Appointment Number Badge */
.appointment-number {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f766e;
    /* High contrast dark teal */
    background: rgba(15, 118, 110, 0.06);
    /* Soft matching background */
    border: 1px dashed rgba(15, 118, 110, 0.3);
    /* Slightly more prominent border */
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    display: inline-block;
}

body.dark-mode .appointment-number {
    color: #2dd4bf;
    /* Bright teal for high contrast in dark mode */
    background: rgba(45, 212, 191, 0.12);
    /* Slightly opacity boost */
    border-color: rgba(45, 212, 191, 0.4);
}

/* Appointment Modal Layout Specifics */
#viewAppointmentModal .bg-primary.bg-opacity-5 {
    background-color: rgba(15, 118, 110, 0.06) !important;
    /* Soft dark-teal tint in Light Mode */
    border-color: rgba(15, 118, 110, 0.2) !important;
}

body.dark-mode #viewAppointmentModal .bg-primary.bg-opacity-5 {
    background-color: rgba(45, 212, 191, 0.08) !important;
    /* Soft cyan/teal tint in Dark Mode */
    border-color: rgba(45, 212, 191, 0.2) !important;
}

/* Unified Custom Outline Secondary Button (Close/Cancel) */
.btn-outline-secondary {
    border: 1.5px solid var(--primary-color, #00796b) !important;
    color: var(--primary-color, #00796b) !important;
    background-color: transparent !important;
    transition: all 0.2s ease-in-out !important;
}

.btn-outline-secondary:hover {
    background-color: var(--primary-color, #00796b) !important;
    color: #ffffff !important;
}

body.dark-mode .btn-outline-secondary {
    border-color: #2dd4bf !important;
    /* Bright teal in dark mode */
    color: #2dd4bf !important;
    background-color: transparent !important;
}

body.dark-mode .btn-outline-secondary:hover {
    background-color: #2dd4bf !important;
    color: #0f172a !important;
}

/* Purple Badge/Text Styling for Doctor Card */
.bg-purple-subtle-custom {
    background-color: rgba(126, 34, 206, 0.06) !important;
    border: 1px solid rgba(126, 34, 206, 0.2) !important;
}

.text-purple-custom {
    color: #7e22ce !important;
    /* Rich deep purple */
    font-weight: 600;
}

body.dark-mode .bg-purple-subtle-custom {
    background-color: rgba(168, 85, 247, 0.12) !important;
    border-color: rgba(168, 85, 247, 0.3) !important;
}

body.dark-mode .text-purple-custom {
    color: #c084fc !important;
    /* Bright high contrast purple */
}

/* Autocomplete Dropdown Styling */
.autocomplete-menu {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(10px);
}

body.dark-mode .autocomplete-menu {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background-color: #1e293b !important;
}

.autocomplete-menu .dropdown-item {
    transition: all 0.2s ease;
    color: var(--text-color, #212529) !important;
}

.autocomplete-menu .dropdown-item:hover {
    background-color: rgba(0, 121, 107, 0.08) !important;
    color: #00796b !important;
    transform: translateX(4px);
}

body.dark-mode .autocomplete-menu .dropdown-item {
    color: #e2e8f0 !important;
}

body.dark-mode .autocomplete-menu .dropdown-item:hover {
    background-color: rgba(45, 212, 191, 0.12) !important;
    color: #2dd4bf !important;
}

/* ─────────────────────────────────────────────────────────────
   10  CLINICAL NOTES & MEDICAL HISTORY
───────────────────────────────────────────────────────────── */

/* Clinical Notes Styles & Dark/Light Mode Adaptations */
.patient-info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1px solid var(--border-soft) !important;
}

body.dark-mode .patient-info-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border: 1px solid #334155 !important;
}

.services-list-container {
    background-color: #fafafa !important;
    border: 1px solid var(--border-soft) !important;
}

body.dark-mode .services-list-container {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
}

.service-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    user-select: none;
}

.service-item:hover {
    border-color: var(--primary-color) !important;
    background-color: rgba(0, 121, 107, 0.04) !important;
}

.service-item.selected {
    border-color: var(--primary-color) !important;
    background-color: rgba(0, 121, 107, 0.08) !important;
    box-shadow: 0 0 0 1px var(--primary-color);
}

body.dark-mode .service-item {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .service-item:hover {
    border-color: #2dd4bf !important;
    background-color: rgba(45, 212, 191, 0.04) !important;
}

body.dark-mode .service-item.selected {
    border-color: #2dd4bf !important;
    background-color: rgba(45, 212, 191, 0.08) !important;
    box-shadow: 0 0 0 1px #2dd4bf;
}

.invoice-summary-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e1b4b 100%) !important;
    color: #ffffff !important;
}

body.dark-mode .invoice-summary-card {
    background: linear-gradient(135deg, #096d65 0%, #020617 100%) !important;
    color: #ffffff !important;
}

body.dark-mode .invoice-summary-card,
body.dark-mode .invoice-summary-card * {
    color: #ffffff !important;
}

body.dark-mode .invoice-summary-card .text-warning {
    color: #fbbf24 !important;
}

.btn-save-treatment {
    border: none !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
    background-color: #f59e0b !important;
    color: #1e1b4b !important;
    transition: all 0.2s ease;
}

.btn-save-treatment:hover {
    background-color: #d97706 !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6) !important;
    color: #1e1b4b !important;
}

body.dark-mode .btn-save-treatment {
    background-color: #fbbf24 !important;
    color: #020617 !important;
}

body.dark-mode .btn-save-treatment:hover {
    background-color: #f59e0b !important;
    color: #020617 !important;
}

.btn-back-custom {
    background-color: #ffffff !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--border-soft) !important;
    transition: all 0.2s ease;
}

.btn-back-custom:hover {
    background-color: #f1f5f9 !important;
}

body.dark-mode .btn-back-custom {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

body.dark-mode .btn-back-custom:hover {
    background-color: #334155 !important;
}

/* Odontogram History Card & Badges */
.odontogram-history-card {
    background-color: var(--border-soft);
    border-radius: 12px;
    border-left: 3px solid var(--primary-color) !important;
    padding: 1rem;
    margin-top: 0.75rem;
}

.odontogram-header-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: block;
}

.odontogram-tooth-badge {
    background-color: rgba(0, 121, 107, 0.08);
    color: #00796b;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 121, 107, 0.15);
    display: inline-block;
}

body.dark-mode .odontogram-tooth-badge {
    background-color: rgba(45, 212, 191, 0.12) !important;
    color: #2dd4bf !important;
    border-color: rgba(45, 212, 191, 0.25) !important;
}

.odontogram-condition-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e11d48;
    /* Soft crimson/red */
}

body.dark-mode .odontogram-condition-text {
    color: #f87171 !important;
    /* Soft rose/red */
}

/* Medical History Patient Banner */
.medical-history-patient-banner {
    background-color: rgba(0, 121, 107, 0.05) !important;
    border: 1px solid rgba(0, 121, 107, 0.12) !important;
    padding: 1.25rem !important;
    border-radius: 14px;
}

.medical-history-patient-name {
    color: var(--primary-color) !important;
    font-weight: 700;
}

body.dark-mode .medical-history-patient-banner {
    background-color: rgba(45, 212, 191, 0.06) !important;
    border-color: rgba(45, 212, 191, 0.15) !important;
}

body.dark-mode .medical-history-patient-name {
    color: #2dd4bf !important;
}

/* Scrollable Container Custom Scrollbar */
#medicalHistoryContent::-webkit-scrollbar {
    width: 6px;
}

#medicalHistoryContent::-webkit-scrollbar-track {
    background: transparent;
}

#medicalHistoryContent::-webkit-scrollbar-thumb {
    background: rgba(0, 121, 107, 0.15);
    border-radius: 4px;
}

body.dark-mode #medicalHistoryContent::-webkit-scrollbar-thumb {
    background: rgba(45, 212, 191, 0.15);
}

#medicalHistoryContent::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 121, 107, 0.3);
}

/* Medical History Record Cards */
.history-record-card {
    background-color: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    display: block;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-record-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

body.dark-mode .history-record-card {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: none;
}

/* Record Card Header */
.history-record-header {
    background-color: rgba(0, 121, 107, 0.02);
    border-bottom: 1px solid var(--border-soft);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-mode .history-record-header {
    background-color: rgba(15, 23, 42, 0.3);
    border-bottom-color: #334155;
}

/* Date in Header */
.history-record-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

body.dark-mode .history-record-date {
    color: #2dd4bf;
}

/* Doctor Badge in Header */
.history-record-doctor-badge {
    background-color: rgba(0, 121, 107, 0.08);
    color: #00796b;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

body.dark-mode .history-record-doctor-badge {
    background-color: rgba(45, 212, 191, 0.12);
    color: #2dd4bf;
}

/* Record Card Body */
.history-record-body {
    padding: 1.25rem;
}

/* Label for Fields */
.history-record-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.35rem;
    display: block;
    letter-spacing: 0.05em;
}

/* Value for Fields */
.history-record-value {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-dark);
    font-weight: 500;
}

.history-field-box {
    background-color: rgba(0, 121, 107, 0.03);
    border: 1px solid rgba(0, 121, 107, 0.1);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    height: 100%;
    transition: all 0.2s ease;
}
.history-field-box:hover {
    background-color: rgba(0, 121, 107, 0.06);
    border-color: rgba(0, 121, 107, 0.2);
}

body.dark-mode .history-field-box {
    background-color: rgba(45, 212, 191, 0.04);
    border-color: rgba(45, 212, 191, 0.12);
}
body.dark-mode .history-field-box:hover {
    background-color: rgba(45, 212, 191, 0.08);
    border-color: rgba(45, 212, 191, 0.25);
}

.history-record-value.text-primary {
    color: var(--primary-color) !important;
    font-weight: 600;
}

body.dark-mode .history-record-value.text-primary {
    color: #2dd4bf !important;
}

/* Prescription Card */
.history-record-prescription {
    background-color: rgba(217, 119, 6, 0.03);
    border-left: 3px solid rgba(217, 119, 6, 0.4);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

body.dark-mode .history-record-prescription {
    background-color: rgba(245, 158, 11, 0.05);
    border-left-color: rgba(245, 158, 11, 0.5);
}

.history-prescription-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #b45309;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    display: block;
    letter-spacing: 0.05em;
}

body.dark-mode .history-prescription-label {
    color: #fbbf24;
}

.history-prescription-value {
    font-size: 0.85rem;
    font-style: italic;
    font-weight: 600;
    color: #78350f;
}

body.dark-mode .history-prescription-value {
    color: #fef08a;
}

/* (Dropdown styles moved to end of file — see ACTIVITY LOGS DROPDOWN section) */


.notification-item:hover .rounded-circle {
    transform: scale(1.1);
    filter: grayscale(0%);
    opacity: 1;
}

/* Pulse animation on notification badge */
.notification-dropdown .badge {
    animation: soft-pulse 2s infinite ease-in-out;
}

@keyframes soft-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Pulse animation on red dot indicator */
.notification-indicator {
    animation: red-pulse 1.5s infinite;
}

@keyframes red-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* ─────────────────────────────────────────────────────────────
   11  NOTIFICATION & ACTIVITY LOG DROPDOWN
        Light & Dark theme included below each base rule.
───────────────────────────────────────────────────────────── */

/* ── Dropdown panel ─────────────────────────────────────────── */
.notification-menu {
    position: absolute;
    background-color: #ffffff;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.07),
        0 20px 60px -10px rgba(0, 0, 0, 0.13) !important;
    padding: 0;
    /* overflow:visible agar arrow ::after tidak terpotong */
    overflow: visible;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Wrapper inner untuk clip konten dengan border-radius */
.notification-menu .notification-header-bg,
.notification-menu .notification-list,
.notification-list + div,
.user-dropdown-menu .notification-header-bg,
.user-dropdown-menu .notification-list {
    overflow: hidden;
}

/* Arrow caret pointing up to bell */
.notification-dropdown .notification-menu::after {
    content: '';
    position: absolute;
    top: -6px;
    right: 30px;
    transform: rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: #f8fafc;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 2px 0 0 0;
}

/* Hover bridge — prevents menu from closing on mouse gap */
.notification-dropdown .notification-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

/* ── Show / hide animation ──────────────────────────────────── */
.notification-dropdown .notification-menu {
    display: block;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transition:
        opacity 0.22s ease,
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.22s;
}

.notification-dropdown:hover .notification-menu,
.notification-menu.show {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity 0.28s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0s;
}

/* ── Header & footer strip ──────────────────────────────────── */
.notification-header-bg {
    background-color: #f8fafc !important;
}

/* ── Scrollable log list ──────────────────────────────────── */
#activityLogList {
    max-height: 320px;
    overflow-y: auto;
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 121, 107, 0.45) rgba(0, 121, 107, 0.07);
}

/* Chrome / Safari / Edge */
#activityLogList::-webkit-scrollbar {
    width: 5px;
}

#activityLogList::-webkit-scrollbar-track {
    background: rgba(0, 121, 107, 0.07);
    border-radius: 0 0 16px 0; /* ikut border-radius panel */
}

#activityLogList::-webkit-scrollbar-thumb {
    background: rgba(0, 121, 107, 0.4);
    border-radius: 4px;
}

#activityLogList::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 121, 107, 0.7);
}

/* ── Individual log item ────────────────────────────────────── */
.log-notification-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    background-color: #ffffff;
    transition: background-color 0.18s ease;
    cursor: pointer;
}

.log-notification-item:last-child {
    border-bottom: none !important;
}

.log-notification-item:hover {
    background-color: #f0fdf9 !important;
}

/* ── Icon circle ────────────────────────────────────────────── */
.log-icon-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    opacity: 0.85;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.log-notification-item:hover .log-icon-circle {
    transform: scale(1.08);
    opacity: 1;
}

/* Bootstrap color utilities for icon circles */
.log-icon-circle.bg-primary   { background-color: rgba(13, 110, 253, 0.12)  !important; color: #0d6efd !important; }
.log-icon-circle.bg-success   { background-color: rgba(25, 135, 84, 0.12)   !important; color: #198754 !important; }
.log-icon-circle.bg-danger    { background-color: rgba(220, 53, 69, 0.12)   !important; color: #dc3545 !important; }
.log-icon-circle.bg-warning   { background-color: rgba(255, 193, 7, 0.12)   !important; color: #d97706 !important; }
.log-icon-circle.bg-info      { background-color: rgba(13, 202, 240, 0.12)  !important; color: #0284c7 !important; }
.log-icon-circle.bg-secondary { background-color: rgba(108, 117, 125, 0.12) !important; color: #6c757d !important; }

/* ── Log item text ──────────────────────────────────────────── */
.log-item-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-item-desc {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-item-time {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ── "View All" footer link ─────────────────────────────────── */
.notification-menu .view-all-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.18s ease;
}

.notification-menu .view-all-link:hover {
    color: var(--primary-light);
}

/* ── Notification badge pulse ───────────────────────────────── */
.notification-dropdown .badge {
    animation: soft-pulse 2.5s infinite ease-in-out;
}

@keyframes soft-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.08); }
}

/* ================================================================
   DARK MODE OVERRIDES — Activity Logs
   ================================================================ */

body.dark-mode .notification-menu {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 25px 70px -10px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .notification-dropdown .notification-menu::after {
    /* Match the header strip color, not the panel body */
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .notification-header-bg {
    background-color: #0f172a !important;
}

body.dark-mode .notification-menu .border-bottom,
body.dark-mode .notification-menu .border-top {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-mode #activityLogList {
    /* Firefox */
    scrollbar-color: rgba(45, 212, 191, 0.5) rgba(45, 212, 191, 0.08);
}

body.dark-mode #activityLogList::-webkit-scrollbar-track {
    background: rgba(45, 212, 191, 0.06);
}

body.dark-mode #activityLogList::-webkit-scrollbar-thumb {
    background: rgba(45, 212, 191, 0.4);
}

body.dark-mode #activityLogList::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 212, 191, 0.65);
}

/* Dark log items */
body.dark-mode .log-notification-item {
    background-color: #1e293b;
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .log-notification-item:hover {
    background-color: rgba(45, 212, 191, 0.05) !important;
}

body.dark-mode .log-icon-circle.bg-primary   { background-color: rgba(96, 165, 250, 0.14)  !important; color: #60a5fa !important; }
body.dark-mode .log-icon-circle.bg-success   { background-color: rgba(52, 211, 153, 0.14)  !important; color: #34d399 !important; }
body.dark-mode .log-icon-circle.bg-danger    { background-color: rgba(248, 113, 113, 0.14) !important; color: #f87171 !important; }
body.dark-mode .log-icon-circle.bg-warning   { background-color: rgba(251, 191, 36, 0.14)  !important; color: #fbbf24 !important; }
body.dark-mode .log-icon-circle.bg-info      { background-color: rgba(56, 189, 248, 0.14)  !important; color: #38bdf8 !important; }
body.dark-mode .log-icon-circle.bg-secondary { background-color: rgba(148, 163, 184, 0.14) !important; color: #94a3b8 !important; }

body.dark-mode .log-item-title {
    color: #e2e8f0 !important;
}

body.dark-mode .log-item-desc {
    color: #94a3b8 !important;
}

/* Dark "View All" link */
body.dark-mode .notification-menu .view-all-link {
    color: #2dd4bf;
}

body.dark-mode .notification-menu .view-all-link:hover {
    color: #5eead4;
}

/* ─────────────────────────────────────────────────────────────
   12  USER ACCOUNT DROPDOWN
───────────────────────────────────────────────────────────── */

.user-dropdown-menu {
    background-color: #ffffff;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.07),
        0 20px 60px -10px rgba(0, 0, 0, 0.13) !important;
    padding: 0;
    /* overflow:visible agar arrow ::after tidak terpotong */
    overflow: visible;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ── Show / hide ────────────────────────────────────────────── */
.user-dropdown-hover .user-dropdown-menu {
    display: block;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transition:
        opacity 0.22s ease,
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.22s;
}

.user-dropdown-hover .user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0; right: 0;
    height: 20px;
    background: transparent;
}

.user-dropdown-hover:hover .user-dropdown-menu,
.user-dropdown-menu.show {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity 0.28s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0s;
}

/* Arrow caret */
.user-dropdown-hover::after {
    content: '';
    position: absolute;
    top: calc(100% + 9px);
    right: 18px;
    transform: rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: #f8fafc;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 2px 0 0 0;
    z-index: 1051;
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.user-dropdown-hover:hover::after {
    opacity: 1;
}

/* Notification item rows in user dropdown */
.notification-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    background-color: #ffffff;
    transition: background-color 0.18s ease;
    position: relative;
    overflow: hidden;
}

.notification-item:hover {
    background-color: #f0fdf9 !important;
}

.notification-list > .notification-item:last-child {
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.notification-item .rounded-circle {
    transition: transform 0.2s ease, filter 0.3s ease, opacity 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.55;
}

.notification-item:hover .rounded-circle {
    transform: scale(1.08);
    filter: grayscale(0%);
    opacity: 1;
}

/* ── User dropdown dark mode ────────────────────────────────── */
body.dark-mode .user-dropdown-menu {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 25px 70px -10px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .user-dropdown-hover::after {
    /* Match the header strip color */
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .user-dropdown-menu .border-bottom,
body.dark-mode .user-dropdown-menu .border-top {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark-mode .notification-item {
    background-color: #1e293b;
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .notification-item:hover {
    background-color: rgba(45, 212, 191, 0.05) !important;
}

body.dark-mode .notification-header-bg {
    background-color: #0f172a !important;
}

/* Sign Out button */
#logoutBtn {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: background-color 0.18s ease, color 0.18s ease;
}

#logoutBtn:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc2626 !important;
}

body.dark-mode #logoutBtn:hover {
    background-color: rgba(248, 113, 113, 0.12) !important;
    color: #f87171 !important;
}

/* ==========================================
   STANDARDIZED DASHBOARD METRIC CARDS
   ========================================== */

/* Metric Card Base Class */
/* ─────────────────────────────────────────────────────────────
   13  DASHBOARD METRIC CARDS & PULSE ANIMATIONS
        Colors: metric-green  metric-blue  metric-purple
                metric-red    metric-orange
        Pulses: pulse-online  pulse-blue   pulse-purple
                pulse-orange  pulse-red
───────────────────────────────────────────────────────────── */

.metric-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease !important;
    border-radius: 16px !important;
    border: 1px solid transparent !important;
    overflow: hidden !important;
}
.metric-card:hover {
    transform: translateY(-4px) !important;
}

/* Green Theme */
body:not(.dark-mode) .metric-green {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
}
body:not(.dark-mode) .metric-green .stat-label,
body:not(.dark-mode) .metric-green .metric-title {
    color: #065f46 !important;
}
body:not(.dark-mode) .metric-green .stat-value,
body:not(.dark-mode) .metric-green .metric-value {
    color: #047857 !important;
}
body:not(.dark-mode) .metric-green .icon-glass,
body:not(.dark-mode) .metric-green .metric-icon-wrapper {
    background-color: #10b981 !important;
    color: #ffffff !important;
}
body:not(.dark-mode) .metric-green .icon-glass i {
    color: #ffffff !important;
}

/* Blue Theme */
body:not(.dark-mode) .metric-blue {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}
body:not(.dark-mode) .metric-blue .stat-label,
body:not(.dark-mode) .metric-blue .metric-title {
    color: #1e40af !important;
}
body:not(.dark-mode) .metric-blue .stat-value,
body:not(.dark-mode) .metric-blue .metric-value {
    color: #1d4ed8 !important;
}
body:not(.dark-mode) .metric-blue .icon-glass,
body:not(.dark-mode) .metric-blue .metric-icon-wrapper {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}
body:not(.dark-mode) .metric-blue .icon-glass i {
    color: #ffffff !important;
}

/* Purple Theme */
body:not(.dark-mode) .metric-purple {
    background: #faf5ff !important;
    border-color: #e9d5ff !important;
}
body:not(.dark-mode) .metric-purple .stat-label,
body:not(.dark-mode) .metric-purple .metric-title {
    color: #6b21a8 !important;
}
body:not(.dark-mode) .metric-purple .stat-value,
body:not(.dark-mode) .metric-purple .metric-value {
    color: #7e22ce !important;
}
body:not(.dark-mode) .metric-purple .icon-glass,
body:not(.dark-mode) .metric-purple .metric-icon-wrapper {
    background-color: #a855f7 !important;
    color: #ffffff !important;
}
body:not(.dark-mode) .metric-purple .icon-glass i {
    color: #ffffff !important;
}

/* Red Theme */
body:not(.dark-mode) .metric-red {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}
body:not(.dark-mode) .metric-red .stat-label,
body:not(.dark-mode) .metric-red .metric-title {
    color: #991b1b !important;
}
body:not(.dark-mode) .metric-red .stat-value,
body:not(.dark-mode) .metric-red .metric-value {
    color: #b91c1c !important;
}
body:not(.dark-mode) .metric-red .icon-glass,
body:not(.dark-mode) .metric-red .metric-icon-wrapper {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}
body:not(.dark-mode) .metric-red .icon-glass i {
    color: #ffffff !important;
}

/* Dark Mode Green */
body.dark-mode .metric-green {
    background-color: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}
body.dark-mode .metric-green .stat-label,
body.dark-mode .metric-green .metric-title {
    color: #a7f3d0 !important;
}
body.dark-mode .metric-green .stat-value,
body.dark-mode .metric-green .metric-value {
    color: #34d399 !important;
}
body.dark-mode .metric-green .icon-glass,
body.dark-mode .metric-green .metric-icon-wrapper {
    background-color: rgba(16, 185, 129, 0.25) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}
body.dark-mode .metric-green .icon-glass i {
    color: #34d399 !important;
}
body.dark-mode .metric-green:hover {
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.1) !important;
}

/* Dark Mode Blue */
body.dark-mode .metric-blue {
    background-color: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
}
body.dark-mode .metric-blue .stat-label,
body.dark-mode .metric-blue .metric-title {
    color: #bfdbfe !important;
}
body.dark-mode .metric-blue .stat-value,
body.dark-mode .metric-blue .metric-value {
    color: #60a5fa !important;
}
body.dark-mode .metric-blue .icon-glass,
body.dark-mode .metric-blue .metric-icon-wrapper {
    background-color: rgba(59, 130, 246, 0.25) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
}
body.dark-mode .metric-blue .icon-glass i {
    color: #60a5fa !important;
}
body.dark-mode .metric-blue:hover {
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.1) !important;
}

/* Dark Mode Purple */
body.dark-mode .metric-purple {
    background-color: rgba(168, 85, 247, 0.08) !important;
    border-color: rgba(168, 85, 247, 0.25) !important;
}
body.dark-mode .metric-purple .stat-label,
body.dark-mode .metric-purple .metric-title {
    color: #e9d5ff !important;
}
body.dark-mode .metric-purple .stat-value,
body.dark-mode .metric-purple .metric-value {
    color: #c084fc !important;
}
body.dark-mode .metric-purple .icon-glass,
body.dark-mode .metric-purple .metric-icon-wrapper {
    background-color: rgba(168, 85, 247, 0.25) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.4) !important;
}
body.dark-mode .metric-purple .icon-glass i {
    color: #c084fc !important;
}
body.dark-mode .metric-purple:hover {
    border-color: rgba(168, 85, 247, 0.5) !important;
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.1) !important;
}

/* Dark Mode Red */
body.dark-mode .metric-red {
    background-color: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}
body.dark-mode .metric-red .stat-label,
body.dark-mode .metric-red .metric-title {
    color: #fecaca !important;
}
body.dark-mode .metric-red .stat-value,
body.dark-mode .metric-red .metric-value {
    color: #f87171 !important;
}
body.dark-mode .metric-red .icon-glass,
body.dark-mode .metric-red .metric-icon-wrapper {
    background-color: rgba(239, 68, 68, 0.25) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}
body.dark-mode .metric-red .icon-glass i {
    color: #f87171 !important;
}
body.dark-mode .metric-red:hover {
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.1) !important;
}

/* Metric Orange (light mode) */
body:not(.dark-mode) .metric-orange {
    background: #fff7ed !important;
    border-color: #fdba74 !important;
}
body:not(.dark-mode) .metric-orange .stat-label,
body:not(.dark-mode) .metric-orange .metric-title {
    color: #9a3412 !important;
}
body:not(.dark-mode) .metric-orange .stat-value,
body:not(.dark-mode) .metric-orange .metric-value {
    color: #c2410c !important;
}
body:not(.dark-mode) .metric-orange .icon-glass,
body:not(.dark-mode) .metric-orange .metric-icon-wrapper {
    background-color: #f97316 !important;
    color: #ffffff !important;
}
body:not(.dark-mode) .metric-orange .icon-glass i {
    color: #ffffff !important;
}

/* Metric Orange (dark mode) */
body.dark-mode .metric-orange {
    background: rgba(249,115,22,0.08) !important;
    border-color: rgba(249,115,22,0.25) !important;
}
body.dark-mode .metric-orange .stat-label,
body.dark-mode .metric-orange .metric-title {
    color: #fed7aa !important;
}
body.dark-mode .metric-orange .stat-value,
body.dark-mode .metric-orange .metric-value {
    color: #fb923c !important;
}
body.dark-mode .metric-orange .icon-glass,
body.dark-mode .metric-orange .metric-icon-wrapper {
    background-color: rgba(249,115,22,0.25) !important;
    color: #fb923c !important;
    border: 1px solid rgba(249,115,22,0.4) !important;
}
body.dark-mode .metric-orange .icon-glass i {
    color: #fb923c !important;
}
body.dark-mode .metric-orange:hover {
    border-color: rgba(249,115,22,0.5) !important;
    box-shadow: 0 12px 30px rgba(249,115,22,0.1) !important;
}

/* Custom scrollbar for patient search results */
#patientSearchResults::-webkit-scrollbar {
    width: 6px;
}
#patientSearchResults::-webkit-scrollbar-track {
    background: transparent;
}
#patientSearchResults::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}
body.dark-mode #patientSearchResults::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
#patientSearchResults::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}
body.dark-mode #patientSearchResults::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ─────────────────────────────────────────────────────────────
   14  DOCTOR REPORTS PAGE
        - Smooth list divider (.divider-smooth)
        - Rank number circles dark mode (.rank-1 … .rank-5)
        - Secure PDF card (.secure-pdf-card / .secure-pdf-icon)
───────────────────────────────────────────────────────────── */

/* Smooth gradient divider */
.divider-smooth {
    border: none;
    border-bottom: 1px solid transparent;
    background-image: linear-gradient(to right, transparent, rgba(0,0,0,0.09), transparent);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
}
body.dark-mode .divider-smooth {
    background-image: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
}

/* Rank number circles — dark mode color overrides */
body.dark-mode .rank-1 { color: #93c5fd !important; background: rgba(59,130,246,0.15) !important; }
body.dark-mode .rank-2 { color: #86efac !important; background: rgba(34,197,94,0.15) !important; }
body.dark-mode .rank-3 { color: #fde68a !important; background: rgba(234,179,8,0.15) !important; }
body.dark-mode .rank-4 { color: #c4b5fd !important; background: rgba(139,92,246,0.15) !important; }
body.dark-mode .rank-5 { color: #fca5a5 !important; background: rgba(239,68,68,0.15) !important; }

/* Secure PDF card — light mode */
.secure-pdf-card {
    background: linear-gradient(135deg, #f0fdfa, #e0f7f4) !important;
    border: 1px solid rgba(13,148,136,0.12) !important;
}
.secure-pdf-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    border: 4px solid rgba(13,148,136,0.15);
}

/* Secure PDF card — dark mode */
body.dark-mode .secure-pdf-card {
    background: linear-gradient(135deg, rgba(13,148,136,0.08), rgba(13,148,136,0.04)) !important;
    border: 1px solid rgba(13,148,136,0.2) !important;
}
body.dark-mode .secure-pdf-card h6 {
    color: #5eead4 !important;
}
body.dark-mode .secure-pdf-icon {
    background: rgba(13,148,136,0.15);
    border-color: rgba(13,148,136,0.3);
    box-shadow: 0 0 20px rgba(13,148,136,0.1);
}
/* Override wizard-container with stronger glassmorphism */
.wizard-container {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.03) !important;
}

/* Full page background blur overlay */
body.booking-page-body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 0;
}

body.booking-page-body > .wizard-container,
body.booking-page-body > .dentigo-bg-decoration {
    position: relative;
    z-index: 1;
}
