:root {
  color-scheme: light;
  --ink: #17332c;
  --muted: #4e655a;
  --bg: #f4f7f0;
  --line: #ceddd3;
  --nav: #12362f;
  --accent: #126959;
  font: 16px/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid #258972; outline-offset: 3px; }
.portal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px max(18px, calc((100vw - 1080px) / 2));
  gap: 16px;
  background: var(--nav);
  color: white;
}
.portal-brand { display: inline-flex; align-items: center; gap: 9px; color: white; font-weight: 750; }
.portal-brand img { border-radius: 9px; }
main { width: min(1080px, calc(100% - 36px)); margin: 36px auto 56px; }
h1, h2 { line-height: 1.2; margin: 0; letter-spacing: -.027em; overflow-wrap: anywhere; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(19px, 3vw, 24px); }
.intro { color: var(--muted); max-width: 60ch; margin: 10px 0 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: clamp(16px, 3vw, 24px); min-width: 0; }
.login { width: min(100%, 420px); }
.login button { width: 100%; margin-top: 16px; }
.login-captcha { margin-top: 16px; }
label { display: grid; gap: 6px; font-weight: 650; margin-top: 14px; }
input, select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
  border: 1px solid #8aa99c;
  border-radius: 8px;
}
button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.secondary { background: #fff; color: var(--accent); }
button:disabled { opacity: .65; cursor: wait; }
.message { background: #e7f3ea; border: 1px solid #c9e0d3; padding: 12px 14px; border-radius: 9px; overflow-wrap: anywhere; }
.message:empty { display: none; }
.message.error { background: #fff0eb; border-color: #eac7bb; color: #783525; }
.admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.muted { color: var(--muted); margin: 8px 0 0; font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
#evidence-area { margin-top: 26px; }
.evidence-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.upload { margin-bottom: 12px; }
.upload label { margin: 0; font-size: 19px; }
.upload input { margin: 12px 0; }
.file-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-name { min-width: 0; overflow-wrap: anywhere; }
.file-row .actions { flex: none; margin: 0; }
#load-more { margin-top: 12px; }
.empty { margin: 0; color: var(--muted); }
dialog { width: min(800px, calc(100% - 28px)); max-height: 90dvh; border: 1px solid var(--line); padding: 16px; border-radius: 12px; }
dialog::backdrop { background: #0c2a24d9; }
dialog img, dialog video { display: block; width: 100%; max-height: 70dvh; object-fit: contain; }
@media (max-width: 700px) {
  main { margin-top: 23px; }
  .admin-grid { grid-template-columns: 1fr; }
  .file-row { display: block; }
  .file-row .actions { margin-top: 9px; }
}

.portal-links { display:flex; gap:5px 12px; align-items:center; justify-content:end; flex-wrap:wrap; }
.portal-links a { color:#fff; min-height:44px; display:inline-flex; align-items:center; font-size:14px; }

.zones-admin { margin-top: 18px; }
.zones-admin select { max-width: 280px; }
#zones-admin-list { list-style: none; margin: 12px 0 0; padding: 0; }
.zone-review-row { border-top: 1px solid var(--line); padding-block: 12px; }
.zone-review-row h3 { margin: 0; font-size: 1rem; }
.zone-review-row p { overflow-wrap: anywhere; }
.zone-review-row .actions { margin-top: 6px; }
.zone-review-row a { min-height: 44px; display: inline-flex; align-items: center; }

.portal-notices { margin-block: 1rem; }
.portal-notices .actions { align-items: center; flex-wrap: wrap; }
.portal-notices fieldset { padding: 0; margin: 0; min-inline-size: 0; border: 0; }
.portal-notices .notice-fields-grid {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap: .5rem .75rem;
}
.portal-notices label { min-width: 0; }
.portal-notices textarea { min-height: 84px; resize: vertical; width: 100%; font: inherit; }
.portal-notices :is(input,select,textarea,button) { min-height: 44px; font-size: 1rem; }
.portal-notices :is(h2,h3,h4,p,li,strong,button) { overflow-wrap: anywhere; }
.portal-notices .notice-admin-list { list-style: none; padding: 0; }
.portal-notices .notice-admin-list li { padding: .8rem 0; border-top: 1px solid #bccfc4; }
.portal-notices .notice-admin-list p { margin: .25rem 0; }
.portal-notices [data-error="true"] { color: #822b22; font-weight: 700; }
.portal-notices [role="status"]:empty { display: none; }
.notice-admin-preview { margin-top: 1rem; }
.notice-admin-preview h4 { margin: 0 0 .35rem; color: #345b4c; }

#admin-mfa-setup code { overflow-wrap:anywhere; user-select:all; font-size:1rem; }
#admin-mfa-qr { display:block; max-width:100%; height:auto; margin:1rem 0; background:#fff; }
#admin-mfa-qr:not([src]) { display:none; }
