:root {
    --bg: #f5f7f6;
    --surface: #ffffff;
    --ink: #17231f;
    --muted: #68756f;
    --line: #d8e1dd;
    --green: #0b6b4f;
    --green-2: #084d3a;
    --amber: #c98313;
    --blue: #2767a3;
    --danger: #a33a32;
    --shadow: 0 12px 32px rgba(25, 43, 35, .07);
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
}

img,
svg,
canvas,
video,
iframe {
    max-width: 100%;
}

.content,
.panel,
.metric,
.topbar,
.topbar-title,
.topbar-controls,
.form-grid,
.inline-form,
.section-head,
.two-col,
.dashboard-board,
.metric-grid,
.role-metrics,
.frontend-grid,
.routine-layout,
.live-chat-console-grid,
.profile-form,
.profile-field-grid {
    min-width: 0;
}

.app-shell {
    display: block;
    min-height: 100vh;
    padding-top: 82px;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    min-height: 82px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, .78);
    color: var(--ink);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    border-bottom: 1px solid rgba(216, 225, 221, .72);
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 18px 42px rgba(21, 43, 34, .08);
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    padding: 0;
    text-decoration: none;
}

.coat-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 8px 13px rgba(0, 0, 0, .14));
}

.logo strong {
    color: var(--green-2);
    font-size: 25px;
    line-height: 1;
    white-space: nowrap;
}

.logo small {
    display: block;
    margin-top: 5px;
    color: var(--green);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
}

.sidebar nav {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
    overflow-x: auto;
    overflow-y: visible;
    padding: 3px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(242, 193, 78, .86) rgba(255, 255, 255, .36);
}

.sidebar nav::-webkit-scrollbar {
    height: 12px;
}

.sidebar nav::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, .34);
    box-shadow: inset 0 0 0 1px rgba(242, 193, 78, .18);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.sidebar nav::-webkit-scrollbar-thumb {
    border: 3px solid rgba(255, 255, 255, .44);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 238, 162, .92), rgba(242, 193, 78, .86));
    box-shadow:
        0 5px 14px rgba(194, 136, 10, .2),
        inset 0 1px 0 rgba(255, 255, 255, .78);
}

.sidebar nav::-webkit-scrollbar-thumb:hover {
    background:
        linear-gradient(180deg, rgba(255, 244, 188, .98), rgba(233, 171, 34, .92));
}

.sidebar nav a,
.nav-group-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 8px;
    border: 0;
    color: var(--green-2);
    background: transparent;
    text-decoration: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}

.nav-group {
    position: relative;
    flex: 0 0 auto;
}

.nav-submenu {
    display: none;
}

.nav-group-trigger::after {
    content: "⌄";
    margin-left: 2px;
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
}

.nav-group:hover .nav-group-trigger::after,
.nav-group:focus-within .nav-group-trigger::after {
    transform: rotate(180deg);
}

.nav-submenu.is-floating {
    display: block;
    position: fixed;
    z-index: 2400;
    min-width: 220px;
    padding: 8px;
    border: 1px solid rgba(216, 225, 221, .86);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 42px rgba(21, 43, 34, .14);
}

.nav-submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--green-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    width: 100%;
}

.nav-submenu a:hover,
.nav-submenu a.active {
    background: rgba(11, 107, 79, .11);
    color: var(--green-2);
}

.sidebar nav a:hover,
.sidebar nav a.active,
.nav-group-trigger:hover,
.nav-group.active .nav-group-trigger {
    background: rgba(11, 107, 79, .11);
    color: var(--green-2);
    box-shadow:
        inset 0 0 0 1px rgba(11, 107, 79, .12),
        0 8px 22px rgba(11, 107, 79, .09);
}

.nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #b91c1c;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border: 1px solid rgba(11, 107, 79, .18);
    border-radius: 7px;
    color: var(--green);
    font-weight: 900;
    background: rgba(255, 255, 255, .64);
}

.sidebar-user {
    display: grid;
    grid-template-columns: 34px minmax(118px, 1fr) auto;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    margin-top: 0;
    padding: 9px 10px;
    border: 1px solid rgba(216, 225, 221, .82);
    border-radius: 8px;
    background: rgba(255, 255, 255, .58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}

.sidebar-user .avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f2fff8;
    color: var(--green);
    font-weight: 900;
    object-fit: cover;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user strong,
.sidebar-user a {
    color: var(--green-2);
}

.profile-link {
    color: inherit;
    text-decoration: none;
}

.sidebar-user small {
    color: var(--green);
}

.sidebar-user a {
    text-decoration: none;
    font-weight: 900;
}

.content {
    padding: 0 24px 24px;
    min-width: 0;
    max-width: 100vw;
}

.embedded-tool-content {
    height: calc(100vh - 82px);
    padding: 0;
    overflow: hidden;
}

.topbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 118px;
    margin: 0 -24px 10px;
    padding: 18px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.topbar h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
}

.topbar-title {
    width: min(980px, 100%);
    margin: 0 auto;
}

.hamburger {
    display: none;
    gap: 4px;
    width: 36px;
    height: 36px;
    padding: 9px;
    flex: 0 0 auto;
    border: 1px solid rgba(11, 107, 79, .16);
    background: rgba(255, 255, 255, .62);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .78),
        0 8px 20px rgba(11, 107, 79, .08);
}

.hamburger span {
    height: 2px;
    background: var(--green-2);
    border-radius: 2px;
}

.topbar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.topbar-control-form {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.topbar-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #252f2a;
    white-space: nowrap;
    margin: 0;
    min-height: 42px;
}

.topbar-controls select,
.topbar-controls input {
    width: 170px;
    min-height: 42px;
    background: #fff;
}

.topbar-controls input {
    width: min(240px, 24vw);
}

.topbar-controls .button {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.sync-row {
    margin: 0 0 12px;
    color: var(--muted);
    text-align: right;
    font-size: 13px;
}

.portal-footer {
    margin-top: 28px;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.portal-footer span {
    display: block;
    max-width: 1180px;
}

.portal-footer nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.portal-footer a {
    color: var(--green);
    font-weight: 800;
    text-decoration: none;
}

.site-content-page,
.contact-form-panel {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr);
    gap: 18px;
    align-items: start;
}

.contact-layout .site-content-page,
.contact-layout .contact-form-panel {
    width: 100%;
    max-width: none;
    margin: 0;
}

.site-content-page .panel-head {
    align-items: flex-start;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.site-content-body {
    max-width: 860px;
    margin: 0 auto;
    color: var(--text);
    line-height: 1.65;
    font-size: 15px;
}

.site-content-body p {
    margin: 0 0 12px;
}

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

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

.site-settings-form textarea {
    min-height: 150px;
    resize: vertical;
}

.site-settings-form .wide-field,
.site-settings-form .form-actions {
    grid-column: 1 / -1;
}

.site-settings-form h3 {
    margin: 8px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--green);
    font-size: 15px;
}

.smtp-test-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(320px, 1.25fr);
    gap: 16px;
    align-items: end;
}

.smtp-test-panel h3 {
    margin: 0 0 4px;
    color: var(--green);
    font-size: 15px;
}

.smtp-test-panel p {
    margin: 0;
    color: var(--muted);
}

.smtp-test-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.reminder-panel .panel-head {
    align-items: flex-start;
}

.reminder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.reminder-form {
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfa;
}

.user-session-revoke-form {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 0;
}

.transmission-version-panel .nmsp-version-tools {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(420px, 1fr);
    gap: 14px 16px;
    align-items: stretch;
}

.transmission-version-panel .inline-form,
.transmission-import-card {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfc;
}

.transmission-version-panel .inline-form {
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: end;
}

.transmission-version-panel .version-create-form {
    grid-template-columns: minmax(180px, 1fr) 120px minmax(220px, 1fr) auto;
}

.transmission-import-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto minmax(320px, 520px);
    gap: 12px;
    align-items: center;
}

.transmission-import-card strong,
.transmission-import-card span {
    display: block;
}

.transmission-import-card span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.transmission-import-card .transmission-import-form {
    padding: 0;
    border: 0;
    background: transparent;
    grid-template-columns: minmax(180px, 1fr) auto;
}

.collapsible-panel {
    padding-top: 0;
}

.collapsible-summary {
    cursor: pointer;
    list-style: none;
    padding-top: 18px;
}

.collapsible-summary::-webkit-details-marker {
    display: none;
}

.collapsible-summary::after {
    content: "Show";
    margin-left: auto;
    color: var(--green);
    font-weight: 800;
}

.collapsible-panel[open] .collapsible-summary::after {
    content: "Hide";
}

.threshold-panel .table-wrap {
    margin-top: 12px;
}

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

.contact-form textarea {
    min-height: 160px;
    resize: vertical;
}

.contact-form .wide-field,
.contact-form .form-actions {
    grid-column: 1 / -1;
}

.messages-layout {
    display: grid;
    grid-template-columns: 210px minmax(260px, 360px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.message-section-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
}

.message-section-tabs a {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--green-2);
    font-weight: 900;
    text-decoration: none;
}

.message-section-tabs a.active {
    border-color: #b8d7cc;
    background: #eaf6f1;
    box-shadow: inset 0 -3px 0 var(--green);
}

[data-messages-shell].is-loading {
    opacity: .62;
    pointer-events: none;
}

.messages-sidebar {
    position: sticky;
    top: 104px;
    display: grid;
    gap: 8px;
}

.messages-sidebar h2 {
    margin: 0 0 6px;
}

.messages-sidebar a,
.message-list-item {
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.messages-sidebar a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    color: var(--green-2);
    font-weight: 900;
}

.messages-sidebar a.active,
.message-list-item.active {
    border-color: #b8d7cc;
    background: #eaf6f1;
    box-shadow: inset 3px 0 0 var(--green);
}

.messages-sidebar strong {
    min-width: 28px;
    border-radius: 999px;
    padding: 3px 8px;
    text-align: center;
    background: #f3f7f5;
    color: var(--ink);
}

.messages-list,
.messages-detail {
    min-height: 560px;
}

.message-list-items {
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 230px);
    overflow-y: auto;
    padding-right: 4px;
}

.message-list-item {
    display: grid;
    gap: 4px;
    padding: 12px;
}

.message-list-item strong,
.message-list-item span,
.message-list-item small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-list-item strong {
    color: var(--ink);
}

.message-list-item span,
.message-list-item small {
    color: var(--muted);
}

.message-list-item.unread strong::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--amber);
}

.message-detail-head {
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
    padding-bottom: 12px;
}

.message-detail-head h2 {
    margin: 0 0 6px;
    overflow-wrap: anywhere;
}

.message-body {
    min-height: 120px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7faf9;
    white-space: normal;
    overflow-wrap: anywhere;
}

.mailbox-html-preview {
    width: 100%;
    min-height: 420px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.message-reply-block {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.message-reply-block h3 {
    margin: 0 0 10px;
}

.message-reply-form {
    margin-top: 14px;
}

.message-reply-form textarea {
    min-height: 180px;
    resize: vertical;
}

.message-move-form {
    margin-top: 12px;
}

.message-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.message-action-row .message-move-form {
    margin-top: 0;
}

.live-chat-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 60;
}

.live-chat-toggle {
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-weight: 900;
    padding: 12px 16px;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.live-chat-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #5dff26;
    box-shadow: 0 0 0 4px rgba(93, 255, 38, .18);
}

.live-chat-window {
    display: none;
    width: min(360px, calc(100vw - 32px));
    max-height: min(620px, calc(100vh - 110px));
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    flex-direction: column;
}

.live-chat-widget.open .live-chat-window {
    display: flex;
    flex-direction: column;
}

.live-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    background: #eef8f4;
    border-bottom: 1px solid var(--line);
}

.live-chat-head small {
    display: block;
}

.live-chat-support-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px;
    border-bottom: 1px solid var(--line);
}

.live-chat-support-list button,
.live-chat-console-list button {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}

.live-chat-support-list button.active,
.live-chat-console-list button.active {
    border-color: var(--green);
    background: #eef8f4;
}

.live-chat-messages {
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 220px;
    height: 360px;
    max-height: min(360px, calc(100vh - 260px));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.live-chat-message {
    max-width: 86%;
    align-self: flex-start;
    background: #f4f7f6;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
}

.live-chat-message.mine {
    align-self: flex-end;
    background: #e4f4ed;
    border-color: #b9dcc0;
}

.live-chat-message p {
    margin: 4px 0;
    line-height: 1.45;
}

.live-chat-message small {
    font-size: 11px;
}

.live-chat-empty {
    color: var(--muted);
    text-align: center;
    padding: 20px;
}

.live-chat-form {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.live-chat-form textarea {
    flex: 1;
    min-height: 42px;
    resize: vertical;
}

.live-chat-send-status {
    flex: 1 0 100%;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
}

.live-chat-console-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 16px;
}

.live-chat-console-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 640px;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.live-chat-console-list button strong,
.live-chat-console-list button small,
.live-chat-console-list button span {
    display: block;
}

.live-chat-console-list button span {
    margin-top: 4px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-chat-console-thread {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    min-height: 640px;
    max-height: calc(100vh - 240px);
    flex-direction: column;
}

.live-chat-console-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
}

.console-messages {
    min-height: 0;
    height: auto;
    max-height: none;
    flex: 1 1 auto;
}

.topbar p,
.muted,
.hint,
small {
    margin: 4px 0 0;
    color: var(--muted);
}

.panel,
.metric,
.login-panel,
.install-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 16px;
    margin-bottom: 0;
}

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

.panel h2 {
    font-size: 17px;
    line-height: 1.25;
}

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

.panel-head h2 {
    margin: 0;
}

.panel-head a,
.panel-link {
    color: var(--green);
    font-weight: 800;
    text-decoration: none;
}

.budget-viz-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
}

.external-tool-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
}

.embedded-tool-content .budget-viz-panel,
.embedded-tool-content .external-tool-panel {
    height: 100%;
    margin: 0;
    padding: 14px 20px 20px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.budget-viz-frame-wrap {
    width: 100%;
    min-height: 0;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.external-tool-frame-wrap {
    width: 100%;
    min-height: 0;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.budget-viz-frame {
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
    transform: none;
    background: #fff;
}

.external-tool-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.nmsp-plan-years {
    font-weight: 900;
    color: var(--green-2);
}

.section-head,
.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
}

.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

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

.dashboard-board {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.dashboard-hero {
    margin-bottom: 16px;
}

.dashboard-role-metrics .metric {
    min-height: 118px;
}

.dashboard-insights-card {
    display: grid;
    align-content: start;
    gap: 12px;
}

.dashboard-insight-list {
    display: grid;
    gap: 10px;
}

.dashboard-insight-list a {
    display: grid;
    gap: 5px;
    padding: 13px 14px;
    border: 1px solid rgba(11, 107, 79, .14);
    border-radius: 8px;
    background: rgba(247, 251, 249, .82);
    color: inherit;
    text-decoration: none;
}

.dashboard-insight-list a:hover {
    border-color: rgba(11, 107, 79, .32);
    box-shadow: 0 10px 22px rgba(11, 107, 79, .08);
}

.dashboard-insight-list span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dashboard-insight-list strong {
    color: var(--green-2);
    font-size: 18px;
    line-height: 1.15;
}

.dashboard-insight-list small {
    color: #5b6b64;
    font-size: 12px;
    line-height: 1.35;
}

.role-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 24px;
    border: 1px solid rgba(216, 225, 221, .84);
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .72)),
        radial-gradient(circle at 8% 20%, rgba(242, 193, 78, .2), transparent 24%),
        radial-gradient(circle at 88% 50%, rgba(11, 107, 79, .14), transparent 30%);
    box-shadow: var(--shadow);
}

.role-hero h2 {
    margin: 0 0 8px;
    color: var(--green-2);
    font-size: 28px;
    line-height: 1.15;
}

.role-hero p {
    max-width: 760px;
    margin: 0;
    color: #4d5f57;
}

.role-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.frontend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.frontend-grid .panel:first-child {
    grid-column: 1 / -1;
}

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

.action-tiles a {
    min-height: 124px;
    padding: 16px;
    border: 1px solid rgba(11, 107, 79, .14);
    border-radius: 8px;
    background: rgba(247, 251, 249, .86);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.action-tiles a:hover {
    transform: translateY(-2px);
    border-color: rgba(11, 107, 79, .28);
    box-shadow: 0 12px 28px rgba(11, 107, 79, .08);
}

.action-tiles strong {
    display: block;
    color: var(--green-2);
    font-size: 16px;
    margin-bottom: 8px;
}

.action-tiles span {
    color: var(--muted);
    font-size: 13px;
}

.routine-card {
    grid-column: span 1;
}

.mop-objective-grid .objective-card {
    text-decoration: none;
    align-content: center;
    gap: 18px;
    min-height: 260px;
    padding: 24px 18px;
}

.mop-objective-grid .objective-card small {
    max-width: 34ch;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.38;
    white-space: normal;
}

.mop-year-filter {
    margin: 14px 0 18px;
    align-items: start;
}

.mop-year-filter .mop-total-lite {
    grid-column: span 2;
}

.mop-version-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.mop-version-publish-form,
.mop-version-status-form,
.mop-version-clear-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.mop-version-status-form label {
    min-width: 220px;
}

.mop-version-actions .button {
    min-height: 38px;
    padding: 9px 14px;
    font-size: 14px;
    border-radius: 7px;
    white-space: nowrap;
}

.mop-version-status-form select {
    min-height: 38px;
    padding: 8px 36px 8px 12px;
    font-size: 14px;
}

.mop-entry-row td {
    background: #eef8f5 !important;
}

.mop-sub-entry-row td {
    background: #f8fffb !important;
}

.mop-sub-entry-row td:first-child,
.mop-sub-entry-row td:nth-child(2) {
    padding-left: 28px;
}

.mop-entry-row small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.mop-matrix-table {
    table-layout: fixed;
    min-width: 1180px;
}

.mop-matrix-table th:first-child,
.mop-matrix-table td:first-child {
    width: 140px;
}

.mop-matrix-table th:nth-child(2),
.mop-matrix-table td:nth-child(2) {
    width: 140px;
}

.mop-matrix-table th:nth-child(4),
.mop-matrix-table td:nth-child(4) {
    width: 180px;
}

.mop-matrix-table th:last-child,
.mop-matrix-table td:last-child {
    width: 220px;
}

.mop-actions-cell {
    padding: 12px !important;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
}

.mop-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.metric-lite {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, .68);
}

.metric-lite strong {
    margin-left: 6px;
    color: var(--green-2);
}

.mop-total-lite {
    display: grid;
    grid-template-columns: minmax(130px, auto) minmax(220px, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 56px;
    padding: 12px 16px;
}

.mop-total-lite span {
    line-height: 1.25;
}

.mop-total-lite strong,
.mop-total-lite [data-mop-total] {
    margin-left: 0;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.2;
}

.mop-matrix-table .mop-add-btn {
    width: 100%;
    max-width: 190px;
    min-height: 42px;
    padding: 10px 12px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.15;
    background: #07878b;
    color: #fff;
}

.mop-actions .inline-delete-form {
    display: inline-flex;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 24, 39, .48);
    overflow-y: auto;
}

.modal-backdrop.active {
    display: flex;
}

.modal-card {
    display: flex;
    flex-direction: column;
    width: min(820px, 100%);
    max-height: calc(100vh - 48px);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
    overflow: hidden;
}

.mop-modal .modal-card {
    width: min(1500px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
}

.resource-modal .modal-card {
    width: min(520px, 100%);
}

.staff-modal .modal-card {
    width: min(760px, calc(100vw - 32px));
}

.modal-head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 {
    margin: 0;
}

.modal-close {
    padding: 0;
    background: transparent;
    color: #6b7280;
    font-size: 28px;
    line-height: 1;
}

.mop-modal-form {
    min-height: 0;
    padding: 22px 26px 26px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.mop-modal-form > .button.primary[type="submit"] {
    position: sticky;
    bottom: 0;
    z-index: 2;
    grid-column: 1 / -1;
    width: min(340px, 100%);
    margin-top: 8px;
    box-shadow: 0 -10px 24px rgba(255, 255, 255, .9);
}

.resource-modal-form {
    padding: 18px 22px 22px;
    overflow-y: auto;
}

.resource-fieldset {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
}

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

.mop-modal-form .is-hidden,
.form-grid .is-hidden {
    display: none;
}

.timeframe-box {
    display: grid;
    grid-template-columns: repeat(4, max-content);
    gap: 12px 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.timeframe-box legend {
    padding: 0 6px;
    font-weight: 800;
}

.mop-cost-builder {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfefd;
}

.mop-modal-form .mop-cost-builder {
    grid-column: 1 / -1;
}

.mop-modal-form [data-mop-title-label] {
    grid-column: 1 / -1;
}

.mop-modal-form [data-mop-source-field] {
    grid-column: span 2;
}

.mop-cost-builder-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.mop-cost-builder h3,
.mop-cost-builder p {
    margin: 0;
}

.mop-cost-builder p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.mop-cost-rows {
    display: grid;
    gap: 12px;
}

.mop-cost-row {
    display: grid;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.mop-cost-main,
.mop-cost-quantity {
    display: grid;
    gap: 12px;
    align-items: end;
}

.mop-cost-main {
    grid-template-columns: minmax(240px, 1.4fr) minmax(220px, 1fr) minmax(160px, .8fr) minmax(170px, .8fr);
}

.mop-cost-quantity {
    grid-template-columns: repeat(4, minmax(150px, 1fr)) 42px;
}

.mop-cost-row label,
.mop-cost-main,
.mop-cost-quantity {
    min-width: 0;
}

.mop-cost-row input,
.mop-cost-row select {
    min-width: 0;
}

.mop-cost-remove {
    align-self: end;
}

.mop-options-panel summary {
    cursor: pointer;
    color: var(--green-2);
    font-weight: 900;
}

.mop-options-grid {
    display: grid;
    gap: 18px;
    margin-top: 14px;
}

.mop-option-group {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}

.mop-option-group h3 {
    margin: 0;
    color: var(--green-2);
    font-size: 16px;
}

.mop-option-list {
    display: grid;
    gap: 8px;
}

.mop-option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.mop-option-delete {
    align-self: stretch;
}

.mop-option-delete .button {
    height: 100%;
}

.routine-layout {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.routine-filter-toolbar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.routine-layout.filters-collapsed {
    grid-template-columns: minmax(0, 1fr);
}

.routine-layout.filters-collapsed .routine-sidebar {
    display: none;
}

.routine-layout.filters-collapsed .routine-main {
    grid-column: 1 / -1;
}

.routine-sidebar {
    position: sticky;
    top: 96px;
    height: auto;
    max-height: none;
    overflow: visible;
}

.routine-sidebar h2 {
    margin-bottom: 8px;
    font-size: 22px;
}

.routine-filter-form,
.routine-catalogue {
    display: grid;
    gap: 12px;
}

.routine-filter-form label {
    display: grid;
    gap: 6px;
    color: var(--green-2);
    font-weight: 900;
}

.routine-filter-form select {
    width: 100%;
}

.routine-org-picker {
    display: grid;
    gap: 12px;
}

.routine-org-picker h3,
.routine-period-picker h3 {
    margin: 0;
    color: #1f2937;
    font-size: 18px;
}

.routine-period-picker {
    display: grid;
    gap: 12px;
}

.routine-period-picker label {
    display: grid;
    gap: 7px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 800;
}

.routine-multi-dropdown {
    position: relative;
    width: 100%;
}

.routine-multi-dropdown summary {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.routine-multi-dropdown summary::-webkit-details-marker {
    display: none;
}

.routine-multi-dropdown summary::after {
    content: "⌄";
    float: right;
    color: var(--muted);
}

.routine-multi-menu {
    position: absolute;
    z-index: 30;
    display: grid;
    gap: 4px;
    width: 100%;
    max-height: 240px;
    overflow: auto;
    margin-top: 4px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
}

.routine-multi-menu label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 7px;
    color: #20252c;
    cursor: pointer;
    font-weight: 800;
}

.routine-multi-menu label:has(input:checked) {
    background: #e9f5ef;
    color: var(--green-2);
}

.routine-multi-menu input {
    width: 15px;
    height: 15px;
    accent-color: #008578;
}

.routine-org-scope {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
    background: #f3f5f7;
}

.routine-org-scope label {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #1f2937;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
}

.routine-org-scope input,
.routine-org-row input {
    width: 18px;
    height: 18px;
    accent-color: #008578;
}

.routine-org-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.routine-org-row input:checked {
    box-shadow: none;
}

.routine-org-tree {
    max-height: 430px;
    overflow: auto;
    padding: 7px 4px 7px 8px;
    border-left: 1px solid #d0d8e2;
}

.routine-org-node,
.routine-org-leaf {
    margin: 3px 0;
}

.routine-org-node summary {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    align-items: center;
    gap: 4px;
    list-style: none;
    cursor: pointer;
}

.routine-org-node summary::-webkit-details-marker {
    display: none;
}

.routine-org-node summary::before {
    content: "▶";
    display: block;
    width: 14px;
    color: #1f2937;
    font-size: 11px;
    line-height: 1;
}

.routine-org-node[open] > summary::before {
    content: "▼";
}

.routine-org-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
    padding: 3px 5px;
    border-radius: 6px;
    color: #1f2937;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.routine-org-row > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.routine-org-row:has(input:checked) {
    background: #e9f5ef;
}

.routine-org-row input:checked + span {
    color: var(--green-2);
    font-weight: 900;
}

.routine-org-children {
    margin-left: 16px;
    padding-left: 6px;
    border-left: 1px solid #d0d8e2;
}

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

.routine-selected-label {
    margin: 0;
    color: #4b5563;
    font-weight: 900;
}

.routine-catalogue h3 {
    margin: 10px 0 0;
    color: var(--green-2);
}

.routine-data-filter {
    display: grid;
    gap: 9px;
}

.routine-data-filter input,
.routine-data-filter select {
    width: 100%;
}

.routine-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.routine-data-filter label {
    display: grid;
    gap: 6px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 900;
}

.routine-catalogue details {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.routine-catalogue summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    color: var(--green-2);
    cursor: pointer;
    font-weight: 900;
}

.routine-catalogue summary span {
    color: var(--muted);
    font-size: 12px;
}

.routine-indicator-list {
    display: grid;
    gap: 4px;
    max-height: 260px;
    overflow: auto;
    padding: 0 8px 10px;
}

.routine-indicator-list a {
    padding: 8px 9px;
    border-radius: 7px;
    color: #20342d;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.routine-indicator-list a:hover,
.routine-indicator-list a.active {
    background: #e9f5ef;
    color: var(--green-2);
}

.routine-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

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

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

.key-malaria-chart {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.key-chart-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.key-chart-actions,
.panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-chart-actions {
    flex-direction: row-reverse;
}

.export-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    color: var(--green-2);
    background: transparent;
    border: 0;
}

.export-icon:hover {
    background: #edf7f2;
}

.export-icon svg {
    width: 20px;
    height: 20px;
}

.key-chart-head span {
    color: var(--green-2);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.key-chart-head h3 {
    margin: 2px 0 0;
    color: #374151;
    font-size: 15px;
}

.key-chart-head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.key-chart-head strong {
    color: var(--green-2);
    font-size: 24px;
    line-height: 1;
}

.routine-line-chart {
    width: 100%;
    min-height: 0;
    overflow: visible;
}

.routine-line-chart svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: 320px;
    overflow: hidden;
}

.routine-line-chart .grid line {
    stroke: #e7ece9;
    stroke-width: 1;
}

.routine-line-chart .grid text,
.routine-line-chart .x-labels text,
.routine-line-chart .chart-legend text {
    fill: #374151;
    font-size: 12px;
    font-weight: 800;
}

.routine-line-chart polyline {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.routine-line-chart .chart-hit-area {
    fill: transparent;
    stroke: transparent;
    pointer-events: all;
}

.routine-line-chart .chart-dot {
    stroke: #fff;
    stroke-width: 2;
}

.routine-line-chart .chart-callout {
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease;
}

.routine-line-chart .chart-point:hover .chart-callout,
.routine-line-chart .chart-point:focus-within .chart-callout {
    opacity: 1;
}

.routine-line-chart .callout-box {
    fill: #fff;
    stroke: #d5e0db;
    stroke-width: 1.5;
    filter: drop-shadow(0 4px 8px rgba(17, 24, 39, .14));
}

.routine-line-chart .value-label {
    fill: #20252c;
    font-size: 12px;
    font-weight: 900;
    text-anchor: middle;
}

.routine-line-chart .chart-legend line {
    stroke-width: 3;
    stroke-linecap: round;
}

.routine-kpi-grid article,
.routine-summary-strip article {
    display: grid;
    gap: 7px;
    padding: 14px;
    border: 1px solid rgba(11, 107, 79, .14);
    border-radius: 8px;
    background: #f7fbf9;
}

.routine-kpi-grid span,
.routine-summary-strip span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.routine-kpi-grid strong,
.routine-summary-strip strong {
    color: var(--green-2);
    font-size: 24px;
    line-height: 1;
}

.routine-kpi-grid small,
.routine-summary-strip small {
    color: var(--muted);
    font-weight: 800;
}

.routine-preview-panel {
    display: grid;
    gap: 14px;
}

.routine-chart {
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(#f9fcfb, #eef6f2);
    overflow: hidden;
}

.routine-chart svg {
    width: 100%;
    height: 260px;
}

.routine-chart polyline {
    fill: none;
    stroke: var(--green);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.routine-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.routine-table {
    max-height: 360px;
}

.metric {
    padding: 18px;
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
    line-height: 1.1;
}

.button,
button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #e7efec;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

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

.button.ghost {
    background: transparent;
    border: 1px solid var(--line);
}

.alert {
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #f1d186;
    border-radius: 8px;
    background: #fff7df;
    color: #654500;
}

.form-grid,
.inline-form,
.form-stack {
    display: grid;
    gap: 12px;
}

.form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.inline-form {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: #35433d;
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

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

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

.compact-table {
    min-width: 0;
}

.compact-table th,
.compact-table td {
    padding: 9px 8px;
    font-size: 13px;
}

.staff-role-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.staff-role-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    color: var(--green);
}

.staff-role-panel summary::marker {
    color: var(--green);
}

.staff-role-panel summary small {
    font-size: 13px;
    color: #68766f;
}

.staff-role-panel details[open] summary {
    margin-bottom: 14px;
}

.staff-role-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 120px 140px 120px;
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.staff-edit-details {
    min-width: 260px;
}

.staff-edit-details summary {
    cursor: pointer;
    color: var(--green);
    font-weight: 800;
}

.staff-edit-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.staff-edit-button {
    padding: 8px 12px;
    min-height: 0;
}

.staff-modal-form {
    padding: 22px 26px 26px;
    overflow-y: auto;
}

.staff-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    grid-column: 1 / -1;
}

.staff-modal-actions .button {
    min-height: 42px;
    padding: 10px 18px;
}

.staff-active-field {
    align-self: center;
}

.aop-workstream-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    color: var(--green);
}

.aop-workstream-panel summary small {
    font-size: 13px;
    color: #68766f;
}

.aop-workstream-panel details[open] summary {
    margin-bottom: 14px;
}

.aop-workstream-panel,
.aop-workstream-panel details {
    max-width: 100%;
    min-width: 0;
    overflow: visible;
}

.aop-assessment-form {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.aop-assessment-table {
    width: max-content;
    min-width: 1600px;
    max-width: none;
}

.aop-assessment-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--green) #e7f0ec;
}

.aop-assessment-wrap .aop-assessment-table {
    margin: 0;
}

.aop-assessment-wrap::-webkit-scrollbar {
    height: 14px;
}

.aop-assessment-wrap::-webkit-scrollbar-track {
    background: #e7f0ec;
    border-radius: 999px;
}

.aop-assessment-wrap::-webkit-scrollbar-thumb {
    background: var(--green);
    border: 3px solid #e7f0ec;
    border-radius: 999px;
}

.aop-assessment-wrap .aop-assessment-table tr:first-child td,
.aop-assessment-wrap .aop-assessment-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f6fbf9;
}

.aop-assessment-table td {
    min-width: 130px;
    white-space: normal;
}

.aop-assessment-table .aop-section-row td {
    background: #eef8f4;
    color: var(--green);
    font-weight: 900;
}

.aop-cell-input {
    min-width: 130px;
    min-height: 34px;
    padding: 6px 8px;
}

.assessment-export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
}

.assessment-export-bar > span {
    font-weight: 900;
    color: var(--green);
}

.approval-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f6fbf9;
}

.approval-banner strong {
    color: var(--green);
}

.approval-banner p {
    margin: 6px 0 0;
    color: #50645c;
}

.approval-banner.approved,
.approval-chip.approved {
    border-color: rgba(11, 107, 79, .25);
    background: rgba(11, 107, 79, .08);
    color: var(--green);
}

.approval-banner.overdue,
.approval-chip.overdue {
    border-color: rgba(196, 20, 20, .2);
    background: #fff2f2;
    color: #b91c1c;
}

.approval-banner.planned,
.approval-chip.planned {
    border-color: rgba(23, 102, 177, .2);
    background: #eef5ff;
    color: #1766b1;
}

.approval-form {
    display: grid;
    grid-template-columns: minmax(220px, .34fr) minmax(360px, 1fr) minmax(180px, auto);
    align-items: start;
    gap: 12px;
    margin: 10px 0 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.approval-form .wide-field {
    grid-column: auto;
}

.approval-form select,
.approval-form textarea,
.approval-form .button {
    min-height: 44px;
}

.approval-form textarea {
    min-height: 74px;
    resize: vertical;
}

.approval-form .button {
    align-self: end;
    width: 100%;
    white-space: nowrap;
}

.resource-approval {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    min-width: 160px;
}

.approval-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.resource-approval small {
    max-width: 240px;
    color: #60736a;
    white-space: normal;
}

.inline-approval summary {
    cursor: pointer;
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
}

.inline-approval .approval-form {
    grid-template-columns: minmax(140px, 1fr);
    min-width: 260px;
    margin: 8px 0 0;
}

.inline-approval .approval-form .wide-field {
    grid-column: auto;
}

.aop-submit-panel {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    position: sticky;
    bottom: 14px;
    z-index: 5;
    padding-right: 210px;
}

.aop-submit-panel .button,
.aop-submit-panel button {
    flex: 0 0 auto;
}

.aop-w1-table {
    min-width: 1450px;
}

.aop-w1-table th,
.aop-w1-table td {
    vertical-align: top;
}

.aop-w1-table th:nth-child(1),
.aop-w1-table th:nth-child(2),
.aop-w1-table td:nth-child(1),
.aop-w1-table td:nth-child(2) {
    min-width: 260px;
}

.aop-w1-table .aop-cell-input {
    width: 100%;
    min-width: 110px;
}

.aop-w3-layout {
    display: grid;
    gap: 16px;
}

.aop-w3-section {
    display: grid;
    gap: 10px;
}

.aop-w3-section h3 {
    margin: 0;
    color: var(--green);
    font-size: 16px;
}

.aop-w3-commodity-table,
.aop-w3-activity-table,
.aop-w3-summary-table {
    min-width: 980px;
}

.aop-w3-commodity-table th,
.aop-w3-commodity-table td,
.aop-w3-activity-table th,
.aop-w3-activity-table td,
.aop-w3-summary-table th,
.aop-w3-summary-table td {
    vertical-align: top;
}

.aop-w3-activity-table th:first-child,
.aop-w3-activity-table td:first-child {
    min-width: 300px;
}

.aop-w3-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    min-width: 380px;
}

.aop-w3-input-grid label {
    display: grid;
    gap: 4px;
    font-weight: 800;
    color: var(--ink);
}

.aop-w3-input-grid label span {
    color: #53645b;
    font-size: 12px;
}

.aop-w3-input-grid [hidden] {
    display: none !important;
}

.aop-w3-commodity-table .aop-cell-input,
.aop-w3-activity-table .aop-cell-input,
.aop-w3-summary-table .aop-cell-input {
    width: 100%;
    min-width: 120px;
}

.aop-source-cell[readonly] {
    background: #f3f7f5;
    color: #435349;
    font-weight: 800;
}

.aop-w3-summary-table tr.is-invalid td {
    background: #fff6f3;
}

.aop-w3-summary-table tr.is-invalid .aop-cell-input:invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 2px rgba(163, 58, 50, 0.12);
}

.aop-w3-validation-message {
    margin-top: 6px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 800;
}

.aop-w4-layout {
    display: grid;
    gap: 16px;
}

.aop-w4-section {
    display: grid;
    gap: 10px;
}

.aop-w4-section h3 {
    margin: 0;
    color: var(--green);
    font-size: 16px;
}

.aop-w4-profile-table,
.aop-w4-table,
.aop-w4-psm-table,
.aop-w4-smc-table {
    min-width: 760px;
}

.aop-w4-psm-table,
.aop-w4-smc-table {
    min-width: 1040px;
}

.aop-w4-profile-table th,
.aop-w4-profile-table td,
.aop-w4-table th,
.aop-w4-table td,
.aop-w4-psm-table th,
.aop-w4-psm-table td,
.aop-w4-smc-table th,
.aop-w4-smc-table td {
    vertical-align: top;
}

.aop-w4-profile-table th:first-child,
.aop-w4-profile-table td:first-child,
.aop-w4-table th:first-child,
.aop-w4-table td:first-child,
.aop-w4-psm-table th:first-child,
.aop-w4-psm-table td:first-child {
    min-width: 360px;
}

.aop-w4-profile-table .aop-cell-input,
.aop-w4-table .aop-cell-input,
.aop-w4-psm-table .aop-cell-input,
.aop-w4-smc-table .aop-cell-input {
    width: 100%;
    min-width: 120px;
}

.aop-summary-layout {
    display: grid;
    gap: 16px;
}

.aop-summary-section {
    display: grid;
    gap: 10px;
}

.aop-summary-section h3 {
    margin: 0;
    color: var(--green);
    font-size: 16px;
}

.aop-summary-rating-table {
    min-width: 1040px;
}

.aop-summary-rating-table th,
.aop-summary-rating-table td {
    vertical-align: top;
}

.aop-summary-rating-table th:nth-child(1),
.aop-summary-rating-table td:nth-child(1) {
    min-width: 210px;
}

.aop-summary-rating-table th:nth-child(2),
.aop-summary-rating-table td:nth-child(2) {
    min-width: 340px;
}

.aop-summary-rating-table .aop-cell-input {
    width: 100%;
    min-width: 120px;
}

.aop-summary-template-list {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #53645b;
    font-size: 12px;
    font-weight: 800;
}

.aop-summary-total-row td {
    background: #f3f7f5;
    font-weight: 900;
}

.aop-swot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 12px;
}

.aop-swot-grid.two-column {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.aop-swot-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfefd;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.aop-swot-card h4 {
    margin: 0;
    color: var(--green);
    font-size: 14px;
}

.aop-swot-card label {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    align-items: start;
}

.aop-swot-card label span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e8f4ef;
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
}

.aop-textarea {
    min-height: 76px;
    resize: vertical;
    line-height: 1.4;
}

@media (max-width: 1200px) {
    .aop-swot-grid,
    .aop-swot-grid.two-column {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 720px) {
    .aop-swot-grid,
    .aop-swot-grid.two-column {
        grid-template-columns: 1fr;
    }
}

.aop-parasite-card {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: #fbfefd;
}

.aop-parasite-card h3 {
    margin: 0 0 12px;
    color: var(--green);
}

.aop-parasite-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.aop-parasite-table {
    min-width: 760px;
}

.aop-parasite-table .aop-cell-input {
    width: 100%;
}

.aop-parasite-table th:last-child,
.aop-parasite-table td:last-child {
    width: 110px;
}

.aop-add-parasite-row {
    margin-top: 12px;
}

.aop-resource-commitments {
    display: grid;
    gap: 14px;
}

.aop-resource-commitments .modal-backdrop,
.aop-resource-commitments .panel-actions {
    display: none;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-line input {
    width: auto;
    min-height: 0;
}

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

th {
    color: #4e5f58;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #f8fbfa;
}

.tree-node {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 12px;
}

.tree-node.nested {
    margin: 10px 0 0 12px;
}

summary {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.objective-selector-panel .panel-head span {
    color: var(--muted);
    font-size: 13px;
}

.nmsp-cost-filter {
    display: grid;
    grid-template-columns: minmax(220px, .35fr) minmax(360px, 1fr);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 18px;
}

.nmsp-total-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(11, 107, 79, .18);
    border-radius: 8px;
    background: #f6fbf8;
}

.nmsp-total-card span,
.nmsp-total-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.nmsp-total-card strong {
    color: var(--green-2);
    font-size: 24px;
    overflow-wrap: anywhere;
}

.nmsp-filter-form {
    justify-content: end;
    align-content: center;
}

.objective-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 1px;
    overflow-x: auto;
    margin: 6px 0 18px;
    border-radius: 8px;
    background: #e5f1ee;
}

.objective-card {
    display: grid;
    place-items: center;
    min-height: 230px;
    padding: 20px 16px;
    border: 0;
    border-radius: 0;
    background: #07858a;
    color: #fff;
    text-align: center;
    box-shadow: none;
}

.objective-card:first-child {
    border-radius: 8px 0 0 8px;
}

.objective-card:nth-child(5) {
    border-radius: 0 8px 8px 0;
}

.objective-card span {
    font-size: 16px;
    font-weight: 700;
}

.objective-card strong {
    display: block;
    max-width: 100%;
    margin: 10px 0;
    font-size: 24px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.objective-card em {
    color: rgba(255, 255, 255, .84);
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.objective-card small {
    display: block;
    max-width: 100%;
    color: rgba(255, 255, 255, .9);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.objective-card:hover,
.objective-card.active {
    background: #056d72;
    box-shadow: inset 0 0 0 4px rgba(242, 193, 78, .72);
}

.objective-card.placeholder {
    cursor: not-allowed;
    opacity: .46;
}

.resource-workspace {
    display: grid;
    gap: 14px;
}

.resource-view-filter {
    justify-content: center;
}

.resource-objective-grid .objective-card {
    text-decoration: none;
}

.resource-table-wrap {
    max-height: 72vh;
    overflow: auto;
}

.resource-map-table {
    min-width: 2600px;
}

.resource-map-table th,
.resource-map-table td {
    min-width: 140px;
    vertical-align: middle;
}

.resource-map-table th:nth-child(3),
.resource-map-table td:nth-child(3) {
    min-width: 360px;
    white-space: normal;
}

.resource-map-table th:nth-child(4),
.resource-map-table td:nth-child(4) {
    min-width: 170px;
    font-weight: 900;
}

.other-commitments-panel {
    margin-top: 16px;
}

.other-commitments-wrap {
    overflow: auto;
}

.other-commitments-table {
    min-width: 1450px;
}

.other-commitments-table th {
    background: #bdbdbd;
    color: #0f1d18;
}

.other-commitments-table th:nth-child(n+6) {
    background: #ff8c8c;
}

.other-commitments-table th,
.other-commitments-table td {
    min-width: 150px;
    text-align: center;
    vertical-align: middle;
}

.other-commitments-table th:nth-child(2),
.other-commitments-table td:nth-child(2) {
    min-width: 320px;
    background: #eefae9;
    text-align: left;
}

.other-commitment-form {
    padding: 18px 22px 22px;
    overflow-y: auto;
}

.other-commitment-modal .modal-card {
    width: min(760px, calc(100vw - 32px));
}

.other-commitment-form .resource-fieldset {
    border-radius: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.other-commitment-form .resource-modal-actions {
    position: sticky;
    bottom: 0;
    margin: 0 -22px -22px;
    padding: 14px 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .86), #fff 36%);
}

.intervention-commitments-panel {
    margin-top: 16px;
}

.intervention-donor {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.intervention-donor + .intervention-donor {
    margin-top: 12px;
}

.intervention-donor summary {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    color: var(--green-2);
    font-weight: 900;
    background: rgba(10, 128, 101, .08);
}

.intervention-donor summary .resource-approval {
    margin-top: 0;
}

.intervention-table-wrap,
.intervention-edit-wrap {
    max-height: 68vh;
    overflow: auto;
}

.intervention-edit-wrap {
    max-height: 58vh;
}

.intervention-commitments-table,
.intervention-edit-table {
    min-width: 1080px;
}

.intervention-commitments-table th,
.intervention-commitments-table td,
.intervention-edit-table th,
.intervention-edit-table td {
    min-width: 130px;
    vertical-align: top;
}

.intervention-commitments-table th,
.intervention-edit-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f4faf7;
    box-shadow: 0 1px 0 var(--line);
}

.intervention-commitments-table th:first-child,
.intervention-commitments-table td:first-child,
.intervention-edit-table th:first-child,
.intervention-edit-table td:first-child {
    min-width: 260px;
    white-space: normal;
}

.intervention-commitments-table th:nth-child(2),
.intervention-commitments-table td:nth-child(2),
.intervention-edit-table th:nth-child(2),
.intervention-edit-table td:nth-child(2) {
    min-width: 120px;
}

.intervention-commitments-table th:nth-child(3),
.intervention-commitments-table td:nth-child(3),
.intervention-edit-table th:nth-child(3),
.intervention-edit-table td:nth-child(3) {
    min-width: 260px;
    white-space: normal;
}

.intervention-edit-table th,
.intervention-edit-table td {
    padding: 7px 8px;
    font-size: 13px;
    line-height: 1.25;
}

.intervention-edit-table textarea,
.intervention-edit-table input[type="number"],
.intervention-edit-table select {
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
}

.intervention-edit-table textarea {
    min-height: 42px;
    resize: vertical;
}

.intervention-edit-table textarea[readonly],
.intervention-edit-table input:disabled {
    cursor: not-allowed;
    color: #8a938f;
    background: #f4f7f6;
}

.intervention-commitment-modal .modal-card {
    width: min(1120px, calc(100vw - 32px));
}

.intervention-commitment-form {
    min-height: 0;
    gap: 12px;
    padding: 14px 18px 18px;
    overflow-y: auto;
}

.intervention-commitment-form > label {
    margin: 0;
}

.intervention-commitment-form > label input {
    min-height: 42px;
}

.intervention-commitment-form .resource-modal-actions {
    position: sticky;
    bottom: 0;
    margin: 0 -18px -18px;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .86), #fff 36%);
}
}

.gap-negative {
    color: #9f1d1d;
}

.gap-positive {
    color: var(--green-2);
}

.objective-detail {
    display: none;
    padding-top: 4px;
}

.objective-detail.active {
    display: block;
}

.objective-detail > .section-head {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid rgba(7, 133, 138, .18);
    border-radius: 8px;
    background: #f5fbfa;
}

.objective-detail > .section-head strong {
    color: var(--green-2);
    font-size: 24px;
}

.nmsp-excel-wrap {
    overflow-x: auto;
    margin-bottom: 18px;
    border: 1px solid #111;
    border-radius: 4px;
}

.nmsp-excel-table {
    width: 100%;
    min-width: 2100px;
    border-collapse: collapse;
    table-layout: fixed;
}

.nmsp-excel-table th {
    padding: 9px 10px;
    border: 1px solid #111;
    background: #f3f6f5;
    color: #17352b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: center;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.nmsp-excel-table td {
    border: 1px solid #111;
    color: #050505;
    font-size: 14px;
    vertical-align: middle;
    line-height: 1.35;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.nmsp-excel-table th:first-child,
.nmsp-excel-table td:first-child {
    width: 105px;
    font-weight: 800;
    text-align: center;
}

.nmsp-excel-table th:nth-child(2),
.nmsp-excel-table td:nth-child(2) {
    width: 105px;
    font-weight: 800;
    text-align: center;
}

.nmsp-excel-table th:nth-child(3),
.nmsp-excel-table td:nth-child(3) {
    width: 320px;
}

.nmsp-excel-table td:nth-child(n+4) {
    text-align: center;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.nmsp-excel-table th:last-child,
.nmsp-excel-table td:last-child {
    width: 110px;
}

.nmsp-excel-table .objective-row td {
    padding: 12px 10px;
    background: #b9dcc0;
    font-weight: 800;
}

.nmsp-excel-table .strategy-row td {
    padding: 12px 10px;
    background: #5dff26;
    font-weight: 800;
}

.nmsp-excel-table .broad-row td {
    padding: 11px 10px;
    background: #fbff91;
    font-size: 15px;
    font-weight: 700;
}

.nmsp-excel-table .activity-row td {
    padding: 10px;
    background: #e7fff3;
    font-size: 14px;
    font-weight: 700;
}

.nmsp-excel-table .sub-row td,
.nmsp-excel-table .subactivity-row td {
    padding: 10px;
    background: #c8fbfb;
    font-size: 14px;
}

.nmsp-excel-table .sub-row td:first-child {
    color: #f00;
}

.assumption-toggle {
    margin-right: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #000;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.assumption-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
}

.assumption-row {
    display: none;
}

.assumption-row.active {
    display: table-row;
}

.assumption-row td {
    padding: 10px !important;
    background: #f8fffd !important;
}

.assumption-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 10px;
    color: #12372e;
    text-align: left;
}

.assumption-card > div {
    padding: 10px;
    border: 1px solid rgba(11, 107, 79, .16);
    border-radius: 8px;
    background: #fff;
}

.assumption-card span {
    display: block;
    margin-bottom: 4px;
    color: #5a6f68;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.assumption-card strong,
.assumption-card small {
    display: block;
    color: #15382e;
    font-size: 13px;
}

.assumption-wide {
    grid-column: 1 / -1;
}

.assumption-year-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    gap: 8px;
}

.nmsp-edit-details {
    margin: 12px 0;
    padding: 10px;
    border: 1px solid rgba(11, 107, 79, .18);
    border-radius: 8px;
    background: #fbfefc;
}

.edit-tools-heading {
    margin: 12px 0 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(11, 107, 79, .1);
    color: var(--green-2);
    font-size: 13px;
    font-weight: 900;
}

.nmsp-edit-details summary {
    color: var(--green-2);
    font-weight: 900;
}

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

.mini-edit-form {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.mini-edit-form h4 {
    margin: 0;
    color: var(--green-2);
    font-size: 14px;
}

.mini-edit-form textarea {
    min-height: 58px;
}

.snt-column-layout {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.snt-column-add-form,
.snt-column-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.snt-column-add-form {
    grid-template-columns: minmax(190px, 1.1fr) minmax(260px, 2fr) 110px 120px 140px;
    align-items: end;
}

.snt-column-add-form h4 {
    grid-column: 1 / -1;
}

.snt-column-list {
    display: grid;
    gap: 8px;
}

.snt-column-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: end;
    gap: 8px;
    padding: 8px;
}

.snt-column-edit-form {
    grid-template-columns: minmax(170px, 1fr) minmax(280px, 2fr) 95px 110px 130px;
    align-items: end;
    padding: 0;
    border: 0;
}

.snt-column-edit-form h4 {
    grid-column: 1 / -1;
}

.snt-column-edit-form textarea,
.snt-column-add-form textarea {
    min-height: 40px;
    resize: vertical;
}

.snt-column-delete-form {
    display: flex;
    align-items: end;
    justify-content: flex-end;
}

.snt-column-delete-form.inline-delete-form {
    display: flex;
    align-items: end;
    justify-content: flex-end;
}

.button.danger,
button.danger {
    background: #f9e7e7;
    color: #9d1c1c;
}

.sub-edit-form {
    grid-template-columns: 90px minmax(220px, 1fr) 110px 180px 130px auto;
    align-items: center;
    margin: 6px 0;
    padding: 8px;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0 2px;
    padding: 0;
    border: 1px solid rgba(11, 107, 79, .18);
    border-radius: 7px;
    background: rgba(255, 255, 255, .72);
    color: var(--green-2);
    font-size: 16px;
    font-weight: 900;
}

.icon-btn.add {
    background: #f7fff9;
}

.icon-btn.danger {
    color: #a33a32;
}

.inline-delete-form {
    display: inline;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.advocacy-check-group {
    min-width: 0;
    padding: 8px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.advocacy-export-form {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    align-items: end;
    gap: 16px;
}

.advocacy-export-form > label,
.advocacy-export-form > button {
    min-width: 0;
}

.advocacy-export-form .advocacy-check-group {
    grid-column: span 2;
    align-self: stretch;
}

.advocacy-export-form .button.primary {
    min-height: 42px;
}

.advocacy-check-group legend {
    padding: 0 5px;
    color: var(--green-2);
    font-size: 12px;
    font-weight: 800;
}

.advocacy-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 6px 10px;
}

.advocacy-month-grid {
    grid-template-columns: repeat(6, minmax(58px, 1fr));
}

.advocacy-check-grid label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    font-size: 13px;
    font-weight: 700;
    color: var(--green-2);
}

.advocacy-check-grid input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    padding: 0;
    flex: 0 0 16px;
    border-radius: 4px;
}

@media (max-width: 980px) {
    .advocacy-export-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .advocacy-export-form {
        grid-template-columns: 1fr;
    }

    .advocacy-export-form .advocacy-check-group {
        grid-column: span 1;
    }

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

.advocacy-progress-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(9, 28, 22, .42);
    backdrop-filter: blur(8px);
}

.advocacy-progress-card {
    width: min(520px, 100%);
    padding: 28px;
    border: 1px solid rgba(216, 225, 221, .9);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(10, 31, 24, .22);
}

.advocacy-progress-card h3 {
    margin: 0 0 6px;
    color: var(--green-2);
    font-size: 22px;
}

.advocacy-progress-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

.advocacy-progress-bar {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6efeb;
}

.advocacy-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), #21a67c);
    transition: width .35s ease;
}

.advocacy-progress-card strong {
    display: block;
    margin-top: 12px;
    color: var(--green-2);
    text-align: right;
    font-size: 20px;
}

.inline-edit-row {
    display: none;
}

.inline-edit-row.active {
    display: table-row;
}

.inline-edit-row td {
    padding: 8px !important;
    background: #fff !important;
}

.table-inline-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    align-items: center;
}

.table-inline-form input,
.table-inline-form select,
.table-inline-form textarea {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
}

.table-inline-form textarea {
    min-height: 72px;
    resize: vertical;
}

.table-inline-form .button {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 13px;
}

.annual-quantity-inputs {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    gap: 8px;
}

.annual-quantity-inputs label {
    display: grid;
    gap: 4px;
    color: #245044;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.nmsp-version-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 14px;
}

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

.table-inline-form .is-hidden,
.mini-edit-form .is-hidden {
    display: none;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.checkbox-line input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    flex: 0 0 auto;
}

.category-manager {
    display: grid;
    gap: 10px;
}

.category-edit-form {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.catalogue-filter-form {
    margin-bottom: 14px;
    align-items: end;
}

.catalogue-filter-form input,
.catalogue-filter-form select {
    min-width: 180px;
}

.filter-scope-pill {
    align-self: end;
    padding: 10px 12px;
    border: 1px solid rgba(11, 107, 79, .16);
    border-radius: 8px;
    background: #eef8f3;
    color: var(--green-2);
    font-size: 13px;
    font-weight: 900;
}

.transmission-map-shell {
    display: grid;
    gap: 12px;
}

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

.transmission-map-card {
    display: grid;
    gap: 8px;
}

.transmission-map-card h3 {
    margin: 0;
    color: var(--green-2);
}

.transmission-map {
    position: relative;
    z-index: 0;
    width: 100%;
    min-height: 460px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #edf4f1;
}

.map-label {
    border: 1px solid rgba(17, 35, 29, .18);
    border-radius: 6px;
    padding: 2px 5px;
    background: rgba(255, 255, 255, .82);
    color: #10251d;
    box-shadow: none;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.state-map-label {
    font-size: 11px;
}

.lga-map-label {
    font-size: 9px;
}

.transmission-map-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 10px;
}

.transmission-map-summary div {
    padding: 12px 14px;
    border: 1px solid rgba(11, 107, 79, .14);
    border-radius: 8px;
    background: #f7fbf9;
}

.transmission-map-summary strong {
    display: block;
    color: var(--green-2);
    font-size: 24px;
    line-height: 1;
}

.transmission-map-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.transmission-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.transmission-map-legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.transmission-map-legend span {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--band-color);
}

.dashboard-map-card {
    display: grid;
    align-content: start;
    gap: 12px;
}

.dashboard-state-map {
    min-height: 330px;
}

.routine-tpr-map-panel {
    display: grid;
    gap: 14px;
}

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

.routine-tpr-map {
    min-height: 360px;
}

.routine-tpr-legend {
    margin-top: -4px;
}

.routine-dqa-panel {
    display: grid;
    gap: 16px;
}

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

.routine-dqa-card {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.routine-dqa-card h3 {
    margin: 0;
    color: var(--green-2);
    font-size: 17px;
}

.routine-dqa-table table {
    min-width: 980px;
}

.routine-dqa-table th {
    background: #d8e5f6;
    color: #1f2937;
}

.routine-dqa-table td:nth-child(n+3) {
    text-align: right;
    font-weight: 900;
}

.routine-dqa-table .dqa-good {
    background: #12e69a;
    color: #062f24;
}

.routine-dqa-table .dqa-warn {
    background: #fff72a;
    color: #1f2937;
}

.routine-dqa-table .dqa-bad {
    background: #ff2b5d;
    color: #fff;
}

@media (max-width: 980px) {
    .routine-tpr-split,
    .routine-dqa-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-map-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.dashboard-map-meta strong {
    color: var(--green-2);
    font-size: 22px;
    line-height: 1;
}

.dashboard-map-legend {
    gap: 6px;
}

.dashboard-map-legend li {
    padding: 5px 8px;
    font-size: 11px;
}

.snt-map-shell {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.snt-map-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.snt-map-head h3 {
    margin: 0 0 4px;
    color: var(--green-2);
}

.snt-map-head p {
    margin: 0;
}

.snt-map-head strong {
    white-space: nowrap;
    color: var(--green-2);
    font-size: 18px;
}

.snt-intervention-map {
    min-height: 500px;
}

.snt-map-legend {
    max-height: 138px;
    overflow: auto;
    padding-right: 4px;
}

.snt-map-legend li {
    max-width: 100%;
}

.snt-map-legend em {
    color: var(--green-2);
    font-style: normal;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.pagination-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination-actions .button {
    min-height: 34px;
    padding: 8px 12px;
}

.performance-framework-wrap {
    max-height: 680px;
    overflow: auto;
}

.performance-framework-table {
    min-width: 1700px;
    table-layout: fixed;
}

.performance-framework-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f5faf7;
}

.performance-framework-table th:first-child,
.performance-framework-table td:first-child {
    width: 430px;
}

.performance-framework-table th:nth-child(3),
.performance-framework-table td:nth-child(3) {
    width: 260px;
}

.performance-framework-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

.performance-framework-table td strong {
    display: block;
    margin-bottom: 4px;
    color: var(--green-2);
}

.performance-framework-table td span {
    display: block;
    color: #48655a;
    font-size: 12px;
    white-space: pre-line;
}

.performance-framework-table .objective-text {
    max-height: none;
    overflow: visible;
    line-height: 1.45;
}

.performance-inline-form {
    grid-template-columns: repeat(12, minmax(86px, 1fr));
    align-items: stretch;
}

.performance-inline-form .perf-type,
.performance-inline-form .perf-group-label,
.performance-inline-form .perf-baseline,
.performance-inline-form .perf-baseline-year {
    grid-column: span 2;
}

.performance-inline-form .perf-objective-text,
.performance-inline-form .perf-name {
    grid-column: span 4;
}

.performance-inline-form .perf-objective-text {
    min-height: 150px;
}

.performance-inline-form .perf-target-2026,
.performance-inline-form .perf-target-2027,
.performance-inline-form .perf-target-2028,
.performance-inline-form .perf-target-2029,
.performance-inline-form .perf-target-2030 {
    grid-column: span 2;
}

.performance-inline-form .perf-data-source {
    grid-column: span 4;
    min-width: 260px;
}

.performance-inline-form .button {
    grid-column: span 2;
}

.performance-mop-wrap {
    max-height: 76vh;
    overflow: auto;
}

.performance-mop-table {
    min-width: 4600px;
}

.performance-mop-table th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.performance-mop-table th,
.performance-mop-table td {
    min-width: 96px;
    vertical-align: middle;
}

.performance-mop-table th:nth-child(3),
.performance-mop-table td:nth-child(3) {
    min-width: 520px;
    white-space: normal;
}

.performance-mop-table th:nth-child(5),
.performance-mop-table td:nth-child(5),
.performance-mop-table th:nth-child(18),
.performance-mop-table td:nth-child(18) {
    min-width: 190px;
    white-space: normal;
}

.performance-mop-table th:nth-child(32),
.performance-mop-table td:nth-child(32),
.performance-mop-table th:nth-child(33),
.performance-mop-table td:nth-child(33) {
    min-width: 360px;
    white-space: normal;
}

.performance-mop-table select,
.performance-mop-table textarea,
.performance-mini-input {
    width: 100%;
    min-width: 88px;
    padding: 7px 8px;
    font-size: 12px;
}

.performance-mop-table textarea {
    min-height: 72px;
    resize: vertical;
}

.performance-rating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #102019;
    font-weight: 900;
    line-height: 1;
}

.performance-rating-badge.none {
    background: #eef3f0;
    color: #68756f;
}

.performance-rating-badge.poor {
    background: #f6c8c8;
    color: #9f1d1d;
}

.performance-rating-badge.fair {
    background: #ffe299;
    color: #7a5200;
}

.performance-rating-badge.good {
    background: #d9efaf;
    color: #3d6b05;
}

.performance-rating-badge.excellent {
    background: #bce7c4;
    color: #075f38;
}

.performance-row-form {
    margin: 0;
}

.currency-switch {
    margin: 0;
}

.currency-switch label {
    margin: 0;
}

.fx-rate-grid {
    display: grid;
    gap: 10px;
}

.fx-rate-row {
    display: grid;
    grid-template-columns: 70px minmax(160px, 1fr) 90px minmax(150px, .7fr);
    gap: 8px;
    align-items: center;
}

.fx-rate-row strong {
    color: var(--green-2);
}

.nmsp-excel-table .sub-row small {
    display: block;
    margin-top: 4px;
    color: #23524a;
    font-size: 11px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.mini-edit-form input,
.mini-edit-form select,
.mini-edit-form textarea {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 13px;
}

.mini-edit-form .button,
.mini-edit-form button {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
}

.action-list {
    display: grid;
    gap: 10px;
}

.action-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.action-list span,
.audit-line small {
    color: var(--muted);
}

.cost-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 16px;
    overflow: hidden;
}

.cost-summary div {
    min-width: 0;
    padding: 0 12px;
    border-right: 1px solid var(--line);
}

.cost-summary div:first-child {
    padding-left: 0;
}

.cost-summary div:last-child {
    padding-right: 0;
    border-right: 0;
}

.cost-summary span,
.gap-number span,
.gap-box {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.cost-summary strong {
    display: block;
    margin-top: 8px;
    color: var(--green);
    font-size: clamp(18px, 1.55vw, 26px);
    line-height: 1.05;
    white-space: nowrap;
}

.cost-card .compact-table {
    table-layout: fixed;
}

.cost-card .compact-table th,
.cost-card .compact-table td {
    overflow-wrap: anywhere;
}

.cost-summary .blue {
    color: #1766b1;
}

.cost-summary .amber,
.amber {
    color: #e28a00;
}

.stacked-bar {
    display: flex;
    overflow: hidden;
    height: 28px;
    margin-bottom: 16px;
    border-radius: 3px;
    background: #eef1ef;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.stacked-bar span,
.stacked-bar em {
    display: grid;
    place-items: center;
    min-width: 36px;
    font-style: normal;
}

.stacked-bar span {
    background: linear-gradient(90deg, #064f31, #0e8050);
}

.stacked-bar em {
    background: linear-gradient(90deg, #e09300, #f0ad11);
}

.mini-progress {
    display: block;
    width: 72px;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #dce2df;
}

.mini-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
}

.steps {
    display: grid;
    grid-template-columns: 44px 1fr 44px 1fr 44px 1fr 44px 1fr 44px;
    align-items: center;
    margin: 14px 4px 28px;
}

.steps > span {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #c8d0cc;
    border-radius: 50%;
    background: #f7f9f8;
    color: #68756f;
    font-weight: 900;
}

.steps .done {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.steps .current {
    background: #1e6dbd;
    border-color: #1e6dbd;
    color: #fff;
}

.steps small {
    position: absolute;
    top: 42px;
    width: 90px;
    color: #25302b;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
}

.steps i {
    height: 2px;
    background: #cfd6d3;
}

.donut-wrap {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    align-items: center;
}

.donut {
    display: grid;
    place-items: center;
    width: 134px;
    height: 134px;
    border-radius: 50%;
    background: conic-gradient(#1a9958 0 65%, #2477c7 65% 87%, #f3b234 87% 95%, #c7ccca 95% 100%);
    position: relative;
}

.donut::before {
    content: "";
    position: absolute;
    inset: 30px;
    border-radius: 50%;
    background: #fff;
}

.donut strong,
.donut small {
    position: relative;
    z-index: 1;
}

.donut strong {
    font-size: 30px;
}

.donut small {
    margin-top: -30px;
    font-size: 11px;
}

.legend-list,
.map-legend {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.legend-list li {
    display: flex;
    align-items: center;
    gap: 9px;
}

.legend-list strong {
    margin-left: auto;
}

.dot,
.map-legend span {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot.green { background: #1a9958; }
.dot.teal { background: #0b6b4f; }
.dot.blue { background: #2477c7; }
.dot.amber { background: #f3b234; }
.dot.gray { background: #c7ccca; }

.gap-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
    gap: 10px 14px;
    align-content: start;
}

.gap-card .panel-head,
.gap-card .panel-link {
    grid-column: 1 / -1;
}

.gap-number strong {
    display: block;
    color: #e28a00;
    font-size: clamp(26px, 2.5vw, 36px);
    line-height: 1;
    overflow-wrap: anywhere;
}

.gap-box {
    position: static;
    justify-self: end;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.gap-box strong {
    display: block;
    margin-top: 8px;
    color: #e28a00;
    font-size: 20px;
}

.trend-line {
    grid-column: 1 / -1;
    position: relative;
    height: 190px;
    margin-top: 18px;
    border-bottom: 1px solid var(--line);
    background: repeating-linear-gradient(to top, transparent 0 39px, #edf1ef 40px);
}

.trend-line svg {
    width: 100%;
    height: 100%;
}

.trend-line polyline {
    fill: none;
    stroke: #e28a00;
    stroke-width: 4;
}

.trend-line circle {
    fill: #e28a00;
}

.trend-line span {
    position: absolute;
    color: #4d5753;
    font-size: 12px;
    white-space: nowrap;
    transform: translateX(-30%);
}

.trend-empty {
    position: absolute;
    inset: 18px 0 0;
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 20px;
    color: #5f6f68;
    text-align: center;
}

.trend-empty strong {
    color: #e28a00;
    font-size: clamp(22px, 2.4vw, 34px);
    line-height: 1;
}

.trend-empty span {
    position: static;
    max-width: 280px;
    white-space: normal;
    transform: none;
}

.nigeria-map {
    display: grid;
    grid-template-columns: repeat(7, 28px);
    gap: 4px;
    width: max-content;
    margin: 8px auto 14px;
    transform: skew(-9deg);
}

.nigeria-map span {
    width: 28px;
    height: 24px;
    border-radius: 8px 5px 9px 4px;
    border: 1px solid rgba(255, 255, 255, .88);
}

.band-very-high { background: #b93524; }
.band-high { background: #ef8f13; }
.band-moderate { background: #f4c658; }
.band-low { background: #38a756; }
.band-very-low { background: #0d6e43; }

.map-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: 12px;
}

.map-legend li {
    display: flex;
    align-items: center;
    gap: 7px;
}

.up {
    color: #0f7a49;
    font-weight: 800;
}

.down,
.high {
    color: #d51717;
    font-weight: 800;
}

.medium {
    color: #e28a00;
}

.low {
    color: #1766b1;
}

.status {
    display: inline-flex;
    min-width: 92px;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
}

.status.overdue {
    border: 1px solid #f0a5a5;
    background: #fff2f2;
    color: #c41414;
}

.status.progress {
    border: 1px solid #f3c061;
    background: #fff7e7;
    color: #d47a00;
}

.status.planned {
    border: 1px solid #a9c3ee;
    background: #eef5ff;
    color: #1766b1;
}

.dashboard-hero,
.dashboard-role-metrics,
.dashboard-board {
    width: min(1720px, 100%);
    margin-right: auto;
    margin-left: auto;
}

.dashboard-hero {
    position: relative;
    align-items: stretch;
    min-height: 148px;
    padding: 28px 30px;
    overflow: hidden;
    border-color: rgba(11, 107, 79, .16);
    background:
        linear-gradient(90deg, rgba(7, 94, 69, .1), rgba(255, 255, 255, .96) 34%),
        #fff;
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(180deg, var(--green), #f2b233);
}

.dashboard-hero h2 {
    max-width: 760px;
    font-size: clamp(24px, 2vw, 34px);
}

.dashboard-hero p {
    max-width: 860px;
    font-size: 15px;
    line-height: 1.55;
}

.dashboard-hero .button {
    align-self: center;
    min-width: 132px;
    text-align: center;
}

.dashboard-role-metrics {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-role-metrics .metric {
    position: relative;
    min-height: 108px;
    padding: 18px 18px 16px;
    overflow: hidden;
    border-color: rgba(11, 107, 79, .14);
    background: linear-gradient(180deg, #fff, #f8fbfa);
}

.dashboard-role-metrics .metric::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green), #f2b233);
    opacity: .82;
}

.dashboard-role-metrics .metric span {
    color: #52655d;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dashboard-role-metrics .metric strong {
    color: var(--green-2);
    font-size: clamp(22px, 1.8vw, 30px);
}

.dashboard-role-metrics .metric small {
    color: #63766d;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-board {
    grid-template-columns: minmax(0, 5fr) minmax(280px, 3fr) minmax(320px, 4fr);
    grid-template-areas:
        "cost lifecycle gap"
        "routine insights map"
        "audit audit audit";
    gap: 18px;
    align-items: stretch;
}

.dashboard-board > .panel {
    min-width: 0;
    padding: 20px;
    border-color: rgba(11, 107, 79, .13);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(251, 253, 252, .96));
}

.dashboard-board .panel-head {
    min-height: 32px;
    margin-bottom: 16px;
}

.dashboard-board .panel-head h2 {
    color: var(--green-2);
    font-size: 18px;
}

.dashboard-column {
    display: contents;
}

.cost-card {
    grid-area: cost;
    grid-column: auto;
    grid-row: auto;
}

.lifecycle-card {
    grid-area: lifecycle;
    grid-column: auto;
    grid-row: auto;
}

.gap-card {
    grid-area: gap;
    grid-column: auto;
    grid-row: auto;
}

.dashboard-insights-card {
    grid-area: insights;
    grid-column: auto;
    grid-row: auto;
}

.routine-card {
    grid-area: routine;
    grid-column: auto;
    grid-row: auto;
}

.dashboard-map-card {
    grid-area: map;
    grid-column: auto;
    grid-row: auto;
}

.audit-card {
    grid-area: audit;
    grid-column: 1 / -1;
    grid-row: auto;
}

.cost-summary {
    gap: 10px;
    margin-bottom: 18px;
}

.cost-summary div {
    padding: 13px 14px;
    border: 1px solid rgba(216, 225, 221, .86);
    border-radius: 8px;
    background: #fff;
}

.cost-summary span {
    min-height: 32px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
    text-transform: uppercase;
}

.stacked-bar {
    height: 34px;
    border-radius: 8px;
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
}

.compact-table th {
    background: #f5f9f7;
    color: #4d5e57;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

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

.compact-table tr:last-child td {
    border-bottom: 0;
}

.mini-progress {
    width: 86px;
    height: 9px;
}

.steps {
    grid-template-columns: 38px 1fr 38px 1fr 38px 1fr 38px 1fr 38px;
    margin: 10px 0 36px;
}

.steps > span {
    width: 34px;
    height: 34px;
    box-shadow: 0 6px 14px rgba(11, 107, 79, .08);
}

.steps small {
    top: 42px;
    width: 76px;
    font-size: 10px;
}

.donut-wrap {
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 14px;
}

.donut {
    width: 116px;
    height: 116px;
}

.donut::before {
    inset: 27px;
}

.legend-list {
    gap: 8px;
}

.legend-list li {
    color: #45554e;
    font-size: 13px;
}

.legend-list strong {
    white-space: nowrap;
}

.gap-card {
    grid-template-columns: minmax(0, 1fr) 156px;
}

.gap-number strong {
    font-size: clamp(30px, 3.1vw, 46px);
}

.gap-box {
    align-self: start;
    width: 100%;
}

.trend-line {
    height: 176px;
    margin-top: 10px;
}

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

.dashboard-insight-list a {
    min-height: 116px;
    align-content: start;
}

.dashboard-insight-list strong {
    font-size: 20px;
}

.dashboard-state-map {
    min-height: 360px;
    border: 1px solid rgba(216, 225, 221, .9);
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-map-meta {
    padding-top: 2px;
}

@media (max-width: 1500px) {
    .dashboard-board {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "cost gap"
            "cost map"
            "routine lifecycle"
            "routine insights"
            "audit audit";
    }
}

@media (max-width: 1100px) {
    .dashboard-role-metrics,
    .dashboard-board {
        grid-template-columns: 1fr;
        grid-template-areas:
            "cost"
            "lifecycle"
            "gap"
            "insights"
            "routine"
            "map"
            "audit";
    }

    .dashboard-board > .panel,
    .dashboard-column,
    .cost-card,
    .lifecycle-card,
    .gap-card,
    .dashboard-insights-card,
    .routine-card,
    .dashboard-map-card,
    .audit-card {
        grid-column: 1;
        grid-row: auto;
    }

    .cost-summary,
    .dashboard-insight-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .dashboard-hero {
        flex-direction: column;
        padding: 22px;
    }

    .dashboard-role-metrics,
    .cost-summary,
    .dashboard-insight-list {
        grid-template-columns: 1fr;
    }

    .gap-card {
        grid-template-columns: 1fr;
    }
}

.bar-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    text-transform: capitalize;
}

meter {
    width: 100%;
    height: 12px;
}

.empty {
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
}

.document pre {
    white-space: pre-wrap;
    font-family: inherit;
    background: #f7faf8;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.login-page,
.maintenance-page,
.install-page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    justify-items: center;
    background:
        linear-gradient(120deg, rgba(11, 107, 79, .12), transparent 42%),
        var(--bg);
}

.login-shell,
.maintenance-card,
.install-card {
    width: min(100%, 520px);
    padding: 20px;
}

.registration-shell {
    width: min(100%, 920px);
}

.auth-content-shell {
    width: min(100%, 1040px);
    padding: 20px;
}

.login-panel,
.maintenance-card,
.install-card {
    padding: 34px;
}

.auth-footer {
    width: min(100%, 1180px);
    padding: 0 20px 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.auth-footer span {
    display: block;
    max-width: 980px;
}

.auth-footer nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-footer a {
    color: var(--green);
    font-weight: 800;
    text-decoration: none;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin: 0 0 20px;
}

.auth-logo img {
    width: min(100%, 300px);
    height: auto;
    object-fit: contain;
}

.public-content-panel {
    text-align: center;
}

.public-content-panel .site-content-body {
    margin: 14px auto 18px;
    max-width: 860px;
}

.registration-panel .brand,
.registration-panel h1,
.registration-panel > .muted {
    text-align: center;
}

.registration-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.registration-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.registration-review-list {
    display: grid;
    gap: 10px;
}

.registration-review-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 14px;
    padding: 12px;
    color: #51635b;
    font-size: 13px;
}

.registration-review-form {
    padding: 12px;
    border-top: 1px solid var(--line);
}

.maintenance-card {
    text-align: center;
}

.maintenance-card img {
    width: 92px;
    height: 78px;
    object-fit: contain;
    margin-bottom: 8px;
}

.maintenance-card .brand-text {
    margin: 0 0 8px;
    color: var(--green);
    font-weight: 900;
    letter-spacing: .08em;
}

.maintenance-card h1 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.08;
}

.maintenance-login {
    margin-top: 22px;
    text-align: left;
}

.maintenance-toggle-panel .section-head {
    margin-bottom: 16px;
}

.auth-link {
    display: inline-flex;
    justify-content: center;
    color: var(--green-2);
    font-weight: 800;
    text-decoration: none;
}

.profile-panel {
    max-width: 1180px;
}

.profile-form {
    display: grid;
    grid-template-columns: minmax(240px, .42fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.profile-photo-card,
.profile-fields-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfefd;
    padding: 14px;
}

.profile-photo-card {
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
    grid-row: span 2;
}

.profile-photo-large {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: #eef8f4;
    color: var(--green);
    font-size: 44px;
    font-weight: 900;
    object-fit: cover;
    box-shadow: inset 0 0 0 1px rgba(11, 107, 79, .12);
}

.profile-fields-card h3 {
    margin: 0 0 12px;
    color: var(--green-2);
}

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

.profile-actions {
    grid-column: 2;
    justify-content: flex-end;
}

.user-admin-panel {
    display: grid;
    gap: 14px;
}

.admin-user-search-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfa;
}

.user-card-list {
    display: grid;
    gap: 8px;
}

.user-edit-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.user-edit-card summary {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) minmax(140px, auto) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 11px 12px;
    cursor: pointer;
    list-style: none;
}

.user-edit-card summary::-webkit-details-marker {
    display: none;
}

.user-edit-card[open] summary {
    border-bottom: 1px solid var(--line);
    background: #f8fbfa;
}

.user-edit-card summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-edit-form {
    padding: 12px;
}

.custom-user-access-panel {
    display: grid;
    grid-column: 1 / -1;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfa;
}

.custom-user-access-panel[hidden] {
    display: none;
}

.custom-user-access-panel .section-head {
    margin: 0;
}

.user-access-wrap {
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.user-access-table {
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

.user-access-table th,
.user-access-table td {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px;
}

.user-access-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 180px;
    background: #f9fcfb;
    color: var(--green-2);
    text-align: left;
}

.user-access-table thead th {
    background: #eef7f3;
    color: var(--green-2);
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.user-access-table .role-right-chip {
    width: 100%;
}

.user-delete-form {
    margin: -4px 12px 12px;
}

.role-admin-panel {
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: min(100%, calc(100vw - 48px));
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.role-admin-panel .panel-head {
    align-items: flex-start;
}

.role-admin-panel > * {
    min-width: 0;
}

.role-create-form {
    align-items: end;
    grid-template-columns: minmax(260px, 1fr) minmax(220px, .75fr) 160px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfa;
}

.role-access-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.role-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.role-edit-card {
    display: grid;
    gap: 10px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(248, 251, 250, .96), #fff);
    box-shadow: 0 8px 22px rgba(21, 43, 34, .05);
    overflow: hidden;
    min-width: 0;
}

.role-edit-card summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) auto auto auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.role-edit-card summary::-webkit-details-marker {
    display: none;
}

.role-edit-card summary::after {
    content: "Edit";
    justify-self: end;
    padding: 5px 9px;
    border-radius: 7px;
    background: rgba(11, 107, 79, .08);
    color: var(--green-2);
    font-size: 11px;
    font-weight: 900;
}

.role-edit-card[open] summary {
    border-bottom: 1px solid var(--line);
    background: #f4faf7;
}

.role-summary-title {
    color: var(--ink);
    font-weight: 900;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-summary-slug {
    color: #60736a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-edit-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
}

.role-edit-form label {
    gap: 5px;
    color: #51635b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.role-edit-form input {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 14px;
}

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

.role-user-pill,
.role-lock-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.role-user-pill {
    border: 1px solid rgba(11, 107, 79, .16);
    color: var(--green-2);
    background: rgba(11, 107, 79, .07);
}

.role-lock-pill {
    border: 1px solid rgba(181, 125, 22, .18);
    color: #8a5a00;
    background: rgba(242, 193, 78, .18);
}

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

.role-actions .inline-delete-form {
    margin: 0;
}

.role-delete-form {
    margin: -4px 12px 12px;
}

.role-delete-form .button {
    width: auto;
}

.role-access-wrap {
    max-height: 70vh;
    max-width: min(100%, calc(100vw - 48px));
    border-top: 3px solid rgba(11, 107, 79, .18);
}

.role-access-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.role-access-table th,
.role-access-table td {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 8px;
}

.role-access-table th:last-child,
.role-access-table td:last-child {
    border-right: 0;
}

.role-access-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #eef7f3;
    color: var(--green-2);
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    vertical-align: middle;
}

.role-access-table thead th span {
    display: block;
    max-width: 190px;
    white-space: normal;
    line-height: 1.2;
}

.role-access-table .sticky-role-meta {
    position: sticky;
    left: 0;
    z-index: 4;
    width: 190px;
    min-width: 190px;
    background: #eef7f3;
}

.role-access-table tbody .sticky-role-meta {
    background: #f9fcfb;
    color: var(--green-2);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.role-rights-cell {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
    width: 390px;
}

.role-right-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 0;
    padding: 7px 6px;
    border: 1px solid rgba(11, 107, 79, .14);
    border-radius: 7px;
    background: #fff;
    color: var(--green-2);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.role-rights-cell input {
    width: 13px;
    height: 13px;
    min-height: 0;
    accent-color: var(--green);
}

.role-right-chip:has(input:checked) {
    border-color: rgba(11, 107, 79, .28);
    background: rgba(11, 107, 79, .08);
}

.role-rights-cell input:disabled + span,
.role-right-chip:has(input:disabled) {
    opacity: .65;
}

.wide-field {
    grid-column: span 2;
}

.nmsp-hero-panel .section-head {
    margin-bottom: 18px;
}

.nmsp-document-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(11, 107, 79, .15);
    border-radius: 8px;
    background: #f8fbfa;
}

.nmsp-document-card img,
.pdf-preview-placeholder {
    width: 180px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    object-fit: cover;
}

.pdf-preview-placeholder {
    display: grid;
    place-items: center;
    padding: 16px;
    text-align: center;
}

.pdf-preview-placeholder strong {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #fff4d4;
    color: #b16d00;
    font-size: 22px;
}

.pdf-preview-placeholder span {
    color: var(--muted);
    font-weight: 800;
}

.nmsp-document-card h3 {
    margin: 0 0 8px;
}

.nmsp-editor-panel {
    margin-bottom: 18px;
    border-color: rgba(11, 107, 79, .22);
    background: #fbfefc;
}

.nmsp-editor-panel textarea {
    min-height: 96px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--green);
    font-weight: 900;
    letter-spacing: .08em;
}

.brand img {
    width: 44px;
    height: 38px;
    object-fit: contain;
    letter-spacing: 0;
}

.login-panel h1,
.install-card h1 {
    margin: 0 0 12px;
    font-size: 32px;
    line-height: 1.1;
}

dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 16px;
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
    font-weight: 800;
}

@media (max-width: 1000px) {
    .approval-form {
        grid-template-columns: 1fr;
    }

    .aop-submit-panel {
        justify-content: flex-start;
        padding-right: 0;
        padding-bottom: 76px;
    }

    .mop-cost-builder-head {
        display: grid;
    }

    .mop-cost-main,
    .mop-cost-quantity {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mop-cost-remove {
        width: 42px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1200;
        height: auto;
        max-height: 100dvh;
        flex-wrap: wrap;
        align-items: flex-start;
        background:
            radial-gradient(circle at 65% 35%, rgba(31, 169, 99, .16), transparent 32%),
            linear-gradient(180deg, #084b2d 0%, #06361f 100%);
        color: #eaf5f0;
        border-bottom: 0;
        box-shadow: 0 12px 30px rgba(5, 36, 23, .18);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .logo {
        order: 1;
        flex: 1;
    }

    .logo strong {
        color: #fff;
    }

    .logo small {
        color: #d7f5e5;
    }

    .sidebar nav {
        display: none;
        order: 4;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        overflow-x: auto;
        max-height: calc(100vh - 170px);
        overflow-y: auto;
        padding-top: 10px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-color: rgba(242, 193, 78, .86) rgba(255, 255, 255, .16);
    }

    body.menu-open .sidebar nav {
        display: flex;
    }

    .sidebar nav a,
    .nav-group-trigger {
        min-height: 46px;
        color: #e0f0e9;
        font-size: 15px;
        width: 100%;
    }

    .nav-group {
        width: 100%;
    }

    body.menu-open .nav-group:not(.mobile-open) > .nav-submenu,
    .nav-submenu {
        display: none !important;
        position: static;
        min-width: 0;
        margin: 4px 0 8px 31px;
        padding: 4px 0 4px 10px;
        border: 0;
        border-left: 1px solid rgba(255, 255, 255, .22);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .nav-group.mobile-open .nav-submenu {
        display: block !important;
    }

    .nav-submenu a {
        min-height: 40px;
        color: #d8eee4;
    }

    .nav-group-trigger::after {
        margin-left: auto;
        color: #d7f5e5;
    }

    .sidebar nav a:hover,
    .sidebar nav a.active,
    .nav-group-trigger:hover,
    .nav-group.active .nav-group-trigger {
        background: linear-gradient(90deg, #179454, #0f7544);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    }

    .nav-icon {
        border-color: rgba(255, 255, 255, .38);
        background: transparent;
        color: #fff;
    }

    .sidebar-user {
        display: none;
        order: 5;
        flex: 0 0 100%;
        grid-template-columns: 36px minmax(0, 1fr) auto;
        margin-top: 10px;
        border-color: rgba(255, 255, 255, .25);
        background: rgba(255, 255, 255, .06);
        box-shadow: none;
    }

    body.menu-open .sidebar-user {
        display: grid;
    }

    .sidebar-user strong,
    .sidebar-user a {
        color: #fff;
    }

    .sidebar-user small {
        color: #bfe3d3;
    }

    .hamburger {
        display: grid;
        order: 3;
        border-color: rgba(255, 255, 255, .25);
        background: rgba(255, 255, 255, .1);
    }

    .hamburger span {
        background: #fff;
    }

    .metric-grid,
    .dashboard-board,
    .role-metrics,
    .frontend-grid,
    .action-tiles,
    .contact-layout,
    .routine-layout,
    .routine-kpi-grid,
    .key-malaria-grid,
    .routine-summary-strip,
    .form-grid,
    .inline-form,
    .two-col,
    .section-head {
        grid-template-columns: 1fr;
    }

    .routine-sidebar {
        position: static;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .routine-filter-toolbar {
        justify-content: stretch;
    }

    .routine-filter-toolbar .button {
        width: 100%;
    }

    .routine-org-scope,
    .routine-org-selects {
        grid-template-columns: 1fr;
    }

    .nmsp-document-card {
        grid-template-columns: 1fr;
    }

    .nmsp-document-card img,
    .pdf-preview-placeholder {
        width: 100%;
        max-width: 280px;
    }

    .objective-card-grid {
        grid-template-columns: repeat(5, minmax(150px, 1fr));
    }

    .objective-card {
        min-height: 170px;
    }

    .nmsp-edit-grid,
    .snt-column-add-form,
    .snt-column-row,
    .snt-column-edit-form,
    .sub-edit-form,
    .table-inline-form {
        grid-template-columns: 1fr;
    }

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

    .nmsp-version-grid,
    .two-field-row {
        grid-template-columns: 1fr;
    }

    .assumption-card,
    .assumption-year-grid {
        grid-template-columns: 1fr;
    }

    .frontend-grid .panel:first-child {
        grid-column: auto;
    }

    .transmission-map-grid {
        grid-template-columns: 1fr;
    }

    .role-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .topbar-controls {
        flex-wrap: wrap;
    }

    .modal-backdrop {
        align-items: flex-start;
        padding: 14px;
    }

    .modal-card {
        max-height: calc(100vh - 28px);
    }

    .other-commitment-form .resource-fieldset {
        grid-template-columns: 1fr;
    }

    .staff-role-row {
        grid-template-columns: 1fr;
    }

    .role-create-form,
    .role-edit-form,
    .admin-user-search-form,
    .user-edit-form {
        grid-template-columns: 1fr;
    }

    .role-card-grid,
    .role-edit-card summary,
    .user-edit-card summary,
    .registration-form,
    .registration-review-meta,
    .profile-form,
    .profile-field-grid {
        grid-template-columns: 1fr;
    }

    .profile-photo-card {
        grid-row: auto;
    }

    .profile-actions {
        grid-column: 1;
    }

    .smtp-test-panel,
    .smtp-test-form {
        grid-template-columns: 1fr;
    }

    .role-edit-card summary::after {
        justify-self: start;
    }

    .live-chat-console-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 16px;
    }

    .mop-cost-main,
    .mop-cost-quantity {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: center;
    }

    .topbar-controls,
    .topbar-control-form,
    .topbar-controls label,
    .topbar-controls input,
    .topbar-controls select {
        width: 100%;
    }

    .topbar-controls .button {
        width: 100%;
    }

    .sidebar {
        padding: 14px 16px;
    }

    .metric strong {
        font-size: 22px;
    }

    .live-chat-widget {
        right: 12px;
        bottom: 12px;
    }

    .aop-submit-panel {
        padding-bottom: 70px;
    }

    .live-chat-form {
        flex-direction: column;
    }
}

/* Final responsive guardrails: keep small screens contained while preserving table scroll. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
canvas,
video,
iframe {
    max-width: 100%;
}

.content,
.panel,
.metric,
.topbar,
.topbar-title,
.section-head,
.panel-head,
.form-grid,
.inline-form,
.dashboard-board,
.metric-grid,
.role-metrics,
.action-tiles,
.routine-layout,
.admin-user-search-form,
.user-edit-card summary,
.role-edit-card summary {
    min-width: 0;
}

.panel,
.metric,
.table-wrap,
.aop-table-scroll,
.workstream-table-wrap,
.resource-table-wrap,
.mop-table-wrap {
    max-width: 100%;
}

input,
select,
textarea,
button,
.button {
    min-width: 0;
}

button,
.button {
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
    .dashboard-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-board > .panel:first-child {
        grid-column: 1 / -1;
    }

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

    .topbar-controls input,
    .topbar-controls select {
        width: 170px;
    }

    .aop-swot-grid,
    .aop-swot-grid.two-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .messages-layout {
        grid-template-columns: 180px minmax(230px, 320px) minmax(0, 1fr);
    }
}

@media (max-width: 1000px) {
    body.menu-open {
        overflow: hidden;
    }

    body.menu-open .sidebar {
        position: fixed;
        inset: 0 0 auto 0;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content {
        padding: 0 18px 18px;
    }

    .topbar {
        margin-left: -18px;
        margin-right: -18px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .panel-head,
    .section-head,
    .form-actions,
    .mop-version-actions,
    .live-chat-console-actions {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .panel-head > *,
    .section-head > *,
    .form-actions > *,
    .mop-version-actions > *,
    .live-chat-console-actions > * {
        min-width: 0;
    }

    .topbar-control-form {
        width: 100%;
    }

    .topbar-controls label {
        flex: 1 1 220px;
        min-width: 0;
        white-space: normal;
    }

    .topbar-controls input,
    .topbar-controls select {
        width: 100%;
    }

    .objective-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

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

    .messages-sidebar {
        position: static;
        grid-template-columns: repeat(5, minmax(120px, 1fr));
        overflow-x: auto;
    }

    .message-list-items {
        max-height: 360px;
    }

    body.menu-open .sidebar nav {
        overflow-x: auto;
        overflow-y: auto;
        max-width: 100%;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    body.menu-open .sidebar nav a,
    body.menu-open .nav-group-trigger {
        width: max-content;
        min-width: 100%;
        max-width: none;
    }

    body.menu-open .nav-group {
        width: max-content;
        min-width: 100%;
        max-width: none;
    }

    body.menu-open .nav-submenu {
        width: max-content;
        min-width: calc(100% - 31px);
        max-width: none;
        overflow: visible;
    }
}

@media (max-width: 720px) {
    .dashboard-board,
    .metric-grid,
    .role-metrics,
    .action-tiles,
    .aop-swot-grid,
    .aop-swot-grid.two-column {
        grid-template-columns: 1fr;
    }

    .panel-head,
    .section-head {
        gap: 10px;
    }

    .panel-head .button,
    .section-head .button,
    .form-actions .button,
    .mop-version-actions .button {
        width: auto;
        max-width: 100%;
    }

    .pagination-bar,
    .pagination-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 12px;
    }

    .topbar {
        margin-left: -12px;
        margin-right: -12px;
        padding: 14px 12px;
    }

    .panel {
        padding: 12px;
    }

    .logo strong {
        font-size: 22px;
        line-height: 1.05;
        white-space: normal;
    }

    .logo small {
        font-size: 11px;
        line-height: 1.2;
    }

    .coat-logo {
        width: 46px;
        height: 46px;
    }

    .sidebar {
        gap: 10px;
    }

    .modal-card,
    .mop-modal .modal-card,
    .resource-modal .modal-card,
    .staff-modal .modal-card {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
    }

    .modal-head,
    .mop-modal-form,
    .resource-modal-form {
        padding: 16px;
    }

    .live-chat-widget {
        right: 10px;
        bottom: 10px;
    }
}

/* Page-specific responsive polish for dashboard and NMSP cost views. */
@media (max-width: 1200px) {
    .dashboard-hero,
    .dashboard-role-metrics,
    .dashboard-board {
        width: 100%;
    }

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

    .cost-card,
    .lifecycle-card,
    .gap-card,
    .dashboard-insights-card,
    .routine-card,
    .dashboard-map-card,
    .audit-card {
        grid-column: auto;
        grid-row: auto;
    }

    .cost-card,
    .audit-card {
        grid-column: 1 / -1;
    }

    .nmsp-cost-filter {
        grid-template-columns: 1fr;
    }

    .nmsp-filter-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .nmsp-filter-form label,
    .nmsp-filter-form input,
    .nmsp-filter-form select,
    .nmsp-filter-form .button {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 1100px) {
    .dashboard-board,
    .dashboard-role-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-board > .panel,
    .cost-card,
    .lifecycle-card,
    .gap-card,
    .dashboard-insights-card,
    .routine-card,
    .dashboard-map-card,
    .audit-card {
        grid-column: 1 / -1;
        grid-row: auto;
        width: 100%;
    }
}

@media (max-width: 900px) {
    .dashboard-board,
    .dashboard-role-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-board > .panel,
    .cost-card,
    .lifecycle-card,
    .gap-card,
    .dashboard-insights-card,
    .routine-card,
    .dashboard-map-card,
    .audit-card {
        grid-column: 1 / -1;
        grid-row: auto;
        width: 100%;
    }

    .dashboard-hero {
        flex-direction: column;
        gap: 14px;
    }

    .dashboard-hero .button {
        align-self: flex-start;
    }

    .cost-card,
    .routine-card,
    .audit-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cost-card .compact-table,
    .routine-card .compact-table,
    .audit-card .compact-table {
        min-width: 620px;
        white-space: nowrap;
    }

    .cost-card .compact-table th,
    .cost-card .compact-table td,
    .routine-card .compact-table th,
    .routine-card .compact-table td,
    .audit-card .compact-table th,
    .audit-card .compact-table td {
        overflow-wrap: normal;
        word-break: normal;
    }

    .donut-wrap,
    .gap-card {
        grid-template-columns: 1fr;
    }

    .gap-box {
        justify-self: stretch;
    }

    .dashboard-state-map {
        min-height: 260px;
    }

    .nmsp-total-card {
        min-height: auto;
    }

    .nmsp-total-card strong {
        font-size: clamp(26px, 7vw, 42px);
        line-height: 1.08;
        word-break: break-word;
    }
}

@media (max-width: 640px) {
    .dashboard-hero,
    .dashboard-board > .panel {
        padding: 14px;
    }

    .dashboard-hero h2,
    .dashboard-board .panel-head h2 {
        font-size: 17px;
    }

    .dashboard-hero p {
        font-size: 12px;
    }

    .dashboard-role-metrics {
        gap: 10px;
    }

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

    .cost-summary {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 30px 1fr 30px 1fr 30px 1fr 30px 1fr 30px;
        margin-bottom: 32px;
    }

    .steps > span {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .steps small {
        top: 36px;
        width: 58px;
        font-size: 8px;
    }

    .trend-line span {
        font-size: 9px;
    }

    .nmsp-cost-filter {
        gap: 14px;
    }

    .nmsp-total-card {
        padding: 18px;
    }

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

    .nmsp-filter-form .button {
        justify-content: center;
    }
}

/* Money totals must stay inside compact cards on tablet/mobile. */
.cost-summary strong,
.metric strong,
.metric-lite strong,
[data-mop-total] {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cost-summary div,
.metric {
    min-width: 0;
}

/* Dashboard cards should read row by row, with each card using the full dashboard width. */
.dashboard-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
        "cost"
        "routine"
        "lifecycle"
        "insights"
        "gap"
        "map"
        "audit" !important;
    gap: 18px;
    align-items: stretch;
}

.dashboard-column {
    display: contents;
}

.cost-card,
.routine-card,
.lifecycle-card,
.dashboard-insights-card,
.gap-card,
.dashboard-map-card,
.audit-card {
    width: 100%;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
}

.cost-card { grid-area: cost !important; }
.routine-card { grid-area: routine !important; }
.lifecycle-card { grid-area: lifecycle !important; }
.dashboard-insights-card { grid-area: insights !important; }
.gap-card { grid-area: gap !important; }
.dashboard-map-card { grid-area: map !important; }
.audit-card { grid-area: audit !important; }

.lifecycle-card .donut-wrap {
    grid-template-columns: minmax(220px, 300px) minmax(280px, 1fr);
    align-items: center;
}

.lifecycle-card .donut {
    width: clamp(210px, 18vw, 280px);
    height: clamp(210px, 18vw, 280px);
}

.lifecycle-card .donut::before {
    inset: clamp(48px, 4.2vw, 66px);
}

.lifecycle-card .donut strong {
    font-size: clamp(48px, 4vw, 68px);
}

.lifecycle-card .donut small {
    margin-top: -54px;
    font-size: 16px;
}

@media (max-width: 900px) {
    .lifecycle-card .donut-wrap {
        grid-template-columns: 1fr;
    }

    .lifecycle-card .donut {
        justify-self: center;
        width: 190px;
        height: 190px;
    }

    .lifecycle-card .donut::before {
        inset: 44px;
    }

    .transmission-version-panel .nmsp-version-tools,
    .transmission-version-panel .inline-form,
    .transmission-version-panel .version-create-form,
    .transmission-import-card,
    .transmission-import-card .transmission-import-form {
        grid-template-columns: 1fr;
    }

    .mop-year-filter .mop-total-lite {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
    }
}
