html, body { min-height:100%; }
.content-wrapper { min-height:calc(100vh - 101px); }
.legacy-user { height:40px; }
.legacy-user .info { left:0; text-align:center; width:100%; padding:2px; }
.legacy-login { min-height:100vh; padding-top:1px; }
.legacy-login .login-logo img { max-width:100%; }
.legacy-modal { overflow:auto; }
.legacy-modal .modal-dialog { z-index:1050; }
.legacy-status { margin:15px; position:relative; z-index:1060; }
.legacy-sort { border:0; padding:0; background:none; color:inherit; font:inherit; font-weight:bold; text-align:left; }
/* Highlight data rows consistently without affecting tables used for form layout. */
@media screen {
    .content-wrapper :is(.table, .deadline-table):has(> thead) > tbody > tr > :is(td, th) {
        transition: background-color 140ms ease;
    }
    .content-wrapper :is(.table, .deadline-table):has(> thead) > tbody > tr:focus-within > :is(td, th) {
        background-color: #e0f0fa;
    }
}
@media screen and (hover: hover) {
    .content-wrapper :is(.table, .deadline-table):has(> thead) > tbody > tr:hover > :is(td, th) {
        background-color: #e0f0fa;
    }
}
@media (prefers-reduced-motion: reduce) {
    .content-wrapper :is(.table, .deadline-table):has(> thead) > tbody > tr > :is(td, th) {
        transition: none;
    }
}
/* Header cells shifted by sticky-table-heads.js must cover the rows beneath them. */
@media screen {
    .content-wrapper thead[data-stuck] > tr > :is(th, td) {
        position: relative;
        z-index: 3;
        background-color: #fff;
        box-shadow: inset 0 -2px 0 #ddd, 0 3px 4px -2px rgb(0 0 0 / 18%);
    }
    .content-wrapper .deadline-table > thead[data-stuck] > tr > th { background-color: #f7f9fb; }
}
@media print {
    .content-wrapper thead > tr > :is(th, td) { transform: none !important; }
}
.sidebar-menu .treeview-menu a.active { color:#fff; font-weight:bold; }
#blazor-error-ui { display:none; position:fixed; bottom:0; background:#ffffe0; width:100%; padding:12px; z-index:2000; }
@media(max-width:767px) { .sidebar-collapse .main-sidebar { transform:translate(0,0); } }

.filter-indicator { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 19px; }
.filter-indicator.enabled { color: #16834b; background: #e4f4ec; }
.filter-indicator.disabled { color: #c0392b; background: #fceae8; }
.permission-dialog { width: min(720px, calc(100% - 24px)); }
.permission-dialog .modal-body { max-height: 65vh; overflow-y: auto; }
.permission-dialog .modal-header p { margin: 8px 0 0; }
.permission-dialog .modal-header p span { display: block; }
.permission-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; }
.permission-toolbar strong { margin-right: auto; }
.permission-group h3 { color: #367fa9; font-size: 14px; margin: 14px 0 8px; }
.permission-option { display: flex; gap: 12px; padding: 12px; margin-bottom: 6px; border: 1px solid #d7e0e8; border-radius: 6px; cursor: pointer; }
.permission-option:has(input:checked) { background: #eef7fc; border-color: #87b9d6; }
.permission-option input { margin-top: 3px; accent-color: #367fa9; width: 17px; height: 17px; flex-shrink: 0; }
.permission-option small { display: block; font-weight: normal; color: #596b79; margin-top: 4px; }

/* Leave room for the fixed panel header during focus/anchor scrolling. */
@media screen {
    html:has(.panel-shell) { scroll-padding-top: 60px; }
}
@media screen and (max-width: 767px) {
    html:has(.panel-shell) { scroll-padding-top: 110px; }
}

/* Employee popups scroll independently from the list behind them. */
html:has(.staff-dialog), body:has(.staff-dialog) { overflow: hidden; }
