:root {
    --bg-color: #e0e5ec;
    --text-color: #495057;
    --primary-color: #007bff;
    --shadow-light: rgba(255, 255, 255, 0.6);
    --shadow-dark: rgba(163, 177, 198, 0.6);
    --border-color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] {
    --bg-color: #1a1a2e;
    --text-color: #e0e0e0;
    --primary-color: #4da8da;
    --shadow-light: rgba(255, 255, 255, 0.05);
    --shadow-dark: rgba(0, 0, 0, 0.8);
    --border-color: rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Neumorphic SweetAlert2 */
.swal2-popup.neumorphic-swal {
    background: var(--bg-color) !important;
    border-radius: 20px !important;
    box-shadow: 9px 9px 16px var(--shadow-dark), -9px -9px 16px var(--shadow-light) !important;
    font-family: 'Tajawal', sans-serif !important;
    color: var(--text-color) !important;
}
.swal2-confirm.neumorphic-swal-btn {
    background: var(--primary-color) !important;
    border-radius: 50px !important;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light) !important;
    color: #fff !important;
    font-weight: bold !important;
    padding: 10px 30px !important;
    border: none !important;
}
.swal2-cancel.neumorphic-swal-btn {
    background: var(--bg-color) !important;
    color: var(--text-color) !important;
}

:root {
    --sidebar-width: 325px;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--bg-color);
    border-left: 1px solid var(--border-color);
    box-shadow: -9px 0 16px var(--shadow-dark), 9px 0 16px var(--shadow-light);
    z-index: 1000;
    padding-top: 20px;
    padding-bottom: 30px;
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s;
}

[dir="rtl"] .sidebar {
    direction: ltr !important;
}
[dir="rtl"] .sidebar > * {
    direction: rtl !important;
}

[dir="ltr"] .sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border-color);
    box-shadow: 9px 0 16px var(--shadow-dark), -9px 0 16px var(--shadow-light);
    direction: rtl !important;
}
[dir="ltr"] .sidebar > * {
    direction: ltr !important;
}

/* Collapsed Sidebar State (Desktop & General) */
html.sidebar-collapsed .sidebar, body.sidebar-collapsed .sidebar {
    transform: translateX(100%) !important;
}
[dir="ltr"] html.sidebar-collapsed .sidebar, [dir="ltr"] body.sidebar-collapsed .sidebar {
    transform: translateX(-100%) !important;
}

html.sidebar-collapsed .main-content, body.sidebar-collapsed .main-content {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.sidebar.mobile-hidden {
    transform: translateX(100%);
}
[dir="ltr"] .sidebar.mobile-hidden {
    transform: translateX(-100%);
}

.sidebar.mobile-visible {
    transform: translateX(0);
}

/* Customize Scrollbars for Sidebar and Main Content */
.main-content::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}
.main-content::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: transparent !important;
}
.main-content::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(163, 177, 198, 0.45) !important;
    border-radius: 10px !important;
    transition: background 0.25s ease !important;
}
.main-content:hover::-webkit-scrollbar-thumb,
.sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(163, 177, 198, 0.75) !important;
}
.main-content::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color) !important;
}

[data-theme="dark"] .main-content::-webkit-scrollbar-thumb,
[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18) !important;
}
[data-theme="dark"] .main-content:hover::-webkit-scrollbar-thumb,
[data-theme="dark"] .sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35) !important;
}
[data-theme="dark"] .main-content::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color) !important;
}

.main-content, .sidebar {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(163, 177, 198, 0.5) transparent !important;
}
[data-theme="dark"] .main-content,
[data-theme="dark"] .sidebar {
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent !important;
}

.sidebar-brand {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    padding: 10px 15px 5px;
}

.sidebar-brand h3 {
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
    margin-bottom: 0;
}

/* Sidebar Toggle Button (Inside Brand Header) */
.sidebar-toggle-btn {
    position: absolute;
    top: 5px;
    left: 15px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-color);
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}
[dir="ltr"] .sidebar-toggle-btn {
    left: auto;
    right: 15px;
}
.sidebar-toggle-btn:hover {
    color: var(--primary-color);
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    transform: scale(1.05);
}

/* Floating Toggle Button (Appears when sidebar is collapsed) */
.sidebar-floating-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-color);
    box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
    border: 1px solid var(--border-color);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1060;
    transition: all 0.25s ease;
}
[dir="ltr"] .sidebar-floating-toggle {
    right: auto;
    left: 18px;
}
.sidebar-floating-toggle:hover {
    transform: scale(1.08);
    color: #4f46e5;
    box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
}
html.sidebar-collapsed .sidebar-floating-toggle, body.sidebar-collapsed .sidebar-floating-toggle {
    display: flex !important;
}

/* Modern Flex Nav Links (Single line, perfectly centered) */
.sidebar .nav-link {
    color: var(--text-color);
    font-weight: 600;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 11px 15px !important;
    margin: 4px 10px !important;
    border-radius: 12px !important;
    gap: 10px !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    position: relative !important;
    box-shadow: none;
}

.sidebar .nav-link i {
    margin: 0 !important;
}

.sidebar .nav-link .menu-icon-box {
    width: 26px !important;
    height: 26px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    font-size: 1.15rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar .nav-link .menu-title {
    flex-grow: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-weight: 700 !important;
    font-size: 0.96rem !important;
    margin: 0 !important;
}

.sidebar .nav-link .collapse-arrow {
    flex-shrink: 0 !important;
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    transition: transform 0.25s ease !important;
    margin-inline-start: auto !important;
    opacity: 0.7;
}

.sidebar .nav-link:hover .collapse-arrow {
    opacity: 1;
}

/* Rotate arrow when open */
.sidebar .nav-link:not(.collapsed) .collapse-arrow {
    transform: rotate(-90deg) !important;
}
[dir="ltr"] .sidebar .nav-link:not(.collapsed) .collapse-arrow {
    transform: rotate(90deg) !important;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: var(--bg-color);
    box-shadow: inset 4px 4px 8px 0 var(--shadow-dark), inset -4px -4px 8px 0 var(--shadow-light) !important;
    color: var(--primary-color);
}

/* Submenu container */
.sidebar-submenu {
    padding-inline-start: 0.8rem;
    margin-inline-start: 1.25rem;
    border-inline-start: 2px solid rgba(102, 126, 234, 0.22);
    margin-top: 3px;
    margin-bottom: 7px;
}

.sidebar-submenu .child-link {
    padding: 8px 12px !important;
    margin: 3px 0 !important;
    border-radius: 9px !important;
    font-size: 0.90rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

.sidebar-submenu .child-link:hover {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light) !important;
}

.sidebar-submenu .child-icon-box {
    width: 20px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar-submenu .child-title {
    flex-grow: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.collapse-item {
    display: block;
    padding: 8px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 10px;
    margin-bottom: 5px;
}

.collapse-item:hover, .collapse-item.active {
    background-color: var(--shadow-light);
    color: var(--primary-color);
    font-weight: bold;
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
    transition: margin-right 0.35s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="ltr"] .main-content {
    margin-right: 0;
    margin-left: var(--sidebar-width);
}

@media (min-width: 992px) {
    html, body {
        height: 100vh;
        overflow: hidden;
    }

    .main-content {
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 15px;
        box-sizing: border-box;
    }

    [dir="rtl"] .main-content {
        direction: ltr;
    }
    [dir="rtl"] .main-content > * {
        direction: rtl;
    }

    [dir="ltr"] .main-content {
        direction: rtl;
    }
    [dir="ltr"] .main-content > * {
        direction: ltr;
    }

    .top-navbar {
        position: sticky;
        top: 0;
        z-index: 1020;
        margin-top: 0;
        margin-bottom: 25px;
    }
}

/* Top Navbar for Mobile/General */
.top-navbar {
    background: var(--bg-color);
    box-shadow: 0 9px 16px var(--shadow-dark), 0 -9px 16px var(--shadow-light);
    padding: 15px 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
}

/* Global Loader */
#global-loader {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg-color);
    opacity: 0.8;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}
.spinner-neumorphic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-color);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-color);
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
}
.mobile-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(100%);
    }
    [dir="ltr"] .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-right: 0;
        padding: 15px;
    }
    [dir="ltr"] .main-content {
        margin-left: 0;
    }
    .mobile-toggle-btn {
        display: block;
    }
    .top-navbar {
        padding: 15px 20px;
    }
}

/* Smart Notification Dropdown */
.notification-dropdown {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 15px;
    background: var(--bg-color);
    box-shadow: 9px 9px 16px var(--shadow-dark), -9px -9px 16px var(--shadow-light);
    border: none;
    padding: 0;
}
.notification-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}
.notification-item:hover {
    background-color: var(--shadow-light);
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: 15px;
    font-size: 0.7rem;
}

.notification-dropdown::-webkit-scrollbar { width: 5px; }
.notification-dropdown::-webkit-scrollbar-track { background: transparent; }
.notification-dropdown::-webkit-scrollbar-thumb { background: #a3b1c6; border-radius: 5px; }

/* =================================================== */
/* Mobile Phone Simulator & Smart Assistant Widget     */
/* =================================================== */
.mobile-simulator-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 99998;
    transition: opacity 0.3s ease;
}
.mobile-simulator-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(5px);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.mobile-simulator-backdrop.show {
    display: block;
    opacity: 1;
}

/* ==========================================
   Sehaty Mobile Services Hub (Smart Assistant)
   ========================================== */
.sehaty-assistant-hub {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 140px;
    width: 450px;
    height: 560px;
    min-height: 480px;
    max-width: calc(100vw - 32px);
    max-height: min(620px, calc(100vh - 40px));
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
    z-index: 99999;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}

[data-theme="dark"] .sehaty-assistant-hub {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

.sehaty-assistant-hub.show {
    display: flex;
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Hub Header */
.hub-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    padding: 16px 20px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.hub-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hub-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hub-robot-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hub-robot-avatar img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.hub-title-box h5 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 2px 0;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.hub-title-box p {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.hub-close-btn:hover {
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    transform: rotate(90deg);
}

/* Assistant Menu Vertical List (Mobile-Matched) */
.hub-menu-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 16px;
    overflow-y: auto;
}

.hub-menu-item {
    display: flex;
    align-items: center;
    padding: 13px 15px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

[data-theme="dark"] .hub-menu-item {
    background: #1e293b;
    border-color: #334155;
}

.hub-menu-item:hover {
    background: #ffffff;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.12), 0 3px 6px -2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .hub-menu-item:hover {
    background: #273549;
    border-color: #60a5fa;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.hub-menu-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-left: 14px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.hub-menu-item:hover .hub-menu-icon {
    transform: scale(1.08);
}

.hub-menu-text {
    flex-grow: 1;
    min-width: 0;
}

.hub-menu-text h6 {
    font-size: 14.5px;
    font-weight: 700;
    margin: 0 0 3px 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .hub-menu-text h6 {
    color: #f8fafc;
}

.hub-menu-text p {
    font-size: 11.5px;
    margin: 0;
    color: #64748b;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .hub-menu-text p {
    color: #94a3b8;
}

.hub-menu-chevron {
    color: #94a3b8;
    font-size: 12px;
    margin-right: 4px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.hub-menu-item:hover .hub-menu-chevron {
    color: #3b82f6;
    transform: translateX(-4px);
}

/* Hub Body & Sub-screens */
.hub-body {
    flex: 1;
    height: calc(100% - 68px);
    min-height: 480px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: inherit;
}

.hub-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    background: inherit;
}

.hub-screen.active {
    display: flex !important;
    animation: hubScreenSlideIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hubScreenSlideIn {
    from {
        opacity: 0;
        transform: translateX(-18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Main Grid */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

/* Hub Card */
.hub-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    user-select: none;
    text-decoration: none;
    color: inherit;
}

[data-theme="dark"] .hub-card {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

.hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
    background: #ffffff;
}

[data-theme="dark"] .hub-card:hover {
    background: #1e293b;
    border-color: #60a5fa;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.hub-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.hub-card-info {
    flex: 1;
    min-width: 0;
}

.hub-card-info h6 {
    margin: 0 0 2px 0;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-theme="dark"] .hub-card-info h6 {
    color: #f8fafc;
}

.hub-card-info p {
    margin: 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .hub-card-info p {
    color: #94a3b8;
}

.hub-card-chevron {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.15s;
}

.hub-card:hover .hub-card-chevron {
    transform: translateX(-3px);
    color: #2563eb;
}

/* Sub-screen Navigation Header */
.hub-sub-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

[data-theme="dark"] .hub-sub-header {
    background: #111827;
    border-color: #1f2937;
}

.hub-back-btn {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.hub-back-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

[data-theme="dark"] .hub-back-btn {
    background: #1e293b;
    border-color: #334155;
    color: #60a5fa;
}

.hub-sub-title {
    font-weight: 800;
    font-size: 14px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .hub-sub-title {
    color: #f8fafc;
}

/* Sub-screen Content Area */
.hub-sub-content {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

/* Patient Quick Search Cards */
.hub-patient-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

[data-theme="dark"] .hub-patient-item {
    background: #1e293b;
    border-color: #334155;
}

.hub-patient-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Holographic Health VIP Card */
.hub-vip-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0369a1 100%);
    border-radius: 20px;
    padding: 22px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px -10px rgba(3, 105, 161, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    margin-bottom: 16px;
}

.hub-vip-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Chat Styling */
.hub-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 84%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 12.5px;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
}

.chat-bubble.bot {
    align-self: flex-start;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-bottom-right-radius: 4px;
}

[data-theme="dark"] .chat-bubble.bot {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

.chat-bubble.user {
    align-self: flex-end;
    background: #2563eb;
    color: #ffffff;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.chat-chip {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    display: inline-block;
    margin: 3px;
    transition: all 0.2s;
}

.chat-chip:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

[data-theme="dark"] .chat-chip {
    background: #1e293b;
    color: #60a5fa;
    border-color: #1e3a8a;
}

.hub-chat-footer {
    padding: 10px 14px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

[data-theme="dark"] .hub-chat-footer {
    background: #111827;
    border-color: #1f2937;
}

.chat-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 12px;
    outline: none;
    background: #f8fafc;
    color: inherit;
}

[data-theme="dark"] .chat-input {
    background: #1f2937;
    border-color: #374151;
    color: #fff;
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

.chat-send-btn:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .sehaty-assistant-hub {
        left: 50% !important;
        transform: translate(-50%, 20px) scale(0.92) !important;
        width: 96vw;
        height: 88vh;
        bottom: 12px;
        border-radius: 20px;
    }
    .sehaty-assistant-hub.show {
        transform: translate(-50%, 0) scale(1) !important;
    }
    .hub-grid {
        grid-template-columns: 1fr;
    }
}

