:root {
    --es-red: #e40146;
    --es-blue: #014e66;
    --es-blue-dark: #002733;
    --es-green: #01a48b;
    --es-cyan: #80cef5;
    --es-orange: #eb7221;
    --surface: #ffffff;
    --surface-soft: #f6f8fa;
    --surface-quiet: #f0f5f8;
    --border: #dfe5ea;
    --border-strong: #c7d1d9;
    --text: #0e2630;
    --text-muted: #58707c;
    --shadow: 0 18px 45px rgba(1, 47, 64, 0.09);
    --radius: 8px;
    --sidebar-width: 274px;
    --detail-width: 412px;
    font-family: Inter, "Source Sans Pro", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--surface-soft);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(1, 78, 102, 0.035), transparent 340px),
        var(--surface-soft);
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: var(--es-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--surface-soft);
}

.auth-panel {
    width: min(420px, 100%);
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-panel img {
    width: 168px;
    height: auto;
    margin-bottom: 20px;
}

.auth-panel h1 {
    margin: 0 0 6px;
    color: var(--es-blue-dark);
    font-size: 26px;
}

.auth-panel p {
    margin: 0 0 18px;
    color: var(--text-muted);
}

.auth-form,
.task-form {
    display: grid;
    gap: 12px;
}

.auth-form label,
.task-form label {
    display: grid;
    gap: 6px;
    color: #294652;
    font-size: 12px;
    font-weight: 850;
}

.auth-form input,
.task-form input,
.task-form select,
.task-form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fbfcfd;
    color: var(--text);
}

.auth-form button,
.task-form button,
.admin-form button {
    min-height: 40px;
    border: 1px solid var(--es-red);
    border-radius: 6px;
    background: var(--es-red);
    color: #fff;
    font-weight: 850;
}

.auth-link {
    display: inline-flex;
    margin-top: 16px;
    font-weight: 800;
}

.form-message {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 800;
}

.form-message--success {
    color: #12643e;
    background: #e6f7ee;
}

.form-message--error {
    color: var(--es-red);
    background: #ffe7ee;
}

:focus-visible {
    outline: 3px solid rgba(128, 206, 245, 0.9);
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 0;
    border-color: var(--es-blue);
    box-shadow: none;
    background: #fff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    flex: 0 0 auto;
}

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

.sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 16px 18px;
    background: #fff;
    border-right: 1px solid var(--border);
    box-shadow: 8px 0 24px rgba(0, 39, 51, 0.035);
    overflow-y: auto;
}

.sidebar-backdrop {
    display: none;
}

.brand {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 58px;
}

.brand img {
    width: 128px;
    height: auto;
    display: block;
}

.brand div {
    min-width: 0;
    border-left: 1px solid var(--border);
    padding-left: 12px;
}

.brand strong {
    display: block;
    color: var(--es-red);
    font-size: 16px;
    line-height: 1.1;
}

.brand span {
    display: block;
    margin-top: 3px;
    color: var(--es-blue-dark);
    font-weight: 700;
}

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

.nav-heading {
    margin: 18px 8px 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.nav-item {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #27424e;
    font-weight: 650;
    font-size: 13px;
}

.nav-item:hover {
    background: #f2f6f8;
    text-decoration: none;
}

.nav-item span {
    min-width: 26px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #edf2f6;
    color: #31515d;
    text-align: center;
    font-size: 12px;
}

.nav-item--active {
    background: #fff0f4;
    color: var(--es-red);
    box-shadow: inset 4px 0 0 var(--es-red);
}

.collapse-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    margin-top: auto;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    color: #304854;
    background: transparent;
    font-weight: 700;
}

.collapse-button:hover {
    background: #eef4f7;
}

.main {
    min-width: 0;
    padding: 16px clamp(16px, 2vw, 28px) 32px;
}

.topbar {
    display: grid;
    grid-template-columns: minmax(210px, 300px) minmax(280px, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 56px;
}

.menu-button {
    display: none;
}

.mobile-header-brand,
.mobile-header-profile,
.mobile-actionbar {
    display: none;
}

.product-title h1 {
    margin: 0;
    color: var(--es-blue-dark);
    font-size: 22px;
    line-height: 1.08;
}

.product-title p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
}

.search {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(12, 48, 60, 0.04);
}

.search input {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.search kbd {
    min-width: 38px;
    padding: 4px 7px;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-muted);
    background: #f9fbfc;
    font-size: 12px;
    text-align: center;
}

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

.icon-button,
.text-button,
.outline-button,
.danger-button,
.filters button,
.panel-header button,
.lane button {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-weight: 750;
}

.icon-button {
    position: relative;
    width: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.menu-button {
    display: none;
}

.text-button,
.outline-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}

.text-button {
    text-decoration: none;
}

.text-button {
    border-color: transparent;
}

.text-button:hover,
.icon-button:hover,
.outline-button:hover,
.filters button:hover,
.panel-header button:hover,
.lane button:hover {
    background: #edf4f7;
}

.danger-button {
    border-color: var(--es-red);
    background: var(--es-red);
    color: white;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.danger-button:hover {
    background: #c8003d;
}

.badge-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 999px;
    background: var(--es-red);
    color: white;
    font-size: 10px;
    font-weight: 800;
}

.profile {
    display: grid;
    grid-template-columns: 34px auto;
    align-items: center;
    gap: 10px;
    min-width: 164px;
}

.profile > span,
.avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--es-blue), var(--es-green));
    font-weight: 850;
}

.profile strong,
.profile small {
    display: block;
}

.profile strong {
    font-size: 13px;
}

.profile small {
    color: var(--text-muted);
    font-size: 12px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 16px;
}

.filters button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    background: #f9fbfc;
    color: #243c47;
    font-size: 13px;
}

.filters .ghost-filter {
    border-color: transparent;
    background: transparent;
    color: var(--text-muted);
}

.view-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
    padding-bottom: 2px;
    overflow-x: auto;
}

.view-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: #263f4b;
    font-size: 13px;
    font-weight: 850;
}

.view-tabs button:hover {
    background: #edf4f7;
}

.view-tabs button.is-active {
    border-color: rgba(228, 1, 70, 0.22);
    background: #fff0f4;
    color: var(--es-red);
    box-shadow: inset 0 -2px 0 var(--es-red);
}

.view-tabs span {
    display: inline-grid;
    place-items: center;
    min-width: 23px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #eef3f6;
    color: #314d59;
    font-size: 12px;
}

.view-tabs button.is-active span {
    background: white;
    color: var(--es-red);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 0;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric-card {
    min-height: 112px;
    padding: 13px 16px 11px;
    border-right: 1px solid var(--border);
}

.metric-card:last-child {
    border-right: 0;
}

.metric-card p,
.metric-card small {
    margin: 0;
}

.metric-card p {
    color: #243b47;
    font-size: 13px;
    font-weight: 750;
}

.metric-card div {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 9px 0 3px;
}

.metric-card strong {
    color: var(--metric-color, var(--es-blue));
    font-size: 27px;
    line-height: 1;
}

.metric-card span {
    color: #23424e;
    font-size: 16px;
    font-weight: 800;
}

.metric-card small {
    color: var(--text-muted);
    font-size: 12px;
}

.metric-card svg {
    width: 100%;
    height: 22px;
    margin-top: 8px;
}

.metric-card polyline {
    fill: none;
    stroke: var(--metric-color, var(--es-blue));
    stroke-width: 2;
}

.metric-card--danger { --metric-color: var(--es-red); }
.metric-card--warning { --metric-color: var(--es-orange); }
.metric-card--info { --metric-color: #075eb5; }
.metric-card--success { --metric-color: #188a4d; }
.metric-card--neutral { --metric-color: #465866; }

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--detail-width);
    gap: 12px;
    align-items: start;
}

.content-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.content-column {
    display: grid;
    grid-column: 1;
    gap: 12px;
    align-content: start;
    min-width: 0;
}

.queue-panel,
.task-form-panel,
.lower-grid {
    grid-column: 1;
    min-width: 0;
}

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

.panel-header,
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.panel-header h2,
.detail-body h2,
.lane h3,
.signals h2 {
    margin: 0;
    color: var(--es-blue-dark);
}

.panel-header h2 {
    font-size: 16px;
}

.panel-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header span,
.tabs span,
.lane h3 span,
.signals strong {
    display: inline-grid;
    place-items: center;
    min-width: 25px;
    height: 22px;
    border-radius: 999px;
    background: #eef3f6;
    color: #314d59;
    font-size: 12px;
    font-weight: 800;
}

.panel-actions {
    display: inline-flex;
    gap: 6px;
}

.table-wrap {
    display: none;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

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

th {
    background: #f5f7f9;
    color: #314b58;
    font-size: 12px;
    font-weight: 850;
}

td {
    color: #243d49;
    font-size: 13px;
}

th:nth-child(2),
td:nth-child(2),
th:nth-child(3),
td:nth-child(3),
th:nth-child(7),
td:nth-child(7),
th:nth-child(8),
td:nth-child(8),
th:nth-child(9),
td:nth-child(9) {
    white-space: nowrap;
}

td:nth-child(4) {
    min-width: 150px;
}

td:nth-child(5),
td:nth-child(6) {
    min-width: 180px;
}

td strong,
td small {
    display: block;
}

td small {
    color: var(--text-muted);
    margin-top: 2px;
}

tbody tr {
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

tbody tr:hover,
tbody tr.is-selected {
    background: #fff8fa;
}

tbody tr.is-selected {
    box-shadow: inset 3px 0 0 var(--es-red);
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--es-red);
}

.priority,
.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 76px;
    min-height: 25px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.priority .icon {
    width: 14px;
    height: 14px;
}

.priority--danger,
.text-danger {
    color: var(--es-red);
}

.priority--warning,
.text-warning {
    color: var(--es-orange);
}

.priority--success,
.text-success {
    color: #13824a;
}

.status--danger {
    color: var(--es-red);
    background: #ffe5ec;
}

.status--info {
    color: #0b5799;
    background: #e7f1ff;
}

.status--neutral {
    color: #405662;
    background: #eef2f5;
}

.status--success {
    color: #147748;
    background: #e3f6ec;
}

.panel-link {
    display: inline-flex;
    margin: 14px 16px 16px;
    font-weight: 800;
    font-size: 13px;
}

.detail-panel {
    position: sticky;
    top: 18px;
    grid-column: 2;
    overflow: hidden;
}

.detail-panel.is-hidden {
    display: none;
}

.content-grid.detail-hidden {
    grid-template-columns: 1fr;
}

.detail-header p {
    margin: 0;
    color: #1e3b47;
    font-size: 15px;
    font-weight: 800;
}

.detail-body {
    padding: 12px 16px 16px;
}

.detail-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.detail-body h2 {
    font-size: 17px;
}

.detail-body > p {
    margin: 4px 0 14px;
    color: var(--text-muted);
    font-size: 13px;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

.tabs button {
    min-height: 42px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #385260;
    font-size: 12px;
    font-weight: 850;
}

.tabs button.is-active {
    border-color: var(--es-red);
    color: var(--es-red);
}

.detail-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
}

.detail-list dt {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.detail-list dd {
    margin: 0;
    color: #233d49;
    font-size: 13px;
}

.sla-bar {
    display: inline-flex;
    width: 110px;
    height: 5px;
    margin-right: 10px;
    border-radius: 99px;
    background: #e3e8ec;
    vertical-align: middle;
}

.sla-bar i {
    display: block;
    border-radius: inherit;
    background: var(--es-red);
}

.pill-warning {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    color: #9a4a00;
    background: #ffe2c5;
    font-size: 12px;
    font-weight: 850;
}

.detail-section {
    margin-top: 14px;
}

.detail-section h3 {
    margin: 0 0 8px;
    color: #1c3642;
    font-size: 13px;
}

.detail-section p {
    margin: 0;
    color: #3e5662;
    font-size: 13px;
}

.inline-empty {
    grid-column: 1 / -1;
    padding: 10px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.collaboration-panel {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #dfe8ee;
    border-radius: 8px;
    background: #f8fbfc;
}

.collaboration-panel label {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 850;
}

.collaboration-panel select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    background: white;
    font: inherit;
}

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

.pdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-stack button,
.note-form button,
.triage-strip button {
    min-height: 36px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fbfc;
    color: var(--es-blue-dark);
    font-size: 12px;
    font-weight: 850;
}

.action-stack button:hover,
.note-form button:hover,
.triage-strip button:hover {
    background: #eef5f7;
}

.note-form {
    display: grid;
    gap: 8px;
}

.mention-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.mention-row button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f8fbfc;
    color: #27424e;
    font-size: 12px;
    font-weight: 800;
}

.mention-row button:hover {
    background: #eef5f7;
}

.note-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 78px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    background: #fbfcfd;
    font: inherit;
}

.activity {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.activity li {
    position: relative;
    padding-left: 22px;
}

.activity li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 6px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface);
}

.activity time,
.activity span,
.activity small {
    display: block;
}

.activity time {
    color: var(--text-muted);
    font-size: 12px;
}

.activity span {
    color: #233d49;
    font-weight: 750;
}

.activity small {
    color: var(--text-muted);
}

.detail-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: #fbfcfd;
}

.lower-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 12px;
    margin-top: 0;
}

.workload {
    min-height: 0;
}

.workload-row {
    padding: 12px 16px;
}

.workload-row div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #28434f;
    font-size: 13px;
}

progress {
    width: 100%;
    height: 8px;
    appearance: none;
}

progress::-webkit-progress-bar {
    border-radius: 99px;
    background: #e8eef2;
}

progress::-webkit-progress-value {
    border-radius: 99px;
    background: var(--bar-color, var(--es-blue));
}

progress::-moz-progress-bar {
    border-radius: 99px;
    background: var(--bar-color, var(--es-blue));
}

.progress--danger { --bar-color: var(--es-red); }
.progress--warning { --bar-color: var(--es-orange); }
.progress--success { --bar-color: #169354; }

.status-board {
    min-width: 0;
}

.lanes {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    min-height: 270px;
    overflow-x: auto;
}

.lane {
    padding: 14px 12px;
    border-right: 1px solid var(--border);
}

.lane:last-child {
    border-right: 0;
}

.lane h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.mini-card {
    display: grid;
    gap: 5px;
    padding: 10px;
    margin-bottom: 9px;
    border: 1px solid #e8edf1;
    border-radius: 6px;
    background: #fbfcfd;
}

.mini-card small {
    color: var(--text-muted);
    font-size: 11px;
}

.mini-card strong {
    color: #223c48;
    font-size: 12px;
}

.mini-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mini-card span {
    padding: 2px 6px;
    border-radius: 4px;
    background: #eef4f7;
    color: #38515d;
    font-size: 11px;
    font-weight: 750;
}

.mini-card time {
    color: var(--es-red);
    font-size: 11px;
}

.lane button {
    width: 100%;
    margin-top: 2px;
    background: transparent;
    color: var(--es-blue);
    font-size: 12px;
}

.district-panel {
    min-width: 0;
}

.mobile-workbench {
    margin-bottom: 14px;
}

.task-form-panel {
    margin: 0;
}

.task-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.task-form .form-wide,
.custom-field-grid {
    grid-column: span 2;
}

.task-form button {
    align-self: end;
}

.custom-field-grid {
    display: contents;
}

.custom-detail-list {
    margin-top: 10px;
}

.admin-main {
    max-width: 1480px;
}

.admin-topbar {
    grid-template-columns: minmax(260px, 1fr) auto;
}

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

.ops-cockpit {
    margin: 0 0 14px;
}

.ops-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.ops-actions form {
    margin: 0;
}

.ops-grid,
.readiness-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px;
}

.ops-grid article,
.readiness-gate {
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: 108px;
    padding: 12px;
    border: 1px solid #dfe8ee;
    border-radius: 8px;
    background: #fbfcfd;
}

.ops-grid span,
.readiness-gate span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 850;
}

.ops-grid strong,
.readiness-gate strong {
    color: var(--es-blue-dark);
    font-size: 20px;
    overflow-wrap: anywhere;
}

.ops-grid small,
.readiness-gate small {
    color: #536d78;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.readiness-list {
    padding-top: 0;
}

.admin-audit-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0 16px 14px;
}

.admin-audit-list h3 {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--es-blue-dark);
    font-size: 13px;
}

.admin-audit-list article {
    display: grid;
    align-content: start;
    gap: 4px;
    min-height: 82px;
    padding: 11px 12px;
    border: 1px solid #dfe8ee;
    border-left: 4px solid var(--es-cyan);
    border-radius: 8px;
    background: #fbfcfd;
}

.admin-audit-list strong,
.admin-audit-list span,
.admin-audit-list small {
    overflow-wrap: anywhere;
}

.admin-audit-list strong {
    color: var(--es-blue-dark);
}

.admin-audit-list span,
.admin-audit-list small {
    color: var(--text-muted);
    font-size: 12px;
}

.readiness-gate {
    border-left: 4px solid var(--gate-color, var(--es-orange));
}

.readiness-gate--success {
    --gate-color: var(--es-green);
}

.readiness-gate--warning {
    --gate-color: var(--es-orange);
}

.admin-panel {
    min-width: 0;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

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

.admin-form label {
    display: grid;
    gap: 6px;
    color: #294652;
    font-size: 12px;
    font-weight: 850;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form .form-wide {
    grid-column: span 2;
}

.admin-form .check-label {
    grid-template-columns: 18px minmax(0, 1fr);
    grid-auto-flow: column;
    align-items: center;
    min-height: 40px;
}

.admin-form .check-label input {
    min-height: 16px;
    padding: 0;
}

.admin-form button {
    align-self: end;
}

.admin-list {
    display: grid;
}

.admin-list article {
    display: grid;
    gap: 2px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.admin-list article:last-child {
    border-bottom: 0;
}

.admin-list strong {
    color: var(--es-blue-dark);
}

.admin-list span,
.admin-list small {
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.workflow-board {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
}

.workflow-board article {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfd;
}

.workflow-title {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.workflow-board h3 {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    color: var(--es-blue-dark);
    font-size: 13px;
    flex: 1;
}

.workflow-board h3 span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.workflow-state {
    display: grid;
    place-content: center end;
    gap: 2px;
    padding: 8px 12px;
    text-align: right;
    white-space: nowrap;
}

.workflow-state strong {
    color: var(--es-red);
    font-size: 12px;
}

.workflow-state small,
.workflow-warnings span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 750;
}

.workflow-diagram {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.workflow-nodes,
.workflow-edges,
.workflow-coverage {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workflow-node,
.workflow-edge span,
.workflow-edge small,
.workflow-coverage span {
    min-height: 28px;
    padding: 6px 9px;
    border-radius: 6px;
    background: #eef3f6;
    color: #314d59;
    font-size: 12px;
    font-weight: 850;
}

.workflow-node--danger {
    color: var(--es-red);
    background: #ffe5ec;
}

.workflow-node--info {
    color: #0b5799;
    background: #e7f1ff;
}

.workflow-node--warning {
    color: #9a4a00;
    background: #ffe2c5;
}

.workflow-node--success {
    color: #147748;
    background: #e3f6ec;
}

.workflow-edge {
    display: grid;
    grid-template-columns: minmax(82px, 1fr) auto minmax(82px, 1fr) minmax(120px, 1.3fr);
    gap: 7px;
    align-items: center;
    width: 100%;
}

.workflow-edge b {
    color: var(--es-red);
}

.workflow-coverage {
    padding: 0 12px 12px;
}

.workflow-coverage span {
    background: #fbfcfd;
    border: 1px solid var(--border);
}

.workflow-warnings {
    display: grid;
    gap: 5px;
    padding: 0 12px 12px;
}

.workflow-warnings span {
    border-left: 3px solid var(--warning);
    padding-left: 8px;
}

.workflow-publish-form {
    display: flex;
    justify-content: flex-end;
    padding: 0 12px 12px;
}

.status-flow {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr) minmax(80px, auto);
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
}

.status-flow span,
.status-flow small {
    min-height: 26px;
    padding: 5px 8px;
    border-radius: 5px;
    background: #eef3f6;
    color: #314d59;
    font-size: 12px;
    font-weight: 800;
}

.status-flow b {
    color: var(--es-red);
}

.docs-main {
    max-width: 1460px;
}

.docs-topbar {
    grid-template-columns: minmax(260px, 1fr) auto;
}

.doc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: end;
    margin: 18px 0 16px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(1, 78, 102, 0.08), rgba(1, 164, 139, 0.08)),
        #fff;
    box-shadow: var(--shadow);
}

.doc-kicker {
    margin: 0 0 8px;
    color: var(--es-red);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.doc-hero h2,
.doc-article h2 {
    margin: 0;
    color: var(--es-blue-dark);
    line-height: 1.12;
}

.doc-hero h2 {
    max-width: 880px;
    font-size: 38px;
}

.doc-hero p:not(.doc-kicker),
.doc-verdict span,
.doc-article p,
.doc-article li {
    color: #415a66;
    font-size: 15px;
}

.doc-hero p:not(.doc-kicker) {
    max-width: 900px;
    margin: 14px 0 0;
}

.doc-verdict {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-left: 4px solid var(--es-green);
    background: rgba(255, 255, 255, 0.72);
}

.doc-verdict strong {
    color: var(--es-blue-dark);
    font-size: 14px;
}

.doc-downloads {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.doc-downloads a {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px 10px;
    min-height: 92px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    box-shadow: 0 10px 24px rgba(1, 47, 64, 0.045);
}

.doc-downloads a:hover {
    border-color: var(--border-strong);
    background: #f9fbfc;
    text-decoration: none;
}

.doc-downloads .icon {
    grid-row: span 2;
    color: var(--es-red);
}

.doc-downloads strong {
    color: var(--es-blue-dark);
    font-size: 14px;
}

.doc-downloads span {
    color: var(--text-muted);
    font-size: 12px;
}

.doc-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.doc-toc {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 24px rgba(1, 47, 64, 0.035);
}

.doc-toc a {
    padding: 8px 10px;
    border-radius: 6px;
    color: #294652;
    font-size: 13px;
    font-weight: 750;
}

.doc-toc a:hover {
    background: #f0f5f8;
    text-decoration: none;
}

.doc-article {
    display: grid;
    gap: 14px;
}

.doc-article section {
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 30px rgba(1, 47, 64, 0.04);
}

.doc-article h2 {
    font-size: 24px;
}

.doc-article p {
    max-width: 960px;
    margin: 12px 0 0;
}

.doc-article ul,
.doc-article ol {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding-left: 20px;
}

.doc-fact-grid,
.doc-system-map {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.doc-fact-grid,
.doc-system-map {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.doc-fact-grid div,
.doc-system-map div {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 132px;
    padding: 14px;
    border: 1px solid #dfe8ee;
    border-top: 4px solid var(--accent, var(--es-blue));
    border-radius: 8px;
    background: #fbfcfd;
}

.doc-fact-grid div:nth-child(2),
.doc-system-map div:nth-child(2) {
    --accent: var(--es-green);
}

.doc-fact-grid div:nth-child(3),
.doc-system-map div:nth-child(3) {
    --accent: var(--es-orange);
}

.doc-fact-grid div:nth-child(4),
.doc-system-map div:nth-child(4) {
    --accent: var(--es-cyan);
}

.doc-fact-grid strong,
.doc-system-map strong {
    color: var(--es-blue-dark);
    font-size: 14px;
}

.doc-fact-grid span,
.doc-system-map span {
    color: #4b6570;
    font-size: 13px;
}

.doc-sources {
    margin-bottom: 26px;
}

.mobile-section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 10px;
}

.mobile-section-title h2 {
    margin: 0;
    color: var(--es-blue-dark);
    font-size: 16px;
}

.mobile-section-title p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
}

.triage-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}

.triage-strip button {
    display: grid;
    gap: 4px;
    justify-items: start;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.triage-strip button:hover {
    background: #f8fbfc;
    text-decoration: none;
}

.triage-strip strong {
    color: var(--es-red);
    font-size: 24px;
    line-height: 1;
}

.triage-strip span {
    display: block;
    color: var(--es-blue-dark);
    font-weight: 850;
    overflow-wrap: anywhere;
}

.triage-strip small {
    color: var(--text-muted);
}

.mobile-task-list {
    display: grid;
}

.empty-state {
    padding: 24px 18px;
}

.empty-state h3 {
    margin: 0 0 6px;
    color: var(--es-blue-dark);
}

.empty-state p {
    margin: 0;
    color: var(--text-muted);
}

.empty-state--filtered {
    border-bottom: 1px solid var(--border);
}

.empty-state--filtered button {
    margin-top: 14px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fbfc;
    color: var(--es-blue-dark);
    font-weight: 850;
}

.mobile-task-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: white;
}

.mobile-task-card.is-selected {
    box-shadow: inset 3px 0 0 var(--es-red);
    background: #fff8fa;
}

.mobile-task-card > div,
.mobile-task-card footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.mobile-task-card h3,
.mobile-task-card p {
    margin: 0;
}

.mobile-task-card h3 {
    color: var(--es-blue-dark);
    font-size: 15px;
}

.mobile-task-card p {
    color: var(--text-muted);
}

.owner-line {
    color: #38515d;
    font-size: 12px;
    font-weight: 750;
}

.source-label {
    color: var(--es-blue);
    font-size: 12px;
    font-weight: 850;
}

.process-radar {
    min-width: 0;
}

.process-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.process-list article {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.process-list article:nth-child(even) {
    border-right: 0;
}

.process-list h3 {
    margin: 0 0 10px;
    color: var(--es-blue-dark);
    font-size: 14px;
}

.process-list dl {
    display: grid;
    gap: 7px;
    margin: 0;
}

.process-list div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px;
}

.process-list dt,
.process-list dd {
    margin: 0;
    font-size: 12px;
}

.process-list dt {
    color: var(--text-muted);
    font-weight: 850;
}

.process-list dd {
    color: #25424f;
}

.district-panel .panel-header button {
    padding: 0 10px;
}

.map-card {
    position: relative;
    height: 218px;
    margin: 14px;
    overflow: hidden;
    border: 1px solid #dce5ec;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(128, 206, 245, 0.42), transparent 42%),
        linear-gradient(35deg, rgba(1, 164, 139, 0.16), transparent 55%),
        #eef4f6;
}

.map-card::before,
.map-card::after {
    content: "";
    position: absolute;
    inset: 26px -20px auto;
    height: 1px;
    background: rgba(1, 78, 102, 0.14);
    box-shadow: 0 42px 0 rgba(1, 78, 102, 0.14), 0 84px 0 rgba(1, 78, 102, 0.14), 0 126px 0 rgba(1, 78, 102, 0.14);
    transform: rotate(-16deg);
}

.map-card::after {
    transform: rotate(28deg);
}

.map-shape {
    position: absolute;
    border: 2px solid rgba(1, 78, 102, 0.12);
    border-radius: 44% 56% 52% 48%;
    opacity: 0.75;
}

.map-shape--one {
    inset: 28px 86px 70px 38px;
    background: rgba(228, 1, 70, 0.12);
}

.map-shape--two {
    inset: 90px 36px 24px 112px;
    background: rgba(1, 164, 139, 0.14);
}

.map-shape--three {
    inset: 30px 26px 112px 150px;
    background: rgba(128, 206, 245, 0.35);
}

.map-pin {
    position: absolute;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    background: var(--es-red);
    box-shadow: 0 4px 12px rgba(0, 39, 51, 0.2);
    font-size: 11px;
    font-weight: 850;
}

.pin-one { left: 74px; top: 70px; }
.pin-two { right: 78px; top: 114px; background: var(--es-green); }
.pin-three { right: 48px; top: 46px; background: #2980bf; }

.map-label {
    position: absolute;
    left: 50%;
    top: 51%;
    transform: translate(-50%, -50%);
    color: rgba(0, 39, 51, 0.34);
    font-size: 20px;
    font-weight: 850;
}

.district-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 10px;
    margin: 0 14px 14px;
    padding: 0;
    list-style: none;
}

.district-list li {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    color: #38515d;
    font-size: 12px;
}

.legend {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8fa0aa;
}

.legend--danger { background: var(--es-red); }
.legend--warning { background: var(--es-orange); }
.legend--info { background: #2980bf; }
.legend--success { background: var(--es-green); }

.signals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    align-items: start;
    gap: 10px;
    margin-top: 0;
}

.signals article {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 74px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
}

.signals strong {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    color: var(--es-red);
    font-size: 20px;
}

.signals h2 {
    font-size: 15px;
}

.signals p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.mobile-preview {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 25;
    pointer-events: none;
}

.phone {
    width: 220px;
    height: 410px;
    border: 10px solid #17222a;
    border-radius: 34px;
    overflow: hidden;
    background: white;
    box-shadow: 0 24px 60px rgba(0, 39, 51, 0.3);
}

.phone header {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

.phone button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
}

.phone header strong {
    color: var(--es-blue-dark);
    font-size: 12px;
    line-height: 1.05;
}

.phone header strong span {
    display: block;
    color: var(--es-red);
}

.phone .avatar {
    width: 28px;
    height: 28px;
    font-size: 10px;
}

.phone section {
    height: 292px;
    padding: 12px 10px;
    overflow: hidden;
}

.phone h2 {
    margin: 0 0 10px;
    color: var(--es-blue-dark);
    font-size: 13px;
}

.phone-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 14px;
}

.phone-metrics article,
.phone-task {
    border: 1px solid #e7edf1;
    border-radius: 6px;
    background: #fbfcfd;
}

.phone-metrics article {
    min-height: 50px;
    padding: 6px 4px;
}

.phone-metrics small {
    display: block;
    color: var(--text-muted);
    font-size: 7px;
    font-weight: 750;
}

.phone-metrics strong {
    display: block;
    color: var(--es-red);
    font-size: 16px;
}

.phone h3 {
    margin: 0 0 8px;
    color: #203945;
    font-size: 12px;
}

.phone h3 span {
    color: var(--text-muted);
}

.phone-task {
    display: grid;
    gap: 2px;
    padding: 7px;
    margin-bottom: 6px;
}

.phone-task small,
.phone-task p {
    margin: 0;
    color: var(--text-muted);
    font-size: 9px;
}

.phone-task strong {
    color: #213b47;
    font-size: 10px;
}

.phone-task div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.phone .status {
    min-width: 52px;
    min-height: 18px;
    font-size: 8px;
}

.phone nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 42px;
    border-top: 1px solid var(--border);
}

.phone nav a {
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 800;
}

.phone nav .icon {
    width: 14px;
    height: 14px;
}

.phone nav a.is-active {
    color: var(--es-red);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 50;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    background: var(--es-blue-dark);
    box-shadow: 0 16px 44px rgba(0, 39, 51, 0.24);
    font-weight: 800;
}

.sidebar-collapsed .sidebar {
    width: 80px;
    padding-left: 10px;
    padding-right: 10px;
}

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

.sidebar-collapsed .brand {
    grid-template-columns: 44px;
}

.sidebar-collapsed .brand img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    object-position: left center;
}

.sidebar-collapsed .brand div,
.sidebar-collapsed .nav-heading,
.sidebar-collapsed .nav-item span,
.sidebar-collapsed .nav-item,
.sidebar-collapsed .collapse-button {
    overflow: hidden;
}

@media (max-width: 1480px) {
    .mobile-preview {
        display: none;
    }
}

@media (max-width: 1250px) {
    .content-grid,
    .lower-grid {
        grid-template-columns: 1fr;
    }

    .content-column {
        display: contents;
    }

    .detail-panel {
        grid-column: auto;
        position: static;
    }

    .queue-panel,
    .task-form-panel,
    .lower-grid {
        grid-column: auto;
    }

    .queue-panel {
        order: 1;
    }

    .detail-panel {
        order: 2;
    }

    .task-form-panel {
        order: 3;
    }

    .lower-grid {
        order: 4;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .metric-card {
        border-bottom: 1px solid var(--border);
    }

    .metric-card:nth-child(2n) {
        border-right: 0;
    }
}

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

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(88vw, 340px);
        max-width: calc(100vw - 48px);
        transform: translateX(-104%);
        transition: transform 0.2s ease;
        box-shadow: 20px 0 54px rgba(0, 39, 51, 0.22);
    }

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

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 15;
        display: block;
        border: 0;
        opacity: 0;
        pointer-events: none;
        background: rgba(6, 27, 38, 0.42);
        transition: opacity 0.18s ease;
    }

    .sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .main {
        padding: 14px;
    }

    input,
    select,
    textarea,
    .collaboration-panel select,
    .note-form textarea {
        font-size: 16px;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 14;
        grid-template-columns: 44px minmax(0, 1fr) 42px;
        gap: 12px;
        min-height: 0;
        margin: -14px -14px 16px;
        padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
        border-bottom: 1px solid rgba(199, 209, 217, 0.78);
        background: rgba(246, 248, 250, 0.94);
        box-shadow: 0 14px 34px rgba(1, 47, 64, 0.11);
        backdrop-filter: blur(18px);
    }

    .menu-button {
        display: inline-grid;
        position: static;
        grid-column: 1;
        grid-row: 1;
        width: 44px;
        min-height: 44px;
        align-self: center;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 10px 24px rgba(0, 39, 51, 0.12);
    }

    .mobile-header-brand {
        display: flex;
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        justify-content: center;
        min-width: 0;
    }

    .mobile-header-brand img {
        width: min(148px, 100%);
        height: auto;
        display: block;
    }

    .mobile-header-profile {
        display: grid;
        grid-column: 3;
        grid-row: 1;
        place-items: center;
        align-self: center;
    }

    .mobile-header-profile span {
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        color: white;
        background: linear-gradient(135deg, var(--es-blue), var(--es-green));
        box-shadow: 0 12px 26px rgba(1, 78, 102, 0.22);
        font-weight: 900;
    }

    .product-title {
        display: none;
    }

    .topbar > .search,
    .topbar > .top-actions {
        display: none;
    }

    .mobile-actionbar {
        display: grid;
        gap: 10px;
        margin: 0 0 14px;
    }

    .mobile-actionbar .text-button {
        width: 100%;
        min-height: 42px;
        justify-content: center;
        border-color: transparent;
        background: white;
        box-shadow: 0 8px 22px rgba(12, 48, 60, 0.04);
    }

    .triage-strip {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .profile {
        min-width: 0;
    }

    #priority-queue,
    #detail,
    #new-task {
        scroll-margin-top: 84px;
    }

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

    .ops-grid,
    .readiness-list,
    .admin-audit-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .docs-topbar {
        grid-template-columns: 44px minmax(0, 1fr) 42px;
    }

    .doc-hero {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 0;
        padding: 20px;
    }

    .doc-hero h2 {
        font-size: 28px;
    }

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

    .doc-layout {
        grid-template-columns: 1fr;
    }

    .doc-toc {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .doc-fact-grid,
    .doc-system-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body {
        font-size: 13px;
    }

    .product-title h1 {
        font-size: 20px;
    }

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

    .task-form {
        grid-template-columns: 1fr;
    }

    .task-form .form-wide,
    .custom-field-grid,
    .admin-form .form-wide {
        grid-column: auto;
    }

    .admin-grid,
    .admin-form,
    .admin-form--compact,
    .ops-grid,
    .readiness-list,
    .admin-audit-list {
        grid-template-columns: 1fr;
    }

    .doc-downloads,
    .doc-toc,
    .doc-fact-grid,
    .doc-system-map {
        grid-template-columns: 1fr;
    }

    .doc-article section {
        padding: 18px;
    }

    .doc-article h2 {
        font-size: 21px;
    }

    .status-flow {
        grid-template-columns: 1fr auto 1fr;
    }

    .status-flow small {
        grid-column: 1 / -1;
    }

    .workflow-edge {
        grid-template-columns: 1fr auto 1fr;
    }

    .workflow-edge small {
        grid-column: 1 / -1;
    }

    .workflow-title {
        display: grid;
    }

    .workflow-state {
        place-content: start;
        text-align: left;
        padding-top: 0;
    }

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

    .metric-card {
        border-right: 0;
    }

    .metric-card:nth-child(odd) {
        border-right: 1px solid var(--border);
    }

    .filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .filters button {
        flex: 0 0 auto;
    }

    .view-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
        padding-bottom: 0;
    }

    .view-tabs button {
        width: 100%;
        min-width: 0;
        justify-content: space-between;
        white-space: normal;
        text-align: left;
        line-height: 1.15;
        padding: 7px 10px;
    }

    .view-tabs span {
        flex: 0 0 auto;
    }

    .top-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        gap: 8px;
    }

    .search kbd {
        display: none;
    }

    .top-actions .text-button {
        width: auto;
        justify-content: center;
    }

    .top-actions .profile {
        grid-template-columns: 38px;
        min-width: 38px;
        justify-self: end;
    }

    .top-actions .profile div {
        display: none;
    }

    .filters button,
    .outline-button,
    .danger-button {
        width: 100%;
        justify-content: center;
    }

    .tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-list div,
    .signals article {
        grid-template-columns: 1fr;
    }

    .mobile-section-title {
        display: block;
    }

    .triage-strip {
        display: grid;
        grid-template-columns: 1fr;
    }

    .triage-strip button {
        min-width: 0;
    }

    .action-stack {
        grid-template-columns: 1fr;
    }

    .process-list {
        grid-template-columns: 1fr;
    }

    .process-list article {
        border-right: 0;
    }

    .lanes {
        grid-template-columns: repeat(4, 78vw);
    }

    .district-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
