/* Hospital ETL — professional UI layer (global, loads after design-system)
   Gồm: biến shell, html/body, sidebar chrome cơ bản, nút theme FAB (trước đây CustomStyle + app-theme-fab). */

:root {
    --app-font: "Plus Jakarta Sans", var(--font-family-sans, "Segoe UI", system-ui, sans-serif);
    --app-sidebar-width: 250px;
    --app-radius-sidebar: 0 1.25rem 1.25rem 0;
    --app-shadow-sidebar: 0 0 0 1px rgba(255, 255, 255, 0.06), 8px 0 32px rgba(1, 47, 106, 0.18);
}

html,
body {
    font-family: var(--app-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    color: var(--text-primary);
    letter-spacing: -0.01em;
    background: var(--app-dark-bg, #070b14);
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-500, #014aad) 0%, var(--primary-400, #049ee0) 100%);
}

.menu-gradient {
    background: linear-gradient(135deg, #014aad, #049ee0 70%, #013f90);
    color: #fff;
}

.menu-gradient::-webkit-scrollbar {
    width: 6px;
}

.menu-gradient::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.menu-gradient::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.menu-gradient::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar-profile {
    margin-bottom: var(--spacing-6, 1.5rem);
    text-align: center;
    padding: 0 var(--spacing-4, 1rem);
}

.sidebar-profile img {
    border-radius: 50%;
    border: 2px solid #fff;
    margin-bottom: var(--spacing-2, 0.5rem);
}

.sidebar-profile .user-email {
    color: #def7f3;
    font-size: var(--font-size-sm, 0.85rem);
}

.app-logo {
    height: 40px;
    max-width: 100%;
    display: inline-block;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ----- Theme FAB (sáng/tối) ----- */
.etl-theme-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1075;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.95);
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35),
        0 0 20px rgba(251, 191, 36, 0.35),
        0 8px 28px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}

.etl-theme-fab:hover {
    transform: scale(1.07);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.25),
        0 0 28px rgba(251, 191, 36, 0.55),
        0 10px 32px rgba(0, 0, 0, 0.5);
    border-color: #fde68a;
}

.etl-theme-fab:active {
    transform: scale(0.96);
}

.etl-theme-fab:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 3px;
}

.etl-theme-fab__svg {
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
    pointer-events: none;
}

.etl-theme-fab__glyph--moon {
    display: none;
}

.etl-theme-fab__glyph--bulb {
    display: block;
    color: #fef08a;
    filter: drop-shadow(0 0 4px rgba(254, 240, 138, 0.95)) drop-shadow(0 0 10px rgba(251, 191, 36, 0.65));
}

.etl-theme-fab__glyph--bulb path {
    stroke-width: 2.25;
}

html[data-theme="light"] .etl-theme-fab {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(15, 23, 42, 0.8);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .etl-theme-fab:hover {
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .etl-theme-fab__glyph--bulb {
    display: none;
}

html[data-theme="light"] .etl-theme-fab__glyph--moon {
    display: block;
    color: #475569;
    filter: none;
}

@media (max-width: 576px) {
    .etl-theme-fab {
        right: 0.75rem;
        bottom: 0.75rem;
        width: 2.75rem;
        height: 2.75rem;
    }

    .etl-theme-fab__svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}
