/* ==========================================================================
   DOCTOR APPOINTMENT SYSTEM - MAIN STYLESHEET
   Modern healthcare admin look inspired by AdminLTE / Tabler / Metronic /
   CoreUI: teal brand palette, rounded 12px cards, soft layered shadows,
   collapsible + role-aware sidebar with nested submenus.
   ========================================================================== */

/* Kantumruy Pro: Google's Khmer typeface designed specifically for software
   UI (not a print/document font like Battambang/Hanuman). Noto Sans Khmer is
   kept as a broad-coverage fallback for any Khmer glyph Kantumruy Pro misses. */
@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:wght@300;400;500;600;700&family=Noto+Sans+Khmer:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #0F766E;
    --primary-dark: #0b5b55;
    --primary-light: #ccfbf1;
    --secondary-color: #14B8A6;
    --accent-color: #8B5CF6;
    --success-color: #14B8A6;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    --bg-light: #F8FAFC;
    --card-bg: #ffffff;
    --text-main: #334155;
    --text-muted: #94a3b8;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 20px -5px rgba(15, 23, 42, 0.12), 0 4px 8px -4px rgba(15, 23, 42, 0.06);
    --radius-md: 12px;
    --radius-lg: 12px;
    --header-height: 72px;
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 76px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Kantumruy Pro', 'Noto Sans Khmer', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--header-height);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Kantumruy Pro', 'Noto Sans Khmer', sans-serif;
    font-weight: 600;
    color: #1e293b;
}

main.main-content {
    flex: 1 0 auto;
}

a {
    transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

/* ==========================================================================
   Header
   ========================================================================== */
.navbar-custom {
    background: linear-gradient(120deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-bottom: 0;
    box-shadow: var(--shadow-md);
    min-height: var(--header-height);
    padding: 0.5rem 0;
}

.navbar-custom.fixed-top {
    height: var(--header-height);
}

.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 0;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background-color var(--transition-speed) ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover,
.sidebar-toggle-btn:focus {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.navbar-logo-box {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-weight: 700;
    color: #ffffff !important;
    letter-spacing: -0.2px;
    line-height: 1.15;
}

.navbar-brand small {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
}

.navbar-search {
    max-width: 420px;
    width: 100%;
}

.navbar-search .input-group-text,
.navbar-search .form-control {
    background: rgba(255, 255, 255, 0.95);
    border: 0;
}

.navbar-search .form-control {
    color: var(--text-main);
}

.navbar-search .form-control::placeholder {
    color: var(--text-muted);
}

.navbar-search .form-control:focus {
    box-shadow: none;
}

.navbar-search kbd {
    background: var(--bg-light);
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

.navbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    position: relative;
    font-size: 1.05rem;
    transition: background-color var(--transition-speed) ease;
}

.navbar-icon-btn:hover,
.navbar-icon-btn:focus {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.btn-language {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition-speed) ease;
}

.btn-language:hover,
.btn-language:focus {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.navbar-icon-btn .badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 50px;
    background: var(--danger-color);
    color: #fff;
    font-size: 0.62rem;
    line-height: 16px;
    text-align: center;
    border: 2px solid var(--primary-color);
}

.navbar-custom .dropdown-menu {
    border: 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
}

.dropdown-panel-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    color: #1e293b;
}

.dropdown-empty-state {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dropdown-empty-state i {
    font-size: 1.6rem;
    opacity: 0.4;
    display: block;
    margin-bottom: 0.4rem;
}

.navbar-custom .user-link {
    color: #ffffff !important;
}

.navbar-custom .user-link .user-name {
    color: #ffffff;
    font-weight: 600;
}

.navbar-custom .user-link .user-role {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.dashboard-wrapper {
    display: block;
    min-height: calc(100vh - var(--header-height));
}

.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.sidebar-search {
    padding: 1rem 1rem 0.5rem;
}

.sidebar-search .input-group-text {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-right: 0;
    color: var(--text-muted);
}

.sidebar-search .form-control {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-left: 0;
}

.sidebar-search .form-control:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

.sidebar-user {
    padding: 0.75rem 1rem;
    margin: 0 0.5rem 0.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-light);
}

.sidebar-user .avatar-thumb {
    width: 42px;
    height: 42px;
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.sidebar-user .user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.menu-section-title {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    padding: 0.9rem 1.25rem 0.35rem;
}

.sidebar .nav-item {
    margin-bottom: 0.1rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem !important;
    color: #475569 !important;
    font-weight: 500;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    border-radius: 0;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.sidebar .nav-link i:not(.submenu-caret) {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    color: #64748b;
    transition: color var(--transition-speed) ease;
    flex-shrink: 0;
}

.sidebar .nav-link:hover {
    background: var(--primary-light);
    color: var(--primary-color) !important;
}

.sidebar .nav-link:hover i:not(.submenu-caret) {
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background: var(--primary-light);
    color: var(--primary-color) !important;
    font-weight: 600;
    border-left-color: var(--primary-color);
}

.sidebar .nav-link.active i:not(.submenu-caret) {
    color: var(--primary-color);
}

.sidebar .menu-badge {
    margin-left: auto;
    background: var(--secondary-color);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 50px;
}

/* Submenu / nested collapse */
.submenu-toggle .submenu-caret {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform var(--transition-speed) ease;
}

.submenu-toggle[aria-expanded="true"] .submenu-caret {
    transform: rotate(180deg);
}

.submenu-toggle[aria-expanded="true"] {
    color: var(--primary-color) !important;
}

.submenu {
    background: #fbfdfd;
}

.submenu .nav-link {
    padding: 0.55rem 1.25rem 0.55rem 3.1rem !important;
    font-size: 0.85rem;
    font-weight: 400;
}

.submenu .nav-link::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #cbd5e1;
    margin-right: 0.6rem;
    flex-shrink: 0;
}

.submenu .nav-link:hover::before,
.submenu .nav-link.active::before {
    background: var(--primary-color);
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.75rem;
}

.sidebar-version-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.78rem;
}

.sidebar-version-card i {
    font-size: 1.2rem;
}

.dashboard-content {
    margin-left: var(--sidebar-width);
    padding: 1.75rem;
    background-color: var(--bg-light);
    min-height: calc(100vh - var(--header-height));
    transition: margin-left var(--transition-speed) ease;
}

/* Desktop collapsed (icon-only rail) mode */
body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .dashboard-content {
    margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-search,
body.sidebar-collapsed .sidebar-user .user-info,
body.sidebar-collapsed .menu-section-title,
body.sidebar-collapsed .nav-link span,
body.sidebar-collapsed .submenu-caret,
body.sidebar-collapsed .menu-badge,
body.sidebar-collapsed .sidebar-footer {
    display: none;
}

body.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

body.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding: 0.75rem !important;
}

body.sidebar-collapsed .submenu {
    display: none !important;
}

/* Mobile off-canvas backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1025;
}

.sidebar-backdrop.show {
    display: block;
}

/* ==========================================================================
   Cards & Components
   ========================================================================== */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-speed) ease;
}

.card-custom:hover {
    box-shadow: var(--shadow-lg);
}

/* Stat / KPI cards: white card with a circular colored icon badge */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.25rem 1rem 1.25rem 5.25rem;
    min-height: 105px;
    color: var(--text-main);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: visible;
    transition: box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #ffffff;
    background: var(--info-color);
    opacity: 1;
    bottom: auto;
    right: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.stat-card .display-6 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
}

.stat-card .stat-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card .stat-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Stat card accent colors - matched to icon badges */
.stat-card.bg-gradient-teal .stat-icon { background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%); }
.stat-card.bg-gradient-amber .stat-icon { background: linear-gradient(135deg, #F59E0B 0%, #d97706 100%); }
.stat-card.bg-gradient-blue .stat-icon { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); }
.stat-card.bg-gradient-purple .stat-icon { background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%); }
.stat-card.bg-gradient-navy .stat-icon { background: linear-gradient(135deg, #8B5CF6 0%, #6d28d9 100%); }
.stat-card.bg-gradient-gray .stat-icon { background: linear-gradient(135deg, #64748B 0%, #475569 100%); }
.stat-card.bg-gradient-red .stat-icon { background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); }


/* Standalone gradient circles (home page feature icons, patient banner) */
.bg-gradient-teal {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.bg-teal {
    background-color: var(--primary-color) !important;
}

.bg-teal-subtle {
    background-color: rgba(15, 118, 110, 0.12) !important;
}

.bg-gradient-navy {
    background: linear-gradient(135deg, #8B5CF6 0%, #6d28d9 100%);
}

.bg-gradient-blue {
    background: linear-gradient(135deg, #14B8A6 0%, #0d9488 100%);
}

.bg-gradient-amber {
    background: linear-gradient(135deg, #F59E0B 0%, #d97706 100%);
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.55rem 1.4rem;
    transition: all var(--transition-speed) ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.3);
}

.btn-outline-teal {
    color: var(--primary-color);
}

.btn-outline-teal:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.text-teal {
    color: var(--primary-color) !important;
}

/* Page title / breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0.75rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

/* Auth Cards */
.auth-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    background: #ffffff;
}

.auth-header {
    background: linear-gradient(120deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 2rem;
    text-align: center;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    padding: 5rem 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
}

/* Badges */
.badge-role {
    padding: 0.4em 0.8em;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin { background-color: #EF4444; color: #ffffff; }
.badge-doctor { background-color: var(--primary-color); color: #ffffff; }
.badge-patient { background-color: var(--info-color); color: #ffffff; }
.badge-receptionist { background-color: var(--warning-color); color: #ffffff; }

/* Status Badges - pastel bordered pill style */
.badge-status {
    border-radius: 50px;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 90px;
    padding: 0.2rem 0.7rem;
    text-align: center;
}

.badge-status-active,
.badge-status-available {
    background-color: #ecfdf9;
    border: 1px solid var(--success-color);
    color: var(--primary-dark);
}

.badge-status-inactive,
.badge-status-unavailable {
    background-color: #f1f5f9;
    border: 1px solid #94a3b8;
    color: #64748b;
}

.badge-status-on-leave {
    background-color: #fef5e4;
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

.badge-status-full {
    background-color: #fee2e2;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

/* Appointment-specific status badges */
.badge-status-pending {
    background-color: #fef5e4;
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

.badge-status-confirmed {
    background-color: #e5f3fe;
    border: 1px solid var(--info-color);
    color: var(--info-color);
}

.badge-status-checked-in {
    background-color: #ecfdf9;
    border: 1px solid var(--success-color);
    color: var(--primary-dark);
}

.badge-status-in-consultation {
    background-color: #f3e8ff;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.badge-status-completed {
    background-color: #dcfce7;
    border: 1px solid #16a34a;
    color: #16a34a;
}

.badge-status-cancelled {
    background-color: #f1f5f9;
    border: 1px solid #94a3b8;
    color: #64748b;
}

.badge-status-rejected,
.badge-status-no-show {
    background-color: #fee2e2;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

/* Appointment booking - time slot picker cards */
.slot-card {
    display: block;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-speed) ease, background-color var(--transition-speed) ease;
    margin-bottom: 0;
}

.slot-card:hover {
    border-color: var(--secondary-color);
}

.slot-card.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.slot-card-time {
    font-weight: 600;
    color: #1e293b;
}

.slot-card.selected .slot-card-time {
    color: var(--primary-dark);
}

.slot-card-capacity {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.slot-card-full {
    cursor: not-allowed;
    opacity: 0.55;
    background-color: #f8fafc;
}

.slot-card-full .slot-card-capacity {
    color: var(--danger-color);
    font-weight: 500;
}

/* Profile Avatars */
.avatar-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.avatar-lg {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary-light);
}

/* Doctor profile cards - card-grid pattern */
.profile-widget {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    text-align: center;
    position: relative;
    overflow: visible;
    transition: box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.profile-widget:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.dropdown.profile-action {
    position: absolute;
    right: 8px;
    top: 10px;
}

.profile-action .action-icon {
    color: #999999;
    font-size: 1.1rem;
    padding: 0 0.4rem;
    display: inline-block;
    text-decoration: none;
}

.profile-action .dropdown-toggle::after {
    display: none;
}

.doctor-img {
    cursor: pointer;
    height: 80px;
    margin: 0 auto 0.9rem;
    position: relative;
    width: 80px;
}

.doctor-img .avatar-thumb {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border-color);
}

.doctor-name {
    margin: 0 0 0.15rem;
    font-size: 1rem;
}

.doctor-name a {
    color: #1e293b;
    text-decoration: none;
}

.doctor-name a:hover {
    color: var(--primary-color);
}

.doc-prof {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.doctor-meta {
    color: #777777;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.doctor-meta i {
    width: 16px;
    text-align: center;
    margin-right: 0.25rem;
}

/* Tables */
.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

.table thead th {
    border-top: 0;
    border-bottom: 1px solid var(--border-color);
    color: #1e293b;
    font-weight: 600;
    background-color: #fafbfc;
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.sidebar-mobile-open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .dashboard-content {
        margin-left: 0;
    }

    body.sidebar-collapsed .dashboard-content {
        margin-left: 0;
    }

    .navbar-search {
        display: none;
    }

    .stat-card {
        padding-left: 5.5rem;
    }
}

/* Small utility classes used across doctor/receptionist/admin appointment pages */
.extra-small {
    font-size: 0.72rem;
}

.fw-mono {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.3px;
}

.border-teal {
    border-color: var(--primary-color) !important;
}

/* Appointment history timeline (admin appointment detail) */
.appointment-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.appointment-timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1.25rem;
}

.appointment-timeline-item:last-child {
    padding-bottom: 0;
}

.appointment-timeline-item::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 18px;
    bottom: -6px;
    width: 2px;
    background: var(--border-color);
}

.appointment-timeline-item:last-child::before {
    display: none;
}

.appointment-timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #cbd5e1;
}

.appointment-timeline-item.complete .appointment-timeline-dot {
    background: var(--success-color);
    box-shadow: 0 0 0 2px var(--success-color);
}

.appointment-timeline-item.active .appointment-timeline-dot {
    background: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}
