/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Royal Theme */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* Royal Theme Colors */
    --royal-dark: #0f172a;
    --royal-medium: #1e3a5f;
    --royal-light: #2a4a7f;
    --gold-primary: #fbbf24;
    --gold-light: #fde68a;
    --gold-dark: #b45309;
    --gold-glow: rgba(251, 191, 36, 0.15);
    
    /* Gray Scale */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --shadow-gold: 0 8px 32px rgba(251, 191, 36, 0.12);
    
    /* Radius */
    --radius: 12px;
    --radius-sm: 8px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== PAGE BACKGROUND ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-image: url('/assets/img/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--gray-800);
    padding-bottom: 70px;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    font-size: 16px;
}

/* Add overlay to make content readable */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.65);
    z-index: 0;
    backdrop-filter: blur(1px);
}
/* Ensure content is above overlay */
.app-header,
.main-content,
.bottom-nav,
.sidebar,
.overlay {
    position: relative;
    z-index: 1;
}

/* ===== HEADER - TALLER ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(29, 78, 216, 0.92));
    color: white;
    padding: 16px 20px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid rgba(255, 255, 255, 0.15);
    min-height: 80px;
}

/* Header background image */
.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/img/tanzania.png');
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    gap: 15px;
    min-height: 56px;
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 6px 10px;
    transition: var(--transition);
    flex-shrink: 0;
}

.hamburger-btn:hover {
    transform: scale(1.1);
}

/* Header Center with Logos and Title */
.header-center {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

/* Logo Wrapper for natural appearance */
.header-logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.header-logo-wrapper:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.header-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    flex-shrink: 0;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.header-logo:hover {
    transform: scale(1.05);
}

.header-logo-left {
    margin-right: 2px;
}

.header-logo-right {
    margin-left: 2px;
}

.header-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.3;
    text-align: center;
    min-width: 0;
    padding: 0 10px;
}

.app-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0;
    white-space: nowrap;
}

.app-subtitle {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-actions .btn {
    font-size: 14px;
    padding: 8px 16px;
}

.notification-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    position: relative;
    padding: 6px 10px;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: 2px;
    background: var(--danger-color);
    color: white;
    font-size: 12px;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ===== MAIN CONTENT - ADJUSTED FOR TALLER HEADER ===== */
.main-content {
    margin-top: 85px;
    padding: 30px 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100vh - 160px);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 2000;
    transition: var(--transition);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--royal-dark), var(--royal-medium));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold-primary);
}

.sidebar-brand {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand i {
    font-size: 28px;
    color: var(--gold-primary);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-brand-text small {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
}

.sidebar-close:hover {
    transform: rotate(90deg);
    color: var(--gold-primary);
}

.user-profile-card {
    padding: 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar {
    font-size: 48px;
    color: var(--gold-primary);
}

.user-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.user-info p {
    font-size: 15px;
    color: var(--gray-500);
}

.nav-menu {
    list-style: none;
    padding: 8px 0;
}

.nav-item {
    padding: 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 17px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item a i {
    width: 24px;
    text-align: center;
    font-size: 20px;
}

.nav-item.active a {
    background: var(--gray-100);
    color: var(--primary-color);
    border-left-color: var(--gold-primary);
}

.nav-item a:hover {
    background: var(--gray-50);
    color: var(--primary-color);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

.logout-btn {
    width: 100%;
    padding: 14px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.app-version {
    text-align: center;
    color: var(--gray-400);
    font-size: 14px;
    margin-top: 12px;
}

/* ===== OVERLAY ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none;
    backdrop-filter: blur(4px);
}

.overlay.active {
    display: block;
}

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
    animation: fadeIn 0.3s ease;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.loading-spinner i {
    font-size: 40px;
    color: var(--gold-primary);
}

.loading-spinner p {
    color: var(--gray-500);
    font-size: 16px;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 env(safe-area-inset-bottom, 10px);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 1000;
    border-top: 1px solid var(--gray-200);
    backdrop-filter: blur(4px);
}

.bottom-nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--gray-500);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 12px;
    transition: var(--transition);
    position: relative;
}

.bottom-nav-item i {
    font-size: 26px;
}

.bottom-nav-item.active {
    color: var(--gold-primary);
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--gold-primary);
    border-radius: 0 0 4px 4px;
}

.bottom-nav-item:hover {
    color: var(--gold-primary);
}

/* ===== CARDS - ROYAL THEME ===== */
.card {
    background: linear-gradient(145deg, 
        rgba(15, 23, 42, 0.95), 
        rgba(30, 58, 95, 0.92)
    );
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.15);
    backdrop-filter: blur(8px);
}

/* Gold radial glow */
.card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, 
        rgba(251, 191, 36, 0.06) 0%, 
        transparent 70%
    );
    pointer-events: none;
}

/* Top accent line */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    right: 30%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(251, 191, 36, 0.4), 
        transparent
    );
    border-radius: 0 0 2px 2px;
}

/* Card hover effect */
.card:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: var(--shadow-gold);
}

/* Typography inside cards */
.card-title,
.card h2,
.card h3,
.card h4,
.card .doctor-name {
    color: #f8fafc;
    font-weight: 600;
}

.card p,
.card li,
.card label,
.card .clinic-info-item {
    color: #cbd5e1;
}

/* Stats and numbers in cards */
.card .stat-card h3,
.card .stat-number {
    color: var(--gold-primary);
}

/* Icons in cards */
.card i {
    color: var(--gold-light);
}

.card .stat-card i {
    color: var(--gold-primary);
}

/* ===== WHITE CARDS (Override for specific cards) ===== */
.welcome-banner,
.stat-card,
.quick-action-btn,
.doctor-card,
.appointment-card,
.booking-flow,
.profile-page {
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-800);
    backdrop-filter: blur(4px);
}

/* Override for stat cards inside themed area */
.stat-card h3 {
    color: var(--gray-800);
}

.stat-card p {
    color: var(--gray-500);
}

.stat-card i {
    color: var(--primary-color);
}

/* Welcome banner with royal theme */
.welcome-banner {
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.95), 
        rgba(30, 58, 95, 0.92)
    );
    color: white;
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 1px solid rgba(251, 191, 36, 0.15);
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, 
        rgba(251, 191, 36, 0.08) 0%, 
        transparent 70%
    );
    pointer-events: none;
}

.welcome-banner h2 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #f8fafc;
}

.welcome-banner p {
    opacity: 0.9;
    font-size: 16px;
    color: #cbd5e1;
}

/* ===== DASHBOARD ===== */
.welcome-card {
    text-align: center;
    padding: 40px 20px;
}

.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.welcome-content h2 {
    font-size: 28px;
    color: #f8fafc;
}

.welcome-content p {
    color: #cbd5e1;
    font-size: 16px;
    max-width: 300px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(4px);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card i {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--gold-primary);
}

.stat-card h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-card p {
    font-size: 15px;
    color: var(--gray-500);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: var(--radius);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-700);
    backdrop-filter: blur(4px);
}

.quick-action-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
    border: 1px solid var(--gold-primary);
}

.quick-action-btn i {
    font-size: 28px;
    color: var(--gold-primary);
}

.quick-action-btn span {
    font-size: 14px;
    font-weight: 500;
}

/* ===== DOCTORS - ENHANCED ===== */
.page-header {
    margin-bottom: 28px;
}

.page-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
}

.page-header p {
    color: #cbd5e1;
    font-size: 18px;
}

.search-filter {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 14px 20px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
}

.search-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
    outline: none;
}

.filter-select {
    padding: 14px 20px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: var(--transition);
    min-width: 180px;
}

.filter-select:focus {
    border-color: var(--gold-primary);
    outline: none;
}

.doctor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* ===== ENHANCED DOCTOR CARD WITH SLOT GRID ===== */
.doctor-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.doctor-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-gold);
    border-color: var(--gold-primary);
}

/* Full width image at top */
.doctor-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--royal-dark) 0%, var(--royal-medium) 100%);
    flex-shrink: 0;
}

.doctor-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.doctor-card:hover .doctor-profile-img {
    transform: scale(1.03);
}

.doctor-card-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.doctor-card-badge {
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold-primary);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.doctor-card-body {
    padding: 16px 20px 14px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Doctor Card Header */
.doctor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 4px;
}

.doctor-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 2px 0;
}

.doctor-speciality {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0;
}

.doctor-speciality i {
    margin-right: 6px;
    color: var(--gold-primary);
}

.doctor-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.clinic-badge {
    display: inline-block;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: var(--gray-600);
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* Clinic Info */
.clinic-info {
    padding: 8px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 10px;
}

.clinic-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-600);
    margin: 2px 0;
}

.clinic-info-item i {
    color: var(--gold-primary);
    width: 18px;
    font-size: 14px;
}

/* ===== ENHANCED TIME SLOTS SECTION - LARGER FONTS ===== */
.time-slots-section {
    margin: 10px 0;
    flex: 1;
    width: 100%;
}

.time-slots-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.time-slots-label .slot-count {
    background: #f1f5f9;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 600;
}

/* ===== SLOTS GRID WRAPPER - FULL WIDTH ===== */
.slots-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 100%;
}

/* ===== SHOW MORE CONTAINER ===== */
.show-more-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 10px 0 4px 0;
    margin-top: 6px;
}

.show-more-btn {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.show-more-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.show-more-btn:active {
    transform: scale(0.97);
}

.show-more-btn i {
    font-size: 13px;
    transition: transform 0.3s ease;
}

.show-more-btn .fa-chevron-up {
    transform: rotate(180deg);
}

/* ===== DATE HEADER WITH SLOT COUNT - LARGER ===== */
.date-header {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    padding: 10px 0 6px 0;
    border-bottom: 2px solid #e2e8f0;
    margin-top: 8px;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-header .slot-count-badge {
    font-weight: 500;
    color: #64748b;
    font-size: 13px;
    background: #f1f5f9;
    padding: 0 14px;
    border-radius: 12px;
    line-height: 24px;
}

/* ===== ENHANCED INDIVIDUAL TIME SLOT BADGES - BIGGER ===== */
.time-slot-badge {
    background: #ecfdf5;
    color: #065f46;
    padding: 10px 6px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #a7f3d0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    position: relative;
    line-height: 1.3;
}

.time-slot-badge.available {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.time-slot-badge.available:hover {
    background: #10b981;
    color: white;
    transform: scale(1.05);
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    z-index: 2;
}

.time-slot-badge.available:active {
    transform: scale(0.95);
}

/* Slot clinic name inside badge - BIGGER */
.time-slot-badge .clinic-short {
    font-size: 12px;
    opacity: 0.8;
    display: block;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
    margin-top: 2px;
}

.time-slot-badge.available:hover .clinic-short {
    color: rgba(255,255,255,0.9);
}

/* ===== BOOKED SLOTS ===== */
.time-slot-badge.booked {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== MORE SLOTS INDICATOR ===== */
.time-slot-badge.more {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.time-slot-badge.more:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* ===== SLOT COUNT BADGE ===== */
.slot-count-badge {
    display: inline-block;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 10px;
    color: var(--gray-600);
    font-weight: 500;
}

/* ===== ANIMATION FOR SHOWING SLOTS ===== */
@keyframes slotFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.time-slot-badge.showing {
    animation: slotFadeIn 0.25s ease forwards;
}

.time-slot-badge.showing:nth-child(1) { animation-delay: 0.02s; }
.time-slot-badge.showing:nth-child(2) { animation-delay: 0.04s; }
.time-slot-badge.showing:nth-child(3) { animation-delay: 0.06s; }
.time-slot-badge.showing:nth-child(4) { animation-delay: 0.08s; }
.time-slot-badge.showing:nth-child(5) { animation-delay: 0.10s; }
.time-slot-badge.showing:nth-child(6) { animation-delay: 0.12s; }
.time-slot-badge.showing:nth-child(7) { animation-delay: 0.14s; }
.time-slot-badge.showing:nth-child(8) { animation-delay: 0.16s; }

/* ===== EMPTY & LOADING STATES - BIGGER ===== */
.time-slot-badge.no-slots {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    font-size: 15px;
    background: transparent;
    border: none;
    cursor: default;
    padding: 16px 0;
}

.time-slot-badge.loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    background: transparent;
    border: none;
    cursor: default;
}

/* ===== DOCTOR CARD - FIXED HEIGHT SLOT GRID ===== */
.doctor-card .time-slots-grid {
    max-height: 160px;
    overflow-y: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
    align-content: start;
}

/* Custom scrollbar for the slot grid inside doctor card */
.doctor-card .time-slots-grid::-webkit-scrollbar {
    width: 4px;
}

.doctor-card .time-slots-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.doctor-card .time-slots-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.doctor-card .time-slots-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Doctor Card Footer */
.doctor-card-footer {
    padding: 12px 0 0 0;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

.doctor-card-footer .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    justify-content: center;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
}

.btn-outline:hover {
    background: var(--gold-primary);
    color: white;
}

.no-results {
    grid-column: 1 / -1;
}

/* ===== APPOINTMENTS ===== */
.appointment-list {
    display: grid;
    gap: 16px;
}

.appointment-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gold-primary);
    backdrop-filter: blur(4px);
}

.appointment-card.cancelled {
    border-left-color: var(--danger-color);
    opacity: 0.7;
}

.appointment-card.completed {
    border-left-color: var(--secondary-color);
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.appointment-header h4 {
    font-size: 18px;
    color: var(--gray-800);
}

.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.status-badge.scheduled {
    background: #dbeafe;
    color: var(--primary-color);
}

.status-badge.confirmed {
    background: #d1fae5;
    color: var(--secondary-color);
}

.status-badge.completed {
    background: #d1fae5;
    color: var(--secondary-color);
}

.status-badge.cancelled {
    background: #fee2e2;
    color: var(--danger-color);
}

.status-badge.no-show {
    background: #fed7aa;
    color: #c2410c;
}

.appointment-details {
    margin: 10px 0;
}

.appointment-details p {
    font-size: 16px;
    color: var(--gray-600);
    margin: 4px 0;
}

.appointment-details i {
    width: 20px;
    color: var(--gold-primary);
}

.appointment-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* ===== BOOKING FLOW ===== */
.booking-flow {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(4px);
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
}

.step.active {
    background: var(--gold-primary);
    color: var(--royal-dark);
}

.step.completed {
    background: var(--secondary-color);
    color: white;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--gray-200);
    margin: 0 10px;
    max-width: 50px;
}

.doctor-select-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.doctor-select-card {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.doctor-select-card:hover {
    border-color: var(--gold-primary);
    background: white;
}

.doctor-select-card h4 {
    font-size: 18px;
    color: var(--gray-800);
}

.doctor-select-card p {
    color: var(--gray-500);
    font-size: 15px;
}

/* ===== PROFILE ===== */
.profile-page {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(4px);
}

.profile-header {
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--gray-200);
}

.profile-avatar {
    font-size: 80px;
    color: var(--gold-primary);
    margin-bottom: 12px;
}

.profile-header h2 {
    font-size: 26px;
    color: var(--gray-800);
}

.profile-header p {
    font-size: 16px;
    color: var(--gray-500);
}

.profile-info {
    padding: 20px 0;
}

.info-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item p {
    font-size: 18px;
    color: var(--gray-800);
    margin-top: 4px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gold-primary);
    color: var(--royal-dark);
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--gold-primary);
    border: 2px solid var(--gold-primary);
}

.btn-outline:hover {
    background: var(--gold-primary);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    margin-bottom: 16px;
    color: var(--gold-primary);
}

.empty-state h3 {
    font-size: 22px;
    color: #f8fafc;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 16px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

/* ===== ERROR STATE ===== */
.error-card {
    text-align: center;
    padding: 40px 20px;
}

.error-card i {
    margin-bottom: 16px;
    color: var(--danger-color);
}

.error-card h3 {
    font-size: 22px;
    color: #f8fafc;
    margin-bottom: 8px;
}

.error-card p {
    font-size: 16px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

/* ===== RESPONSIVE HEADER ===== */
@media (max-width: 1200px) {
    .main-content {
        padding: 24px 30px;
    }
    
    .doctor-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .app-header {
        min-height: 72px;
        padding: 14px 16px;
    }
    
    .main-content {
        margin-top: 78px;
        padding: 20px 24px;
    }
    
    .doctor-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .header-logo {
        height: 40px;
    }
    
    .app-title {
        font-size: 19px;
    }
    
    .app-subtitle {
        font-size: 12px;
        letter-spacing: 2px;
    }
    
    .header-actions .btn {
        font-size: 13px;
        padding: 6px 14px;
    }
    
    .hamburger-btn {
        font-size: 24px;
    }
    
    .notification-btn {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 10px 14px;
        min-height: 65px;
    }
    
    .main-content {
        margin-top: 72px;
        padding: 16px;
    }
    
    .header-content {
        padding: 0 10px;
        gap: 8px;
    }
    
    .header-logo {
        height: 32px;
    }
    
    .app-title {
        font-size: 15px;
        letter-spacing: 0.5px;
        white-space: normal;
        line-height: 1.2;
    }
    
    .app-subtitle {
        font-size: 10px;
        letter-spacing: 1.5px;
    }
    
    .header-center {
        gap: 6px;
    }
    
    .header-actions {
        gap: 6px;
    }
    
    .header-actions .btn {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .header-actions .btn i {
        font-size: 12px;
    }
    
    .notification-btn {
        font-size: 18px;
        padding: 4px 8px;
    }
    
    .hamburger-btn {
        font-size: 20px;
        padding: 4px 8px;
    }
    
    .notification-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -3px;
        right: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .doctor-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .doctor-card-image {
        height: 180px;
    }
    
    .doctor-card-body {
        padding: 14px 16px 12px 16px;
    }
    
    .doctor-name {
        font-size: 18px;
    }
    
    /* ===== TABLET SLOT SIZES ===== */
    .slots-grid-wrapper {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .time-slot-badge {
        font-size: 14px;
        padding: 8px 5px;
        min-height: 38px;
        border-radius: 6px;
        border-width: 1.5px;
    }
    
    .date-header {
        font-size: 14px;
        padding: 8px 0 4px 0;
    }
    
    .date-header .slot-count-badge {
        font-size: 12px;
    }
    
    .time-slot-badge .clinic-short {
        font-size: 11px;
    }
    
    .show-more-btn {
        font-size: 13px;
        padding: 7px 20px;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .search-input {
        min-width: unset;
    }
    
    .filter-select {
        min-width: unset;
    }
    
    .page-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 8px 10px;
        min-height: 58px;
    }
    
    .main-content {
        margin-top: 65px;
        padding: 12px;
    }
    
    .header-content {
        padding: 0 6px;
        gap: 4px;
    }
    
    .header-logo {
        height: 26px;
    }
    
    .app-title {
        font-size: 12px;
        letter-spacing: 0.3px;
    }
    
    .app-subtitle {
        font-size: 8px;
        letter-spacing: 1px;
    }
    
    .header-title-group {
        padding: 0;
    }
    
    .header-center {
        gap: 4px;
    }
    
    .header-actions .btn {
        font-size: 10px;
        padding: 4px 8px;
        gap: 4px;
    }
    
    .header-actions .btn i {
        font-size: 10px;
    }
    
    .notification-btn {
        font-size: 16px;
        padding: 3px 6px;
    }
    
    .hamburger-btn {
        font-size: 18px;
        padding: 3px 6px;
    }
    
    .notification-badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
        top: -3px;
        right: 0;
    }
    
    .doctor-card {
        border-radius: var(--radius-sm);
    }
    
    .doctor-card-image {
        height: 160px;
    }
    
    .doctor-card-body {
        padding: 12px 14px 10px 14px;
    }
    
    .doctor-name {
        font-size: 16px;
    }
    
    .doctor-speciality {
        font-size: 13px;
    }
    
    /* ===== PHONE SLOT SIZES - 3 COLUMNS ===== */
    .slots-grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    
    .time-slot-badge {
        font-size: 13px;
        padding: 7px 4px;
        min-height: 34px;
        border-radius: 6px;
        border-width: 1.5px;
    }
    
    .date-header {
        font-size: 13px;
        padding: 6px 0 4px 0;
    }
    
    .date-header .slot-count-badge {
        font-size: 12px;
        padding: 0 10px;
    }
    
    .time-slot-badge .clinic-short {
        font-size: 10px;
    }
    
    .show-more-btn {
        font-size: 12px;
        padding: 6px 16px;
    }
    
    .clinic-info-item {
        font-size: 13px;
    }
    
    .doctor-card-footer {
        flex-direction: column;
    }
    
    .quick-actions {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 380px) {
    .header-logo {
        height: 20px;
    }
    
    .app-title {
        font-size: 10px;
    }
    
    .app-subtitle {
        font-size: 7px;
        letter-spacing: 0.5px;
    }
    
    .header-actions .btn {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .header-actions .btn i {
        font-size: 9px;
    }
    
    .notification-btn {
        font-size: 14px;
    }
    
    .hamburger-btn {
        font-size: 16px;
    }
    
    /* ===== SMALL PHONE SLOT SIZES - 2 COLUMNS ===== */
    .slots-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    
    .time-slot-badge {
        font-size: 12px;
        padding: 6px 3px;
        min-height: 30px;
        border-radius: 4px;
    }
    
    .date-header {
        font-size: 12px;
        padding: 4px 0 3px 0;
    }
    
    .date-header .slot-count-badge {
        font-size: 11px;
        padding: 0 8px;
    }
    
    .time-slot-badge .clinic-short {
        font-size: 9px;
    }
    
    .show-more-btn {
        font-size: 11px;
        padding: 5px 14px;
    }
}

@media (min-width: 769px) {
    .main-content {
        padding: 30px 40px;
    }
}

/* ===== SIDEBAR RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar-brand {
        font-size: 18px;
    }
    
    .sidebar-brand-text small {
        font-size: 11px;
    }
    
    .sidebar-header {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .sidebar-brand {
        font-size: 16px;
    }
    
    .sidebar-brand-text small {
        font-size: 10px;
    }
    
    .sidebar-header {
        padding: 12px 16px;
    }
}

/* ===== SWEETALERT CUSTOM ===== */
.swal2-popup {
    border-radius: var(--radius) !important;
}

.swal2-confirm {
    border-radius: var(--radius-sm) !important;
    background: var(--gold-primary) !important;
    color: var(--royal-dark) !important;
}

.swal2-confirm:hover {
    background: var(--gold-light) !important;
}

.swal2-cancel {
    border-radius: var(--radius-sm) !important;
}

.swal2-input {
    border-radius: var(--radius-sm) !important;
    border: 2px solid var(--gray-200) !important;
    padding: 12px 16px !important;
    font-size: 16px !important;
}

.swal2-input:focus {
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15) !important;
}

/* ===== SLOT SELECTION POPUP ===== */
.slot-selection-popup {
    max-width: 650px !important;
    padding: 24px !important;
}

.slot-selection-popup .swal2-html-container {
    padding: 0 !important;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    padding: 4px;
}

.slot-grid::-webkit-scrollbar {
    width: 6px;
}

.slot-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.slot-grid::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 10px;
}

/* Slot Cards in Popup */
.slot-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.slot-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.slot-card .slot-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.slot-card .slot-status {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
}

.slot-card .slot-status.available {
    background: #ecfdf5;
    color: #065f46;
}

.slot-card .slot-status.booked {
    background: #fee2e2;
    color: #dc2626;
}

.slot-card .slot-book-btn .btn {
    font-size: 12px;
    padding: 6px 16px;
}

@media (max-width: 600px) {
    .slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .slot-card {
        padding: 12px;
    }
    
    .slot-card .slot-time {
        font-size: 14px;
    }
    
    .slot-selection-popup {
        max-width: 95% !important;
    }
}

/* Doctor Select Grid for Booking */
.doctor-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* ===== DOCTOR SELECT CARD ===== */
.doctor-select-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid var(--gray-200);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.doctor-select-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.doctor-select-card .doctor-card-image {
    height: 200px;
}

.doctor-select-card .doctor-card-body {
    padding: 14px 16px 12px 16px;
}

.doctor-select-card .clinic-info {
    padding: 6px 16px;
}

.doctor-select-card .time-slots-section {
    padding: 8px 16px;
}

.doctor-select-card .doctor-card-footer {
    padding: 10px 16px 16px 16px;
}

.doctor-select-card .doctor-card-footer .btn {
    padding: 8px 12px;
    font-size: 13px;
}

/* ===== ADDITIONAL ROYAL THEME ENHANCEMENTS ===== */

/* Gold accent for active states */
.nav-item.active a {
    border-left-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* Gold hover for bottom nav */
.bottom-nav-item:hover {
    color: var(--gold-primary);
}

/* Loading spinner with gold accent */
.loading-spinner i {
    color: var(--gold-primary);
}

/* Notification badge with gold accent */
.notification-badge {
    background: var(--danger-color);
}

/* Scrollbar for the entire app */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* Selection color */
::selection {
    background: var(--gold-primary);
    color: var(--royal-dark);
}

/* Focus outline for accessibility */
*:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 2px;
}

/* ============================================================
   DOCTOR IMAGES WITH PFNO - NEW STYLES
   ============================================================ */

/* ===== DOCTOR CARD IMAGE CONTAINER ===== */
.doctor-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    flex-shrink: 0;
}

/* ===== DOCTOR PROFILE IMAGE ===== */
.doctor-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease, opacity 0.3s ease;
    background-color: #e2e8f0;
}

.doctor-card:hover .doctor-profile-img {
    transform: scale(1.05);
}

/* ===== IMAGE LOADING STATE ===== */
.doctor-profile-img.loading {
    background: linear-gradient(90deg, 
        #e2e8f0 25%, 
        #f1f5f9 50%, 
        #e2e8f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== IMAGE LOADED STATE ===== */
.doctor-profile-img.loaded {
    opacity: 1;
    animation: fadeInImage 0.4s ease;
}

@keyframes fadeInImage {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== IMAGE ERROR/FALLBACK STATE ===== */
.doctor-profile-img.error {
    object-fit: contain;
    padding: 20px;
    background: #f1f5f9;
}

/* ===== IMAGE OVERLAY ===== */
.doctor-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* ===== SPECIALITY BADGE ===== */
.doctor-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--royal-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ===== PFNO BADGE ON IMAGE (NEW) ===== */
.doctor-pfno-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.doctor-pfno-badge i {
    font-size: 12px;
    color: var(--gold-primary);
}

.doctor-card:hover .doctor-pfno-badge {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

/* ===== PFNO TEXT BELOW DOCTOR NAME (NEW) ===== */
.doctor-pfno {
    font-size: 12px;
    color: #475569;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 2px 12px;
    border-radius: 12px;
    transition: var(--transition);
}

.doctor-pfno:hover {
    background: #e2e8f0;
    transform: scale(1.02);
}

.doctor-pfno i {
    color: var(--gold-primary);
    font-size: 11px;
}

.doctor-pfno .pfno-label {
    font-weight: 500;
    color: #64748b;
}

.doctor-pfno .pfno-value {
    font-weight: 600;
    color: #1e293b;
    letter-spacing: 0.3px;
}

/* ============================================================
   PROFILE MODAL IMAGE
   ============================================================ */

/* ===== PROFILE MODAL IMAGE CONTAINER ===== */
.profile-modal-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold-primary);
    background: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.profile-modal-image:hover {
    transform: scale(1.05);
    border-color: var(--gold-light);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

/* ===== PROFILE PFNO DISPLAY ===== */
.profile-pfno {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-pfno i {
    color: var(--gold-primary);
}

.profile-pfno strong {
    color: #1e293b;
}

/* ============================================================
   SLOT DISPLAY WITH PFNO
   ============================================================ */

/* ===== PFNO IN SLOT BADGE ===== */
.slot-pfno {
    font-size: 9px;
    color: #64748b;
    display: block;
    line-height: 1.2;
    font-weight: 400;
    margin-top: 1px;
}

.time-slot-badge.available:hover .slot-pfno {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== PFNO IN SLOT GROUP HEADER ===== */
.pfno-badge {
    font-size: 11px;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 12px;
    color: #475569;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pfno-badge i {
    font-size: 10px;
    color: var(--gold-primary);
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 768px) {
    .doctor-card-image {
        height: 180px;
    }
    
    .doctor-card-badge {
        font-size: 12px;
        padding: 4px 12px;
        top: 10px;
        left: 10px;
    }
    
    .doctor-pfno-badge {
        font-size: 10px;
        padding: 3px 10px;
        bottom: 10px;
        right: 10px;
    }
    
    .doctor-pfno {
        font-size: 11px;
        padding: 2px 10px;
    }
    
    .profile-modal-image {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .doctor-card-image {
        height: 160px;
    }
    
    .doctor-card-badge {
        font-size: 11px;
        padding: 3px 10px;
        top: 8px;
        left: 8px;
    }
    
    .doctor-pfno-badge {
        font-size: 9px;
        padding: 2px 8px;
        bottom: 8px;
        right: 8px;
    }
    
    .doctor-pfno {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    .doctor-pfno i {
        font-size: 10px;
    }
    
    .profile-modal-image {
        width: 50px;
        height: 50px;
    }
}

/* ============================================================
   ANIMATIONS FOR IMAGES
   ============================================================ */

/* Image appear animation */
@keyframes imageAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.doctor-profile-img.appear {
    animation: imageAppear 0.4s ease forwards;
}

/* Image hover zoom */
.doctor-card-image .doctor-profile-img {
    transition: transform 0.4s ease, filter 0.3s ease;
}

.doctor-card:hover .doctor-profile-img {
    transform: scale(1.05);
}

/* ============================================================
   FALLBACK AVATAR STYLES
   ============================================================ */

/* Avatar fallback when image doesn't load */
.doctor-profile-img[src*="ui-avatars"] {
    object-fit: contain;
    padding: 20px;
    background: #f1f5f9;
}

/* Avatar in profile modal */
.profile-modal-image[src*="ui-avatars"] {
    object-fit: contain;
    padding: 15px;
    background: #f1f5f9;
}