:root {
  --ink: #192622;
  --muted: #697570;
  --faint: #8d9793;
  --accent: #087c70;
  --accent-dark: #075e56;
  --accent-soft: #eaf5f2;
  --canvas: #f3f5f3;
  --surface: #fff;
  --line: #d9dedb;
  --line-soft: #e8ece9;
  --green: #25866f;
  --green-soft: #e6f3ef;
  --yellow: #bc7c1d;
  --yellow-soft: #fff3d8;
  --red: #bd4b45;
  --red-soft: #fbe9e8;
  --shadow: 0 1px 3px rgba(24, 42, 36, .08);
  --radius: 8px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid rgba(8, 124, 112, .28); outline-offset: 2px; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 10px 16px; border-radius: 6px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }

.app-header { position: fixed; inset: 0 0 auto; z-index: 30; height: 72px; display: grid; grid-template-columns: 290px 1fr 260px; align-items: stretch; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.wordmark { display: grid; place-items: center; width: 92px; height: 38px; border-radius: 4px; background: #0b4942; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .11em; }
.brand-separator { width: 1px; height: 32px; background: var(--line); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 15px; }
.brand-copy small, .user-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.primary-nav { display: flex; align-items: stretch; justify-content: center; gap: 12px; }
.primary-nav a { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #4f5a56; font-size: 13px; font-weight: 600; text-decoration: none; }
.primary-nav a::after { content: ""; position: absolute; right: 8px; bottom: 0; left: 8px; height: 2px; transform: scaleX(0); background: var(--accent); transition: transform .16s ease; }
.primary-nav a:hover { color: var(--accent); }
.primary-nav a.active { color: var(--ink); }
.primary-nav a.active::after { transform: scaleX(1); }
.user-session { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.user-avatar { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #cad8d4; border-radius: 50%; color: var(--accent-dark); background: #f2f8f6; font-size: 19px; }
.user-copy { display: flex; flex-direction: column; min-width: 92px; }
.user-copy strong { font-size: 12px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.icon-button:hover { border-color: var(--accent); color: var(--accent); }
.icon-button b { display: none; }
.mobile-menu { display: none; border: 0; background: none; font-size: 23px; }

.main-content { min-height: 100vh; padding: 106px max(24px, calc((100vw - 1380px) / 2)) 52px; }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 58px; margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.page-toolbar h1 { margin: 0; font-size: 15px; }
.page-filters, .filters-inline { display: flex; align-items: flex-end; gap: 10px; }
.filter { display: grid; gap: 4px; }
.filter label, .field label, .field legend { color: #65716c; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
select, input, textarea { width: 100%; border: 1px solid #cfd6d2; border-radius: 5px; background: #fff; transition: border-color .15s, box-shadow .15s; }
select, input { height: 38px; padding: 0 11px; }
textarea { min-height: 74px; padding: 10px 11px; resize: vertical; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(8,124,112,.1); outline: 0; }
.button, .form-actions button, .primary-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: #fff; font-weight: 650; }
.button:hover, .form-actions button:hover, .primary-button:hover { background: var(--accent-dark); }
.button.secondary, .form-actions .secondary { border-color: #cbd3cf; background: #fff; color: #35413d; }
.button.secondary:hover, .form-actions .secondary:hover { border-color: var(--accent); color: var(--accent); }
.button.danger { border-color: var(--red); background: var(--red); }

.eyebrow { display: block; margin-bottom: 6px; color: #6d7a75; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow-accent { color: var(--accent); }
.executive-summary { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(500px, 1.7fr); gap: 14px; margin-bottom: 14px; }
.card, .scorecard-panel, .aside-panel, .completed-panel, .management-list, .management-form, .audit-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.summary-card { min-height: 164px; padding: 24px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.card-heading h2 { margin: 0; font-size: 21px; }
.health-score { font-size: 37px; font-weight: 700; line-height: 1; }
.stacked-bar { display: flex; gap: 2px; height: 9px; margin: 28px 0 18px; overflow: hidden; border-radius: 8px; background: #e8ecea; }
.stacked-bar span:first-child { border-radius: 8px 0 0 8px; }
.stacked-bar span:last-child { border-radius: 0 8px 8px 0; }
.bg-green { background: var(--green); } .bg-yellow { background: var(--yellow); } .bg-red { background: var(--red); } .bg-gray { background: #9ca7a3; }
.health-legend { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 11px; }
.health-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.text-green { color: var(--green); } .text-yellow { color: var(--yellow); } .text-red { color: var(--red); } .text-gray { color: #87928e; }
.attention-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 20px; }
.attention-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; min-height: 70px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 6px; background: #fcfdfc; text-align: left; }
.attention-item:hover { border-color: #b8cac5; background: #f7fbf9; }
.attention-item strong, .attention-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-item strong { font-size: 12px; }
.attention-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.attention-value { display: grid; place-items: center; width: 52px; height: 52px; padding: 2px; border: 3px solid currentColor; border-radius: 50%; color: var(--yellow); font-size: 8px; font-weight: 700; text-align: center; white-space: nowrap; }
.attention-value.red { color: var(--red); }

.scorecard-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, .88fr); gap: 14px; align-items: start; }
.scorecard-main { display: grid; gap: 14px; min-width: 0; }
.scorecard-aside { display: grid; gap: 14px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); }
.panel-heading h2 { margin: 0; font-size: 16px; }
.panel-heading small { color: var(--muted); font-size: 10px; }
.table-scroll { overflow-x: auto; }
.kpi-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.kpi-table th, .kpi-table td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); font-size: 11px; text-align: left; vertical-align: middle; }
.kpi-table th:first-child { width: 28%; }
.kpi-table td { color: #58635f; }
.kpi-table .month-value { color: var(--ink); font-weight: 700; }
.area-row th { padding: 0; background: #f4f7f5; }
.area-row button { display: flex; width: 100%; min-height: 54px; align-items: center; gap: 12px; padding: 0 14px; border: 0; background: transparent; text-align: left; }
.area-row button:hover { background: #edf3f0; }
.area-row button > span:nth-child(2) { flex: 1; font-size: 12px; font-weight: 700; }
.area-row small { margin-left: 7px; color: var(--muted); font-weight: 400; }
.chevron { transition: transform .16s; }
.collapsed .chevron { transform: rotate(-90deg); }
.area-avatar { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #c7dcd6; border-radius: 4px; background: #edf6f3; color: var(--accent-dark); font-size: 9px; font-weight: 800; }
.column-row th { padding-top: 9px; padding-bottom: 9px; background: #fafbfa; color: #78827f; font-size: 8px; text-transform: uppercase; letter-spacing: .04em; }
.data-row { cursor: pointer; }
.data-row:hover { background: #f8fbfa; }
.data-row th { font-weight: 650; }
.missing { color: #9ca5a2 !important; font-style: italic; }
.light { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 4px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.light::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.light.green { color: var(--green); background: var(--green-soft); }
.light.yellow { color: var(--yellow); background: var(--yellow-soft); }
.light.red { color: var(--red); background: var(--red-soft); }
.light.gray { color: #6e7874; background: #eef1ef; }
.aside-panel { padding: 18px; }
.aside-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 13px; }
.aside-heading h2 { margin: 0; font-size: 15px; }
.count-badge { display: grid; place-items: center; min-width: 27px; height: 27px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; background: #f7f8f7; font-size: 10px; font-weight: 700; }
.aside-list { display: grid; gap: 8px; }
.aside-item { width: 100%; padding: 12px; border: 1px solid var(--line); border-left: 3px solid var(--yellow); border-radius: 5px; background: #fff; text-align: left; }
.aside-item.action { border-left-color: var(--accent); }
.aside-item:hover { box-shadow: 0 2px 8px rgba(30,55,47,.08); transform: translateY(-1px); }
.aside-item strong, .aside-item small, .aside-item p { display: block; }
.aside-item strong { margin-top: 8px; font-size: 11px; }
.aside-item p { margin: 6px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.aside-item small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.area-chip { display: inline-flex; padding: 3px 6px; border-radius: 3px; background: #eef4f2; color: #50615c; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.detail-link { display: block; margin-top: 9px; color: var(--accent); font-size: 9px; font-weight: 700; text-align: right; }
.status-pill { display: inline-flex; margin-top: 8px; padding: 3px 7px; border-radius: 10px; background: #eef4f2; color: var(--accent-dark); font-size: 8px; font-weight: 700; }
.completed-panel { padding-bottom: 10px; }
.completed-groups { padding: 14px; }
.completed-group + .completed-group { margin-top: 18px; }
.completed-group h3 { margin: 0 0 8px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.completed-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.completed-item { display: grid; grid-template-columns: 25px 1fr; gap: 9px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 5px; background: #fcfdfc; text-align: left; }
.completed-check { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; }
.empty { padding: 24px; color: var(--muted); text-align: center; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 4px 0 20px; border-bottom: 1px solid var(--line); }
.section-heading h1 { margin: 0; font-size: 29px; }
.section-heading p { margin: 6px 0 0; color: var(--muted); }
.section-period { min-width: 190px; }
.tabs { display: flex; gap: 18px; margin: 20px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { position: relative; flex: 0 0 auto; padding: 13px 8px; border: 0; background: none; color: #5d6965; font-size: 12px; }
.tabs button::after { content: ""; position: absolute; inset: auto 3px -1px; height: 2px; transform: scaleX(0); background: var(--accent); }
.tabs button.active { color: var(--ink); font-weight: 700; }
.tabs button.active::after { transform: scaleX(1); }
.management-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: start; }
.management-section-heading, .management-form > h2, .audit-title { min-height: 54px; margin: 0; padding: 17px; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.management-section-heading { display: flex; align-items: center; justify-content: space-between; }
.management-section-heading span { display: grid; place-items: center; min-width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 4px; font-size: 10px; }
.management-items { max-height: 650px; overflow-y: auto; }
.management-item { padding: 15px 17px; border-bottom: 1px solid var(--line-soft); }
.management-item.archived { opacity: .62; background: #f4f5f4; }
.management-item > span { display: block; color: var(--accent); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.management-item strong { display: block; margin-top: 5px; font-size: 12px; }
.management-item small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; }
.link-button { padding: 0; border: 0; background: none; color: var(--accent); font-size: 10px; font-weight: 700; }
.link-button:hover { text-decoration: underline; }
.link-button.danger { color: var(--red); }
.management-form { padding-bottom: 16px; }
.management-form-body { display: grid; gap: 13px; padding: 17px; }
.field { display: grid; gap: 5px; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-row { display: flex; flex-wrap: wrap; gap: 18px; }
.check-row label { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.check-row input { width: 16px; height: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 17px; }
.audit-filters { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 16px; border-bottom: 1px solid var(--line-soft); }
.audit-list { padding: 0 16px; }
.audit-entry { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.audit-entry header { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.audit-entry strong { display: block; margin-top: 7px; }
.audit-entry details { margin-top: 8px; color: var(--muted); font-size: 11px; }
.audit-entry pre { max-height: 180px; overflow: auto; padding: 10px; border-radius: 5px; background: #f2f4f3; font-size: 10px; white-space: pre-wrap; }
.audit-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 13px 16px; color: #7b8b96; font-size: 10px; }
.audit-pagination button { min-height: 38px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 7px; color: #9aa7ae; background: #fff; font-weight: 700; }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(13,27,23,.52); animation: fade .15s ease; }
.modal { width: min(560px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow-y: auto; border-radius: 9px; background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.26); animation: rise .18s ease; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-soft); }
.modal-header h2 { margin: 0; font-size: 19px; }
.modal-close { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 19px; }
.modal-body { padding: 20px 22px; color: #46534e; line-height: 1.55; }
.modal-body p:first-child { margin-top: 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.detail-grid div { padding: 10px; border-radius: 5px; background: #f4f7f5; }
.detail-grid small, .detail-grid strong { display: block; }
.detail-grid small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.detail-grid strong { margin-top: 3px; font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 20px; }
.toast-root { position: fixed; z-index: 80; right: 18px; bottom: 18px; display: grid; width: min(440px, calc(100vw - 36px)); gap: 8px; }
.toast { padding: 14px 16px; border: 1px solid #a8cfc5; border-left: 4px solid var(--accent); border-radius: 6px; background: #f7fffc; box-shadow: 0 8px 28px rgba(14,47,38,.17); line-height: 1.45; animation: slide .2s ease; }
.toast strong { display: block; margin-bottom: 3px; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: .5; } }
@keyframes slide { from { transform: translateX(18px); opacity: 0; } }

@media (max-width: 1100px) {
  .app-header { grid-template-columns: 240px 1fr 190px; padding: 0 22px; }
  .primary-nav a { padding: 0 7px; font-size: 11px; }
  .user-copy { display: none; }
  .executive-summary { grid-template-columns: 1fr 1.5fr; }
  .attention-list { grid-template-columns: 1fr; max-height: 215px; overflow: auto; }
  .attention-item { min-height: 61px; }
}

@media (max-width: 850px) {
  .app-header { height: 64px; grid-template-columns: 1fr auto auto; padding: 0 16px; }
  .wordmark { width: 78px; height: 34px; font-size: 10px; }
  .brand-copy, .brand-separator { display: none; }
  .mobile-menu { display: block; }
  .primary-nav { position: absolute; top: 64px; right: 0; left: 0; display: none; align-items: stretch; padding: 8px 16px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
  .primary-nav.open { display: grid; }
  .primary-nav a { min-height: 43px; }
  .primary-nav a::after { right: auto; left: 0; top: 8px; bottom: 8px; width: 2px; height: auto; transform: scaleY(0); }
  .primary-nav a.active::after { transform: scaleY(1); }
  .main-content { padding: 86px 16px 42px; }
  .page-toolbar, .section-heading { align-items: stretch; flex-direction: column; }
  .page-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .page-filters .button { grid-column: 1 / -1; }
  .executive-summary, .scorecard-layout, .management-grid { grid-template-columns: 1fr; }
  .scorecard-aside { grid-template-columns: 1fr 1fr; }
  .section-period { min-width: 0; }
}

@media (max-width: 580px) {
  body { font-size: 13px; }
  .user-avatar { display: none; }
  .icon-button b { display: inline; }
  .logout { width: auto; padding: 0 10px; }
  .page-filters, .filters-inline, .scorecard-aside, .form-columns, .audit-filters, .completed-grid { grid-template-columns: 1fr; }
  .filters-inline { display: grid; width: 100%; }
  .summary-card { padding: 18px; }
  .card-heading h2 { font-size: 18px; }
  .health-score { font-size: 30px; }
  .health-legend { gap: 10px; }
  .section-heading h1 { font-size: 25px; }
  .tabs { gap: 8px; }
  .kpi-table, .kpi-table tbody, .kpi-table tr, .kpi-table th, .kpi-table td { display: block; }
  .kpi-table { min-width: 0; }
  .kpi-table .column-row { display: none; }
  .kpi-table .area-row th { width: 100%; }
  .kpi-table .data-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 13px; border-bottom: 1px solid var(--line-soft); }
  .kpi-table .data-row th { grid-column: 1 / -1; width: auto; padding: 0 0 7px; border: 0; font-size: 13px; }
  .kpi-table .data-row td { position: relative; padding: 17px 0 0; border: 0; }
  .kpi-table .data-row td::before { content: attr(data-label); position: absolute; top: 0; left: 0; color: var(--faint); font-size: 8px; font-weight: 700; text-transform: uppercase; }
  .kpi-table .data-row td:last-child { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* Camada de fidelidade visual: valores medidos na aplicação de referência. */
:root {
  --ink: #10263b;
  --muted: #667788;
  --faint: #84929c;
  --accent: #007f77;
  --accent-dark: #0c2c48;
  --accent-soft: #dff5f1;
  --canvas: #f3f6f8;
  --surface: #fff;
  --line: #dce4e9;
  --line-soft: #e6ecef;
  --green: #1b9b78;
  --green-soft: #e1f4ed;
  --yellow: #e8b22e;
  --yellow-soft: #fff3cf;
  --red: #d95b4b;
  --red-soft: #fde9e5;
  --shadow: 0 16px 40px rgba(18, 42, 61, .07);
  --radius: 8px;
  color: var(--ink);
  background: var(--canvas);
}

html { overflow-y: scroll; scrollbar-gutter: stable; }
body { min-height: 100vh; color: var(--ink); background: var(--canvas); font-size: 16px; }
h1, h2, h3, p { margin-top: 0; }

.app-header {
  position: sticky;
  top: 0;
  height: 58px;
  min-height: 58px;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  gap: 28px;
  padding: 7px clamp(20px, 4vw, 64px);
  align-items: center;
  color: #dbe8ef;
  border: 0;
  background: rgba(7, 26, 45, .97);
  box-shadow: 0 4px 24px rgba(3, 18, 31, .2);
  backdrop-filter: blur(12px);
}
.brand { width: 204px; min-width: 204px; height: 33px; gap: 0; justify-self: start; color: inherit; }
.wordmark { display: flex; width: 72px; height: 33px; padding-top: 1px; justify-content: center; background: transparent; color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .09em; }
.brand-separator { display: block; width: 1px; height: 26px; margin: 0 13px; background: #7890a0; }
.brand-copy { line-height: 1; }
.brand-copy strong { color: #fff; font-size: 18px; letter-spacing: .01em; }
.brand-copy small { margin-top: 6px; color: #8ca3b3; font-size: 9px; letter-spacing: .09em; }
.primary-nav { align-self: stretch; align-items: center; justify-self: center; gap: 28px; }
.primary-nav a { align-self: stretch; gap: 8px; padding: 0 2px; color: #9eb0bc; border-radius: 0; font-size: 12px; font-weight: 700; }
.primary-nav a::after { right: 0; bottom: 3px; left: 0; height: 2px; background: #4aa3cf; }
.primary-nav a:hover, .primary-nav a.active { color: #fff; }
.nav-icon, .user-avatar svg, .logout svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.user-session { width: 230px; min-width: 230px; gap: 10px; justify-self: end; justify-content: flex-start; }
.user-avatar { width: 38px; height: 38px; color: #82d8d1; border: 1px solid #31546c; background: #12344e; }
.user-avatar svg { width: 19px; height: 19px; }
.user-copy { min-width: 0; flex: 1; line-height: 1.15; }
.user-copy strong { color: #f1f6f8; font-size: 11px; }
.user-copy small { margin-top: 4px; color: #819aaa; font-size: 9px; letter-spacing: 0; }
.icon-button.logout { width: auto; min-width: 64px; height: 38px; gap: 6px; padding: 9px 10px; color: #b8c8d2; border-color: #2c4b62; border-radius: 9px; background: #102c43; font-size: 10px; }
.icon-button.logout:hover { color: #fff; border-color: #4d7088; background: #173a54; }
.icon-button.logout b { display: inline; }

.main-content { width: min(1460px, calc(100% - clamp(32px, 7vw, 112px))); min-height: calc(100vh - 128px); margin: 0 auto; padding: 35px 0; }
.main-content > section { margin-top: -12px; }
.page-toolbar { min-height: 62px; height: 62px; justify-content: flex-end; margin: -12px 0 20px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.main-content > .page-toolbar { margin: -12px 0 20px; }
.page-toolbar > h1 { display: none; }
.page-filters { align-items: flex-end; justify-content: flex-end; gap: 10px; }
.page-filters .filter { gap: 6px; }
.page-filters .filter label { color: #647786; font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.select-shell { position: relative; display: flex; align-items: center; color: #6c7f8d; }
.control-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.select-shell > .control-icon { position: absolute; z-index: 1; left: 11px; pointer-events: none; }
.page-filters select { min-width: 150px; height: 42px; padding: 0 34px 0 38px; color: var(--ink); border-color: #d4dfe4; border-radius: 4px; background: #fff; font-size: 12px; font-weight: 600; }
.page-filters .filter:last-child select { min-width: 210px; }
.page-filters .button { height: 42px; min-height: 42px; padding: 0 14px; color: #344e61; border-color: #d4dfe4; border-radius: 4px; background: #fff; box-shadow: 0 2px 5px rgba(18,42,61,.04); font-size: 12px; font-weight: 650; }
.page-filters .button:hover { color: #10263b; border-color: #aabdc8; background: #fcfdfe; box-shadow: 0 5px 14px rgba(18,42,61,.08); }

.executive-summary { grid-template-columns: minmax(0, 1fr); gap: 15px; margin-bottom: 15px; }
.health-card, .attention-card, .scorecard-panel, .completed-actions-panel, .scorecard-aside > section, .management-list, .management-form, .audit-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.health-card, .attention-card { min-width: 0; padding: 16px 20px; }
.health-card { height: 163px; min-height: 163px; }
.card-heading { align-items: center; gap: 16px; }
.card-heading h2 { margin: 5px 0 0; color: var(--ink); font-size: 21px; letter-spacing: -.025em; }
.eyebrow { margin: 0; color: #718292; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.health-score { color: var(--ink); font-size: 40px; font-weight: 400; line-height: normal; }
.stacked-bar { height: 15px; gap: 3px; margin: 18px 0; border-radius: 20px; background: #edf2f4; }
.health-legend { gap: 20px; color: #5e7280; font-size: 13px; }
.health-legend strong { color: var(--ink); font-size: 18px; }
.health-legend .dot { width: 9px; height: 9px; }
.attention-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-height: 362px; margin-top: 22px; padding: 2px 5px 2px 2px; overflow-y: auto; align-content: start; }
.attention-item { min-width: 0; width: 100%; min-height: 80px; height: 82px; grid-template-columns: 16px minmax(0, 1fr) 70px; gap: 10px; padding: 5px 12px; border: 1px solid transparent; border-radius: 6px; background: #f7f9fa; }
.attention-item:hover { border-color: #c9d6dc; background: #fff; }
.attention-item strong { color: var(--ink); font-size: 14px; }
.attention-item small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.attention-value { position: relative; display: grid; place-items: center; width: 70px; height: 70px; padding: 0; border: 0; color: var(--yellow); background: transparent; font-size: inherit; }
.attention-value.red { color: var(--red); }
.attention-value.yellow { color: var(--yellow); }
.attention-value svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.attention-value circle { fill: none; stroke-width: 4; }
.attention-progress-track { stroke: #e1e6ea; }
.attention-progress-value { stroke: currentColor; stroke-linecap: round; }
.attention-value b { position: relative; max-width: 52px; overflow: hidden; color: var(--ink); font-size: 10.5px; font-weight: 400; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }

.scorecard-layout { grid-template-columns: minmax(0, 1fr) 350px; gap: 15px; }
.scorecard-main, .scorecard-main-column, .scorecard-aside { gap: 15px; }
.scorecard-panel { min-width: 0; overflow: hidden; }
.panel-heading.table-toolbar { min-height: 54px; padding: 14px 19px; }
.panel-heading.table-toolbar h2 { font-size: 19px; }
.panel-heading.table-toolbar small { color: var(--muted); font-size: 11px; }
.kpi-table { font-size: 11px; }
.kpi-table th, .kpi-table td { padding: 12px 10px; border-bottom-color: #e6ecef; }
.kpi-table th:first-child { width: 28%; }
.area-row th { color: var(--ink); background: #f8fafb; font-size: 14px; }
.area-row button { min-height: 54px; padding: 13px 18px; }
.area-row small { color: var(--muted); font-size: 11px; }
.area-avatar { width: 26px; height: 26px; border: 0; border-radius: 6px; background: #dff5f1; color: #006e67; font-size: 8px; }
.column-row th { color: #667a89; background: #f2f5f6; font-size: 11px; letter-spacing: .06em; }
.data-row th { color: var(--ink); font-size: 12px; }
.data-row td, .data-row .month-value { color: #445867; font-size: 12px; }
.light { padding: 5px 8px; border-radius: 4px; font-size: 10px; }
.scorecard-aside > section { padding: 13px 16px; }
.aside-heading { min-height: 48px; margin-bottom: 16px; }
.aside-heading h2 { font-size: 17px; }
.count-badge { min-width: 28px; height: 28px; border: 0; border-radius: 6px; color: #596c7b; background: #eef2f4; }
.aside-list { gap: 9px; }
.aside-item { padding: 12px; border: 1px solid #e3e9ec; border-left: 3px solid #d7911d; border-radius: 6px; }
.aside-item.action { border-left-color: var(--accent); }
.aside-item strong { font-size: 12px; }
.aside-item p { font-size: 10.5px; }
.aside-item small { font-size: 9.5px; }
.area-chip { padding: 5px 8px; border-radius: 6px; color: #436374; background: #e8f0f3; font-size: 10px; }
.detail-link { color: var(--accent); font-size: 9px; }
.status-pill { padding: 5px 7px; border-radius: 6px; font-size: 9px; }
.completed-actions-panel { padding-bottom: 10px; }
.completed-actions-panel > .panel-heading { min-height: 58px; padding: 15px 18px; }
.completed-groups { padding: 15px 18px; }
.completed-grid { gap: 10px; }
.completed-item { padding: 15px; border-color: #cfe3dc; border-radius: 6px; background: #f7fbf9; }

.section-heading { min-height: 122px; align-items: center; margin: 0 0 18px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.section-heading h1 { margin: 5px 0 7px; color: #071a2d; font-size: 38px; line-height: 1.15; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 16px; }
.section-period { width: 180px; min-width: 180px; gap: 6px; }
.section-period label { color: #405766; font-size: 11px; font-weight: 750; letter-spacing: 0; text-transform: none; }
.section-period select { height: 38px; padding: 0 32px 0 38px; border-color: #c5d5e1; border-radius: 4px; color: var(--ink); background: #e8f0f6; font-size: 12px; font-weight: 650; }
.tabs { height: 46px; gap: 28px; margin: 0 0 15px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 15px 2px 14px; color: #60717e; font-size: 12px; font-weight: 700; }
.tabs button::after { right: 0; bottom: 0; left: 0; background: #071a2d; }
.tabs button.active { color: #0c2c48; }
.management-grid { grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 15px; }
.management-grid > .management-list { align-self: stretch; }
.management-list { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.management-section-heading { flex: none; min-height: 56px; padding: 16px 20px; color: var(--ink); font-size: 17px; }
.management-section-heading span { min-width: 28px; height: auto; min-height: 24px; padding: 4px 8px; border: 0; border-radius: 999px; color: #48606f; background: #edf2f4; font-size: 11px; }
.management-items { max-height: 680px; }
.management-item { display: grid; gap: 5px; padding: 12px 20px; }
.management-item > span { color: #718292; font-size: 9px; }
.management-item strong { margin: 0; color: var(--ink); font-size: 13px; }
.management-item small { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.management-action-item { position: relative; padding-right: 145px; }
.management-action-item > .status-pill { position: absolute; top: 14px; right: 20px; bottom: auto; color: var(--status); font-size: 9px; text-transform: none; }
.item-actions { gap: 12px; margin-top: 5px; }
.link-button { color: #718292; font-size: 11px; font-weight: 750; }
.management-form { display: block; padding: 16px 20px; }
.management-form > h2 { min-height: 0; margin: 0 0 16px; padding: 0; border: 0; color: var(--ink); font-size: 17px; }
.management-form-body { display: grid; gap: 12px; padding: 0; }
.field { gap: 6px; }
.field label { color: #405766; font-size: 11px; font-weight: 750; letter-spacing: 0; text-transform: none; }
.field input, .field select, .field textarea { min-width: 0; padding: 10px 11px; border-color: #ccd6db; border-radius: 4px; color: var(--ink); font-size: 12px; }
.field input, .field select { height: 38px; }
.field textarea { min-height: 70px; }
.form-actions { gap: 9px; margin-top: 19px; padding: 0; }
.form-actions button { min-height: 43px; padding: 10px 16px; border: 0; border-radius: 8px; background: #071a2d; font-weight: 750; }
.form-actions button:hover { background: #0c2c48; }
.form-actions .secondary { color: #405766; border: 1px solid var(--line); background: #fff; }
.check-row { gap: 18px; }
.check-row label { color: #405766; font-size: 12px; font-weight: 650; }
.check-row input[type="checkbox"] { width: 16px; height: 16px; padding: 0; }
.field > .check-row { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; }
.audit-panel { overflow: hidden; }
.audit-title { display: none; }
.audit-filters { padding: 16px 20px; background: #f8fafb; }
.audit-list { padding: 0; }
.audit-entry { padding: 14px 20px; }
.audit-entry header { font-size: 10px; }

.modal-backdrop { background: rgba(3, 16, 27, .64); backdrop-filter: blur(5px); }
.modal { width: min(900px, 100%); border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-info, .modal-confirm { width: min(520px, 100%); }
.modal-header { padding: 30px 30px 0; border: 0; }
.modal-header h2 { color: var(--ink); font-size: 24px; }
.modal-body { padding: 20px 30px; }
.modal-actions { padding: 0 30px 30px; }
.modal-detail .detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modal-actions .button { background: #071a2d; border-color: #071a2d; }
.modal-actions .button.secondary { color: #405766; border-color: var(--line); background: #fff; }
.modal-actions .button.danger { background: var(--red); border-color: var(--red); }
.modal-kpi, .modal-record { position: relative; max-height: 90vh; padding: 30px; }
.modal-record { width: min(760px, 100%); }
.modal-kpi .modal-header, .modal-record .modal-header { height: 0; padding: 0; border: 0; }
.modal-kpi .modal-header > h2, .modal-record .modal-header > h2 { display: none; }
.modal-kpi .modal-close, .modal-record .modal-close { position: absolute; z-index: 2; top: 18px; right: 18px; display: grid; place-items: center; }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.modal-kpi .modal-body, .modal-record .modal-body { padding: 0; color: #405766; line-height: 1.45; }
.modal-kpi .modal-actions, .modal-record .modal-actions { display: none; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 50px; padding-right: 40px; }
.modal-heading h2 { margin: 6px 0 0; color: var(--ink); font-size: 24px; line-height: 1.2; }
.detail-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin: 24px 0; }
.detail-metrics > div { min-width: 0; padding: 13px; border-radius: 7px; background: #f3f6f7; }
.detail-metrics span, .record-grid section > span { display: block; color: #718292; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-metrics strong { display: block; margin-top: 5px; overflow: hidden; color: var(--ink); font-size: 15px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.modal-grid { display: grid; gap: 11px; }
.kpi-detail-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.detail-copy { grid-column: span 3; }
.history-card { grid-column: span 2; }
.detail-copy, .history-card, .record-grid section { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.detail-copy h3, .history-card h3 { margin: 0 0 12px; color: var(--ink); font-size: 13px; }
.detail-copy p { margin: 0 0 17px; color: #546978; font-size: 11px; line-height: 1.65; }
.detail-copy dl { margin: 0; }
.detail-copy dl div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid #e7edef; font-size: 11px; line-height: 1.45; }
.detail-copy dt { color: #718292; font-weight: 600; }
.detail-copy dd { margin: 0; color: #344b5a; }
.bar-chart { display: grid; gap: 18px; padding-top: 16px; }
.bar-row { display: grid; grid-template-columns: 35px minmax(80px, 1fr) minmax(75px, auto); align-items: center; gap: 8px; }
.bar-row > span:first-child { color: #718292; font-size: 9px; }
.bar-track { display: block; height: 20px; overflow: hidden; border-radius: 4px; background: #eef2f4; }
.bar-track i { display: block; height: 100%; border-radius: 4px; background: #91a8b4; }
.bar-track i.current { background: #071a2d; }
.bar-row b { color: var(--ink); font-size: 9px; font-weight: 400; text-align: right; white-space: nowrap; }
.kpi-detail-grid > .detail-copy, .kpi-detail-grid > .history-card { min-height: 263px; }
.empty-history { display: grid; gap: 5px; padding: 28px 6px; color: #718292; text-align: center; font-size: 10px; }
.empty-history strong { color: #405766; font-size: 11px; }
.record-heading { padding-right: 48px; }
.record-heading .area-chip, .action-heading-badges { margin-top: 12px; }
.action-heading-badges { display: flex; gap: 7px; }
.action-dialog-heading { width: 100%; padding-right: 0; }
.action-dialog-heading > div { width: 100%; min-width: 0; }
.action-dialog-heading h2 { padding-right: 40px; }
.action-heading-badges { width: 100%; align-items: center; justify-content: space-between; gap: 12px; }
.record-heading .action-heading-badges .area-chip { margin-top: 0; }
.action-heading-badges .status-pill { position: static; flex: none; margin-top: 0; }
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 24px; }
.record-grid section { padding: 17px; border-radius: 11px; background: #f9fbfb; }
.record-grid section p { margin: 8px 0 0; color: #405766; font-size: 11px; line-height: 1.6; }
.record-grid .record-decision { grid-column: 1 / -1; border-left: 4px solid #153b59; background: #f3f7fa; }
.action-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.action-detail-grid { grid-template-columns: 1fr; }
.action-detail-grid section { min-height: 100px; border-left: 3px solid #153b59; background: #e8f0f6; }
.action-history-card { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.action-history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.action-history-heading > div > span { color: #718292; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.action-history-heading h3 { margin: 4px 0 0; color: var(--ink); font-size: 13px; }
.action-history-heading > span { padding: 4px 8px; color: #596c7b; border-radius: 9px; background: #eef2f4; font-size: 9px; font-weight: 800; white-space: nowrap; }
.action-history-list, .action-history-event-group { display: grid; }
.action-history-event { display: grid; grid-template-columns: auto minmax(140px, 1fr) minmax(112px, .5fr) minmax(105px, .5fr); align-items: center; gap: 13px; padding: 13px; border: 1px solid #e2e8eb; border-radius: 10px; background: #f8fafb; }
.action-history-event.current { border-color: #b9cbd7; box-shadow: inset 3px 0 #153b59; }
.action-history-marker { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #536b7d; background: #e4edf2; }
.action-history-event.current .action-history-marker { color: #fff; background: #153b59; }
.action-history-marker svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.action-history-copy { min-width: 0; display: grid; gap: 4px; }
.action-history-copy span { color: #718292; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.action-history-copy strong { overflow: hidden; color: #263e50; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.action-history-value { display: grid; gap: 5px; }
.action-history-value > span:first-child { color: #728491; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.action-history-value > strong { color: var(--ink); font-size: 10px; font-weight: 400; }
.action-history-event .status-pill { position: static; width: fit-content; margin: 0; }
.action-history-arrow { height: 34px; display: grid; place-items: center; color: #153b59; font-size: 20px; font-weight: 800; line-height: 1; }
.status-in_progress { --status: #008f87; }
.status-planned { --status: #bc7d12; }
.status-not_started { --status: #7d8d98; }
.status-completed { --status: #247652; }
.status-pill[class*="status-"] { color: var(--status); background: color-mix(in srgb, var(--status) 12%, white); }
.status-mark { width: 4px; min-height: 42px; border-radius: 999px; background: var(--status, #7d8d98); }
.aside-alerts, .aside-actions { display: grid; gap: 9px; }
.aside-alerts > button { width: 100%; padding: 12px; text-align: left; border: 1px solid #e3e9ec; border-radius: 6px; background: #fff; cursor: pointer; }
.aside-alerts > button:hover { border-color: #a8cfca; background: #f8fbfb; box-shadow: 0 6px 15px rgba(20,65,72,.07); }
.alert-top { display: flex; align-items: center; gap: 8px; }
.aside-alerts strong { display: block; margin: 8px 0 3px; font-size: 12px; }
.aside-alerts p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.open-detail { display: flex; justify-content: flex-end; margin-top: 8px; color: #718292; font-size: 9px; font-weight: 700; }
.aside-actions > button { position: relative; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; padding: 12px; text-align: left; border: 1px solid #e3e9ec; border-radius: 6px; background: #fff; cursor: pointer; }
.aside-actions > button:hover { border-color: #a8cfca; box-shadow: 0 6px 15px rgba(20,65,72,.07); }
.aside-actions .status-mark { min-height: 64px; }
.action-button-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.action-button-copy strong { margin: 7px 0 4px; padding-right: 58px; font-size: 11.5px; line-height: 1.35; }
.action-button-copy small { color: var(--muted); font-size: 9.5px; }
.aside-actions .status-pill { position: absolute; right: 9px; bottom: 9px; }
.completed-actions-panel { padding: 15px 18px; }
.completed-actions-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.completed-actions-heading > div { flex: 1; }
.completed-actions-heading h2 { margin: 3px 0 0; font-size: 18px; }
.completed-action-groups { display: grid; gap: 22px; }
.completed-action-period { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.completed-action-period h3 { margin: 0; color: #294654; font-size: 13px; }
.completed-action-period span { color: var(--muted); font-size: 9px; font-weight: 700; }
.completed-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.completed-actions-grid > button { position: relative; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 15px; text-align: left; border: 1px solid #cfe3dc; border-radius: 6px; background: #f7fbf9; cursor: pointer; }
.completed-actions-grid > button:hover { border-color: #82bda9; box-shadow: 0 7px 18px rgba(31,104,78,.08); }
.completed-check { width: 30px; height: 30px; display: grid; place-items: center; color: #fff; border-radius: 6px; background: #247652; font-size: 15px; font-weight: 800; }
.completed-action-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.completed-action-copy strong { margin: 8px 0 5px; padding-right: 76px; font-size: 11px; line-height: 1.4; }
.completed-action-copy small { color: var(--muted); font-size: 9px; }
.completed-actions-grid .status-pill { position: absolute; top: 14px; right: 14px; }
.audit-entry { display: grid; gap: 7px; }
.audit-entry header { align-items: center; }
.audit-entry header span { color: #718292; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.audit-entry time, .audit-entry > small, .audit-entry strong small { color: var(--muted); font-size: 10px; font-weight: 500; }
.audit-entry summary { color: #466170; cursor: pointer; font-size: 11px; font-weight: 700; }
.audit-changes { margin-top: 12px; padding: 11px 14px; border: 1px solid #cce3e0; border-radius: 6px; background: #f2faf8; }
.audit-changes > b { color: #718292; font-size: 11px; text-transform: uppercase; }
.audit-changes dl { display: grid; gap: 8px; margin: 11px 0 0; }
.audit-changes dl > div { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr); align-items: start; gap: 10px; padding-top: 8px; border-top: 1px solid #d9ebe8; }
.audit-changes dt { color: #405766; font-size: 11px; font-weight: 750; }
.audit-changes dd { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin: 0; color: #314854; font-size: 11px; overflow-wrap: anywhere; }
.audit-changes dd > span { padding: 6px 8px; border-radius: 6px; background: #fff; }
.audit-changes dd > strong { color: #718292; }
.audit-changes p { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.audit-json { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.audit-json section { min-width: 0; padding: 8px 11px; overflow: auto; border-radius: 6px; background: #f3f6f7; }
.audit-json b { color: #506775; font-size: 10px; text-transform: uppercase; }
.audit-json pre { max-height: none; margin: 7px 0 0; padding: 0; color: #314854; background: transparent; font-size: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.toast-root { position: fixed; z-index: 80; top: 72px; right: clamp(16px, 2.5vw, 34px); bottom: auto; width: min(360px, calc(100vw - 32px)); gap: 8px; }
.toast { min-height: 64px; padding: 12px; color: var(--ink); border: 1px solid #7cc8b4; border-left: 4px solid var(--green); border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(7,26,45,.14); font-size: 12px; }
.toast strong { color: var(--green); font-size: 12px; }

@media (max-width: 1180px) {
  .app-header { grid-template-columns: max-content minmax(0, 1fr) max-content; gap: clamp(12px, 2vw, 24px); padding-right: clamp(16px, 2.5vw, 30px); padding-left: clamp(16px, 2.5vw, 30px); }
  .primary-nav { display: flex; position: static; justify-self: center; padding: 0; border: 0; box-shadow: none; }
  .attention-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scorecard-layout { grid-template-columns: 1fr; }
  .scorecard-aside { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .management-action-item { padding-right: 20px; }
  .management-action-item > .status-pill { position: static; width: fit-content; margin-top: 4px; }
  .app-header { grid-template-columns: 1fr auto auto; padding: 7px 16px; }
  .brand-separator { margin: 0 9px; }
  .brand-copy { display: flex; }
  .primary-nav { position: absolute; top: 58px; right: 0; left: 0; display: none; padding: 8px 16px; background: #071a2d; }
  .primary-nav.open { display: grid; }
  .primary-nav a { min-height: 43px; }
  .mobile-menu { display: block; color: #dbe8ef; }
  .user-copy { display: none; }
  .main-content { width: min(100% - 36px, 1400px); padding-top: 28px; }
  .management-grid { grid-template-columns: 1fr; }
  .management-form { grid-row: 1; }
  .section-heading { align-items: flex-start; flex-direction: column; height: auto; }
  .section-period { width: 100%; }
  .section-period select { width: 100%; }
}

@media (max-width: 760px) {
  html, body { width: 100%; max-width: 100vw; overflow-x: hidden; }
  .app-header { position: static; width: 100vw; max-width: 100vw; height: auto; min-height: 0; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px; overflow: hidden; }
  .brand { min-width: 0; flex: 1; margin: 0; }
  .wordmark { width: 58px; font-size: 12px; }
  .brand-separator { margin: 0 9px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { display: none; }
  .user-session { min-width: 0; flex: none; gap: 5px; order: 1; }
  .user-avatar { display: grid; width: 34px; height: 34px; }
  .icon-button.logout { min-width: 38px; width: 38px; height: 34px; padding: 8px; }
  .icon-button.logout b { display: none; }
  .mobile-menu { display: none; }
  .primary-nav, .primary-nav.open { position: static; width: 100%; min-width: 0; display: flex; order: 2; gap: 0; padding: 0; background: transparent; box-shadow: none; }
  .primary-nav a { min-width: 0; min-height: 40px; flex: 1; justify-content: center; padding: 9px 6px; font-size: 9.5px; line-height: 1.2; text-align: center; }
  .primary-nav a::after { top: auto; right: 3px; bottom: 0; left: 3px; width: auto; height: 2px; transform: scaleX(0); }
  .primary-nav a.active::after { transform: scaleX(1); }
  .main-content { width: calc(100% - 24px); padding: 22px 0 24px; }
  .page-toolbar { height: auto; min-height: 0; margin: 0 0 15px; }
  .page-filters { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .page-filters .button { grid-column: 1 / -1; }
  .page-filters select { width: 100%; min-width: 0 !important; }
  .attention-list { grid-template-columns: 1fr; max-height: 420px; }
  .attention-item { height: 74px; min-height: 74px; }
  .scorecard-aside { grid-template-columns: 1fr; }
  .tabs { gap: 18px; }
  .modal-kpi, .modal-record { padding: 24px 18px; }
  .modal-heading { gap: 14px; padding-right: 32px; }
  .modal-heading h2 { font-size: 20px; }
  .detail-metrics { grid-template-columns: 1fr 1fr; }
  .detail-metrics > div:last-child { grid-column: 1 / -1; }
  .kpi-detail-grid, .record-grid { grid-template-columns: 1fr; }
  .detail-copy, .history-card, .record-grid .record-decision { grid-column: 1; }
  .action-metrics { grid-template-columns: 1fr; }
  .action-history-event { grid-template-columns: auto minmax(0, 1fr); }
  .action-history-value, .action-history-event > .status-pill { grid-column: 2; }
  .completed-action-period { align-items: flex-start; flex-direction: column; gap: 3px; }
  .completed-actions-grid { grid-template-columns: minmax(0, 1fr); }
  .completed-action-copy strong { padding-right: 0; }
  .completed-actions-grid .status-pill { position: static; margin-top: 9px; }
  .audit-filters, .audit-json { grid-template-columns: 1fr; }
  .audit-entry header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .audit-pagination { flex-wrap: wrap; }
  .audit-changes dl > div { grid-template-columns: 1fr; }
  .audit-changes dd { grid-template-columns: 1fr; }
  .audit-changes dd > strong { justify-self: center; transform: rotate(90deg); }
}

@media (max-width: 520px) {
  .brand-copy, .brand-separator { display: none; }
  .health-card, .attention-card { padding: 14px 17px; }
  .card-heading h2 { font-size: 18px; }
  .health-score { font-size: 32px; }
  .health-legend { gap: 11px; font-size: 11px; }
  .health-legend strong { font-size: 14px; }
  .section-heading h1 { font-size: 30px; }
  .form-columns, .audit-filters { grid-template-columns: 1fr; }
}
