/* ==========================================================================
   Healty — Hyper-premium layer (on top of healty-shadcn.css)
   ui-ux-pro-max guidance applied: multi-layer realistic shadows, grain texture,
   dark navigation with minimal glow (OLED style), data-dense dashboard row
   highlighting, contrast ≥ 4.5:1, visible focus, reduced-motion respected.
   Performance: everything here is static paint except transform/opacity
   transitions — no backdrop-filter over the animated stage.
   ========================================================================== */

:root {
    --pm-ink: #0A1B23;
    --pm-panel: rgba(251, 253, 254, .92);
    --pm-hair: rgba(10, 27, 35, .07);
    --pm-hair-2: rgba(10, 27, 35, .11);
    --pm-teal: #0E7490;
    --pm-teal-hi: #22D3EE;
    --pm-green: #10B981;
    --pm-shadow-card:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 0 0 1px rgba(10, 27, 35, .06),
        0 1px 1px rgba(10, 27, 35, .03),
        0 2px 4px -1px rgba(10, 27, 35, .04),
        0 14px 28px -14px rgba(10, 27, 35, .14);
    --pm-shadow-card-hover:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 0 0 1px rgba(14, 116, 144, .16),
        0 2px 4px -1px rgba(10, 27, 35, .05),
        0 22px 40px -18px rgba(14, 116, 144, .28);
    --pm-shadow-float:
        0 0 0 1px rgba(10, 27, 35, .05),
        0 10px 30px -14px rgba(10, 27, 35, .22);
    --pm-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ======================= Sidebar — obsidian teal ======================= */
html.hl3d body .aside-menu-container {
    --sb-fg: #C3D6DD;
    --sb-fg-strong: #F2FBFD;
    --sb-muted: #7E99A4;
    --sb-hover: rgba(255, 255, 255, .06);
    --sb-line: rgba(255, 255, 255, .07);
    background:
        var(--pm-grain),
        radial-gradient(420px 280px at 0% 0%, rgba(34, 211, 238, .16), transparent 70%),
        radial-gradient(360px 300px at 100% 100%, rgba(16, 185, 129, .10), transparent 70%),
        linear-gradient(180deg, #082430 0%, #061B24 55%, #04141B 100%) !important;
    background-blend-mode: soft-light, normal, normal, normal;
    border-right: 1px solid rgba(255, 255, 255, .04) !important;
    color: var(--sb-fg);
}
html.hl3d body .hl-brand { color: var(--sb-fg-strong) !important; }
html.hl3d body .hl-brand:hover { background: var(--sb-hover); }
html.hl3d body .hl-brand-logo {
    background: linear-gradient(145deg, #FFFFFF, #DDF3F8) !important; border: 0 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .2), 0 6px 16px -6px rgba(34, 211, 238, .6);
}
html.hl3d body .hl-brand-text small { color: var(--sb-muted); }
html.hl3d body .aside-menu-container__aside-search .form-control {
    background: rgba(255, 255, 255, .05) !important; border: 1px solid var(--sb-line) !important;
    color: var(--sb-fg-strong) !important; box-shadow: none !important;
}
html.hl3d body .aside-menu-container__aside-search .form-control::placeholder { color: var(--sb-muted); }
html.hl3d body .aside-menu-container__aside-search .form-control:focus { border-color: rgba(34, 211, 238, .55) !important; box-shadow: 0 0 0 3px rgba(34, 211, 238, .18) !important; }
html.hl3d body .aside-menu-container__search-icon svg path { fill: var(--sb-muted); }
html.hl3d body .hl-sb-label { color: var(--sb-muted); text-transform: uppercase; letter-spacing: .08em; font-size: .6875rem; font-weight: 600; }
html.hl3d body .aside-menu-container__aside-menu .nav-item .nav-link { color: var(--sb-fg) !important; }
html.hl3d body .aside-menu-container__aside-menu .nav-item .nav-link svg { color: #8FB1BC; transition: color .15s ease; }
html.hl3d body .aside-menu-container__aside-menu .nav-item .nav-link:hover { background: var(--sb-hover) !important; color: var(--sb-fg-strong) !important; }
html.hl3d body .aside-menu-container__aside-menu .nav-item .nav-link:hover svg { color: var(--sb-fg-strong); }
html.hl3d body .aside-menu-container__aside-menu .nav-item.active > .nav-link {
    background: linear-gradient(90deg, rgba(34, 211, 238, .20) 0%, rgba(34, 211, 238, .06) 100%) !important;
    color: #FFFFFF !important; font-weight: 500;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .18), inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}
html.hl3d body .aside-menu-container__aside-menu .nav-item.active > .nav-link * { color: #FFFFFF !important; }
html.hl3d body .aside-menu-container__aside-menu .nav-item.active > .nav-link svg { color: var(--pm-teal-hi) !important; filter: drop-shadow(0 0 6px rgba(34, 211, 238, .55)); }
html.hl3d body .aside-menu-container__aside-menu .nav-item.active > .nav-link::before {
    background: linear-gradient(180deg, #67E8F9, #22D3EE); box-shadow: 0 0 10px rgba(34, 211, 238, .8);
}
html.hl3d body .aside-submenu { border-left-color: var(--sb-line) !important; }
html.hl3d body .hl-sb-user {
    color: var(--sb-fg-strong) !important;
    background: rgba(255, 255, 255, .04);
    box-shadow: inset 0 0 0 1px var(--sb-line);
}
html.hl3d body .hl-sb-user:hover { background: rgba(255, 255, 255, .08); }
html.hl3d body .hl-sb-user-text small, html.hl3d body .hl-sb-user-chev { color: var(--sb-muted); }
html.hl3d body .hl-sb-avatar { border: 0; box-shadow: 0 0 0 2px rgba(34, 211, 238, .45); }
html.hl3d body .sidebar-scrolling::-webkit-scrollbar { width: 6px; }
html.hl3d body .sidebar-scrolling::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 6px; }
html.hl3d body .sidebar-scrolling { scrollbar-color: rgba(255, 255, 255, .14) transparent; scrollbar-width: thin; }

/* ======================= Inset content panel ======================= */
@media (min-width: 1200px) {
    html.hl3d body .wrapper { position: relative; padding: .5rem .5rem .5rem var(--sc-sidebar-w) !important; }
    html.hl3d body.collapsed-menu .wrapper { padding-left: var(--sc-sidebar-w-icon) !important; }
    html.hl3d body .wrapper::before {
        content: ""; position: absolute; z-index: 0; pointer-events: none;
        top: .5rem; right: .5rem; bottom: .5rem; left: calc(var(--sc-sidebar-w) + .5rem);
        border-radius: 1rem;
        background: var(--pm-panel);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), var(--pm-shadow-float);
    }
    html.hl3d body.collapsed-menu .wrapper::before { left: calc(var(--sc-sidebar-w-icon) + .5rem); }
    html.hl3d body .wrapper > * { position: relative; z-index: 1; margin-left: .5rem; }
    html.hl3d body .wrapper > .container-fluid:first-child { position: sticky; top: .5rem; z-index: 100; }
    html.hl3d body .header, html.hl3d body header.header { border-radius: 1rem 1rem 0 0; }
}
html.hl3d body .header, html.hl3d body header.header {
    background: linear-gradient(180deg, rgba(252, 254, 255, .97), rgba(248, 251, 252, .94)) !important;
    border-bottom: 1px solid var(--pm-hair) !important;
}
html.hl3d body .hl-search-btn {
    border-radius: 999px; padding-left: .85rem; background: linear-gradient(180deg, #FFFFFF, #F7FAFB);
    box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--pm-hair-2), 0 2px 6px -3px rgba(10, 27, 35, .12);
    border: 0;
}
html.hl3d body .hl-search-btn kbd { border-radius: 999px; background: #EEF4F6; }
html.hl3d body #nav-header .navbar-nav { background: rgba(10, 27, 35, .045); box-shadow: inset 0 1px 2px rgba(10, 27, 35, .05); }
html.hl3d body #nav-header .navbar-nav .nav-link.active { box-shadow: 0 0 0 1px var(--pm-hair), 0 2px 6px -2px rgba(10, 27, 35, .16); }
html.hl3d body .content { padding-top: 1.75rem !important; }
html.hl3d body footer.border-top { border-top: 1px solid var(--pm-hair) !important; }

/* ======================= Welcome hero ======================= */
.hl-hero {
    position: relative; isolation: isolate;
    display: flex; align-items: stretch; min-height: 13.5rem; margin-bottom: 1.25rem;
    border-radius: 1rem; color: #fff;
    background:
        radial-gradient(520px 260px at 82% 20%, rgba(34, 211, 238, .38), transparent 62%),
        radial-gradient(480px 260px at 100% 110%, rgba(16, 185, 129, .30), transparent 60%),
        radial-gradient(400px 240px at 0% 0%, rgba(14, 116, 144, .45), transparent 70%),
        linear-gradient(135deg, #0B3442 0%, #072631 55%, #041B23 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(4, 27, 35, .6), 0 24px 48px -24px rgba(4, 27, 35, .55);
}
.hl-hero::before {               /* hairline grid, masked */
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(600px 300px at 70% 40%, #000, transparent 75%);
    mask-image: radial-gradient(600px 300px at 70% 40%, #000, transparent 75%);
}
.hl-hero::after {                /* grain */
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .07; border-radius: inherit;
    background: var(--pm-grain);
}
.hl-hero-body { position: relative; z-index: 1; padding: 1.75rem 2rem; max-width: 40rem; display: flex; flex-direction: column; justify-content: center; }
.hl-hero-date {
    display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start;
    padding: .3rem .7rem; margin-bottom: .9rem; border-radius: 999px; font-size: .75rem; font-weight: 500; color: #D3EEF4;
    background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
html.hl3d body .content h1.hl-hero-title, .hl-hero-title {
    font-size: clamp(1.5rem, 2.4vw, 2rem) !important; font-weight: 600 !important; letter-spacing: -.03em; line-height: 1.15;
    margin: 0 0 .4rem; color: #FFFFFF !important;
    background: linear-gradient(180deg, #FFFFFF 30%, #BFEFF8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hl-hero-sub { margin: 0 0 1.25rem; color: #A9C6CF; font-size: .9375rem; }
.hl-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
html.hl3d body .hl-hero .btn-primary {
    background: linear-gradient(180deg, #2CC6E6 0%, #0E8FB0 100%) !important; border: 0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 1px rgba(34, 211, 238, .5), 0 10px 24px -10px rgba(34, 211, 238, .8) !important;
}
html.hl3d body .hl-btn-glass {
    color: #E6F7FB !important; background: rgba(255, 255, 255, .08) !important;
    border: 1px solid rgba(255, 255, 255, .18) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1) !important;
}
html.hl3d body .hl-btn-glass:hover { background: rgba(255, 255, 255, .14) !important; }
.hl-hero .hl-helix-hero { position: absolute; right: .5rem; top: .25rem; bottom: .25rem; height: calc(100% - .5rem); width: 40%; z-index: 0; pointer-events: none; }
@media (max-width: 767.98px) { .hl-hero .hl-helix-hero { opacity: .35; width: 70%; } .hl-hero-body { padding: 1.5rem; } }

/* ======================= Cards ======================= */
html.hl3d body .card, html.hl3d body .accordion-item {
    border: 0 !important; border-radius: .875rem !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #FCFEFE 100%) !important;
    box-shadow: var(--pm-shadow-card) !important;
    transition: box-shadow .3s cubic-bezier(.2, .8, .2, 1);
}
html.hl3d body .card.hl-hover { box-shadow: var(--pm-shadow-card-hover) !important; }
html.hl3d body .card .card-header { border-bottom: 1px solid var(--pm-hair) !important; padding-bottom: 1rem !important; }
html.hl3d body .card .card-header + .card-body { padding-top: 1.25rem !important; }

/* KPI — gem icon tiles, display numerals, corner glow */
html.hl3d body .widget > a > .rounded-10 {
    border: 0 !important; border-radius: .875rem !important;
    background:
        radial-gradient(220px 140px at 100% 0%, rgba(34, 211, 238, .14), transparent 70%),
        linear-gradient(180deg, #FFFFFF, #FBFDFE) !important;
    box-shadow: var(--pm-shadow-card) !important;
    padding: 1.35rem 1.5rem 1.5rem !important;
}
html.hl3d body .widget > a > .bg-success { background: radial-gradient(220px 140px at 100% 0%, rgba(16, 185, 129, .14), transparent 70%), linear-gradient(180deg, #FFFFFF, #FBFDFE) !important; }
html.hl3d body .widget > a > .bg-warning { background: radial-gradient(220px 140px at 100% 0%, rgba(245, 158, 11, .15), transparent 70%), linear-gradient(180deg, #FFFFFF, #FBFDFE) !important; }
html.hl3d body .widget > a > .bg-info { background: radial-gradient(220px 140px at 100% 0%, rgba(14, 165, 233, .15), transparent 70%), linear-gradient(180deg, #FFFFFF, #FBFDFE) !important; }
html.hl3d body .widget > a > .rounded-10:hover { box-shadow: var(--pm-shadow-card-hover) !important; }
html.hl3d body .widget > a > .rounded-10 .widget-icon {
    width: 2.5rem !important; height: 2.5rem !important; border: 0 !important; border-radius: .7rem !important;
    background: linear-gradient(145deg, #2CC6E6, #0E7490) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 0 1px rgba(14, 116, 144, .25), 0 8px 18px -8px rgba(14, 116, 144, .7) !important;
}
html.hl3d body .widget > a > .bg-success .widget-icon { background: linear-gradient(145deg, #34D399, #047857) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 0 1px rgba(4,120,87,.25), 0 8px 18px -8px rgba(5,150,105,.7) !important; }
html.hl3d body .widget > a > .bg-warning .widget-icon { background: linear-gradient(145deg, #FBBF24, #D97706) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 0 1px rgba(217,119,6,.25), 0 8px 18px -8px rgba(217,119,6,.7) !important; }
html.hl3d body .widget > a > .bg-info .widget-icon { background: linear-gradient(145deg, #38BDF8, #0369A1) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 0 0 1px rgba(3,105,161,.25), 0 8px 18px -8px rgba(14,165,233,.7) !important; }
html.hl3d body .widget > a > .rounded-10 .widget-icon svg,
html.hl3d body .widget > a > .rounded-10 .widget-icon i { color: #FFFFFF !important; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
html.hl3d body .widget > a > .rounded-10 h3 { font-size: .8125rem !important; font-weight: 500 !important; color: #5A6E78 !important; letter-spacing: .01em; }
html.hl3d body .widget > a > .rounded-10 h2 {
    font-size: 2.25rem !important; font-weight: 600 !important; letter-spacing: -.04em;
    background: linear-gradient(180deg, #0A1B23 40%, #2B4A57 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ======================= Buttons ======================= */
html.hl3d body .btn-primary {
    background: linear-gradient(180deg, #1597B8 0%, #0E7490 100%) !important; border: 0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 0 1px #0B6078, 0 1px 2px rgba(10, 27, 35, .2), 0 6px 14px -6px rgba(14, 116, 144, .55) !important;
}
html.hl3d body .btn-primary:hover, html.hl3d body .btn-primary:focus {
    background: linear-gradient(180deg, #1AA6C9 0%, #0F7D9B 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px #0B6078, 0 2px 4px rgba(10, 27, 35, .2), 0 10px 22px -8px rgba(14, 116, 144, .65) !important;
}
html.hl3d body .btn-secondary, html.hl3d body .btn-light, html.hl3d body .btn-outline-primary {
    background: linear-gradient(180deg, #FFFFFF 0%, #F6F9FA 100%) !important; border: 0 !important;
    box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--pm-hair-2), 0 1px 2px rgba(10, 27, 35, .06) !important;
}
html.hl3d body .btn-danger { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 0 1px #A61B1B, 0 6px 14px -6px rgba(220, 38, 38, .5) !important; border: 0 !important; }

/* ======================= Inputs ======================= */
html.hl3d body .form-control, html.hl3d body .form-select,
html.hl3d body .select2-container--bootstrap-5 .select2-selection {
    border: 0 !important;
    box-shadow: inset 0 1px 2px rgba(10, 27, 35, .05), 0 0 0 1px var(--pm-hair-2) !important;
}
html.hl3d body .form-control:focus, html.hl3d body .form-select:focus,
html.hl3d body .select2-container--focus .select2-selection, html.hl3d body .select2-container--open .select2-selection {
    box-shadow: 0 0 0 1px var(--pm-teal), 0 0 0 4px rgba(14, 116, 144, .16) !important;
}

/* ======================= DataTable ======================= */
html.hl3d body .table-responsive { border: 0 !important; border-radius: .875rem !important; box-shadow: var(--pm-shadow-card) !important; background: #FFFFFF; }
html.hl3d body .table > thead > tr > th, html.hl3d body .table thead th {
    background: linear-gradient(180deg, #F8FBFC, #F3F7F9) !important;
    color: #4F6570 !important; font-size: .75rem !important; font-weight: 600 !important;
    text-transform: uppercase !important; letter-spacing: .06em !important;
    border-bottom: 1px solid var(--pm-hair-2) !important;
}
html.hl3d body .table > tbody > tr > td { border-bottom: 1px solid var(--pm-hair) !important; }
html.hl3d body .table > tbody > tr:hover > td { background: linear-gradient(90deg, rgba(14, 116, 144, .06), rgba(14, 116, 144, .015) 70%) !important; }
html.hl3d body .table > tbody > tr:hover > td:first-child { box-shadow: inset 2px 0 0 var(--pm-teal) !important; }
html.hl3d body .table .image-circle img, html.hl3d body .table .image img { box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(14, 116, 144, .22); }

/* ======================= Badges with status dot ======================= */
html.hl3d body .badge:not(.rounded-circle):not(.notification-counter)::before {
    content: ""; width: .375rem; height: .375rem; border-radius: 50%; background: currentColor; opacity: .85; flex: 0 0 auto;
}
html.hl3d body .badge:not(.rounded-circle) { border-radius: 999px !important; padding: .15rem .6rem !important; }

/* ======================= Overlays ======================= */
html.hl3d body .dropdown-menu, html.hl3d body .modal-content {
    border: 0 !important;
    box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--pm-hair-2), 0 24px 48px -16px rgba(10, 27, 35, .28) !important;
}
html.hl3d body .modal-content { border-radius: 1rem !important; }
html.hl3d body .modal-backdrop.show { background: #031319; opacity: .55; }

/* ======================= Typography polish ======================= */
html.hl3d body .content h1:not(.hl-hero-title) { font-size: 1.625rem !important; font-weight: 600 !important; letter-spacing: -.03em; }
html.hl3d body ::selection { background: rgba(34, 211, 238, .25); }
html.hl3d body .content::-webkit-scrollbar, html.hl3d body .table-responsive::-webkit-scrollbar { height: 8px; width: 8px; }
html.hl3d body .table-responsive::-webkit-scrollbar-thumb { background: #D6E2E7; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) { .hl-hero .hl-helix-hero { display: none; } }
