:root{font:16px/1.45 system-ui,sans-serif;color:#142a49;background:#f0f5fb}*{box-sizing:border-box}body{margin:0}header,main{max-width:1200px;margin:auto;padding:20px}header{display:flex;justify-content:space-between;align-items:center}header strong{font-size:24px}header p{margin:4px 0;color:#526882}h1,h2,h3,p{margin-top:0}h2{font-size:21px}h3{font-size:17px}.panel,.kpi{background:white;border:1px solid #d5e0ee;border-radius:16px;padding:22px;margin-bottom:18px}.narrow{max-width:460px;margin:40px auto}.toolbar,.actions{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.actions{margin:18px 0}label{display:block;font-size:14px;font-weight:600;min-width:0}input,select,textarea{display:block;font:inherit;width:100%;padding:11px;border:1px solid #9eafc4;border-radius:8px;margin:6px 0 12px;color:inherit;background:white}button{font:inherit;font-weight:600;min-height:44px;border:1px solid #a8bbd2;border-radius:9px;padding:10px 16px;cursor:pointer;color:#14375e;background:#f6faff}.primary{background:#057c85;color:white;border-color:#057c85}button:disabled{opacity:.6;cursor:wait}:focus-visible{outline:3px solid #1a70e5;outline-offset:3px}.toolbar button{margin-bottom:12px}.kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.kpi{margin:0}.kpi strong{display:block;font-size:28px;margin-top:8px}.muted,small{color:#526882}.fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.records{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.record,.notice{border:1px solid #d7e3ef;border-radius:10px;padding:16px;overflow-wrap:anywhere}.record dl{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:12px 0}.record dt{color:#526882}.record dd{margin:0;text-align:right}.notice{margin:12px 0;background:#f5faff}.badge{display:inline-block;padding:4px 8px;border-radius:5px;background:#e8f3fa;font-size:13px}.change{border-left:3px solid #108e93;padding:7px 12px;margin:8px 0}#message:not(:empty){padding:12px;background:#fff4d9;border-radius:9px}#quality{margin:12px 0}.toolbar label{flex:1;min-width:160px}[hidden]{display:none!important}@media(max-width:640px){header,main{padding:12px}.panel{padding:16px}.kpis,.fields,.records{grid-template-columns:1fr}.kpi strong{font-size:26px}.actions button{flex:1;min-width:140px}.toolbar label{min-width:120px}.narrow{margin-top:20px}header strong{font-size:20px}}@media(prefers-reduced-motion:no-preference){button:hover{filter:brightness(.96)}}

dialog#rankingDialog{width:min(1000px,calc(100% - 24px));max-height:calc(100dvh - 24px);border:1px solid #a8bbd2;border-radius:16px;padding:20px;color:inherit;overflow:auto}dialog#rankingDialog::backdrop{background:#142a4970}#closeRankings{margin-bottom:16px}#rankingDialog .record{min-width:0}#rankingDialog h3{overflow-wrap:anywhere}@media(max-width:640px){dialog#rankingDialog{padding:14px}}

input.projectChoice{display:inline-block;width:auto;margin:8px 10px 8px 0}#projects label{display:flex;align-items:center;min-height:44px}

.summary-delta{font-size:14px;line-height:1.5;overflow-wrap:anywhere}.summary-delta.up{color:#087a4b}.summary-delta.down{color:#b12c30}.summary-delta.neutral{color:#526882}#summaryResult .kpi{min-width:0}#summaryResult .kpi strong{overflow-wrap:anywhere}

#records,#months,#cleanRecords,#recordList{display:block}.record-scroll{max-width:100%;overflow:auto}.record-table{width:100%;border-collapse:collapse;font-size:14px}.record-table th,.record-table td{text-align:left;vertical-align:top;padding:10px;border-bottom:1px solid #d5e0ee}.record-table th{background:#eef5fa}.record-table summary{cursor:pointer;min-height:44px;padding:8px}.record-table details{min-width:110px}.record-table details[open]{min-width:220px}@media(max-width:640px){.record-table{min-width:580px}.record-table th,.record-table td{padding:8px}}
/* Keep row actions reachable while retaining a real table on narrow screens. */
@media(max-width:600px){
 #cleanRecords .record-table td:last-child,#cleanRecords .record-table th:last-child,
 #records .record-table td:last-child,#records .record-table th:last-child,
 #recordList .record-table td:last-child,#recordList .record-table th:last-child{position:sticky;right:0;background:#fff;box-shadow:-2px 0 4px #17334c15;min-width:90px;max-width:150px}
}
body[data-section]:not([data-section="report"]) #branchOperations{display:none}

/* Temporary collection-only workspace. Reports/data/permissions remain intact. */
.collection-only #reportKpis,.collection-only #historyInfo,.collection-only #dashboardLink,
.collection-only #monthlyPanel,.collection-only #showOperations,.collection-only #showNotifications,
.collection-only #showPartners,.collection-only #showAccounts,.collection-only #showCatalogs,
.collection-only #showRankings,.collection-only #showCompleteness,.collection-only #showMonthClose,
.collection-only #partnersPanel,.collection-only #accountsPanel,.collection-only #catalogPanel,
.collection-only #notifications,.collection-only #completenessPanel,.collection-only #monthClosePanel,
.collection-only #monthNotices,.collection-only #branchOperations,.collection-only #primaryMetrics,
.collection-only .secondary,.collection-only #cleanFinance,.collection-only #cleanCatalogOpen,
.collection-only #cleanCatalog {display:none !important;}

.collection-hub #content > :not(#collectionProjects) {display:none !important;}

.collection-hub .platform-tabs {display:none !important;}

/* Month review remains available on request; reports stay hidden. */
.collection-only #showMonthClose:not([hidden]),.collection-only #showCompleteness:not([hidden]){display:inline-block!important;}
.collection-only #monthClosePanel:not([hidden]),.collection-only #completenessPanel:not([hidden]){display:block!important;}

.collection-only #monthNotices:not([hidden]){display:block!important;}

/* Compact registers: one record per row, details never stretch the table. */
.entry-register{margin:20px 0}.entry-register h3 small{font-weight:400}
.entry-table{table-layout:fixed;min-width:0!important}.entry-table th:first-child{width:105px}.entry-table th:nth-child(3){width:150px}.entry-table th:last-child{width:110px}
.entry-table td{overflow-wrap:anywhere}.entry-table small{display:block;margin-top:4px;font-size:12px;color:#526477}.entry-table .entry-mobile-date{display:none}
.entry-table .entry-row-actions{position:static!important;box-shadow:none!important}.entry-row-actions button{display:block;width:100%;min-height:44px;margin:0 0 4px!important;padding:6px;font-size:13px}
.entry-preview{width:min(520px,calc(100% - 24px));max-height:85dvh;overflow:auto;border:1px solid #bdd0dd;border-radius:16px;padding:20px;box-sizing:border-box;color:#19334b}.entry-preview::backdrop{background:#10283e88}.entry-preview dt{color:#526477;margin-top:12px}.entry-preview dd{margin:3px 0;overflow-wrap:anywhere}.entry-preview button{min-height:44px}.entry-preview form{position:sticky;bottom:0;background:white;padding-top:12px}
@media(max-width:640px){.entry-table .entry-date{display:none}.entry-table .entry-mobile-date{display:block}.entry-table th:nth-child(3){width:88px}.entry-table th:last-child{width:82px}.entry-table th,.entry-table td{padding:6px 3px;font-size:12px}.entry-table small{font-size:11px}.entry-table .entry-row-actions{min-width:0!important;max-width:none!important}.entry-row-actions button{font-size:11px}.entry-register .record-scroll{overflow-x:auto}}
