:root {
    --brand-primary-dark: #0f1f32;
    --brand-header: #1e73be;
    --brand-accent: #2cc7c9;
    --brand-success: #42c98a;
    --brand-warning: #f0b44d;
    --brand-danger: #e35d6a;
    --work-bg: #071826;
    --work-surface: #0f1f32;
    --work-surface-2: #102b43;
    --work-surface-3: #143650;
    --work-border: #20445b;
    --work-border-strong: #2c607c;
    --work-text: #f3f7fa;
    --work-muted: #91aabd;
    --work-light-blue: #b9ddf2;
    --topbar-height: 58px;
    --sidebar-width: 232px;
    --sidebar-collapsed-width: 62px;
    --panel-radius: 4px;
    --focus-ring: 0 0 0 3px rgba(44, 199, 201, 0.26);
}

html {
    scroll-behavior: smooth;
}

body.app-layout {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--work-bg);
    color: var(--work-text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.app-layout *,
.app-layout *::before,
.app-layout *::after {
    box-sizing: border-box;
}

.skip-link {
    position: fixed;
    z-index: 2000;
    top: 8px;
    left: 8px;
    padding: 8px 12px;
    transform: translateY(-150%);
    border: 2px solid var(--brand-accent);
    border-radius: 3px;
    background: var(--work-bg);
    color: var(--work-text);
}

.skip-link:focus {
    transform: translateY(0);
}

.global-topbar {
    position: sticky;
    z-index: 1000;
    top: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    min-height: var(--topbar-height);
    border-bottom: 3px solid var(--brand-header);
    background: var(--brand-primary-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.topbar-primary,
.topbar-utilities,
.topbar-brand,
.topbar-user,
.utility-link {
    display: flex;
    align-items: center;
}

.topbar-primary {
    min-width: 0;
}

.icon-button,
.utility-button {
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.navigation-toggle {
    display: grid;
    place-items: center;
    width: 48px;
    height: 100%;
    min-height: var(--topbar-height);
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.1);
}

.navigation-toggle:hover,
.navigation-toggle:focus-visible {
    background: rgba(44, 199, 201, 0.16);
}

.ui-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.topbar-brand {
    align-self: stretch;
    min-width: 282px;
    gap: 10px;
    padding: 6px 18px 6px 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    text-decoration: none;
}

.topbar-logo-text {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 3px;
    background: #071d31;
    color: var(--brand-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.topbar-logo-image {
    display: block;
    width: 190px;
    max-width: 100%;
    height: auto;
    max-height: 28px;
    object-fit: contain;
}

.topbar-brand.has-image-logo {
    min-width: 238px;
    background: var(--brand-primary-dark);
}

.topbar-brand-copy,
.user-copy {
    display: grid;
    min-width: 0;
}

.topbar-brand-copy strong {
    font-size: 0.9rem;
    letter-spacing: 0.015em;
}

.topbar-brand-copy small,
.topbar-module span,
.user-copy small,
.topbar-clock span {
    color: #c7e2f1;
    font-size: 0.68rem;
}

.topbar-module {
    display: grid;
    align-content: center;
    min-width: 0;
    padding: 5px 16px;
}

.topbar-module strong {
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-utilities {
    flex: 0 0 auto;
}

.topbar-clock {
    display: grid;
    align-content: center;
    min-width: 122px;
    padding: 4px 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    text-align: right;
}

.topbar-clock strong {
    font-size: 0.77rem;
}

.utility-link {
    align-self: stretch;
    gap: 7px;
    padding: 0 13px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #e8f4fa;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
}

.utility-link:hover,
.utility-link:focus-visible {
    background: rgba(44, 199, 201, 0.14);
    color: #fff;
}

.topbar-user {
    align-self: stretch;
    gap: 8px;
    min-width: 160px;
    padding: 5px 13px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.user-initials {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-accent);
    color: #03222c;
    font-size: 0.75rem;
    font-weight: 900;
}

.user-copy strong {
    max-width: 138px;
    overflow: hidden;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-logout {
    display: block;
    align-self: stretch;
    margin: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: calc(100vh - var(--topbar-height));
    transition: grid-template-columns 150ms ease;
}

.staff-sidebar {
    position: sticky;
    z-index: 800;
    top: var(--topbar-height);
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    border-right: 1px solid var(--work-border-strong);
    background: #091522;
    transition: width 150ms ease, transform 150ms ease;
}

.sidebar-scroll {
    flex: 1;
    padding: 10px 8px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar-label {
    margin: 9px 9px 5px;
    color: #789bb1;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sidebar-nav {
    display: grid;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #b5cfdf;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    border-color: #235574;
    background: #102f49;
    color: #fff;
}

.sidebar-link.active {
    border-color: #287fa1;
    background: linear-gradient(90deg, #15587e, #123d5a);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--brand-accent);
}

.sidebar-link.active .ui-icon {
    color: var(--brand-accent);
}

.sidebar-divider {
    height: 1px;
    margin: 12px 6px;
    background: var(--work-border);
}

.sidebar-context-nav .sidebar-link {
    min-height: 32px;
    font-size: 0.72rem;
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border-top: 1px solid var(--work-border);
    color: var(--work-muted);
    font-size: 0.68rem;
    white-space: nowrap;
}

.system-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--brand-success);
    box-shadow: 0 0 0 3px rgba(66, 201, 138, 0.12);
}

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

.sidebar-collapsed .staff-sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .sidebar-label,
.sidebar-collapsed .sidebar-link span,
.sidebar-collapsed .sidebar-status span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-inline: 8px;
}

.sidebar-collapsed .sidebar-status {
    justify-content: center;
}

.workspace-main {
    min-width: 0;
    background: linear-gradient(180deg, #0a1b2b 0, var(--work-bg) 260px);
    outline: none;
}

.workspace-content {
    width: 100%;
    max-width: 1660px;
    margin: 0 auto;
    padding: 14px 16px 30px;
}

.audit-context {
    position: sticky;
    z-index: 700;
    top: var(--topbar-height);
    border-bottom: 1px solid #337394;
    background: rgba(7, 28, 46, 0.98);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.audit-context-primary {
    display: grid;
    grid-template-columns: minmax(210px, 1.2fr) minmax(0, 5fr);
    gap: 16px;
    padding: 9px 16px 7px;
}

.audit-context-identity {
    display: grid;
    align-content: center;
    min-width: 0;
    padding-right: 14px;
    border-right: 1px solid var(--work-border);
}

.context-reference {
    color: var(--brand-accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.audit-context-identity strong {
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-context-identity small {
    overflow: hidden;
    color: var(--work-muted);
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-context-facts {
    display: grid;
    grid-template-columns: repeat(10, minmax(72px, 1fr));
    gap: 0;
    min-width: 0;
    margin: 0;
}

.audit-context-facts > div {
    min-width: 0;
    padding: 2px 9px;
    border-left: 1px solid rgba(32, 68, 91, 0.7);
}

.audit-context-facts dt,
.metric-label,
.detail-grid dt {
    color: var(--work-muted);
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.audit-context-facts dd {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin: 3px 0 0;
    overflow: hidden;
    color: #e8f2f7;
    font-size: 0.7rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-context-facts .ui-icon {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
}

.audit-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    overflow-x: auto;
    border-top: 1px solid #173d56;
    background: #0b263c;
}

.audit-tabs a {
    position: relative;
    padding: 8px 15px 7px;
    border-right: 1px solid #173d56;
    color: #a7c4d5;
    font-size: 0.72rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.audit-tabs a:hover,
.audit-tabs a:focus-visible,
.audit-tabs a.active {
    background: #123a56;
    color: #fff;
}

.audit-tabs a.active::after {
    position: absolute;
    right: 8px;
    bottom: 0;
    left: 8px;
    height: 3px;
    background: var(--brand-accent);
    content: "";
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--work-border);
}

.page-heading h1 {
    margin: 1px 0 2px;
    color: #fff;
    font-size: 1.18rem;
    line-height: 1.2;
}

.eyebrow {
    margin: 0 0 3px;
    color: var(--brand-accent);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.115em;
    text-transform: uppercase;
}

.muted,
.field-help,
.table-note {
    color: var(--work-muted);
}

.page-heading .muted {
    margin: 0;
    font-size: 0.76rem;
}

.page-actions,
.workflow-actions,
.action-toolbar,
.filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.button,
.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin: 0;
    padding: 6px 11px;
    border: 1px solid #36aeb4;
    border-radius: 3px;
    background: var(--brand-accent);
    color: #05202a;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
}

.button:hover,
.button:focus-visible,
.logout-button:hover,
.logout-button:focus-visible {
    border-color: #7be2e3;
    background: #5ad9db;
}

.button-secondary {
    border-color: #35627c;
    background: #15364d;
    color: #e8f2f7;
}

.button-secondary:hover,
.button-secondary:focus-visible {
    background: #1c4b69;
    color: #fff;
}

.button-warning {
    border-color: #d39127;
    background: var(--brand-warning);
    color: #271900;
}

.button-danger {
    border-color: #c94150;
    background: var(--brand-danger);
    color: #fff;
}

.content-panel,
.welcome-panel,
.stat-card {
    border: 1px solid var(--work-border);
    border-radius: var(--panel-radius);
    background: rgba(11, 31, 58, 0.93);
    box-shadow: none;
}

.content-panel,
.welcome-panel {
    margin: 0 0 12px;
    padding: 13px 14px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -13px -14px 11px;
    padding: 8px 11px;
    border-bottom: 1px solid var(--work-border);
    background: #102b43;
}

.panel-heading h2,
.content-panel > h2 {
    margin: 0;
    font-size: 0.87rem;
    line-height: 1.25;
}

.content-panel > h2 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--work-border);
}

.content-panel h3 {
    margin: 0 0 5px;
    color: var(--work-light-blue);
    font-size: 0.78rem;
}

.content-panel p:last-child {
    margin-bottom: 0;
}

.stat-grid,
.audit-summary-grid,
.finding-summary-grid,
.metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 0 0 12px;
}

.metric-strip {
    grid-template-columns: repeat(8, minmax(98px, 1fr));
}

.stat-card,
.metric-cell {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--work-border);
    border-radius: 3px;
    background: #0d2940;
}

.stat-card span,
.metric-cell span {
    display: block;
    color: var(--work-muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat-card strong,
.metric-cell strong {
    display: block;
    margin-top: 2px;
    color: #fff;
    font-size: 1.22rem;
    line-height: 1.2;
}

.metric-cell.attention {
    border-left: 3px solid var(--brand-warning);
}

.metric-cell.critical {
    border-left: 3px solid var(--brand-danger);
}

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

.workspace-grid .content-panel {
    min-width: 0;
}

.workspace-grid .span-full {
    grid-column: 1 / -1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--work-border);
    border-left: 1px solid var(--work-border);
}

.detail-grid > div {
    min-width: 0;
    padding: 8px 9px;
    border: 0;
    border-right: 1px solid var(--work-border);
    border-bottom: 1px solid var(--work-border);
    border-radius: 0;
    background: rgba(6, 26, 42, 0.48);
}

.detail-grid dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    font-size: 0.77rem;
}

.detail-section {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--work-border);
}

.detail-section p {
    font-size: 0.78rem;
}

.preserve-lines {
    white-space: pre-wrap;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--work-border);
}

table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.75rem;
}

th,
td {
    padding: 7px 8px;
    border-right: 1px solid rgba(32, 68, 91, 0.66);
    border-bottom: 1px solid rgba(32, 68, 91, 0.78);
    text-align: left;
    vertical-align: top;
}

th:last-child,
td:last-child {
    border-right: 0;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:nth-child(even) td {
    background: rgba(18, 58, 84, 0.23);
}

tbody tr:hover td {
    background: rgba(44, 125, 160, 0.18);
}

th {
    position: sticky;
    z-index: 2;
    top: 0;
    background: #12324a;
    color: #b9d4e4;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

td a {
    color: #62dadd;
}

.table-note {
    display: block;
    margin-top: 2px;
    font-size: 0.67rem;
}

.empty-state {
    margin: 7px 0 0;
    padding: 18px;
    border: 1px dashed #315c73;
    border-radius: 3px;
    background: rgba(7, 24, 38, 0.36);
    color: var(--work-muted);
    text-align: center;
}

.status-badge,
.risk-badge,
.finding-severity-badge,
.finding-status-badge,
.finding-visibility-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
}

.status-active,
.risk-low,
.finding-status-resolved,
.finding-status-accepted {
    background: rgba(66, 201, 138, 0.11);
    color: var(--brand-success);
}

.status-review {
    background: rgba(77, 175, 225, 0.12);
    color: #7ecdf2;
}

.status-warning,
.risk-moderate,
.finding-status-pending {
    background: rgba(240, 180, 77, 0.12);
    color: var(--brand-warning);
}

.status-critical,
.risk-critical,
.finding-severity-critical {
    background: rgba(227, 93, 106, 0.13);
    color: var(--brand-danger);
}

.risk-high,
.finding-severity-high {
    background: rgba(240, 138, 77, 0.13);
    color: #f5a46e;
}

.risk-informational,
.status-finalized,
.finding-severity-informational {
    background: rgba(145, 170, 189, 0.11);
    color: #bdd0dc;
}

.alert,
.record-lock-notice,
.security-notice {
    margin: 0 0 11px;
    padding: 9px 11px;
    border: 1px solid;
    border-radius: 3px;
    font-size: 0.76rem;
}

.alert-success {
    border-color: rgba(66, 201, 138, 0.55);
    background: rgba(66, 201, 138, 0.1);
    color: #abefd2;
}

.alert-error {
    border-color: rgba(227, 93, 106, 0.55);
    background: rgba(227, 93, 106, 0.1);
    color: #ffc0c8;
}

.alert-warning,
.record-lock-notice,
.security-notice {
    border-color: rgba(240, 180, 77, 0.48);
    background: rgba(240, 180, 77, 0.09);
    color: #f7d99a;
}

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

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

.field-group {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
}

.field-span {
    grid-column: 1 / -1;
}

label {
    margin: 0;
    color: #c6dae6;
    font-size: 0.69rem;
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #315771;
    border-radius: 3px;
    outline: none;
    background: #061b2c;
    color: var(--work-text);
    font: inherit;
    font-size: 0.76rem;
}

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

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 2px solid transparent;
    border-color: var(--brand-accent);
    box-shadow: var(--focus-ring);
}

input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-height: 0;
    padding: 5px 0;
}

.checkbox-row input {
    width: auto;
    min-height: 0;
    margin: 2px 0 0;
}

.field-help {
    margin: 0;
    font-size: 0.66rem;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 230px) auto;
    align-items: end;
    gap: 9px;
}

.workflow-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: end;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.workflow-form label {
    grid-column: 1 / -1;
}

.sticky-actions {
    position: sticky;
    z-index: 20;
    bottom: 8px;
    display: flex;
    gap: 6px;
    width: fit-content;
    margin: 14px 0 0 auto;
    padding: 6px;
    border: 1px solid var(--work-border-strong);
    border-radius: 4px;
    background: rgba(7, 24, 38, 0.97);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.activity-list {
    display: grid;
    gap: 0;
    margin: 0;
    border: 1px solid var(--work-border);
}

.activity-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--work-border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-dot {
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(44, 199, 201, 0.1);
}

.activity-item p {
    margin: 3px 0 0;
    font-size: 0.71rem;
}

.settings-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
}

.settings-section-nav {
    position: sticky;
    top: calc(var(--topbar-height) + 14px);
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--work-border);
    border-radius: 3px;
    background: var(--work-surface);
}

.settings-section-nav a {
    padding: 7px 8px;
    border-radius: 2px;
    color: #b8cedb;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}

.settings-section-nav a:hover,
.settings-section-nav a:focus-visible {
    background: #153a55;
    color: #fff;
}

.settings-panels {
    min-width: 0;
}

.settings-color-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px;
}

.settings-color-row input[type="color"] {
    padding: 2px;
}

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

.readout {
    padding: 8px;
    border: 1px solid var(--work-border);
    background: #0a263b;
}

.readout dt {
    color: var(--work-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.readout dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    font-size: 0.75rem;
    font-weight: 700;
}

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

.maintenance-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--work-border);
    background: #0a263b;
}

.maintenance-action p {
    margin: 2px 0 0;
    color: var(--work-muted);
    font-size: 0.67rem;
}

.sidebar-backdrop {
    display: none;
}

code {
    padding: 2px 5px;
    border: 1px solid #25475a;
    border-radius: 2px;
    background: #061724;
    color: #b8eff0;
    font-size: 0.72rem;
}

@media (max-width: 1280px) {
    .audit-context-facts {
        grid-template-columns: repeat(5, minmax(100px, 1fr));
        row-gap: 5px;
    }

    .metric-strip {
        grid-template-columns: repeat(4, minmax(110px, 1fr));
    }

    .topbar-clock,
    .utility-link span,
    .user-copy small {
        display: none;
    }

    .topbar-user {
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .global-topbar {
        position: sticky;
    }

    .topbar-brand {
        min-width: 0;
    }

    .topbar-brand-copy small,
    .topbar-module,
    .user-copy {
        display: none;
    }

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

    .staff-sidebar,
    .sidebar-collapsed .staff-sidebar {
        position: fixed;
        top: var(--topbar-height);
        bottom: 0;
        left: 0;
        width: min(280px, 86vw);
        height: calc(100vh - var(--topbar-height));
        transform: translateX(-105%);
        box-shadow: 10px 0 32px rgba(0, 0, 0, 0.38);
    }

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

    .sidebar-collapsed .sidebar-label,
    .sidebar-collapsed .sidebar-link span,
    .sidebar-collapsed .sidebar-status span:last-child {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }

    .sidebar-collapsed .sidebar-link {
        justify-content: flex-start;
        padding-inline: 10px;
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 750;
        inset: var(--topbar-height) 0 0;
        display: block;
        visibility: hidden;
        border: 0;
        background: rgba(0, 8, 16, 0.62);
        opacity: 0;
        transition: opacity 150ms ease, visibility 150ms ease;
    }

    .sidebar-open .sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .audit-context {
        top: var(--topbar-height);
    }

    .audit-context-primary {
        grid-template-columns: 1fr;
    }

    .audit-context-identity {
        padding: 0 0 6px;
        border-right: 0;
        border-bottom: 1px solid var(--work-border);
    }

    .workspace-grid,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-section-nav {
        position: static;
        grid-template-columns: repeat(4, minmax(110px, 1fr));
        overflow-x: auto;
    }
}

@media (max-width: 680px) {
    :root {
        --topbar-height: 54px;
    }

    .topbar-logo-text {
        width: 30px;
        height: 30px;
    }

    .topbar-logo-image {
        width: 150px;
        max-height: 24px;
    }

    .topbar-brand {
        padding-inline: 8px;
    }

    .topbar-user {
        display: none;
    }

    .utility-link {
        padding-inline: 10px;
    }

    .workspace-content {
        padding: 10px 9px 24px;
    }

    .audit-context-facts {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }

    .audit-context-facts > div:nth-child(n+7) {
        display: none;
    }

    .page-heading {
        flex-direction: column;
    }

    .page-actions,
    .page-actions .button {
        width: 100%;
    }

    .form-grid,
    .form-grid.form-grid-three,
    .filter-bar,
    .detail-grid,
    .readout-grid,
    .maintenance-actions {
        grid-template-columns: 1fr;
    }

    .field-span {
        grid-column: auto;
    }

    .stat-grid,
    .audit-summary-grid,
    .finding-summary-grid,
    .metric-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-form,
    .maintenance-action {
        grid-template-columns: 1fr;
    }

    .workflow-form label {
        grid-column: auto;
    }

    .sticky-actions {
        width: 100%;
    }

    .sticky-actions .button {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
