/* Eigentümerportal – Design angelehnt an lissmann-website (Montserrat-Fallback, Taubenblau, Grün) */
:root {
  --blau: #60A5FA;
  --blau-dunkel: #1E293B;
  --gruen: #15a54d;
  --gruen-dunkel: #0e7a38;
  --gruen-tint: #E6F4EC;
  --bg: #F9FAFB;
  --bg-alt: #F1F5F9;
  --weiss: #FFFFFF;
  --text: #1F2937;
  --muted: #475569;
  --border: #E2E8F0;
  --rot: #b42318;
  --rot-tint: #FEE4E2;
  --gelb-tint: #FEF3C7;
  --radius: 6px;
  --radius-card: 16px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--gruen-dunkel); }
a:hover { color: var(--blau-dunkel); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--blau-dunkel); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }
.container { max-width: 1160px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; background: var(--weiss); border-bottom: 1px solid var(--border); padding: .75rem 1.25rem; }
.brand { text-decoration: none; color: var(--blau-dunkel); display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.1rem; }
.brand-name .hl { color: var(--gruen); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.captcha-box { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; padding: .7rem .9rem; border: 1px solid #cbd5e1; border-radius: var(--radius); background: #fff; }
.captcha-box input { width: 1.25rem; height: 1.25rem; }
.captcha-box label { margin: 0; font-weight: 500; }
.captcha-status { margin-left: auto; font-size: .8rem; color: var(--muted); }
.captcha-ok .captcha-box, .captcha-ok.captcha-box { border-color: var(--gruen); }
.captcha-ok .captcha-status { color: var(--gruen-dunkel); font-weight: 600; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.brand-sub { font-size: .8rem; color: var(--gruen-dunkel); font-weight: 600; }
.site-header nav { flex: 1; }
.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.site-header nav a { display: block; padding: .45rem .8rem; border-radius: var(--radius); text-decoration: none; color: var(--blau-dunkel); font-weight: 500; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { background: var(--gruen-tint); color: var(--gruen-dunkel); }
.logout { display: flex; align-items: center; gap: .75rem; margin: 0; }
.who { font-size: .9rem; color: var(--muted); }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; }
label.check input { width: auto; margin-top: .35rem; }

h1 { font-size: 1.75rem; color: var(--blau-dunkel); margin: 0 0 .25rem; }
h2 { font-size: 1.25rem; color: var(--blau-dunkel); margin: 0 0 .75rem; }
.lead { color: var(--muted); margin: 0 0 1.5rem; }

.card { background: var(--weiss); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 1.25rem 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid .card { margin-bottom: 0; }
.stat { font-size: 2rem; font-weight: 700; color: var(--gruen-dunkel); line-height: 1.1; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; }

label { display: block; font-weight: 600; margin: .9rem 0 .25rem; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], select, textarea, input[type=file] {
  width: 100%; padding: .6rem .75rem; border: 1px solid #cbd5e1; border-radius: var(--radius); font: inherit; background: #fff; color: var(--text);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--blau); outline-offset: 1px; }
.hint { font-size: .85rem; color: var(--muted); margin: .25rem 0 0; }

.btn { display: inline-block; background: var(--gruen); color: #fff; border: 2px solid var(--gruen); border-radius: 25px; padding: .55rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--gruen-dunkel); border-color: var(--gruen-dunkel); color: #fff; }
.btn-outline { background: transparent; color: var(--gruen-dunkel); }
.btn-sm { padding: .3rem .9rem; font-size: .9rem; }
.form-actions { margin-top: 1.25rem; display: flex; gap: .75rem; flex-wrap: wrap; }

.flash { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; }
.flash-ok { background: var(--gruen-tint); color: var(--gruen-dunkel); }
.flash-error { background: var(--rot-tint); color: var(--rot); }

.badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-offen { background: var(--gelb-tint); color: #92400e; }
.badge-bearb { background: #DBEAFE; color: #1e40af; }
.badge-erledigt { background: var(--gruen-tint); color: var(--gruen-dunkel); }
.badge-fehler { background: var(--rot-tint); color: var(--rot); }

.comment { border-left: 3px solid var(--border); padding: .25rem 0 .25rem .9rem; margin: 1rem 0; }
.comment.admin { border-color: var(--gruen); }
.meta { font-size: .85rem; color: var(--muted); }
.pre { white-space: pre-wrap; }
.muted { color: var(--muted); }
.mt { margin-top: 1.25rem; }
ul.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; }
ul.codes li { background: var(--bg-alt); border-radius: var(--radius); padding: .5rem .75rem; font-size: 1.05rem; }
#qr img { display: block; max-width: 220px; height: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; background: #fff; }
.notice-box { background: var(--gelb-tint); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1.25rem; }
.privacy h2 { margin-top: 1.5rem; }
.privacy ul { margin-top: 0; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.stat-card:hover { border-color: var(--gruen); }
.stat-card span:last-child { color: var(--muted); font-size: .9rem; }
h3.sub { font-size: 1rem; color: var(--muted); margin: 1rem 0 .4rem; }
section[id] { scroll-margin-top: 1rem; }
.filter-note { background: var(--bg-alt); border-radius: var(--radius); padding: .5rem .9rem; margin-bottom: 1rem; }
.subnav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.subnav a { display: block; padding: .35rem .9rem; border-radius: 999px; background: var(--bg-alt); text-decoration: none; color: var(--blau-dunkel); font-weight: 500; }
.subnav a[aria-current="page"] { background: var(--gruen); color: #fff; }
.inline-form { display: inline; margin: 0; }
.inline-form select { width: auto; display: inline-block; }
.row { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.login-box { max-width: 420px; margin: 3rem auto; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem 1rem; border-top: 1px solid var(--border); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 640px) {
  .logout { width: 100%; justify-content: space-between; }
  h1 { font-size: 1.4rem; }
}

/* Hilfeseite */
.help-steps { padding-left: 1.3rem; }
.help-steps > li { margin: 0 0 1rem; }
.help-steps > li > strong { display: block; margin-bottom: .2rem; color: var(--blau-dunkel); }
.help-steps p, .faq p { margin: .35rem 0; }
details.faq { border: 1px solid var(--border); border-radius: 8px; margin: .4rem 0; background: var(--bg); }
details.faq > summary { cursor: pointer; padding: .6rem .9rem; font-weight: 600; }
details.faq[open] > summary { border-bottom: 1px solid var(--border); }
details.faq > div { padding: .3rem .9rem .6rem; }
.card h3 { font-size: 1.05rem; margin: 1.2rem 0 .3rem; color: var(--gruen-dunkel); }

/* Menü auf eine eigene Zeile, wenn der Platz neben dem Namen nicht reicht (z. B. Tablet, schmale Fenster) */
@media (max-width: 1180px) {
  .site-header nav { order: 3; flex: 1 1 100%; }
  .site-header .logout { margin-left: auto; }
}
