/* Sidebar inspired by the supplied visual reference. */
:root { --surface-muted: #f5f8fe; --line: #dce6f5; --radius-lg: 18px; --shadow-sm: 0 4px 18px rgba(11,35,68,.025); }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 45; width: 254px; display: flex; flex-direction: column; padding: 18px 14px; background: #0a213e; color: #edf5ff; border-right: 1px solid #203c5d; }
.sidebar-brand { padding: 2px 2px 22px; margin-bottom: 20px; border-bottom: 1px solid #233b55; }
.sidebar-brand .brand { gap: 10px; color: #fff; }
.sidebar-brand .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
.sidebar-brand .brand strong { font-size: .96rem; }
.sidebar-brand .brand small { display: none; }
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #28496e transparent; }
.sidebar-home, .sidebar-group > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 9px 8px; color: #edf5ff; border: 1px solid transparent; border-radius: 11px; font-size: .82rem; font-weight: 650; cursor: pointer; }
.sidebar-home { margin-bottom: 12px; }
.sidebar-group { margin-bottom: 12px; border: 1px solid transparent; border-radius: 11px; }
.sidebar-group > summary { list-style: none; }
.sidebar-group > summary::-webkit-details-marker { display: none; }
.sidebar-icon { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; background: #18395d; border: 1px solid #23496f; border-radius: 8px; color: #d1e2fc; }
.sidebar-icon svg { width: 20px; height: 20px; }
.sidebar-home:hover, .sidebar-group > summary:hover { background: #123354; }
.sidebar-home.active, .sidebar-group.active > summary { background: #14365d; border-color: #41638d; }
.sidebar-home.active .sidebar-icon, .sidebar-group.active .sidebar-icon { background: #1e50a1; border-color: #3269b9; }
.sidebar-group[open] { background: #0e294a; border-color: #1d4168; }
.sidebar-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #1682ff; opacity: 0; }
.sidebar-group.active .sidebar-dot { opacity: 1; }
.sidebar-submenu { position: relative; margin: 5px 10px 9px 23px; padding-left: 16px; border-left: 1px solid #2c537c; }
.sidebar-submenu a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 41px; padding: 8px 8px; border-radius: 7px; color: #c2d5ee; font-size: .75rem; line-height: 1.4; }
.sidebar-submenu a::before { content: ''; position: absolute; left: -19px; width: 5px; height: 5px; border-radius: 50%; background: #355e8a; }
.sidebar-submenu a:hover, .sidebar-submenu a.active { color: #fff; background: #173d68; }
.sidebar-submenu a.active::before { background: #1682ff; box-shadow: 0 0 0 3px #153b64; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; padding: 20px 4px 4px; margin-top: 14px; border-top: 1px solid #28425f; }
.sidebar-footer .avatar { width: 34px; height: 34px; background: #0877ef; color: #fff; }
.sidebar-user { display: grid; gap: 3px; flex: 1; min-width: 0; }
.sidebar-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; }
.sidebar-user small { color: #91aac9; font-size: .62rem; }
.app-shell > .topbar { margin-left: 254px; background: #f5f8fe; color: #0a213e; box-shadow: none; border-bottom: 1px solid var(--line); }
.app-shell .topbar-main { width: 100%; min-height: 64px; padding: 10px 28px; justify-content: space-between; }
.current-page { font-size: .85rem; }
.app-shell .company-picker span { color: #6e819e; }
.app-shell .company-picker select { background: #fff; color: #17365b; border: 1px solid var(--line); border-radius: 9px; }
.app-shell > .main-content { width: auto; max-width: none; margin: 0 0 0 254px; padding: 28px 32px 48px; }
.mobile-brand, .mobile-logout, .mobile-section-tabs { display: none; }
.panel, .metric-card, .quick-card { border-radius: 16px; }
.btn { border-radius: 9px; }
.btn-primary { background: linear-gradient(115deg, #004ac4, #0877ef); box-shadow: none; }
@media(max-width: 900px) {
 .app-sidebar { display: none; }
 .app-shell > .topbar, .app-shell > .main-content { margin-left: 0; }
 .app-shell > .main-content { padding: 20px 16px 100px; }
 .app-shell .topbar-main { padding: 10px 16px; gap: 10px; }
 .mobile-brand, .mobile-logout, .mobile-section-tabs { display: block; }
 .mobile-brand .brand { color: #0a213e; }
 .mobile-brand .brand small, .current-page { display: none; }
 .mobile-section-tabs .desktop-section-tabs { display: flex; overflow-x: auto; }
 .mobile-section-tabs .desktop-section-tabs a { flex-shrink: 0; }
 .mobile-nav { display: grid; position: fixed; bottom: 0; left: 0; right: 0; z-index: 35; grid-template-columns: repeat(5,1fr); padding: 8px; background: #fff; border-top: 1px solid var(--line); }
 .mobile-nav-group { display: flex; align-items: center; flex-direction: column; gap: 4px; border: 0; background: transparent; color: var(--text-muted); font-size: .65rem; padding: 6px; }
 .mobile-nav-group.active { color: var(--blue-600); background: var(--surface-blue); border-radius: 9px; }
}
@media print { .app-sidebar { display: none !important; } .app-shell > .main-content { margin: 0; padding: 0; } }

.column-sort { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.column-sort:hover, th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--blue-600); }
.column-sort:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 5px; border-radius: 3px; }
.sort-indicator { opacity: .5; font-size: .9rem; }
th[aria-sort="ascending"] .sort-indicator, th[aria-sort="descending"] .sort-indicator { opacity: 1; }
@media(min-width: 761px) { [data-action="open-list-sort"] { display: none !important; } }
