/* ============================================================
   Einwohnermeldeamt Aldenbrock — behördliche Gestaltung
   Amtsblau #14395e · Siegelgold #c8a24a · Registerdaten in Monospace
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  background: #eceef0;
  color: #1c2733;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Kopf / Behördenleiste ---------- */

.amt-bar { height: 4px; background: #c8a24a; }

.amt-kopf { background: #14395e; color: #ffffff; }
.amt-inner {
  max-width: 860px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.amt-marke { display: flex; align-items: center; gap: 14px; cursor: default; }
.amt-siegel { flex: none; }
.amt-siegel svg { display: block; }
.amt-titel { line-height: 1.25; }
.amt-stadt {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #cddae6;
}
.amt-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px; font-weight: 700; letter-spacing: 0.01em;
}
.amt-rechts { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.amt-kennung { color: #cddae6; }
.amt-kennung b { color: #ffffff; font-weight: 600; }
.amt-abmelden { color: #ffffff; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.amt-abmelden:hover { color: #f0d69a; }

/* ---------- Login ---------- */

.login-wrap {
  min-height: calc(100vh - 90px);
  display: grid; place-items: center; padding: 48px 20px;
}
.login-col { width: 100%; max-width: 400px; }
.amt-karte {
  background: #ffffff; border: 1px solid #d5dae0;
  border-top: 3px solid #14395e;
  box-shadow: 0 1px 2px rgba(20,57,94,0.06), 0 10px 30px rgba(20,57,94,0.07);
}
.login-kopf { padding: 22px 26px 6px; }
.login-titel { font-family: Georgia, serif; font-size: 18px; font-weight: 700; color: #14395e; }
.login-sub { font-size: 13px; color: #647485; margin-top: 3px; }
.login-body { padding: 18px 26px 24px; display: flex; flex-direction: column; gap: 15px; }

.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #5a6a7a; }
.eingabe {
  font: inherit; font-size: 15px; padding: 10px 12px;
  border: 1px solid #c2cad2; border-radius: 3px; background: #fbfcfd; color: #1c2733;
}
.eingabe:focus { outline: none; border-color: #14395e; box-shadow: 0 0 0 3px rgba(20,57,94,0.12); background: #fff; }

.amt-btn {
  font: inherit; font-size: 15px; font-weight: 700;
  color: #fff; background: #14395e; border: none; border-radius: 3px;
  padding: 11px 16px; cursor: pointer; letter-spacing: 0.02em;
}
.amt-btn:hover { background: #1d4d7c; }
.amt-btn:active { background: #0f2c48; }

.amt-fehler {
  font-size: 13px; color: #8a2417; background: #fbe9e6;
  border: 1px solid #efc7bf; border-radius: 3px; padding: 9px 11px;
}
.login-fuss {
  padding: 12px 26px; border-top: 1px solid #e6e9ec;
  font-size: 11.5px; color: #8a97a4; letter-spacing: 0.03em;
}

/* ---------- Suche ---------- */

.such-wrap { max-width: 860px; margin: 0 auto; padding: 26px 24px 64px; }

.such-box {
  background: #ffffff; border: 1px solid #d5dae0; border-top: 3px solid #14395e;
  padding: 20px 22px; box-shadow: 0 1px 2px rgba(20,57,94,0.05);
}
.such-label { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #5a6a7a; margin-bottom: 8px; }
.such-eingabe {
  width: 100%; font: inherit; font-size: 17px; padding: 13px 15px;
  border: 1px solid #c2cad2; border-radius: 3px; background: #fbfcfd; color: #1c2733;
}
.such-eingabe:focus { outline: none; border-color: #14395e; box-shadow: 0 0 0 3px rgba(20,57,94,0.12); background: #fff; }
.such-hint { margin-top: 8px; font-size: 12.5px; color: #8a97a4; }

.such-status { margin: 22px 2px 12px; font-size: 13px; color: #5a6a7a; }
.such-status b { color: #14395e; }

/* ---------- Trefferliste ---------- */

.liste { display: flex; flex-direction: column; gap: 8px; }
.zeile {
  background: #ffffff; border: 1px solid #d9dee3; border-left: 3px solid #14395e;
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; transition: background .12s, border-color .12s;
}
.zeile:hover { background: #f5f8fb; border-left-color: #c8a24a; }
.zeile-haupt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.zeile-name { font-size: 15px; font-weight: 700; color: #14395e; }
.zeile-sub { font-size: 12.5px; color: #64717f; font-family: "Courier New", monospace; word-break: break-word; }
.zeile-sub mark { background: #fdeec2; color: inherit; padding: 0 1px; }
.zeile-az { font-size: 12px; color: #8a97a4; font-family: "Courier New", monospace; flex: none; }
.zeile.status-verzogen .zeile-name::after { content: " · verzogen"; font-size: 11.5px; font-weight: 400; color: #a06a2b; }
.zeile.status-verstorben .zeile-name::after { content: " · verstorben"; font-size: 11.5px; font-weight: 400; color: #8a2417; }

.leer { padding: 26px 2px; color: #64717f; font-size: 14px; }

/* ---------- Feldgitter (im Slide-out) ---------- */

.feldgitter {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 22px;
}
.gitter-zeile { display: flex; flex-direction: column; padding: 7px 0; border-bottom: 1px dotted #e7eaed; }
.gitter-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8a97a4; }
.gitter-wert { font-size: 14px; font-family: "Courier New", monospace; color: #1c2733; word-break: break-word; }
.gitter-wert mark { background: #fdeec2; color: inherit; padding: 0 1px; }
.zeile-breit { grid-column: 1 / -1; }

/* ---------- Overlay + Slide-out ---------- */

.overlay {
  position: fixed; inset: 0; background: rgba(20,32,45,0.38);
  opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 90;
}
.overlay.offen { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 440px; max-width: 92vw;
  background: #ffffff; box-shadow: -10px 0 40px rgba(20,32,45,0.22);
  transform: translateX(100%); transition: transform .28s ease; z-index: 100;
  display: flex; flex-direction: column; overflow: hidden;
}
.drawer.offen { transform: none; }
.drawer-kopf {
  flex: none; display: flex; justify-content: flex-end; gap: 6px;
  padding: 12px 14px; background: #14395e;
}
.drawer-icon {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: transparent; border: none; border-radius: 5px; color: #ffffff; cursor: pointer;
  transition: background .12s, color .12s;
}
.drawer-icon:hover { background: rgba(255,255,255,0.14); }
.drawer-icon.ok { color: #7fdca0; }
.drawer-body { padding: 20px 22px 44px; overflow-y: auto; }
.drawer-titel { padding-bottom: 12px; margin-bottom: 6px; border-bottom: 2px solid #14395e; }
.d-name { font-size: 18px; font-weight: 700; color: #14395e; }
.d-geb { font-size: 12.5px; color: #64717f; font-family: "Courier New", monospace; margin-top: 3px; }

/* Mitbewohner des Haushalts */
.hh-block { margin-top: 22px; padding-top: 14px; border-top: 2px solid #14395e; }
.hh-titel { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8a97a4; margin-bottom: 9px; }
.hh-liste { display: flex; flex-direction: column; gap: 6px; }
.hh-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 12px; background: #f5f8fb; border: 1px solid #e2e8ee; border-radius: 5px;
  text-decoration: none; transition: background .12s, border-color .12s;
}
.hh-link:hover { background: #eef3f8; border-color: #c8a24a; text-decoration: none; }
.hh-name { font-size: 14px; font-weight: 600; color: #14395e; }
.hh-meta { font-size: 12.5px; color: #64717f; font-family: "Courier New", monospace; flex: none; }
.hh-leer { font-size: 13px; color: #8a97a4; }

/* Ladehinweis */
.ladehinweis {
  position: fixed; left: 12px; right: 12px; bottom: 12px;
  font-size: 12.5px; line-height: 1.4;
  background: #2a1c10; color: #ffd9a8;
  border: 1px solid #5c4326; border-radius: 4px; padding: 10px 14px; z-index: 9999;
}

@media (max-width: 560px) {
  .feldgitter { grid-template-columns: 1fr; }
  /* Slide-out kommt auf dem Handy von unten */
  .drawer {
    top: auto; bottom: 0; right: 0; left: 0; width: auto; max-width: none;
    height: 86vh; border-radius: 14px 14px 0 0;
    transform: translateY(100%); box-shadow: 0 -10px 40px rgba(20,32,45,0.22);
  }
  .drawer.offen { transform: none; }
}