:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #233547;
  background: #f2f4f6;
  line-height: 1.55;
  font-synthesis: none;
  --ink: #142e46;
  --teal: #285eaa;
  --teal-dark: #1d4784;
  --mint: #eaf1fb;
  --muted: #5c6e7d;
  --line: #dce2e7;
  --paper: #fff;
  --warning: #923c28;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
main { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 30px; }
#root { display: flex; flex: 1 0 auto; flex-direction: column; }
p { margin: 0 0 16px; }
h1, h2 { color: var(--ink); }
h2 { margin: 0 0 10px; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.2; letter-spacing: -.025em; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
}
.brand { color: white; font-size: 1.1rem; font-weight: 700; }

.access-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
  max-width: 720px;
  margin: 72px auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 16px 48px #14333f0a;
}
.access-panel p { color: var(--muted); }
.access-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; background: var(--mint); color: var(--teal-dark); font-size: 1.3rem; font-weight: 750; }

.property-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin: 0; }
.property-meta div { display: flex; align-items: baseline; gap: 6px; }
.property-meta dt { color: #dbe6f0; font-size: .88rem; }
.property-meta dd { margin: 0; color: #fff; font-size: .92rem; font-weight: 650; }
#notice:first-child { margin-top: 16px; }

#message {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 20px 0;
  padding: 12px 15px;
  border: 1px solid #cbd9e5;
  border-radius: 10px;
  background: #edf4fa;
  color: #254b6a;
  font-size: .9rem;
  overflow-wrap: anywhere;
}
#message::before { content: ""; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: currentColor; }
#message.error { border-color: #edc8bf; background: #fff1ed; color: var(--warning); }
.access-panel #message { margin: 18px 0 0; }

#notice, .complaint-card, #complaint-form { display: flex; flex: 1 0 auto; flex-direction: column; }
#complaint { flex: 1 0 auto; }
.card { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 8px 24px #14333f08; }
.card > p:not(.card-label) { color: var(--muted); font-size: .94rem; }
.card-label { color: var(--teal); }

button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 20px;
  color: white;
  background: var(--teal);
  font: inherit;
  font-size: .94rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s, box-shadow .15s;
}
button:hover:not(:disabled) { background: var(--teal-dark); box-shadow: 0 4px 12px #285eaa25; }
button:disabled { color: #fff; background: #727d86; cursor: default; }
#save { width: 100%; }
button:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #d39a42; outline-offset: 3px; }

form { margin-top: 22px; padding-top: 20px; border-top: 1px solid #edf0f2; }
.complaint-card > p { margin-bottom: 12px; }
.complaint-card form { margin-top: 0; padding-top: 0; border-top: 0; }
label { display: block; margin-bottom: 9px; color: var(--ink); font-size: .93rem; font-weight: 650; }
textarea { display: block; width: 100%; min-height: 220px; resize: vertical; border: 1px solid #b8c7d1; border-radius: 9px; padding: 14px; background: #fcfdfe; color: #233547; font: inherit; font-size: 1rem; line-height: 1.55; }
textarea:focus { border-color: var(--teal); background: white; }
textarea:disabled { background: #f1f4f4; color: #6b7b7f; }
.form-meta { display: flex; justify-content: space-between; gap: 16px; margin: 8px 0 18px; color: var(--muted); font-size: .8rem; }

footer { max-width: 760px; margin: 30px auto 0; color: var(--muted); font-size: .82rem; text-align: center; }
footer strong { color: #425a64; }
noscript { display: block; margin-top: 24px; color: var(--warning); }
[hidden] { display: none !important; }

@media (max-width: 820px) {
  main { width: min(680px, calc(100% - 32px)); padding-top: 16px; }
}
@media (max-width: 480px) {
  main { width: calc(100% - 24px); }
  .site-header { gap: 6px 16px; }
  .property-meta { width: 100%; gap: 4px 12px; }
  .card { padding: 23px 20px; }
  .access-panel { grid-template-columns: 1fr; margin: 34px auto; padding: 24px; }
  .form-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
