/* Modern Scrollbar Styles */
:root {
    /* Medical Blue */
    --medical-blue-50: #E3F2FD;
    --medical-blue-100: #BBDEFB;
    --medical-blue-500: #4A90E2;
    --medical-blue-600: #0066CC;
    --medical-blue-700: #0052A3;

    /* Healthcare Green */
    --healthcare-green-50: #E0F2F1;
    --healthcare-green-100: #B2DFDB;
    --healthcare-green-500: #4CAF50;
    --healthcare-green-600: #00BFA5;
    --healthcare-green-700: #00897B;

    /* Clinical Purple */
    --clinical-purple-50: #F3E5F5;
    --clinical-purple-100: #E1BEE7;
    --clinical-purple-500: #9575CD;
    --clinical-purple-600: #7C4DFF;
    --clinical-purple-700: #6A3DE8;

    /* Medical Coral */
    --medical-coral-500: #FF7043;
    --medical-coral-600: #F4511E;
    --medical-coral-700: #E64A19;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    /* gray-300 */
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
    /* gray-400 */
}

/* Dark mode overrides */
.dark ::-webkit-scrollbar-thumb {
    background-color: #334155;
    /* slate-700 */
}

.dark ::-webkit-scrollbar-thumb:hover {
    background-color: #475569;
    /* slate-600 */
}

/* Firefox support */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.dark * {
    scrollbar-color: #334155 transparent;
}

@media (max-width: 640px) {

    #partial-content table,
    #app-tab-panels table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        width: max-content;
    }
}

.sidebar-link {
    --accent-rgb: 0, 102, 204;
    /* Medical Blue */
    transition: background-color 220ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms cubic-bezier(.2, .8, .2, 1), transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.sidebar-link i {
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1), color 220ms cubic-bezier(.2, .8, .2, 1);
}

.sidebar-link:hover {
    background-color: rgba(var(--accent-rgb), 0.24);
    box-shadow: 0 14px 30px -18px rgba(var(--accent-rgb), 0.75);
    transform: translateY(-1px);
}

.sidebar-link:hover i {
    color: rgba(var(--accent-rgb), 1);
    transform: scale(1.12);
}

.sidebar-link:active {
    transform: translateY(0);
}

.sidebar-link:focus-visible {
    outline: 2px solid rgba(var(--accent-rgb), 0.9);
    outline-offset: 2px;
}