/* Design System Variables */
:root {
    --primary-hue: 215;
    --primary: hsl(var(--primary-hue), 95%, 48%);
    --primary-rgb: 6, 105, 239;
    --primary-hover: hsl(var(--primary-hue), 95%, 40%);
    --primary-light: hsl(var(--primary-hue), 95%, 93%);
    
    --success: hsl(150, 80%, 40%);
    --success-light: hsl(150, 80%, 95%);
    --warning: hsl(42, 100%, 45%);
    --warning-light: hsl(42, 100%, 95%);
    --danger: hsl(355, 85%, 50%);
    --danger-light: hsl(355, 85%, 96%);
    --info: hsl(190, 85%, 45%);
    --info-light: hsl(190, 85%, 93%);
    
    --dark: hsl(220, 40%, 15%);
    --light: hsl(220, 40%, 98%);
    --text-main: hsl(220, 35%, 22%);
    --text-muted: hsl(220, 20%, 55%);
    
    --border-color: rgba(220, 224, 235, 0.6);
    --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ngan thanh cuon ngang tren html (KHONG phai body) de fixed elements van hien thi */
html {
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Roboto', sans-serif;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

p, span, label, input, select, textarea, button, td, th {
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
}

body {
    background: linear-gradient(135deg, hsl(218, 50%, 93%) 0%, hsl(218, 30%, 97%) 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: block;
    /* QUAN TRONG: overflow-x hidden tren body co the clip fixed elements!
       Chuyen sang overflow: visible de floating widgets hien thi dung. */
    overflow-x: visible;
    --left-sidebar-width: 230px;
    --right-sidebar-width: 260px;
}

body.left-collapsed {
    --left-sidebar-width: 50px;
}

body.right-collapsed {
    --right-sidebar-width: 50px;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-grow: 1;
    min-width: 0;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Header Styles */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    animation: slideDown 0.5s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo i {
    color: var(--primary);
    font-size: 26px;
}

.logo span span {
    color: var(--primary);
}

.icon-pulse {
    animation: heartbeat 1.5s infinite;
}

.user-info-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.user-meta h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-patient { background: var(--primary-light); color: var(--primary); }
.badge-doctor { background: var(--success-light); color: var(--success); }
.badge-admin { background: hsl(280, 80%, 95%); color: hsl(280, 80%, 40%); }

/* Screen Transitions */
.screen-section {
    animation: fadeIn 0.4s ease-out;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 20px hsla(var(--primary-hue), 95%, 48%, 0.15);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: hsl(150, 80%, 35%);
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: #fff;
    border: none;
}

.btn-warning:hover {
    background: hsl(42, 100%, 37%);
    transform: translateY(-2px);
}

.btn-info {
    background: var(--info);
    color: #fff;
    border: none;
}

.btn-info:hover {
    background: hsl(190, 85%, 37%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--light);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-logout {
    color: var(--danger);
    background: var(--danger-light);
}

.btn-logout:hover {
    background: var(--danger);
    color: #fff;
    transform: rotate(180deg);
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group label i {
    margin-right: 6px;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #fff;
    outline: none;
    transition: all 0.2s ease;
    color: var(--text-main);
}

.form-group input[type="date"] {
    padding-left: 10px;
    padding-right: 10px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

/* Login Card Screen */
#login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    min-height: calc(100vh - 48px);
}

.login-wrapper {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.login-branding {
    text-align: center;
}

.brand-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 10px 25px hsla(var(--primary-hue), 95%, 48%, 0.2);
    margin-bottom: 16px;
}

.login-branding h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.login-branding p {
    font-size: 15px;
    color: var(--text-muted);
}

.login-card {
    padding: 32px;
}

.login-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: var(--dark);
}

.divider {
    text-align: center;
    margin: 28px 0 20px;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.divider span {
    background: #f1f4f9;
    padding: 0 16px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    position: relative;
    z-index: 2;
}

/* Quick Login Grid */
.quick-login-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-card {
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}

.quick-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.patient-card .quick-icon { background: var(--primary-light); color: var(--primary); }
.patient-card:hover { border-color: var(--primary); }

.doctor-card .quick-icon { background: var(--success-light); color: var(--success); }
.doctor-card:hover { border-color: var(--success); }

.admin-card .quick-icon { background: hsl(280, 80%, 95%); color: hsl(280, 80%, 40%); }
.admin-card:hover { border-color: hsl(280, 80%, 40%); }

.quick-card h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.quick-card p {
    font-size: 11px;
    color: var(--text-muted);
}

.quick-login-select {
    width: 90%;
    margin: 4px auto 0 auto;
    padding: 4px 6px;
    font-size: 11px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    text-align-last: center;
    transition: all 0.2s ease;
}

.quick-login-select:hover {
    border-color: var(--primary);
    background: #fff;
}

.quick-login-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 132, 255, 0.15);
    background: #fff;
}

/* Stats Cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.bg-blue { background: var(--primary-light); color: var(--primary); }
.bg-yellow { background: var(--warning-light); color: var(--warning); }
.bg-green { background: var(--success-light); color: var(--success); }
.bg-red { background: var(--danger-light); color: var(--danger); }

.stat-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Dashboard Layout Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

/* Adjust column span if booking form is hidden */
.dashboard-grid.no-form {
    grid-template-columns: 1fr;
}

.form-card, .list-card {
    padding: 28px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.card-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.card-icon {
    font-size: 24px;
    color: var(--primary);
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-card-header {
    justify-content: space-between;
    margin-bottom: 28px;
}

.list-card-header > div {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Appointments Cards/List */
.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.appointment-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.2s ease;
}

.appointment-card:hover {
    box-shadow: var(--card-shadow);
    border-color: hsla(var(--primary-hue), 95%, 48%, 0.2);
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.app-meta-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-meta-group h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

.app-meta-group span {
    font-size: 13px;
    color: var(--text-muted);
}

.app-meta-group span i {
    margin-right: 6px;
}

.status-badge {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

.status-pending { background: var(--warning-light); color: var(--warning); }
.status-confirmed { background: var(--primary-light); color: var(--primary); }
.status-completed { background: var(--success-light); color: var(--success); }
.status-cancelled { background: var(--danger-light); color: var(--danger); }

.app-details {
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.detail-item {
    font-size: 14px;
    color: var(--text-main);
}

.detail-item strong {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.app-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Small Buttons */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* Loading & Empty State Placeholders */
.loading-placeholder, .empty-placeholder {
    padding: 60px 0;
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

.loading-placeholder i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}

.empty-placeholder i {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: block;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: #fff;
    border-left: 5px solid var(--primary);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-success { border-left-color: var(--success); }
.toast-success i { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error i { color: var(--danger); }

.toast i {
    font-size: 18px;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

/* Keyframes */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

@keyframes slideDown {
    from { transform: translateY(-40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .quick-login-grid {
        grid-template-columns: 1fr;
    }
    .app-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .user-info-area {
        justify-content: space-between;
    }
} /* end @media 576px */

/* ============================================
   TABS â€” Modern Pill Navigation
   ============================================ */
.tabs-container {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 11px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
}

.tab-btn i {
    font-size: 14px;
    transition: transform 0.22s ease;
}

.tab-btn:hover {
    color: var(--dark);
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.tab-btn:hover i {
    transform: scale(1.15);
}

/* Appointments tab active â€” blue */
#tab-btn-appointments.active {
    background: linear-gradient(135deg, hsl(215, 95%, 52%), hsl(220, 90%, 58%));
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

/* Records tab active â€” green */
#tab-btn-records.active {
    background: linear-gradient(135deg, hsl(150, 75%, 40%), hsl(160, 70%, 46%));
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 142, 79, 0.3);
    transform: translateY(-1px);
}

/* Schedule tab active â€” teal */
#tab-btn-schedule.active {
    background: linear-gradient(135deg, hsl(175, 70%, 38%), hsl(185, 65%, 44%));
    color: #fff;
    box-shadow: 0 4px 14px rgba(14, 140, 130, 0.3);
    transform: translateY(-1px);
}

/* Users tab active â€” purple */
#tab-btn-users.active {
    background: linear-gradient(135deg, hsl(270, 70%, 52%), hsl(280, 65%, 58%));
    color: #fff;
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
    transform: translateY(-1px);
}

/* Overview tab active â€” indigo gradient */
#tab-btn-overview.active {
    background: linear-gradient(135deg, hsl(245, 80%, 54%), hsl(215, 85%, 55%));
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

/* Default inactive overview style */
#tab-btn-overview:not(.active) {
    background: transparent;
    color: hsl(245, 60%, 55%);
}

.tab-content {
    display: none;
    animation: fadeIn 0.35s ease-out;
}

.tab-content.active {
    display: block;
}

/* Modal Popup Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.35); /* Sleek backdrop */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 28px;
    animation: slideDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-body {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 4px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--success);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}

.btn-close:hover {
    color: var(--danger);
    transform: scale(1.15);
}

/* Custom Specialty Booking Modal styles */
.specialty-booking-modal-content {
    width: 95%;
    max-width: 850px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.spec-modal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.spec-modal-title {
    font-size: 22px;
    font-weight: 850;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.spec-modal-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.spec-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.spec-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spec-filter-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.spec-filter-group select,
.spec-filter-group input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    outline: none;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s ease;
}

.spec-filter-group select:focus,
.spec-filter-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 105, 239, 0.15);
}

.spec-doc-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.spec-doc-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #fff;
    transition: all 0.25s ease;
    align-items: start;
}

.spec-doc-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 8px 16px -4px rgba(6, 105, 239, 0.08);
    transform: translateY(-2px);
}

.spec-doc-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 120px;
}

.spec-doc-avatar-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.spec-doc-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    color: #fff;
    font-weight: 850;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.spec-doc-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--success);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #fff;
}

.spec-doc-rating {
    font-size: 11px;
    color: #f59e0b;
    margin-top: 4px;
}

.spec-doc-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-doc-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
}

.spec-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.spec-doc-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.spec-doc-meta-item i {
    color: var(--primary);
}

.spec-slots-section {
    margin-top: 10px;
}

.spec-slots-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spec-slots-alert {
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.spec-slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spec-slot-btn {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--dark);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spec-slot-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.spec-slot-btn.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.spec-slot-btn.disabled {
    background: #f1f5f9;
    color: #cbd5e1;
    border-color: #e2e8f0;
    cursor: not-allowed;
    pointer-events: none;
}

.spec-no-doctors {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.spec-no-doctors i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.spec-booking-confirm-panel {
    background: #fff8e6;
    border: 1px solid #ffeeba;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    animation: fadeIn 0.25s ease-out;
}

.spec-confirm-title {
    font-size: 14px;
    font-weight: 800;
    color: #856404;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spec-confirm-details {
    font-size: 13px;
    color: #856404;
    margin-bottom: 12px;
    line-height: 1.4;
}

.spec-confirm-symptoms {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spec-confirm-symptoms textarea {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
    outline: none;
    font-size: 13px;
    resize: vertical;
}

.spec-confirm-symptoms textarea:focus {
    border-color: #f59e0b;
}

.spec-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

@media (max-width: 768px) {
    .spec-filters {
        grid-template-columns: 1fr;
    }
    .spec-doc-card {
        grid-template-columns: 1fr;
    }
    .spec-doc-left {
        width: 100%;
        flex-direction: row;
        gap: 12px;
        text-align: left;
        align-items: center;
    }
    .spec-doc-avatar-wrapper {
        margin-bottom: 0;
    }
}

/* Admin Dashboard & User Management Table */
.stats-container.admin-stats {
    grid-template-columns: repeat(3, 1fr);
}

.admin-table-wrapper {
    overflow-x: auto;
    width: 100%;
    margin-top: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table th {
    font-weight: 700;
    color: var(--dark);
    font-size: 13px;
    background: rgba(0, 0, 0, 0.02);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    font-size: 14px;
    color: var(--text-main);
}

.admin-table tr:hover {
    background: hsla(var(--primary-hue), 95%, 48%, 0.02);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Doctor Schedule Grid and Custom Checkbox Buttons */
.schedule-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.slot-checkbox-label {
    display: block;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.slot-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.slot-checkbox-label span {
    display: block;
    padding: 14px 16px;
    text-align: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.slot-checkbox-label:hover span {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.slot-checkbox-label input:checked ~ span {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px hsla(var(--primary-hue), 95%, 48%, 0.2);
}

.slot-checkbox-label input:disabled ~ span {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.8;
}

/* ============================================
   OVERVIEW DASHBOARD STYLES
   ============================================ */

/* KPI Cards Grid */
.overview-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.kpi-info h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-info p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Mid-grid: Analytics + Top Doctors */
.overview-mid-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.overview-analytics-card {
    padding: 24px;
    border-radius: var(--radius-md);
}

/* Completion Rate */
.overview-completion-rate {
    text-align: center;
    padding: 10px 0 20px;
}

.completion-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.progress-bar-track {
    height: 12px;
    background: hsl(215, 30%, 92%);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), hsl(250, 90%, 65%));
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Status Pills */
.overview-status-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    background: var(--light);
}

.status-pill .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-pill.pending { background: hsl(42, 100%, 95%); color: hsl(42, 100%, 35%); }
.status-pill.pending .dot { background: hsl(42, 100%, 45%); }
.status-pill.confirmed { background: hsl(215, 90%, 93%); color: hsl(215, 80%, 40%); }
.status-pill.confirmed .dot { background: hsl(215, 85%, 52%); }
.status-pill.completed { background: var(--success-light); color: var(--success); }
.status-pill.completed .dot { background: var(--success); }
.status-pill.cancelled { background: var(--danger-light); color: var(--danger); }
.status-pill.cancelled .dot { background: var(--danger); }

/* Top Doctors Leaderboard */
.doctor-rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    background: hsl(220, 30%, 98%);
    transition: background 0.2s;
}

.doctor-rank-item:hover { background: var(--primary-light); }

.rank-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.rank-badge.gold   { background: hsl(46, 100%, 88%); color: hsl(36, 90%, 40%); }
.rank-badge.silver { background: hsl(220, 20%, 88%); color: hsl(220, 20%, 40%); }
.rank-badge.bronze { background: hsl(25, 80%, 88%);  color: hsl(25, 70%, 40%); }
.rank-badge.other  { background: hsl(220, 30%, 92%); color: var(--text-muted); }

.rank-name {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
}

.rank-count {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
}

.rank-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Tables Grid */
.overview-tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Danger Zone */
.danger-zone-card {
    border: 1px solid hsl(355, 70%, 88%);
    background: hsl(355, 85%, 99%) !important;
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.danger-zone-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid hsl(355, 60%, 90%);
}

.danger-zone-header > i {
    font-size: 24px;
    color: var(--danger);
    padding-top: 2px;
    flex-shrink: 0;
}

.danger-zone-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 4px;
}

.danger-zone-header p {
    font-size: 13px;
    color: hsl(355, 50%, 45%);
}

.danger-zone-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.danger-zone-action h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.danger-zone-action p {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-danger:hover { background: hsl(355, 85%, 42%); transform: translateY(-1px); }
.btn-danger:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Tab btn overview highlight */
#tab-btn-overview {
    background: linear-gradient(135deg, hsl(250,80%,96%), hsl(215,90%,93%));
    color: hsl(250,70%,45%);
}

#tab-btn-overview.active {
    background: linear-gradient(135deg, hsl(250,80%,52%), hsl(215,85%,52%));
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .overview-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
    .overview-mid-grid,
    .overview-tables-grid { grid-template-columns: 1fr; }
    .overview-kpi-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
    .overview-kpi-grid { grid-template-columns: 1fr; }
}

/* ============================================
   QUICK ACTION CARD (Admin Overview)
   ============================================ */
.quick-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(99, 179, 237, 0.25);
    background: linear-gradient(135deg,
        rgba(219, 234, 254, 0.5) 0%,
        rgba(236, 253, 245, 0.5) 100%) !important;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.quick-action-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.quick-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, hsl(215,90%,55%), hsl(250,80%,60%));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(79,70,229,0.25);
}

.quick-action-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 3px;
}

.quick-action-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.quick-action-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-btn-doctor {
    background: linear-gradient(135deg, hsl(175,70%,38%), hsl(185,65%,46%));
    color: #fff;
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(14,140,130,0.25);
}

.quick-btn-doctor:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14,140,130,0.35);
}

.quick-btn-patient {
    background: linear-gradient(135deg, hsl(215,90%,52%), hsl(225,85%,58%));
    color: #fff;
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.quick-btn-patient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.35);
}

/* Role Display Badge in Admin Modal */
.role-display-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    margin-top: 4px;
}

.role-display-badge.doctor {
    background: hsl(175,70%,92%);
    color: hsl(175,70%,32%);
    border: 1.5px solid hsl(175,60%,75%);
}

.role-display-badge.patient {
    background: hsl(215,90%,93%);
    color: hsl(215,80%,40%);
    border: 1.5px solid hsl(215,70%,78%);
}

/* App Header Navigation Link */
.app-header-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease, color 0.2s ease;
}
.app-header-nav a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* Admin Register Modal Select Dropdown */
#admin-reg-branch option {
    background: #ffffff;
    color: var(--dark);
    font-weight: 500;
}
#admin-reg-branch:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 56,132,255), 0.15);
}

/* Public User Area (for logged-in users on landing page) */
#public-user-area {
    animation: fadeIn 0.4s ease-out;
}

/* ============================================
   USER SUB-TABS (Staff / Patients)
   ============================================ */
.user-subtab-bar {
    display: flex;
    gap: 6px;
    padding: 5px;
    background: rgba(0,0,0,0.04);
    border-radius: 12px;
}
.user-subtab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    font-size: 13.5px;
    font-weight: 600;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.user-subtab:hover { background: rgba(0,0,0,0.05); color: var(--dark); }
.user-subtab.active { background: #fff; color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.subtab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
    background: var(--primary-light); color: var(--primary);
}
.user-subtab.active .subtab-count { background: var(--primary); color: #fff; }

/* ============================================
   REGISTER FORM — Section Divider
   ============================================ */
.reg-section-divider {
    display: flex; align-items: center; gap: 12px; margin: 18px 0 14px;
}
.reg-section-divider::before, .reg-section-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border-color);
}
.reg-section-divider span {
    font-size: 12px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}

/* ============================================
   PATIENT TABLE — Info Badges
   ============================================ */
.gender-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.gender-badge.male   { background: hsl(215,85%,92%); color: hsl(215,75%,42%); }
.gender-badge.female { background: hsl(330,80%,93%); color: hsl(330,70%,45%); }
.gender-badge.other  { background: hsl(45,90%,92%);  color: hsl(45,80%,40%); }
.blood-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
    background: hsl(355,85%,93%); color: hsl(355,75%,45%);
    border: 1px solid hsl(355,70%,82%);
}
.patient-appt-count { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--primary); }
.address-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text-muted); }

/* ============================================
   AI ASSIST BUTTON (Symptoms Form)
   ============================================ */
.btn-ai-assist {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    background: linear-gradient(135deg, hsl(var(--primary-hue), 95%, 95%), hsl(var(--primary-hue), 95%, 90%));
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.08);
}
.btn-ai-assist:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
    transform: translateY(-1px);
}
.btn-ai-assist:active {
    transform: translateY(0);
}

/* ============================================
   AI FLOATING CHAT WIDGET & QUICK CONTACT SPEED DIAL
   ============================================ */

/* ============================================
   FLOATING RIGHT CONTACT STACK STYLES
   ============================================ */

.floating-contact-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1040;
}

.contact-stack-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    position: relative;
}

.contact-stack-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.26);
}

/* AI Chat Button */
.contact-stack-btn.ai-chat-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Messenger Button */
.contact-stack-btn.messenger-btn {
    background: linear-gradient(135deg, #0084ff, #0066cc);
}

/* Zalo Button */
.contact-stack-btn.zalo-btn {
    background: linear-gradient(135deg, #0068ff, #0050c5);
    font-weight: 800;
    font-size: 14.5px;
}

.contact-stack-btn .zalo-text-icon {
    font-family: Arial, sans-serif;
    letter-spacing: -0.5px;
}

/* SMS Button */
.contact-stack-btn.sms-btn {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Hotline Button */
.contact-stack-btn.hotline-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: pulseHotlineBtn 2s infinite;
}

/* Badge for AI Chat Button */
.contact-stack-btn .btn-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

@keyframes pulseHotlineBtn {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Mobile/Tablet styles for Floating Contact Stack */
@media (max-width: 991px) {
    /* Mobile Overrides for Floating Contact Stack */
    .floating-contact-stack {
        bottom: 16px;
        right: 16px;
        gap: 8px;
    }
    .contact-stack-btn {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }
    .contact-stack-btn.zalo-btn {
        font-size: 12px;
    }
    .contact-stack-btn .btn-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    .ai-chat-container {
        right: 16px !important;
        bottom: 80px !important;
        width: calc(100% - 32px) !important;
        height: calc(100% - 120px) !important;
    }
}

/* Chat container positioning - shifts based on right sidebar state */
.ai-chat-container {
    position: fixed;
    bottom: 24px;
    right: 90px;
    width: 380px;
    height: 520px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999; /* Tren tat ca */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    animation: aiSlideUp 0.35s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transition: right 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: bottom right;
}

.ai-chat-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, hsl(210, 85%, 55%), hsl(190, 85%, 48%));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ai-avatar-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.online-indicator {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #00e676;
    border-radius: 50%;
    box-shadow: 0 0 6px #00e676;
}
.ai-btn-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}
.ai-btn-close:hover {
    opacity: 1;
}

.ai-chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}
.ai-chat-body::-webkit-scrollbar {
    width: 5px;
}
.ai-chat-body::-webkit-scrollbar-track {
    background: transparent;
}
.ai-chat-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.ai-message {
    display: flex;
    flex-direction: column;
    max-width: 82%;
    animation: aiMsgFadeIn 0.3s ease;
}
.ai-message p {
    margin: 0 0 8px 0;
    line-height: 1.5;
}
.ai-message p:last-child {
    margin-bottom: 0;
}
.ai-message ul, .ai-message ol {
    margin: 0 0 8px 0;
    padding-left: 20px;
}
.ai-msg-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ai-msg-bot {
    align-self: flex-start;
}
.ai-msg-bot .ai-msg-content {
    background: #fff;
    color: var(--dark);
    border-top-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.ai-msg-user {
    align-self: flex-end;
}
.ai-msg-user .ai-msg-content {
    background: linear-gradient(135deg, hsl(210, 85%, 55%), hsl(205, 80%, 50%));
    color: #fff;
    border-top-right-radius: 4px;
}

.ai-quick-replies {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px dashed var(--border-color);
}
.ai-quick-replies::-webkit-scrollbar {
    height: 3px;
}
.ai-quick-replies::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}
.quick-reply-btn {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.quick-reply-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.ai-chat-input-area {
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: center;
}
.ai-chat-input-area input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    font-size: 13.5px;
    outline: none;
    background: rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s, background 0.2s;
}
.ai-chat-input-area input:focus {
    border-color: var(--primary);
    background: #fff;
}
.ai-btn-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}
.ai-btn-send:hover {
    transform: scale(1.05);
    background: hsl(210, 85%, 48%);
}
.ai-btn-send:active {
    transform: scale(0.95);
}

.typing-indicator {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-top-left-radius: 4px;
    width: fit-content;
}
.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Animations */
@keyframes pulseGlow {
    0% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 0px rgba(30, 144, 255, 0.4); }
    70% { box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(30, 144, 255, 0); }
    100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 0px rgba(30, 144, 255, 0); }
}
@keyframes bounceBadge {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}
@keyframes aiSlideUp {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes aiMsgFadeIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 480px) {
    .ai-chat-container {
        width: calc(100% - 32px);
        height: calc(100% - 100px);
        right: 16px;
        bottom: 84px;
    }
}

/* ============================================
   HEALTH AI TOOLS SECTION (CareConnect Tools)
   ============================================ */
.tools-intro-card {
    background: linear-gradient(135deg, hsl(215, 95%, 98%) 0%, hsl(195, 95%, 97%) 100%);
    border: 1px solid rgba(6, 105, 239, 0.1);
    padding: 30px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.tools-intro-text h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}
.tools-intro-text p {
    color: var(--text-muted);
    font-size: 14px;
}
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .tools-intro-card {
        flex-direction: column;
        text-align: center;
    }
}
.tool-select-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.tool-select-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(6, 105, 239, 0.3);
}
.tool-select-card.active {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 12px 30px rgba(6, 105, 239, 0.1);
}
.tool-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}
.tool-card-icon.bmi {
    background: hsl(215, 95%, 93%);
    color: var(--primary);
}
.tool-card-icon.symptom {
    background: hsl(150, 80%, 93%);
    color: var(--success);
}
.tool-card-icon.drug {
    background: hsl(42, 100%, 93%);
    color: var(--warning);
}
.tool-select-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}
.tool-select-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    flex-grow: 1;
}
.tool-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
}
.tool-card-badge.danger { background: var(--danger); }
.tool-card-badge.primary { background: var(--primary); }
.tool-card-badge.info { background: hsl(190, 85%, 45%); }

.tool-card-action {
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.tool-select-card:hover .tool-card-action i {
    transform: translateX(4px);
}
.tool-card-action i {
    transition: transform 0.2s ease;
}

/* Tool workspace styles */
.tool-workspace {
    margin-top: 24px;
}
.bmi-progress-container {
    background: #e9ecef;
    border-radius: 8px;
    height: 16px;
    position: relative;
    margin: 24px 0 12px 0;
    overflow: hidden;
}
.bmi-progress-bar {
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s ease;
}
.bmi-ranges {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}
.health-result-card {
    background: linear-gradient(135deg, #fff 0%, hsl(210, 80%, 99%) 100%);
    border: 1px solid rgba(6, 105, 239, 0.1);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 20px;
}
.interaction-alert {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.interaction-alert.severe {
    background: var(--danger-light);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: hsl(355, 85%, 35%);
}
.interaction-alert.moderate {
    background: var(--warning-light);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: hsl(42, 100%, 30%);
}
.interaction-alert.safe {
    background: var(--success-light);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: hsl(150, 80%, 25%);
}

/* ============================================
   PUBLIC LANDING PAGE STYLES (Guest View)
   ============================================ */
.public-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    margin-bottom: 0;
    animation: slideDown 0.5s ease-out;
    gap: 24px;
    flex-wrap: nowrap;
}
.public-nav {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}
.public-nav a, .public-nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    padding-bottom: 4px;
}
.public-nav a:hover, .public-nav-link:hover {
    color: var(--primary);
}
.public-nav-link.active {
    color: var(--primary) !important;
}
.public-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.5px;
    background-color: var(--primary);
    border-radius: 2px;
    animation: scaleXIn 0.25s ease-out forwards;
    transform-origin: left;
}
@keyframes scaleXIn {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
.landing-hero {
    padding: 40px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
}
@media (max-width: 1180px) {
    .public-nav {
        display: none; /* Hide nav links on tablet/mobile to prevent overflow */
    }
}

@media (max-width: 992px) {
    .landing-hero {
        grid-template-columns: 1fr;
        padding: 30px 20px;
        text-align: center;
    }
    .hero-image-content {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-btn-text {
        display: none; /* Show only icons on mobile buttons */
    }
    .public-header {
        padding: 12px 20px;
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .public-header {
        padding: 10px 14px;
        gap: 12px;
    }
    #public-user-area {
        gap: 8px;
    }
}

/* Red Pulse Dot for live updates */
.pulse-dot-red {
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    animation: pulseRed 1.8s infinite;
}

@keyframes pulseRed {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* ============================================
   FILTER BAR STYLES
   ============================================ */
.filter-bar {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.3);
    flex-wrap: wrap;
    align-items: center;
}

.filter-search-wrapper {
    position: relative;
    flex: 2;
    min-width: 240px;
}

.filter-search-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.filter-search-wrapper input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 13.5px;
    color: var(--text-main);
    transition: all 0.2s ease;
    outline: none;
}

.filter-search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 105, 239, 0.1);
}

.filter-select-wrapper {
    flex: 1;
    min-width: 160px;
    position: relative;
}

.filter-select-wrapper select {
    width: 100%;
    padding: 10px 32px 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 13.5px;
    color: var(--text-main);
    transition: all 0.2s ease;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.filter-select-wrapper::after {
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 14px;
}

.filter-select-wrapper select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 105, 239, 0.1);
}

@media (max-width: 768px) {
    .filter-select-wrapper {
        flex: 1 1 100%;
    }
    .filter-search-wrapper {
        flex: 1 1 100%;
    }
}

/* ==========================================================================
   HEALTH CHECKUP PACKAGES & NEWS CATEGORIES (YouMed Integration)
   ========================================================================== */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.package-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(6, 105, 239, 0.15);
    border-color: rgba(6, 105, 239, 0.25);
    background: rgba(255, 255, 255, 0.8);
}

.package-header {
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 16px;
    position: relative;
}

.package-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    letter-spacing: 0.5px;
}

.package-badge.popular {
    background: var(--primary-light);
    color: var(--primary);
}

.package-badge.success {
    background: var(--success-light);
    color: var(--success);
}

.package-badge.info {
    background: hsl(190, 85%, 93%);
    color: hsl(190, 85%, 35%);
}

.package-badge.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.package-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    margin: 8px 0 10px 0;
    line-height: 1.4;
    font-family: 'Roboto', sans-serif;
    padding-right: 115px; /* Ngăn chặn chữ đè lên badge */
}

.package-price {
    font-size: 22px;
    font-weight: 850;
    color: var(--primary);
    font-family: 'Roboto', sans-serif;
}

.package-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.package-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    min-height: 42px;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.package-features li {
    font-size: 13px;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.package-features li i {
    color: var(--success);
    margin-top: 3px;
    font-size: 14px;
}

/* Specialty categories for landing news tab */
.news-categories-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.news-cat-btn {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.news-cat-btn:hover {
    background: rgba(6, 105, 239, 0.05);
    color: var(--primary);
    border-color: rgba(6, 105, 239, 0.3);
    transform: translateY(-1px);
}

.news-cat-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(6, 105, 239, 0.25);
}

/* Patient appointment hide settings and card hidden style */
.patient-filter-settings {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(6, 105, 239, 0.02);
    border-bottom: 1px dashed var(--border-color);
    font-size: 12.5px;
    flex-wrap: wrap;
    gap: 12px;
}

.appointment-card.appointment-hidden {
    opacity: 0.55;
    border: 1.5px dashed var(--border-color) !important;
    background: rgba(240, 240, 240, 0.35) !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.appointment-card.appointment-hidden:hover {
    opacity: 0.9;
    background: rgba(240, 240, 240, 0.7) !important;
    border-color: rgba(6, 105, 239, 0.4) !important;
}

/* Hide package prices - prices not displayed per business decision */
.package-price {
    display: none !important;
}

/* ===================================================
   MEDPRO-INSPIRED FEATURES - NEW SECTIONS CSS
   =================================================== */

/* --- Specialty Quick-Select Grid --- */
.specialty-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.specialty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px 16px;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}
.specialty-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(6, 105, 239, 0.12);
    transform: translateY(-4px);
}
.specialty-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: transform 0.25s ease;
}
.specialty-card:hover .specialty-icon {
    transform: scale(1.1);
}
.specialty-card span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

/* --- Stats Counter Section --- */
.stats-counter-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: linear-gradient(135deg, #0b1e4a 0%, #1a3a7a 50%, #0b2d6b 100%);
    border-radius: 20px;
    padding: 40px 20px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.stats-counter-section::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(6,105,239,0.25) 0%, transparent 70%);
    border-radius: 50%;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 20px;
    border-right: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 1;
}
.stat-item:last-child { border-right: none; }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: #60c7ff;
    margin-bottom: 12px;
}
.stat-number {
    font-size: 42px;
    font-weight: 850;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    line-height: 1;
}
.stat-suffix {
    font-size: 22px;
    font-weight: 700;
    color: #60efaa;
    margin-top: -2px;
    margin-bottom: 8px;
}
.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

/* --- How It Works Steps --- */
.howitworks-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.hiw-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 220px;
    position: relative;
    padding: 0 16px;
    animation: fadeInUp 0.6s ease both;
}
.hiw-step.interactive {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    padding: 16px 12px;
}
.hiw-step.interactive:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 24px rgba(6, 105, 239, 0.08);
    transform: translateY(-4px);
}
.hiw-step-num {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 12px;
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: 20px;
}
.hiw-icon-wrap {
    width: 70px; height: 70px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}
.hiw-step:hover .hiw-icon-wrap { transform: scale(1.08) rotate(-3deg); }
.hiw-step h4 {
    font-size: 15px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
    font-family: 'Roboto', sans-serif;
}
.hiw-step p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
}
.hiw-arrow {
    font-size: 18px;
    color: var(--border-color);
    padding: 0 8px;
    flex-shrink: 0;
    margin-top: -30px;
}

/* --- Featured Doctor Cards --- */
.doctor-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.doctor-feat-card {
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 18px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.doctor-feat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #60c7ff);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}
.doctor-feat-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(6, 105, 239, 0.14);
}
.doctor-feat-card:hover::before { transform: scaleX(1); }
.doctor-avatar-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 16px;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.doctor-feat-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
    font-family: 'Roboto', sans-serif;
}
.doctor-feat-spec {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}
.doctor-feat-branch {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.doctor-feat-stars {
    color: #f59e0b;
    font-size: 13px;
    margin-bottom: 14px;
    letter-spacing: 1px;
}
.doctor-feat-btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}
.doctor-feat-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* --- Testimonials Grid --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.testimonial-card {
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 18px;
    padding: 28px 24px;
    transition: all 0.25s ease;
    position: relative;
}
.testimonial-card::before {
    content: '\201C';
    font-size: 80px;
    line-height: 1;
    color: rgba(6, 105, 239, 0.08);
    position: absolute;
    top: 10px; left: 20px;
    font-family: Georgia, serif;
}
.testimonial-card:hover {
    box-shadow: 0 10px 30px rgba(6, 105, 239, 0.1);
    transform: translateY(-4px);
    border-color: rgba(6, 105, 239, 0.2);
}
.testimonial-card-featured {
    background: linear-gradient(135deg, #f0f7ff, #e3eeff);
    border-color: rgba(6, 105, 239, 0.25);
}
.testimonial-stars {
    color: #f59e0b;
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 14px;
}
.testimonial-text {
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
    position: relative;
    z-index: 1;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}
.testimonial-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.testimonial-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
}
.testimonial-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Testimonial Form & Rating Styles --- */
.star-item {
    color: #cbd5e1; /* slate-300 */
    transition: color 0.15s ease, transform 0.15s ease;
    display: inline-block;
}
.star-item.active {
    color: #f59e0b; /* amber-500 */
}
.star-item.hover {
    color: #fbbf24; /* amber-400 */
}
.star-item:hover {
    transform: scale(1.2);
}

.review-submission-card input:focus,
.review-submission-card textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(6, 105, 239, 0.1);
}


/* --- FAQ Accordion --- */
.faq-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.faq-item {
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
}
.faq-item:hover { border-color: rgba(6, 105, 239, 0.3); }
.faq-item.faq-open { border-color: var(--primary); box-shadow: 0 4px 16px rgba(6, 105, 239, 0.1); }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--dark);
    gap: 16px;
}
.faq-chevron {
    font-size: 12px;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.faq-item.faq-open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.7;
    padding: 0 22px;
}
.faq-item.faq-open .faq-answer {
    max-height: 300px;
    padding: 0 22px 18px;
}

/* --- Floating Hotline Button --- */
.floating-hotline-btn {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s ease;
    animation: pulse-phone 2s infinite;
}
.floating-hotline-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(22, 163, 74, 0.55);
}
.floating-hotline-btn:hover .hotline-tooltip { opacity: 1; pointer-events: auto; transform: translateX(0); }
.hotline-tooltip {
    position: absolute;
    right: 62px;
    background: #0b132b;
    border-radius: 10px;
    padding: 10px 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(8px);
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.hotline-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%; transform: translateY(-50%);
    border: 6px solid transparent;
    border-right: none;
    border-left-color: #0b132b;
}

@keyframes pulse-phone {
    0%, 100% { box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4); }
    50% { box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4), 0 0 0 8px rgba(22, 163, 74, 0.12); }
}

/* --- Responsive adjustments --- */
@media (max-width: 1100px) {
    .specialty-grid { grid-template-columns: repeat(4, 1fr); }
    .doctor-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-counter-section { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: none; }
}
@media (max-width: 768px) {
    .specialty-grid { grid-template-columns: repeat(3, 1fr); }
    .howitworks-grid { flex-direction: column; align-items: center; gap: 20px; }
    .hiw-arrow { transform: rotate(90deg); margin: -8px 0; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .stats-counter-section { grid-template-columns: repeat(2, 1fr); border-radius: 14px; }
    .doctor-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .specialty-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .specialty-card { padding: 14px 8px 12px; }
    .specialty-icon { width: 44px; height: 44px; font-size: 18px; }
}

/* --- Interactive Booking Slots Styles --- */
.booking-slots-container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
    animation: fadeIn 0.3s ease;
}

.slots-session-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.slots-session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.booking-slot-btn {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--dark);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.booking-slot-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(6, 105, 239, 0.05);
}

.booking-slot-btn.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(6, 105, 239, 0.2);
}

.booking-slot-btn.disabled {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #e2e8f0;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    font-weight: 500;
}
.booking-slot-btn.disabled i {
    color: #cbd5e1;
}

/* Promo Carousel Styles */
.promo-slide {
    display: none;
}
.promo-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}
.carousel-dot {
    display: inline-block;
    width: 8px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.carousel-dot.active {
    background: var(--primary) !important;
    width: 24px !important;
}

/* ============================================
   FIXED LEFT HEALTH NEWS SIDEBAR STYLES
   ============================================ */

/* ============================================
   COLLAPSIBLE LEFT HEALTH NEWS SIDEBAR STYLES
   ============================================ */

.left-news-sidebar {
    position: fixed;
    left: 24px;
    top: 96px;
    height: auto;
    width: var(--left-sidebar-width);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 105, 239, 0.12);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(6, 105, 239, 0.06);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    flex-shrink: 0;
}

/* Expanded State CSS */
.sidebar-expanded-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px 12px;
    overflow: hidden;
}

.news-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.news-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-sidebar-title h3 {
    font-size: 12.5px;
    font-weight: 900;
    color: var(--dark);
    margin: 0;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.3px;
}

.icon-news-rss {
    font-size: 20px;
    color: var(--primary);
    animation: pulseRss 2s infinite;
}

.news-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(220, 53, 69, 0.08);
    color: var(--danger);
    font-size: 7.5px;
    font-weight: 850;
    padding: 1px 5px;
    border-radius: 4px;
    margin-top: 1px;
}

.btn-minimize-news-sidebar {
    background: rgba(6, 105, 239, 0.06);
    border: 1px solid rgba(6, 105, 239, 0.1);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: var(--primary);
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-minimize-news-sidebar:hover {
    background: var(--primary);
    color: white;
}

.news-sidebar-body {
    height: 250px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.03);
    margin-bottom: 12px;
}

.news-carousel-container {
    display: flex;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.sidebar-news-card {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
}

.sidebar-news-img-wrapper {
    width: 100%;
    height: 100px;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.sidebar-news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-news-card:hover .sidebar-news-img {
    transform: scale(1.04);
}

.sidebar-news-cat-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
}

.sidebar-news-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-news-info h4 {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 30px;
}

.sidebar-news-info h4:hover {
    color: var(--primary);
}

.sidebar-news-summary {
    font-size: 9.5px;
    color: var(--text-muted);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 25px;
}

.sidebar-news-advice {
    background: rgba(6,105,239,0.03);
    border: 1px dashed rgba(6,105,239,0.12);
    border-radius: 6px;
    padding: 6px;
    font-size: 9px;
    line-height: 1.3;
    color: var(--text-main);
    margin-top: 1px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 24px;
}

.sidebar-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 8px;
    color: var(--text-muted);
    font-weight: 600;
    padding-top: 5px;
    border-top: 1px dashed rgba(0,0,0,0.04);
    margin-top: 1px;
}

.sidebar-news-meta span i {
    margin-right: 2px;
    color: var(--primary);
}

.sidebar-news-source-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.sidebar-news-source-link:hover {
    text-decoration: underline;
}

.news-sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-carousel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-carousel-prev, .btn-carousel-next {
    background: rgba(6, 105, 239, 0.05);
    border: 1px solid rgba(6, 105, 239, 0.1);
    color: var(--primary);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-carousel-prev:hover, .btn-carousel-next:hover {
    background: var(--primary);
    color: white;
}

.news-carousel-dots {
    display: flex;
    gap: 4px;
}

.news-carousel-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(6, 105, 239, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.news-carousel-dot.active {
    background: var(--primary);
    width: 12px;
    border-radius: 3px;
}


/* Collapsed State Strip */
.sidebar-collapsed-strip {
    display: none;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 16px 0;
    gap: 20px;
    cursor: pointer;
    overflow: hidden;
}

.btn-expand-news-sidebar {
    background: rgba(6, 105, 239, 0.06);
    border: 1px solid rgba(6, 105, 239, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: var(--primary);
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-expand-news-sidebar:hover {
    background: var(--primary);
    color: white;
}

.icon-news-rss-collapsed {
    font-size: 16px;
    color: var(--primary);
    animation: pulseRss 2s infinite;
}

.collapsed-vertical-text {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    font-size: 10.5px;
    font-weight: 900;
    color: var(--text-muted);
    letter-spacing: 2px;
    white-space: nowrap;
    font-family: 'Roboto', sans-serif;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.sidebar-collapsed-strip:hover .collapsed-vertical-text {
    opacity: 1;
    color: var(--primary);
}

@keyframes pulseRss {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Collapsed Toggle CSS rule */
.left-news-sidebar.collapsed {
    width: 50px;
    height: 260px; /* vertical capsule */
}

.left-news-sidebar.collapsed .sidebar-expanded-content {
    display: none;
}

.left-news-sidebar.collapsed .sidebar-collapsed-strip {
    display: flex;
}

/* Dynamic Page Container Layout Shift on Desktop (2-8-2 Grid Proportion) */
@media (min-width: 992px) {
    .left-news-sidebar {
        left: max(24px, calc(8.33vw - 130px)) !important;
    }
    
    .left-news-sidebar.collapsed {
        left: max(16px, calc(8.33vw - 25px)) !important;
    }
    
    .app-container {
        margin-left: 16.67vw !important;
        margin-right: 16.67vw !important;
        width: 66.66vw !important;
        max-width: none !important;
        transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }
    
    .floating-contact-stack {
        right: 12px !important;
    }
    
    .ai-chat-container {
        right: 78px !important;
    }
}

/* Mobile/Tablet Overlay Styles */
@media (max-width: 991px) {
    .left-news-sidebar {
        position: fixed;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        height: 100% !important;
        transform: translateX(-100%) !important;
        width: 230px !important;
        box-shadow: 10px 0 30px rgba(0,0,0,0.15) !important;
        z-index: 1100 !important;
        border-radius: 0 !important;
        border: none !important;
    }
    
    .left-news-sidebar.active {
        transform: translateX(0);
    }
    
    .left-news-sidebar.collapsed {
        /* On mobile, collapse acts as complete hide */
        transform: translateX(-100%);
        width: 230px;
    }
    
    .left-news-sidebar.collapsed .sidebar-expanded-content {
        display: flex; /* keep content layout intact */
    }
    
    .left-news-sidebar.collapsed .sidebar-collapsed-strip {
        display: none;
    }
    
    .left-news-sidebar ~ .app-container {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Floating News Bubble (Mobile only) */
    .news-widget-bubble {
        display: flex !important;
        position: fixed;
        left: 20px;
        bottom: 20px;
        width: 46px;
        height: 46px;
        background: linear-gradient(135deg, var(--primary) 0%, #0550c0 100%);
        color: white;
        border-radius: 50%;
        border: none;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        box-shadow: 0 4px 16px rgba(6, 105, 239, 0.3);
        cursor: pointer;
        z-index: 1049;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        animation: floatBubble 3s ease-in-out infinite;
    }
    
    .news-widget-bubble:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 20px rgba(6, 105, 239, 0.45);
    }
    
    .news-widget-bubble .pulse-dot-red {
        width: 8px;
        height: 8px;
        background: var(--danger);
        border-radius: 50%;
        position: absolute;
        top: 8px;
        right: 8px;
        border: 2px solid white;
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
        animation: pulseBadgeMobile 1.5s infinite;
    }
}

@keyframes floatBubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes pulseBadgeMobile {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Sidebar Highlight Pulse effect */
.left-news-sidebar.highlight-pulse {
    animation: borderHighlight 1.5s ease;
}

@keyframes borderHighlight {
    0%, 100% {
        border-right-color: rgba(6, 105, 239, 0.12);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.03);
    }
    50% {
        border-right-color: var(--primary);
        box-shadow: 6px 0 24px rgba(6, 105, 239, 0.15);
        background: rgba(240, 245, 255, 0.98);
    }
}


.sidebar-news-advice-box {
    background: rgba(6,105,239,0.02);
    border: 1px dashed rgba(6,105,239,0.15);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 10px;
    line-height: 1.35;
    color: var(--text-main);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
}
/* ==========================================
   RECEPTIONIST DASHBOARD STYLES
   ========================================== */

/* Quick login card for Receptionist */
.reception-card {
    background: linear-gradient(135deg, hsl(282, 70%, 30%), hsl(282, 85%, 45%));
    border: 1px solid rgba(200, 120, 255, 0.3);
}
.reception-card h3 { color: #fff; }
.reception-card .quick-icon { background: rgba(255,255,255,0.18); color: #fff; }
.reception-card .quick-login-select { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.3); }
.reception-card .quick-login-select option { background: hsl(282,60%,25%); color: #fff; }
.reception-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 20px 45px rgba(180, 80, 255, 0.35); }

/* Tab btn for reception */
.tab-btn-reception { background: linear-gradient(135deg, hsl(282,70%,30%), hsl(282,85%,45%)) !important; color: #fff !important; }
.tab-btn-reception:hover, .tab-btn-reception.active { background: linear-gradient(135deg, hsl(282,70%,22%), hsl(282,85%,38%)) !important; box-shadow: 0 4px 14px rgba(180,80,255,0.4) !important; }

/* Reception Dashboard 2-column layout */
#tab-reception {
    padding: 0 !important;
}

.reception-dashboard-layout {
    display: grid;
    grid-template-columns: 430px 1fr;
    gap: 24px;
    padding: 28px;
    min-height: calc(100vh - 160px);
    align-items: start;
}

.reception-left-col {
    position: sticky;
    top: 20px;
}

.reception-right-col {}

/* Search result item in reception */
.reception-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    background: rgba(255,255,255,0.6);
    transition: all 0.2s;
    cursor: pointer;
}
.reception-search-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateX(3px);
}
.reception-search-item .appt-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.reception-search-item .appt-name { font-size: 13px; font-weight: 700; color: var(--dark); }

/* Today appointment row */
.today-appt-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    transition: all 0.2s;
    background: rgba(255,255,255,0.5);
}
.today-appt-row:hover { border-color: var(--primary); background: var(--primary-light); }
.today-appt-row .patient-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), hsl(175,65%,40%));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}
.today-appt-row .patient-info { flex: 1; min-width: 0; }
.today-appt-row .patient-name { font-size: 13px; font-weight: 700; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-appt-row .patient-detail { font-size: 11px; color: var(--text-muted); }
.today-appt-row .slot-badge { font-size: 10px; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 3px 8px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }

@media (max-width: 900px) {
    .reception-dashboard-layout {
        grid-template-columns: 1fr;
    }
    .reception-left-col { position: static; }
}

/* Booking modal styling enhancements */
#booking-modal .form-card {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
#booking-modal .form-card .card-header {
    display: none !important;
}

/* Staff dashboard full-width optimization */
body.no-sidebars .left-news-sidebar,
body.no-sidebars .news-widget-bubble,
body.no-sidebars .floating-contact-stack,
body.no-sidebars .ai-chat-container,
body.no-sidebars #news-widget-bubble {
    display: none !important;
}

body.no-sidebars .app-container {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 1200px !important;
}

body.no-sidebars {
    --left-sidebar-width: 0px !important;
    --right-sidebar-width: 0px !important;
}

/* ==========================================
   HYBRID MOBILE APP OPTIMIZATIONS (.mobile-app-shell)
   ========================================== */
body.mobile-app-shell #public-header,
body.mobile-app-shell #app-header,
body.mobile-app-shell #public-footer,
body.mobile-app-shell #left-news-sidebar,
body.mobile-app-shell #news-widget-bubble,
body.mobile-app-shell .btn-minimize-news-sidebar,
body.mobile-app-shell .floating-contact-stack {
    display: none !important;
}

body.mobile-app-shell {
    padding: 0 !important;
    margin: 0 !important;
    background-color: #f8fafc !important;
    overflow-x: hidden !important;
    --left-sidebar-width: 0px !important;
    --right-sidebar-width: 0px !important;
}

body.mobile-app-shell .app-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

body.mobile-app-shell .screen-section {
    padding: 12px !important;
}

/* Custom design for tab bar on mobile */
body.mobile-app-shell #tabs-container {
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
    background: #ffffff !important;
    padding: 8px 12px !important;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.08) !important;
    border-radius: 0 0 16px 16px !important;
    margin: -12px -12px 16px -12px !important;
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 8px !important;
    border: none !important;
}

body.mobile-app-shell #tabs-container::-webkit-scrollbar {
    display: none !important; /* Hide scrollbar for clean UI */
}

body.mobile-app-shell .tab-btn {
    flex: 0 0 auto !important;
    padding: 8px 16px !important;
    font-size: 13.5px !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #64748b !important;
    margin: 0 !important;
}

body.mobile-app-shell .tab-btn.active {
    background: #0f766e !important;
    color: #ffffff !important;
    border-color: #0f766e !important;
}

/* Adjust card grids on mobile app to single column */
body.mobile-app-shell .stats-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
}

body.mobile-app-shell .stat-card {
    padding: 12px !important;
}

body.mobile-app-shell .stat-card h3 {
    font-size: 18px !important;
}

body.mobile-app-shell .stat-card p {
    font-size: 11px !important;
}

body.mobile-app-shell .form-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
}

body.mobile-app-shell .grid-2col {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
}

body.mobile-app-shell .grid-3col {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
}

/* Onboarding Tour Widget Styles */
#booking-tour-widget {
    background: #ffffff;
    border: 1.5px solid var(--primary);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 350px;
    z-index: 25000; /* Float above modal backdrop (which is z-index 10000) */
    padding: 20px;
    animation: scaleInOnboarding 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pulsing-icon {
    animation: pulseIcon 1.5s infinite ease-in-out;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.tour-step-completed {
    color: #10b981 !important;
    font-weight: 600;
}

.tour-step-active {
    color: var(--primary) !important;
    font-weight: 700;
}

.tour-step-active i {
    animation: pulseIcon 1.5s infinite ease-in-out;
}

@keyframes scaleInOnboarding {
    from { transform: scale(0.9) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Quick login card for Pharmacist */
.pharmacist-card .quick-icon { background: hsl(150, 80%, 95%); color: hsl(150, 80%, 30%); }
.pharmacist-card:hover { border-color: hsl(150, 80%, 30%); }

/* Quick login card for Lab Technician */
.labtech-card .quick-icon { background: hsl(190, 80%, 95%); color: hsl(190, 80%, 35%); }
.labtech-card:hover { border-color: hsl(190, 80%, 35%); }

/* Tab btn for Pharmacist */
.tab-btn-pharmacist { background: linear-gradient(135deg, hsl(150,70%,30%), hsl(150,85%,45%)) !important; color: #fff !important; }
.tab-btn-pharmacist:hover, .tab-btn-pharmacist.active { background: linear-gradient(135deg, hsl(150,70%,22%), hsl(150,85%,38%)) !important; box-shadow: 0 4px 14px rgba(16,185,129,0.4) !important; }

/* Tab btn for Labtech */
.tab-btn-labtech { background: linear-gradient(135deg, hsl(190,70%,30%), hsl(190,85%,45%)) !important; color: #fff !important; }
.tab-btn-labtech:hover, .tab-btn-labtech.active { background: linear-gradient(135deg, hsl(190,70%,22%), hsl(190,85%,38%)) !important; box-shadow: 0 4px 14px rgba(14,165,233,0.4) !important; }

/* ========================================================
   CARECONNECT RAG KNOWLEDGE BASE & AI GROUNDING STYLES
   ======================================================== */
.ai-header-action-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    border-radius: 8px;
    padding: 4px 9px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}
.ai-header-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}
.rag-filter-pill {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.rag-filter-pill:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.rag-filter-pill.active {
    background: #0d9488;
    color: #fff;
    border-color: #0d9488;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}
.rag-knowledge-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rag-knowledge-card:hover {
    border-color: #99f6e4;
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.08);
    transform: translateY(-2px);
}
.rag-source-chip {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #0369a1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    text-align: left;
    margin: 2px 0;
}
.rag-source-chip:hover {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #0284c7;
    transform: translateY(-1px);
}
.rag-keyword-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 4px;
}


