:root {
  --navy: #17365d;
  --blue: #1f4e78;
  --blue-soft: #e8f0f7;
  --border: #dce3ea;
  --text: #17212b;
  --muted: #66717d;
  --background: #f4f6f8;
  --white: #ffffff;
  --warning: #fff4d8;
  --error: #fde8e8;
  --project-highlight: #4fba78;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; color: var(--text); background: var(--background); }
a { color: var(--blue); text-decoration: none; }
.topbar { min-height: 64px; display: flex; align-items: center; gap: 32px; padding: 0 32px; color: white; background: var(--navy); }
.brand { color: white; font-size: 18px; font-weight: 700; white-space: nowrap; }
.topbar nav { display: flex; gap: 22px; flex: 1; }
.topbar nav a, .user-menu, .link-button { color: #eef4f8; }
.user-menu { display: flex; align-items: center; gap: 16px; }
.link-button { border: 0; background: transparent; cursor: pointer; padding: 0; font: inherit; }
.page { max-width: 1500px; margin: 0 auto; padding: 32px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
h1 { margin: 0 0 8px; font-size: 28px; color: var(--navy); }
h2 { margin: 0 0 16px; font-size: 18px; color: var(--navy); }
p { margin: 0; color: var(--muted); }
.actions { display: flex; gap: 12px; align-items: center; }
.report-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: -6px 0 20px; }
.view-switcher { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 9px; background: white; }
.view-switcher a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; border-radius: 6px; color: var(--muted); font-weight: 700; }
.view-switcher a:hover { color: var(--navy); background: var(--blue-soft); }
.view-switcher a.is-active { color: white; background: var(--blue); }
.view-switcher a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.checks-trigger { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border: 2px solid #bb6b00; border-radius: 50%; color: #8a4f00; background: var(--warning); cursor: pointer; font-size: 24px; font-weight: 800; line-height: 1; }
.checks-trigger:hover { background: #ffe8ad; }
.checks-trigger:focus-visible { outline: 3px solid rgba(187, 107, 0, .28); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.modal-open { overflow: hidden; }
.report-modal[hidden] { display: none; }
.report-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; }
.report-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 26, 45, .52); }
.report-modal-dialog { position: relative; z-index: 1; width: min(680px, 100%); max-height: min(80vh, 680px); overflow-y: auto; padding: 24px; border-radius: 12px; background: white; box-shadow: 0 18px 54px rgba(10, 26, 45, .25); }
.report-modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.report-modal-heading h2 { margin: 0; }
.report-modal-dialog ul { margin: 20px 0 0; padding-left: 22px; line-height: 1.55; }
.report-modal-dialog li + li { margin-top: 8px; }
.modal-close-icon { width: 36px; height: 36px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; font-size: 26px; line-height: 1; }
.modal-close-icon:hover { color: var(--navy); background: var(--blue-soft); }
.report-modal-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border: 1px solid var(--blue); border-radius: 7px; color: var(--blue); background: white; cursor: pointer; font-weight: 600; }
.button.primary { color: white; background: var(--blue); }
.panel, .form-card, .login-card, .empty-state { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 22px; box-shadow: 0 2px 8px rgba(24, 45, 70, .04); }
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { padding: 18px; background: white; border: 1px solid var(--border); border-radius: 9px; }
.kpi span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.kpi strong { font-size: 20px; color: var(--navy); }
.chart-grid, .table-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.room-breakdown { margin-bottom: 20px; }
.table-wrap { overflow-x: auto; }
.report-tables { padding-top: 0; }
.report-tabs { display: flex; gap: 4px; margin: 0 -22px 20px; padding: 0 22px; border-bottom: 1px solid var(--border); }
.report-tab { position: relative; min-height: 54px; padding: 0 18px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font: inherit; font-weight: 700; }
.report-tab::after { content: ""; position: absolute; right: 18px; bottom: -1px; left: 18px; height: 3px; background: transparent; border-radius: 3px 3px 0 0; }
.report-tab:hover { color: var(--navy); }
.report-tab.is-active { color: var(--navy); }
.report-tab.is-active::after { background: var(--blue); }
.report-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; border-radius: 5px; }
.report-tab-panel[hidden] { display: none; }
.analysis-tables { padding-top: 0; }
.analysis-entity-tabs { margin-bottom: 0; }
.analysis-entity-tabs .report-tab:not(.is-active) { color: #7c8794; }
.analysis-entity-tabs .report-tab:not(.is-active):hover { color: #536171; }
.metric-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 18px; }
.metric-tab { min-height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); background: white; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.metric-tab:hover { color: var(--navy); background: var(--blue-soft); }
.metric-tab.is-active { border-color: var(--blue); color: white; background: var(--blue); }
.metric-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
#analysis-table th:first-child, #analysis-table td:first-child { width: 54px; text-align: center; }
#analysis-table td:not(:nth-child(2)) { white-space: nowrap; }
table { width: 100%; border-collapse: collapse; background: white; }
th { padding: 12px 10px; text-align: left; color: white; background: var(--blue); font-size: 13px; white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
tbody tr:hover { background: #f8fafc; }
.highlighted-project td, .highlighted-project:hover td { background: var(--project-highlight); }
.status { display: inline-block; padding: 4px 9px; border-radius: 20px; background: #edf1f5; font-size: 12px; }
.status-published { color: #17633a; background: #e5f5eb; }
.status-validated { color: #19558a; background: #e4f0fb; }
.status-mapping_required { color: #8a4f00; background: var(--warning); }
.status-failed { color: #9d2525; background: #fde8e8; }
.stacked-form { display: grid; gap: 10px; }
.stacked-form input { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #bfc9d4; border-radius: 6px; font: inherit; }
.stacked-form .button { margin-top: 12px; }
.form-card { max-width: 620px; }
.login-card { max-width: 430px; margin: 80px auto; }
.login-card p { margin-bottom: 22px; }
.form-error { color: #9d2525; font-size: 13px; }
.form-note { margin-top: 6px; padding: 12px; color: #54616d; background: var(--blue-soft); border-radius: 6px; font-size: 13px; line-height: 1.45; }
.messages { display: grid; gap: 8px; margin-bottom: 20px; }
.message, .alert { padding: 14px 16px; border-radius: 7px; }
.message.success { background: #e5f5eb; }
.message.warning { background: var(--warning); }
.message.error, .alert.error { background: var(--error); }
.alert.warning { margin-bottom: 20px; background: var(--warning); }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.empty-state { text-align: center; padding: 70px 30px; }
.empty-state p { margin: 8px 0 22px; }
canvas { max-height: 360px; }
.reference-intro { margin-bottom: 20px; }
.reference-intro p { max-width: 980px; line-height: 1.55; }
.reference-form { display: grid; gap: 20px; }
.mapping-grid { display: grid; align-items: center; gap: 12px 16px; }
.mapping-grid-developers { grid-template-columns: minmax(220px, 1.2fr) minmax(240px, 1fr) minmax(220px, 1fr); }
.mapping-grid-projects { grid-template-columns: minmax(220px, 1.2fr) minmax(280px, 1.2fr) minmax(180px, .8fr) minmax(200px, .8fr); }
.mapping-grid-header { padding: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--border); }
.mapping-name { display: grid; gap: 4px; align-self: stretch; align-content: center; }
.mapping-name span { color: var(--muted); font-size: 12px; }
.mapping-grid select, .mapping-grid input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #bfc9d4; border-radius: 6px; color: var(--text); background: white; font: inherit; }
.reference-actions { display: flex; justify-content: flex-end; gap: 12px; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } .topbar { flex-wrap: wrap; padding: 14px 20px; gap: 16px; } }
@media (max-width: 1100px) { .mapping-grid-developers, .mapping-grid-projects { grid-template-columns: 1fr; } .mapping-grid-header { display: none; } .mapping-name:not(:first-of-type) { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--border); } }
@media (max-width: 760px) { .page { padding: 20px 14px; } .page-heading, .chart-grid, .table-grid { display: block; } .page-heading .button, .chart-grid .panel, .table-grid .panel { margin-top: 14px; } .kpi-grid { grid-template-columns: 1fr 1fr; } .topbar nav { order: 3; width: 100%; overflow-x: auto; } .report-toolbar { align-items: flex-start; } .view-switcher { display: flex; width: 100%; overflow-x: auto; } .view-switcher a { flex: 1 0 auto; justify-content: center; } .metric-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 14px; } .reference-actions { flex-direction: column-reverse; } }

