:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #1f2937;
  background: #f3f6fa;
}
* { box-sizing: border-box; }
body { margin: 0; }
.topbar {
  position: relative;
  min-height: 88px;
  padding: 0 5vw;
  background: #102a43;
  color: white;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  line-height: 0;
}
.brand img { display: block; width: 250px; height: auto; }
nav { display: flex; align-items: center; gap: 20px; }
nav a, .link-button { color: white; }
.inline-form { margin: 0; }
.link-button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; text-decoration: underline; }
main { width: min(1000px, 92vw); margin: 36px auto; }
.panel { background: white; padding: 28px; margin-bottom: 24px; border: 1px solid #d9e2ec; border-radius: 8px; box-shadow: 0 3px 12px #102a4310; }
.narrow { max-width: 440px; margin: 8vh auto; }
h1 { margin-top: 0; font-size: 1.65rem; }
h2 { margin-top: 0; font-size: 1.3rem; }
p { line-height: 1.5; }
form:not(.inline-form) { display: grid; gap: 10px; }
label { font-weight: 600; margin-top: 8px; }
input[type="text"], input[type="password"] { width: 100%; padding: 11px; border: 1px solid #9fb3c8; border-radius: 4px; font: inherit; }
input[type="file"] { padding: 8px 0; font: inherit; }
.button { width: fit-content; margin-top: 14px; border: 0; border-radius: 4px; padding: 11px 18px; background: #1261a0; color: white; font: inherit; font-weight: 600; cursor: pointer; }
.button:hover { background: #0b4f84; }
.flash { padding: 12px 16px; margin-bottom: 18px; border-radius: 4px; background: #e8f1fa; }
.flash.error, .field-error { color: #a61b1b; }
.flash.error { background: #fff0f0; }
.flash.success { color: #176b3a; background: #e9f7ef; }
.field-error { display: block; }
.muted, .admin-form small { color: #52606d; }
.checkbox { display: flex; gap: 8px; align-items: center; }
.checkbox input { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { padding: 10px 12px; border: 1px solid #d9e2ec; text-align: left; vertical-align: top; }
th { background: #f0f4f8; }
.document-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.success-text { color: #176b3a; font-weight: 600; }
@media (max-width: 600px) {
  .topbar { min-height: 112px; padding: 12px 4vw; align-items: flex-end; justify-content: center; }
  .brand { top: 10px; transform: translateX(-50%); }
  .brand img { width: 220px; }
  nav { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .panel { padding: 20px; }
}
