/* Ekhshafly - Modern Medical Platform Design (Vezeeta Inspired) */
:root {
    /* Brand Colors */
    --primary-color: #0070cd;
    --primary-dark: #00569e;
    --primary-light: #e6f1fa;
    --secondary-color: #ffffff;

    /* Text Colors */
    --text-primary: #272b41;
    --text-secondary: #7e8c9d;
    --text-label: #8a96a3;

    /* Backgrounds */
    --bg-body: #f6f8fa;
    --bg-card: #ffffff;
    --bg-input: #ffffff;

    /* Borders & Shadows */
    --border-color: #e3e6ea;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-sm: 4px;
    --shadow-sm: 0 1px 3px rgba(46, 56, 77, 0.05);
    --shadow-md: 0 2px 8px rgba(46, 56, 77, 0.08);
    --shadow-lg: 0 4px 16px rgba(46, 56, 77, 0.12);

    /* Functional Colors */
    --success-color: #28a745;
    --danger-color: #eb0029;
    --warning-color: #ffc107;
    --info-color: #17a2b8;

    /* Transitions */
    --transition: all 0.2s ease-in-out;
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', 'Nunito Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* Header & Navigation */
.navbar,
header {
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

@media (max-width: 992px) {

    .nav-links,
    .nav-buttons {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-outline-white {
    background-color: transparent;
    border-color: white;
    color: white;
}

.btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    background-color: var(--bg-input);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
    resize: vertical;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(0, 112, 205, 0.9), rgba(0, 86, 158, 0.9)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 0 6rem;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search Box (Floating) */
.search-box-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-secondary);
}

/* Specialties Grid */
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.specialty-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: block;
}

.specialty-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.specialty-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: block;
}

.specialty-card h5 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0;
}

/* Footer */
footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    padding-inline-start: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
}

/* Badge */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

.badge-success {
    background: #e6f9ed;
    color: var(--success-color);
}

.badge-warning {
    background: #fff8e1;
    color: #f57f17;
}

.badge-danger {
    background: #fde8ec;
    color: var(--danger-color);
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.text-center {
    text-align: center;
}

.w-100 {
    width: 100%;
}

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.py-4 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

/* Dashboard Specific Layout */
.dashboard {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-color);
    /* LTR default */
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    background: var(--bg-body);
    overflow-y: auto;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition);
    border-right: 3px solid transparent;
    /* RTL default */
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* RTL Support */
body[dir="rtl"] {
    text-align: right;
}

body[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

body[dir="rtl"] .sidebar-nav li a {
    border-left: 3px solid transparent;
    /* Actually should be border-right for RTL marker? usually side relative */
}

body[dir="rtl"] .sidebar-nav li a.active {
    border-left-color: var(--primary-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table thead th {
    background: var(--bg-body);
    padding: 1rem;
    text-align: inherit;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--primary-light);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Time Slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.time-slot {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    background: white;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.time-slot.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

/* Doctor Profile Header */
.doctor-header-card {
    display: flex;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.doctor-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-body);
}

@media (max-width: 768px) {
    .doctor-header-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* Search Page Layout */
.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.search-sidebar {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    height: fit-content;
    position: sticky;
    top: 90px;
}

@media (max-width: 992px) {
    .search-layout {
        grid-template-columns: 1fr;
    }

    .search-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

/* Horizontal Doctor Card */
.doctor-card-horizontal {
    display: flex;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    transition: var(--transition);
    overflow: hidden;
}

.doctor-card-horizontal:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.doctor-info-side {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    gap: 1.5rem;
    border-right: 1px solid var(--border-color);
}

.doctor-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-body);
    flex-shrink: 0;
}

.doctor-details h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.doctor-details .title {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.doctor-details .description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctor-details .rating {
    color: #ffc107;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.doctor-details .meta-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.doctor-details .meta-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.doctor-booking-side {
    width: 320px;
    padding: 1.5rem;
    background: #fbfbfb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .doctor-card-horizontal {
        flex-direction: column;
    }

    .doctor-info-side {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .doctor-booking-side {
        width: 100%;
        border-left: none;
    }

    .doctor-avatar {
        margin: 0 auto;
    }

    .doctor-details .meta-item {
        justify-content: center;
    }
}

/* RTL Adjustments */
body[dir="rtl"] .doctor-info-side {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

body[dir="rtl"] .doctor-booking-side {
    border-left: none;
    border-right: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    body[dir="rtl"] .doctor-info-side {
        border-left: none;
    }


}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    /* will be right for RTL if needed, but usually covers 100% */
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 2000;
    padding: 1rem;
    transform: translateX(100%);
    /* Start hidden (slide from right or left depending on lang) */
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

body[dir="ltr"] .mobile-menu {
    transform: translateX(-100%);
    /* Slide from left for LTR */
    left: 0;
    right: auto;
}

body[dir="rtl"] .mobile-menu {
    transform: translateX(100%);
    /* Slide from right for RTL */
    right: 0;
    left: auto;
}

/* Fix Specificity */
body .mobile-menu.active,
body[dir="rtl"] .mobile-menu.active,
body[dir="ltr"] .mobile-menu.active {
    transform: translateX(0) !important;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-header h4 {
    margin: 0;
    color: var(--primary-color);
}

.mobile-menu-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-list li a {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.5rem 0;
}

.mobile-nav-list li.divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.mobile-nav-list li a:hover {
    color: var(--primary-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h4 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-body);
}

/* Additional Badge Types */
.badge-secondary {
    background: #e3e6ea;
    color: var(--text-secondary);
}

.badge-info {
    background: #e6f4fa;
    color: #0070cd;
}

/* Additional Utilities */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.p-3 {
    padding: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.text-white {
    color: white !important;
}

.gap-3 {
    gap: 1.5rem;
}

/* Print Styles */
@media print {

    .sidebar,
    .navbar,
    footer,
    .btn {
        display: none !important;
    }

    .dashboard-content {
        padding: 0;
    }
}

/* ==================== */
/* Dashboard Layout */
/* ==================== */
.dashboard {
    display: flex;
    min-height: calc(100vh - 70px);
    background: var(--bg-body);
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

body[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-light), white);
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    margin-bottom: 0.75rem;
    object-fit: cover;
}

.sidebar-header h5 {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.sidebar-header p {
    margin: 0;
    font-size: 0.85rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav li.divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 1rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

body[dir="rtl"] .sidebar-nav a {
    border-left: none;
    border-right: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.sidebar-nav a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

body[dir="rtl"] .sidebar-nav a.active {
    border-left-color: transparent;
    border-right-color: var(--primary-color);
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-nav a.logout-link {
    color: var(--danger-color);
}

.sidebar-nav a.logout-link:hover {
    background: #fff0f0;
    color: var(--danger-color);
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    min-width: 0;
}

.dashboard-content>h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Dashboard Mobile */
@media (max-width: 992px) {
    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    body[dir="rtl"] .sidebar {
        border-left: none;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: right;
        padding: 1rem;
    }

    body[dir="ltr"] .sidebar-header {
        text-align: left;
    }

    .sidebar-avatar {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
    }

    .sidebar-nav {
        padding: 0.5rem 0;
    }

    .sidebar-nav ul {
        display: flex;
        overflow-x: auto;
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .sidebar-nav li {
        margin: 0;
        flex-shrink: 0;
    }

    .sidebar-nav li.divider {
        display: none;
    }

    .sidebar-nav a {
        padding: 0.5rem 1rem;
        border-radius: var(--border-radius);
        border-left: none;
        white-space: nowrap;
        font-size: 0.9rem;
    }

    body[dir="rtl"] .sidebar-nav a {
        border-right: none;
    }

    .sidebar-nav a.active {
        background: var(--primary-color);
        color: white;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    transition: var(--transition);
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: var(--primary-color);
}

.mobile-bottom-nav .nav-item.active i {
    transform: scale(1.1);
}

.mobile-nav-list li.divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.mobile-nav-list li a:hover {
    color: var(--primary-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h4 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-body);
}

/* Additional Badge Types */
.badge-secondary {
    background: #e3e6ea;
    color: var(--text-secondary);
}

.badge-info {
    background: #e6f4fa;
    color: #0070cd;
}

/* Additional Utilities */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.my-4 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.p-3 {
    padding: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.text-white {
    color: white !important;
}

.gap-3 {
    gap: 1.5rem;
}

/* Print Styles */
@media print {

    .sidebar,
    .navbar,
    footer,
    .btn {
        display: none !important;
    }

    .dashboard-content {
        padding: 0;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    transition: var(--transition);
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: var(--primary-color);
}

.mobile-bottom-nav .nav-item.active i {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Add padding to body to prevent content being hidden by bottom nav */
    body {
        padding-bottom: 70px;
    }

    /* Hide desktop header elements on mobile */
    .nav-links {
        display: none !important;
    }

    .nav-buttons {
        display: none !important;
    }

    /* Make mobile menu toggle visible */
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
    }

    /* Improve hero section on mobile */
    .hero {
        padding: 2.5rem 0 4rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Make search box more mobile friendly */
    .search-box-container {
        margin-top: -2rem;
        padding: 1rem;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Improve specialty cards on mobile */
    .specialties-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .specialty-card {
        padding: 1rem 0.5rem;
    }

    .specialty-card i {
        font-size: 1.5rem;
    }

    .specialty-card h5 {
        font-size: 0.8rem;
    }

    /* Hide footer on mobile (bottom nav replaces it) */
    footer {
        padding-bottom: 80px;
    }

    /* Dashboard sidebar on mobile */
    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
    }

    .sidebar .text-center {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }

    .sidebar .text-center img {
        width: 50px !important;
        height: 50px !important;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .sidebar-nav li {
        flex-shrink: 0;
    }

    .sidebar-nav li a {
        padding: 0.5rem 1rem;
        white-space: nowrap;
        border-radius: var(--border-radius);
        border: 1px solid var(--border-color);
    }

    .sidebar-nav li a.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

    .dashboard-content {
        padding: 1rem;
    }

    /* Improve stats grid on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Cards on mobile */
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Tables on mobile */
    .table thead {
        display: none;
    }

    .table tbody td {
        display: block;
        padding: 0.5rem 1rem;
        border: none;
    }

    .table tbody tr {
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 0;
    }

    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
        color: var(--text-secondary);
        font-size: 0.8rem;
    }

    /* Auth pages on mobile */
    .auth-page {
        padding: 1rem;
        min-height: calc(100vh - 150px);
    }

    .auth-card {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .role-selector {
        flex-direction: row;
        gap: 0.5rem;
    }

    .role-option .role-card {
        padding: 1rem 0.5rem;
    }

    .role-option .role-card i {
        font-size: 1.5rem;
    }
}
/* EMERGENCY FIX FOR MOBILE MENU */
.mobile-menu.active { transform: translateX(0) !important; display: flex !important; opacity: 1 !important; visibility: visible !important; }

.mobile-menu-header button { display: block !important; color: #333 !important; font-size: 1.5rem !important; background: none; border: none; cursor: pointer; }

/* Mobile Bottom Nav */
.mobile-bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; padding: 0.5rem 0; z-index: 2500; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.mobile-bottom-nav .nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--text-secondary); font-size: 0.8rem; gap: 0.3rem; }
.mobile-bottom-nav .nav-item i { font-size: 1.2rem; }
.mobile-bottom-nav .nav-item.active { color: var(--primary-color); }
@media (min-width: 992px) { .mobile-bottom-nav { display: none; } .mobile-menu-toggle { display: none !important; } }
