:root { color-scheme: light; font-family: "Segoe UI", system-ui, sans-serif; color: #284253; background: #fff; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; }
body { height: 100dvh; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
header { flex: 0 0 auto; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; border-bottom: 1px solid #e5edf2; }
.identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.institution { font-size: 12px; font-weight: 700; letter-spacing: .08em; padding-right: 12px; border-right: 1px solid #d9e4ec; }
h1 { margin: 0; font-size: 13px; font-weight: 500; white-space: nowrap; }
nav { display: flex; align-items: center; gap: 4px; }
a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: #325c73; text-decoration: none; border-radius: 6px; }
a:hover { background: #eff5f8; }
a:focus-visible { outline: 2px solid #326f95; outline-offset: -3px; }
.external svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mobile-app { display: none; padding: 0 8px; font-size: 12px; white-space: nowrap; }
main { flex: 1 1 auto; min-height: 0; }
iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 600px), (pointer: coarse) {
  header { padding: 0 8px; }
  .identity { gap: 8px; }
  .institution { padding-right: 8px; }
  .mobile-app { display: inline-flex; }
}
@media (max-width: 350px) { .institution { display: none; } }

#report { width:100%; height:100%; min-height:0; }
.viewer-controls { flex-wrap:wrap; gap:8px; }
.viewer-controls label { font-size:12px; color:#496270; }
.viewer-controls select,.viewer-controls button { font:inherit; font-size:12px; min-height:34px; padding:6px 9px; border:1px solid #d9e4ec; border-radius:7px; background:#fff; color:#284253; }
#report-page { max-width:220px; }
#viewer-status { position:absolute; top:54px; left:14px; z-index:1; padding:10px 14px; background:#fff; color:#284253; border:1px solid #d9e4ec; border-radius:8px; font-size:13px; }
.login-page { min-height:100dvh; height:auto; background:radial-gradient(ellipse at top left,#e8f0f6,transparent 65%),#f7f9fb; }
.login-shell { display:grid; place-items:center; width:100%; min-height:100dvh; padding:clamp(16px,3vw,40px); }
.login-card { width:min(100%,760px); min-width:0; overflow-wrap:anywhere; padding:clamp(24px,4vw,64px); background:#fff; border:1px solid #e0e8ef; border-radius:18px; box-shadow:0 16px 50px #17354a12; }
.login-brand { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; color:#527082; font-weight:700; font-size:14px; letter-spacing:.12em; margin-bottom:40px; }
.login-card h1 { color:#203e52; font-size:clamp(28px,3vw,38px); font-weight:600; white-space:normal; }
.login-description { margin:12px 0 32px; color:#647b8b; font-size:17px; }
.login-card label { display:block; margin:20px 0 9px; font-size:16px; color:#3b5668; }
.login-card input { width:100%; min-height:56px; border:1px solid #cfdae3; border-radius:8px; padding:16px; font:inherit; font-size:18px; color:#203e52; background:#fff; }
.login-card input:focus { outline:2px solid #397da5; outline-offset:2px; }
.login-card button { width:100%; min-height:56px; margin-top:30px; padding:16px; border:0; border-radius:8px; background:#254e68; color:#fff; font:inherit; font-size:18px; font-weight:600; cursor:pointer; }
.login-card button:disabled { opacity:.65; }
.login-error { color:#a4262c; font-size:13px; line-height:1.5; }
.login-footer { margin:28px 0 0; color:#748896; font-size:14px; text-align:center; }
@media(max-width:700px) {
  body:not(.login-page) header { padding:8px; flex-wrap:wrap; }
  .viewer-controls { width:100%; justify-content:space-between; gap:4px; }
  .viewer-controls label { display:none; }
  #report-page { max-width:46%; flex:1; }
  .viewer-controls select,.viewer-controls button { min-height:38px; }
  #viewer-status { top:98px; right:8px; left:8px; }
}

/* Annual document choice, outside the report canvas. */
.annual-dialog { width: min(440px, calc(100vw - 48px)); box-sizing: border-box; border: 1px solid #dce6ec; border-radius: 10px; padding: 26px; color: #243f54; background: white; font: 14px "Segoe UI", sans-serif; box-shadow: 0 16px 60px #15314233; }
.annual-dialog::backdrop { background: #182e4666; }
.annual-dialog h2 { font-size: 20px; margin: 0 0 12px; }
.annual-dialog p { line-height: 1.5; margin-bottom: 20px; }
.annual-dialog select { font: inherit; padding: 7px 12px; color: inherit; background: white; border: 1px solid #a9becb; border-radius: 5px; }
.annual-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.annual-actions button { font: inherit; padding: 9px 12px; border: 1px solid #a9becb; border-radius: 5px; color: #243f54; background: #f2f6f8; cursor: pointer; }
.annual-actions button:last-child { background: #286e87; color: white; }
.annual-actions button:disabled { opacity: .5; cursor: default; }
.process-document-dialog { width: calc(100vw - 40px); max-width: 1440px; height: calc(100dvh - 40px); max-height: none; box-sizing: border-box; padding: 0; border: 1px solid #dce6ec; border-radius: 8px; background: #fff; color: #284253; box-shadow: 0 16px 60px #15314233; overflow: hidden; }
.process-document-dialog[open] { display: flex; flex-direction: column; }
.process-document-dialog::backdrop { background: #182e4666; }
.process-document-header { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid #e5edf2; }
.process-document-header h2 { margin: 0; font: 500 14px "Segoe UI", sans-serif; }
.process-document-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 0; padding: 7px; border-radius: 6px; background: transparent; color: #357b96; cursor: pointer; }
.process-document-close:hover { color: #245b73; background: #eaf3f7; }
.process-document-close:focus-visible { outline: 2px solid #488a9e; outline-offset: 1px; }
.process-document-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.process-document-dialog > iframe { flex: 1; min-height: 0; width: 100%; border: 0; }
@media (max-width: 700px) { .process-document-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); } .process-document-header h2 { font-size: 12px; } }
