:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #172033;
    --muted: #667085;
    --border: #dfe5ee;
    --grid-border: #b7c6d5;
    --accent: #1688c8;
    --accent-dark: #0d5f8e;
    --table-blue: #4299dc;
    --table-blue-dark: #2f82c2;
    --success: #dff8e9;
    --warning: #fff3cf;
    --danger: #ffe1e1;
    --booked: #e6f0ff;
    --shadow: 0 16px 38px rgba(21, 38, 64, .09);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 258px minmax(0, 1fr);
    transition: grid-template-columns .2s ease;
}

body.sidebar-collapsed .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
    padding: 18px 10px;
    overflow: visible;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 22px 18px;
    box-shadow: 6px 0 26px rgba(20, 34, 58, .04);
    z-index: 20;
}

.brand {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 72px;
}

.brand-logo-full {
    max-width: 190px;
    max-height: 74px;
}

.brand-logo-compact {
    display: none;
    width: 44px;
    height: 44px;
    margin: 0 auto;
}

.sidebar-rail-toggle {
    width: 42px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    margin: -10px auto 2px;
    border-color: #d9e6f1;
    background: #eef8fd;
    color: var(--accent-dark);
}

.sidebar-rail-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}

body.sidebar-collapsed .sidebar-rail-toggle svg {
    transform: rotate(180deg);
}

.nav {
    display: grid;
    gap: 6px;
}

.nav a,
.logout {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #39465c;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav a svg,
.logout svg {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav a:hover,
.logout:hover,
.nav a.active {
    background: #eaf6fc;
    color: var(--accent-dark);
}

body.sidebar-collapsed .brand {
    min-height: 54px;
    justify-content: center;
}

body.sidebar-collapsed .brand-logo-full {
    display: none;
}

body.sidebar-collapsed .brand-logo-compact {
    display: block;
}

body.sidebar-collapsed .nav,
body.sidebar-collapsed .sidebar-footer {
    align-items: center;
}

body.sidebar-collapsed .nav a,
body.sidebar-collapsed .logout {
    width: 48px;
    height: 48px;
    justify-content: center;
    padding: 0;
}

body.sidebar-collapsed .user-chip {
    width: 48px;
    height: 48px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
}

body.sidebar-collapsed .nav a span,
body.sidebar-collapsed .logout span,
body.sidebar-collapsed .user-chip strong {
    display: none;
}

body.sidebar-collapsed .nav a svg,
body.sidebar-collapsed .logout svg {
    width: 22px;
    height: 22px;
}

body.sidebar-collapsed .sidebar-rail-toggle {
    margin-top: 0;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

.user-chip {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.user-chip img,
.user-chip span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    object-fit: cover;
    background: #d9edf7;
    color: var(--accent-dark);
    font-weight: 800;
}

.user-chip strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.user-chip small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.main {
    padding: 28px;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
}

.client-header-logo {
    max-width: 150px;
    max-height: 42px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 5px 8px;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.1;
}

.topbar p,
.muted {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.panel,
.table-panel,
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel {
    padding: 22px;
    margin-bottom: 18px;
}

.panel h2,
.panel h3 {
    margin: 0 0 14px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    border-radius: var(--radius) var(--radius) 0 0;
}

.toolbar .spacer {
    flex: 1 1 auto;
}

.table-panel {
    overflow: visible;
}

#retentions-table,
#retentions-archive-table,
#users-table,
#reports-table,
#history-table {
    min-height: 520px;
}

.toolbar-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.tabulator {
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: Inter, Arial, sans-serif;
    font-size: 13px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(32, 65, 104, .12), inset 0 1px 0 rgba(255, 255, 255, .85);
    overflow: visible;
    position: relative;
}

.tabulator .tabulator-header,
.tabulator .tabulator-header .tabulator-headers,
.tabulator .tabulator-header .tabulator-frozen,
.tabulator .tabulator-header .tabulator-calcs-holder {
    background: linear-gradient(180deg, #58abe7 0%, var(--table-blue) 52%, var(--table-blue-dark) 100%) !important;
    color: #fff !important;
    border-bottom: 1px solid #2874ad;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
    overflow: visible !important;
    position: relative !important;
    z-index: 5000 !important;
}

.tabulator .tabulator-col,
.tabulator .tabulator-col.tabulator-sortable,
.tabulator .tabulator-col.tabulator-frozen {
    background: linear-gradient(180deg, #58abe7 0%, var(--table-blue) 52%, var(--table-blue-dark) 100%) !important;
    color: #fff !important;
    border-right: 1px solid rgba(17, 78, 123, .42) !important;
    border-bottom: 1px solid #2874ad !important;
    overflow: visible !important;
    position: relative !important;
}

.tabulator .tabulator-col-title,
.tabulator .tabulator-col-content,
.tabulator .tabulator-col-title-holder {
    color: #fff !important;
    font-weight: 800;
    overflow: visible !important;
}

.tabulator .tabulator-col-content {
    padding: 7px 8px;
}

.tabulator .tabulator-col-title {
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tabulator .tabulator-col.tabulator-sortable .tabulator-col-content {
    padding-right: 22px;
}

.tabulator .tabulator-col.tabulator-sortable .tabulator-col-title {
    box-sizing: border-box;
    padding-right: 14px;
}

.tabulator .tabulator-col.tabulator-sortable .column-filter-heading > span {
    padding-right: 14px;
}

.tabulator .tabulator-col .tabulator-col-sorter {
    right: 7px !important;
    top: 9px !important;
}

.tabulator .tabulator-col.filter-open {
    z-index: 6000 !important;
}

.tabulator .tabulator-col.tabulator-frozen {
    position: sticky !important;
    z-index: 6500 !important;
}

.tabulator .tabulator-header .tabulator-frozen {
    position: sticky !important;
    z-index: 6500 !important;
}

.tabulator .tabulator-col .tabulator-col-resize-handle {
    width: 10px !important;
    right: -5px !important;
    z-index: 7600 !important;
    cursor: col-resize !important;
    pointer-events: auto !important;
}

.tabulator .tabulator-col.tabulator-frozen .tabulator-col-resize-handle {
    width: 14px !important;
    right: -7px !important;
    z-index: 9000 !important;
}

.tabulator .tabulator-col[tabulator-field="site"]::after {
    content: "";
    position: absolute;
    top: 0;
    right: -9px;
    width: 18px;
    height: 100%;
    cursor: col-resize;
    z-index: 9800;
}

body.exact-column-resizing,
body.exact-column-resizing * {
    cursor: col-resize !important;
}

.tabulator .tabulator-row .tabulator-cell.tabulator-frozen {
    position: sticky !important;
    z-index: 50 !important;
}

.tabulator .tabulator-row.row-completed .tabulator-cell.tabulator-frozen {
    background: var(--success) !important;
}

.tabulator .tabulator-row.row-warning .tabulator-cell.tabulator-frozen {
    background: var(--warning) !important;
}

.tabulator .tabulator-row.row-danger .tabulator-cell.tabulator-frozen {
    background: var(--danger) !important;
}

.tabulator .tabulator-row.row-booked .tabulator-cell.tabulator-frozen {
    background: var(--booked) !important;
}

.tabulator .tabulator-row:not(.row-completed):not(.row-warning):not(.row-danger):not(.row-booked) .tabulator-cell.tabulator-frozen {
    background: #fff !important;
}

.column-filter-heading {
    display: grid;
    gap: 6px;
    position: relative;
    overflow: visible;
}

.column-filter-heading span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tabulator .tabulator-header-filter {
    background: linear-gradient(180deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .08) 100%);
    border-top: 1px solid rgba(255, 255, 255, .28);
    padding: 6px;
    overflow: visible !important;
}

.tabulator .tabulator-header-filter input,
.tabulator .tabulator-header-filter select,
.table-header-input,
.table-header-select,
.table-filter-button {
    width: 100%;
    min-width: 0;
    min-height: 30px;
    background: rgba(255, 255, 255, .94);
    color: var(--text);
    border: 1px solid rgba(36, 91, 135, .22);
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(16, 32, 55, .06);
    padding: 5px 7px;
}

.table-filter-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    font-weight: 700;
}

.table-filter-button::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #5f6f83;
    flex: 0 0 auto;
}

.table-filter-button.has-selection {
    color: var(--accent-dark);
    background: #fff;
}

.table-multi-filter {
    position: relative;
    z-index: 9;
}

.table-multi-filter.open {
    z-index: 7000;
}

.table-multi-filter-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    display: none;
    width: max(190px, 100%);
    max-width: min(320px, 76vw);
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    background: #fff;
    color: var(--text);
    border: 1px solid #cfd9e6;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(18, 38, 64, .18);
    z-index: 8000;
}

.table-multi-filter.open .table-multi-filter-panel {
    display: grid;
    gap: 4px;
}

.table-multi-filter-panel.floating-filter-panel {
    position: fixed !important;
    display: grid !important;
    gap: 4px;
    box-sizing: border-box;
    pointer-events: auto;
    overscroll-behavior: contain;
    z-index: 2147483000 !important;
}

.table-multi-filter-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.table-multi-filter-panel label:hover {
    background: #eef8fd;
}

.table-multi-filter-panel .table-multi-filter-all {
    border-bottom: 1px solid #e4ebf3;
    margin-bottom: 4px;
    padding-bottom: 8px;
}

.table-multi-filter-panel input {
    width: 15px !important;
    height: 15px !important;
    min-height: 15px !important;
    padding: 0 !important;
}

.site-filter {
    display: none;
    align-items: center;
    gap: 10px;
    flex: 0 1 360px;
    min-width: 260px;
    padding: 0;
    border: 1px solid #dbe6f0;
    border-radius: 8px;
    background: #f8fbff;
}

.site-filter.is-active {
    display: flex;
}

.site-filter-label {
    flex: 0 0 auto;
    padding-left: 11px;
    font-size: 13px;
    font-weight: 800;
    color: #263342;
}

.site-filter-control {
    flex: 1 1 auto;
    min-width: 180px;
}

.site-filter .table-filter-button {
    min-height: 38px;
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 800;
    box-shadow: none;
}

.site-filter .table-filter-button.has-selection {
    background: var(--accent);
    color: #fff;
}

.site-filter .table-filter-button::after {
    border-top-color: #fff;
}

.site-filter .table-multi-filter-panel label:has(input:checked) {
    background: var(--accent);
    color: #fff;
    font-weight: 800;
}

@media (max-width: 760px) {
    .site-filter {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

.tabulator .tabulator-tableholder {
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    position: relative;
    z-index: 1;
}

.tabulator.engineer-mobile-grid .tabulator-tableholder {
    overflow: auto !important;
}

.tabulator.engineer-mobile-grid .tabulator-table {
    width: max-content !important;
}

.tabulator.engineer-mobile-grid .tabulator-row .tabulator-responsive-collapse {
    display: none !important;
}

.tabulator.engineer-mobile-grid .tabulator-col[tabulator-field="_row_handle"],
.tabulator.engineer-mobile-grid .tabulator-cell[tabulator-field="_row_handle"] {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    flex: 0 0 42px !important;
    box-sizing: border-box;
}

.tabulator.engineer-mobile-grid .tabulator-col[tabulator-field="plot"],
.tabulator.engineer-mobile-grid .tabulator-cell[tabulator-field="plot"] {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    flex: 0 0 112px !important;
    box-sizing: border-box;
}

.tabulator.engineer-mobile-grid .tabulator-header .tabulator-frozen {
    flex: 0 0 auto !important;
}

.tabulator.engineer-mobile-grid .tabulator-header .tabulator-frozen[tabulator-field="_row_handle"] {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
}

.tabulator.engineer-mobile-grid .tabulator-header .tabulator-frozen[tabulator-field="plot"] {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
}

.tabulator .tabulator-footer {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 12px 14px !important;
    overflow: visible !important;
}

.tabulator .tabulator-footer-contents {
    display: flex !important;
    flex: 1 1 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    width: 100%;
}

.tabulator .tabulator-page-counter {
    flex: 1 1 190px;
    white-space: nowrap;
}

.tabulator .tabulator-paginator {
    display: flex !important;
    flex: 1 1 420px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 !important;
}

.tabulator .tabulator-page-size {
    width: auto;
    min-width: 86px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 8px;
    background: #fff;
    color: var(--text);
    font: 700 13px Inter, Arial, sans-serif;
}

.tabulator .tabulator-page {
    min-width: 36px;
    min-height: 36px;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: var(--text) !important;
    font-weight: 800 !important;
    padding: 0 10px !important;
}

.tabulator .tabulator-page.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.tabulator .tabulator-row .tabulator-cell {
    border-right: 1px solid #9eb1c4 !important;
    border-bottom: 1px solid #9eb1c4 !important;
    padding: 8px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tabulator .tabulator-row .tabulator-cell.wrap-cell {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.35;
}

.tabulator .tabulator-row .tabulator-cell.wrap-cell .cell-wrap-text {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
}

.tabulator .tabulator-row .tabulator-cell:last-child {
    border-right: 0 !important;
}

.tabulator .tabulator-row.tabulator-row-even,
.tabulator .tabulator-row.tabulator-row-odd {
    background: #fff;
}

.tabulator .tabulator-row:hover {
    background: #f5faff;
}

.tabulator .tabulator-row.row-completed:hover {
    background: #d5f3e2;
}

.tabulator .tabulator-row.row-completed:hover .tabulator-cell {
    background: #d5f3e2;
}

.tabulator .tabulator-row.row-warning:hover {
    background: #ffedbd;
}

.tabulator .tabulator-row.row-warning:hover .tabulator-cell {
    background: #ffedbd;
}

.tabulator .tabulator-row.row-danger:hover {
    background: #ffd4d4;
}

.tabulator .tabulator-row.row-danger:hover .tabulator-cell {
    background: #ffd4d4;
}

.tabulator .tabulator-row.row-booked:hover {
    background: #dbeaff;
}

.tabulator .tabulator-row.row-booked:hover .tabulator-cell {
    background: #dbeaff;
}

.tabulator .tabulator-row {
    min-height: 40px;
    border-bottom: 0;
    transition: background .18s ease;
}

.tabulator .tabulator-row .tabulator-responsive-collapse {
    border-top: 1px solid #9eb1c4;
    color: #263342;
    padding: 9px 12px 11px;
}

.tabulator .tabulator-row .tabulator-responsive-collapse.is-empty,
.tabulator .tabulator-row .tabulator-responsive-collapse:empty,
.tabulator .tabulator-row .tabulator-responsive-collapse:has(.responsive-fields.is-empty) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.tabulator .tabulator-responsive-collapse-toggle {
    display: none !important;
}

.responsive-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 6px 18px;
}

.responsive-fields.is-empty {
    display: none !important;
}

.responsive-field {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.responsive-label {
    font-weight: 800;
    color: #253248;
}

.responsive-value {
    min-height: 0;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: #263342;
    box-shadow: none;
    font-weight: 600;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: default;
}

.responsive-value:hover {
    transform: none;
    box-shadow: none;
}

.responsive-value.editable {
    cursor: pointer;
    color: #0d5f8e;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.drag-handle {
    cursor: grab;
    user-select: none;
    color: #4b5563;
}

.drag-handle:active {
    cursor: grabbing;
}

.tabulator .tabulator-placeholder {
    background: #fff;
    color: var(--muted);
}

.tabulator .tabulator-tableholder .tabulator-table {
    background: #fff;
}

.tabulator .tabulator-row.row-completed {
    background: var(--success) !important;
}

.tabulator .tabulator-row.row-completed .tabulator-cell {
    background: var(--success) !important;
}

.tabulator .tabulator-row.row-warning {
    background: var(--warning) !important;
}

.tabulator .tabulator-row.row-warning .tabulator-cell {
    background: var(--warning) !important;
}

.tabulator .tabulator-row.row-danger {
    background: var(--danger) !important;
}

.tabulator .tabulator-row.row-danger .tabulator-cell {
    background: var(--danger) !important;
}

.tabulator .tabulator-row.row-booked {
    background: var(--booked) !important;
}

.tabulator .tabulator-row.row-booked .tabulator-cell {
    background: var(--booked) !important;
}

.tabulator .tabulator-row.flash-update {
    animation: rowFlash 1.3s ease;
}

@keyframes rowFlash {
    0% { box-shadow: inset 0 0 0 999px rgba(22, 136, 200, .18); }
    100% { box-shadow: inset 0 0 0 999px rgba(22, 136, 200, 0); }
}

@media (min-width: 1400px) {
    .tabulator {
        font-size: 12.5px;
    }

    .tabulator .tabulator-col-content {
        padding: 6px;
    }

    .tabulator .tabulator-row .tabulator-cell {
        padding: 7px 7px;
    }

    .tabulator .tabulator-header-filter {
        padding: 5px;
    }

    .tabulator .tabulator-header-filter input,
    .tabulator .tabulator-header-filter select,
    .table-header-input,
    .table-header-select {
        min-height: 28px;
        padding: 4px 6px;
        font-size: 12px;
    }
}

.button,
button,
input[type="submit"] {
    border: 1px solid var(--border);
    background: #fff;
    color: #1f2a3d;
    min-height: 38px;
    border-radius: var(--radius);
    padding: 0 14px;
    font: 700 13px/1 Inter, Arial, sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover,
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(21, 38, 64, .11);
}

.button.primary,
button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.button.danger {
    color: #b42318;
    border-color: #ffd3cf;
    background: #fff4f2;
}

.row-action-icon {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: #d92d20;
    border-color: #ffc7c0;
    background: #fff4f2;
}

.row-action-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    position: relative;
    font-size: 0;
    line-height: 0;
}

.archive-button::before,
.archive-button::after,
.restore-button::before,
.restore-button::after {
    content: none !important;
    display: none !important;
}

.tabulator .tabulator-row .tabulator-cell.utility-cell {
    overflow: visible;
    text-align: center;
}

.tabulator .tabulator-row .tabulator-cell.files-cell {
    overflow: hidden;
    padding: 6px 4px !important;
    white-space: nowrap;
}

.icon-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.upload-button,
.download-button {
    margin: 0 1px;
}

.download-button {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.download-button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.admin-comment-cell,
.admin-comment-text,
.admin-comment-input {
    color: #c01f1f !important;
    font-weight: 700;
}

.release-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.download-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbff;
}

.download-row a,
.download-row-name {
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.download-row-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-row-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.download-row:hover {
    border-color: var(--accent);
    background: #eef8ff;
}

.pending-upload-row {
    border-style: dashed;
    background: #fff8e5;
}

.files-modal {
    max-width: 720px;
}

.file-preview-backdrop {
    padding: 14px;
}

.file-preview-modal {
    width: min(1180px, calc(100vw - 28px));
    height: min(900px, calc(100vh - 28px));
    max-width: none;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 16px;
}

.file-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.file-preview-header h2 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.file-preview-frame,
.file-preview-image-wrap {
    width: 100%;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.file-preview-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 12px;
    background: #f8fbff;
}

.file-preview-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

.file-upload-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fbff;
}

@media (max-width: 720px) {
    .file-upload-panel {
        grid-template-columns: 1fr;
    }
}

.button.full {
    width: 100%;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    padding: 9px 11px;
    font: 500 14px/1.3 Inter, Arial, sans-serif;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

input[type="checkbox"] {
    width: auto;
    min-height: 0;
    margin-right: 8px;
}

label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    color: #29354a;
}

.field-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 800;
    color: #29354a;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.checkbox-grid.compact {
    max-height: 190px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.checkbox-card:hover {
    border-color: var(--table-blue);
    background: #f4faff;
}

.checkbox-card input {
    flex: 0 0 auto;
}

.checkbox-card span {
    overflow-wrap: anywhere;
}

.inline-checkbox {
    display: inline-flex;
    width: auto;
    margin-top: 8px;
}

.inline-check-label {
    display: inline-flex;
    width: auto;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.inline-check-label input[type="checkbox"] {
    margin: 0;
}

.config-filters {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.toggle-switch {
    display: inline-flex;
    grid-auto-flow: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-weight: 800;
    cursor: pointer;
}

.toggle-switch input {
    appearance: none;
    width: 42px;
    height: 24px;
    min-height: 24px;
    border: 1px solid #c8d3df;
    border-radius: 999px;
    background: #e7edf4;
    position: relative;
    transition: background .16s ease, border-color .16s ease;
}

.toggle-switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(16, 32, 55, .18);
    transition: transform .16s ease;
}

.toggle-switch input:checked {
    background: var(--table-blue);
    border-color: var(--table-blue-dark);
}

.toggle-switch input:checked::after {
    transform: translateX(18px);
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack-form {
    display: grid;
    gap: 14px;
}

.wide-modal {
    max-width: min(1180px, calc(100vw - 34px));
}

.compact-panel {
    padding: 14px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.panel-heading h2 {
    margin: 0;
}

.segmented-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    background: #eef4fb;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.segmented-tabs a {
    padding: 9px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 800;
    color: var(--muted);
}

.segmented-tabs a.active {
    background: #fff;
    color: var(--accent-dark);
    box-shadow: 0 6px 16px rgba(21, 38, 64, .08);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.metric-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 16px;
    min-height: 112px;
    display: grid;
    align-content: space-between;
}

.metric-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.metric-card strong {
    font-size: 34px;
    line-height: 1;
}

.metric-card.danger {
    background: linear-gradient(180deg, #fff 0%, var(--danger) 100%);
}

.metric-card.warning {
    background: linear-gradient(180deg, #fff 0%, var(--warning) 100%);
}

.metric-card.booked {
    background: linear-gradient(180deg, #fff 0%, var(--booked) 100%);
}

.metric-card.success {
    background: linear-gradient(180deg, #fff 0%, var(--success) 100%);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.dashboard-visual-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-visual-card {
    min-height: 276px;
}

.donut-layout {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.donut-chart {
    width: 142px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(16, 32, 55, .08), 0 18px 30px rgba(32, 65, 104, .12);
    position: relative;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 24px;
    background: #fff;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(16, 32, 55, .08);
}

.donut-chart span {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2px;
    place-items: center;
    font-weight: 900;
    font-size: 28px;
}

.donut-chart small {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.chart-legend {
    display: grid;
    gap: 9px;
}

.chart-legend.compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 10px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: #172033;
}

.chart-legend i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.chart-legend .success { background: #55c782; }
.chart-legend .danger { background: #f97066; }
.chart-legend .booked { background: #58abe7; }
.chart-legend .warning { background: #f8bf3c; }

.due-ladder {
    display: grid;
    gap: 10px;
}

.due-ladder-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 7px 12px;
    align-items: center;
}

.due-ladder-row span,
.due-ladder-row strong {
    font-weight: 900;
}

.due-ladder-row i {
    grid-column: 1 / -1;
    display: block;
    height: 12px;
    border-radius: 999px;
    background: #e9eef5;
    overflow: hidden;
}

.due-ladder-row b {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
}

.due-ladder-row.danger b { background: #f97066; }
.due-ladder-row.warning b { background: #f8bf3c; }
.due-ladder-row.success b { background: #55c782; }
.due-ladder-row.muted b { background: #94a3b8; }

.activity-pulse {
    min-height: 156px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.pulse-day {
    display: grid;
    gap: 5px;
    justify-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.pulse-day strong {
    color: #172033;
    font-size: 13px;
}

.lollipop-list {
    display: grid;
    gap: 11px;
}

.lollipop-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 5px 12px;
    align-items: center;
}

.lollipop-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lollipop-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.lollipop-row i {
    grid-column: 1 / -1;
    height: 10px;
    border-radius: 999px;
    background: #e9eef5;
    overflow: hidden;
}

.lollipop-row b {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: linear-gradient(90deg, #58abe7, #f97066);
}

.summary-bars {
    display: grid;
    gap: 12px;
}

.summary-bar-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
}

.summary-bar {
    grid-column: 1 / -1;
    display: flex;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eef5;
}

.summary-bar i {
    display: block;
    min-width: 2px;
}

.summary-bar .danger {
    background: #ff6b6b;
}

.summary-bar .warning {
    background: #f8bf3c;
}

.summary-bar .success {
    background: #5ec487;
}

.compact-table {
    min-width: 760px;
}

.compact-table tr.row-completed td {
    background: var(--success);
}

.compact-table tr.row-warning td {
    background: var(--warning);
}

.compact-table tr.row-danger td {
    background: var(--danger);
}

.compact-table tr.row-booked td {
    background: var(--booked);
}

.status-badge {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf2f8;
    color: #172033;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inline-release {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
}

.inline-release input {
    width: 16px;
    height: 16px;
}

.table-cell-input,
.table-cell-textarea {
    width: 100%;
    min-height: 30px;
    border: 1px solid #b7c6d5;
    border-radius: 6px;
    padding: 5px 7px;
    font: inherit;
}

.table-cell-textarea {
    min-height: 78px;
    resize: vertical;
}

.colour-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.colour-chip::before {
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid rgba(16, 32, 55, .2);
    background: var(--chip-colour);
}

.config-edit-input,
.config-sort-input {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 7px 9px;
    background: #fff;
    font: inherit;
}

.config-sort-input {
    max-width: 96px;
}

.config-colour-field {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
}

.config-colour-field input[type="color"] {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.config-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

@media (max-width: 1320px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-visual-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-visual-grid {
        grid-template-columns: 1fr;
    }

    .donut-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.notice {
    padding: 12px 14px;
    border-radius: var(--radius);
    margin: 0 0 16px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
}

.notice.success {
    background: var(--success);
    border-color: #b7ecc9;
}

.notice.danger {
    background: var(--danger);
    border-color: #ffc6c6;
}

.notice.warning {
    background: var(--warning);
    border-color: #ffe1a3;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
}

.auth-card {
    width: min(460px, 100%);
    padding: 28px;
}

.auth-logo {
    height: 76px;
    margin-bottom: 18px;
}

.auth-card h1 {
    margin: 0 0 12px;
}

.auth-card form {
    display: grid;
    gap: 14px;
}

.toast-root {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: grid;
    gap: 10px;
    z-index: 100;
}

.toast {
    background: #111827;
    color: #fff;
    padding: 11px 13px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 13px;
    font-weight: 700;
    animation: toastIn .22s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: blur(0);
    transition: opacity .36s ease, backdrop-filter .36s ease, visibility 0s linear .36s;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(5px);
    transition: opacity .36s ease, backdrop-filter .36s ease;
}

.modal {
    width: min(880px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
    padding: 22px;
    animation: modalIn .34s cubic-bezier(.16, 1, .3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 1280px) {
    .main {
        padding: 22px;
    }

    .tabulator .tabulator-col-content {
        padding: 6px 7px;
    }

    .tabulator .tabulator-header-filter {
        padding: 5px;
    }

    .tabulator .tabulator-header-filter input,
    .tabulator .tabulator-header-filter select {
        min-height: 28px;
        padding: 4px 6px;
    }

    .tabulator .tabulator-row .tabulator-cell {
        padding: 7px 7px;
    }
}

@media (max-width: 760px) {
    .tabulator .tabulator-footer,
    .tabulator .tabulator-footer-contents,
    .tabulator .tabulator-paginator {
        justify-content: flex-start;
    }

    .tabulator .tabulator-page-counter,
    .tabulator .tabulator-paginator {
        flex-basis: 100%;
    }
}

.mobile-nav-button {
    display: none;
}

.profile-photo {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    background: #eaf6fc;
    border: 1px solid var(--border);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
}

.offline-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: #e7f5ee;
    color: #126b45;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.offline-status.is-offline {
    background: #fff1cc;
    color: #835600;
}

.offline-status.has-pending {
    background: #e7f0ff;
    color: #174a8b;
}

.table-scroll {
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 10px 11px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: #111827;
    color: #fff;
    font-weight: 800;
}

@media (max-width: 600px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    body.sidebar-collapsed .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        transform: translateX(-102%);
        transition: transform .2s ease;
        width: min(300px, 86vw);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

body.sidebar-collapsed.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main {
        padding: 18px;
    }

    .mobile-nav-button {
        display: inline-flex;
    }

    .sidebar-collapse-toggle {
        display: none;
    }

    .grid,
    .grid.three,
    .grid.four,
    .metric-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .config-filters {
        grid-template-columns: 1fr;
    }

    .toolbar {
        align-items: stretch;
    }

    .toolbar > * {
        flex: 1 1 auto;
    }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1180px) {
    .app-shell,
    body.sidebar-collapsed .app-shell {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .main {
        margin-left: 0;
        padding: 10px;
    }

    .sidebar,
    body.sidebar-collapsed .sidebar {
        position: sticky;
        top: 0;
        width: 54px;
        max-width: 54px;
        height: 100dvh;
        padding: 8px 4px;
        transform: none;
        overflow: visible;
    }

    .brand,
    body.sidebar-open .brand {
        min-height: 48px;
        justify-content: center;
    }

    .brand-logo-full,
    body.sidebar-open .brand-logo-full {
        display: none;
    }

    .brand-logo-compact,
    body.sidebar-open .brand-logo-compact {
        display: block;
        width: 34px;
        height: 34px;
    }

    .nav,
    .sidebar-footer,
    body.sidebar-open .nav,
    body.sidebar-open .sidebar-footer {
        align-items: center;
    }

    .nav a,
    .logout,
    body.sidebar-open .nav a,
    body.sidebar-open .logout {
        width: 42px;
        height: 42px;
        justify-content: center;
        padding: 0;
    }

    .user-chip,
    body.sidebar-open .user-chip {
        width: 42px;
        height: 42px;
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 0;
    }

    .nav a span,
    .logout span,
    .user-chip strong,
    body.sidebar-open .nav a span,
    body.sidebar-open .logout span,
    body.sidebar-open .user-chip strong {
        display: none;
    }

    .mobile-nav-button {
        display: inline-flex;
    }

    .sidebar-collapse-toggle {
        display: none;
    }

    .sidebar-rail-toggle {
        display: flex;
        width: 42px;
        height: 34px;
        min-height: 34px;
    }

    body.sidebar-open .sidebar,
    body.sidebar-collapsed.sidebar-open .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: min(300px, 86vw);
        max-width: min(300px, 86vw);
        padding: 22px 18px;
        transform: none;
        overflow: auto;
    }

    body.sidebar-open .brand {
        min-height: 72px;
        justify-content: flex-start;
    }

    body.sidebar-open .brand-logo-full {
        display: block;
    }

    body.sidebar-open .brand-logo-compact {
        display: none;
    }

    body.sidebar-open .nav,
    body.sidebar-open .sidebar-footer {
        align-items: stretch;
    }

    body.sidebar-open .nav a,
    body.sidebar-open .logout {
        width: auto;
        height: auto;
        justify-content: flex-start;
        padding: 10px 12px;
    }

    body.sidebar-open .user-chip {
        width: auto;
        height: auto;
        grid-template-columns: 36px minmax(0, 1fr);
        justify-items: stretch;
        padding: 10px;
    }

    body.sidebar-open .nav a span,
    body.sidebar-open .logout span,
    body.sidebar-open .user-chip strong {
        display: inline;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

@media print {
    .sidebar,
    .topbar,
    .form-actions,
    .nav,
    .toolbar,
    .notice {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .main {
        padding: 0;
    }

    .panel {
        box-shadow: none;
        border: 0;
        padding: 0;
    }
}
