/* osl.huettentool.org — sachlich, ruhig, nordisches Blaugrau als Akzent. Kein Framework. */

:root {
  --akzent: #2f5d7c;
  --akzent-dunkel: #1f3a4d;
  --akzent-hell: #e4edf3;
  --hintergrund: #f3f5f7;
  --karte: #ffffff;
  --rahmen: #d7dde3;
  --rahmen-hell: #e8ecf0;
  --text: #1f2933;
  --gedaempft: #5b6770;
  --gruen: #1b5e30;
  --gruen-hell: #dcefe0;
  --gelb: #8a6100;
  --gelb-hell: #fff3cd;
  --rot: #9b2c22;
  --rot-hell: #fbe3e1;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.45;
  color: var(--text);
  font-size: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--hintergrund); }
h1 { font-size: 1.75rem; margin: 0 0 .25rem; line-height: 1.2; }
h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
h1 + p, .untertitel { color: var(--gedaempft); margin: 0 0 1.25rem; }
p { margin: .5rem 0 1rem; }
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-size: .9em; }
small { font-size: .85em; }

/* Kopfzeile und Navigation */
header {
  background: var(--akzent-dunkel);
  color: #fff;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  min-height: 3.25rem;
}
header .brand { color: #fff; font-weight: 700; font-size: 1.1rem; padding: .75rem 0; white-space: nowrap; }
header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 .25rem; flex: 1; min-width: 0; }
header nav a { color: rgba(255, 255, 255, .85); padding: .9rem .6rem; white-space: nowrap; border-bottom: 3px solid transparent; }
header nav a:hover { color: #fff; text-decoration: none; }
header nav a.aktiv { color: #fff; border-bottom-color: #fff; }
header .konto { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
header .konto a { color: rgba(255, 255, 255, .85); padding: .9rem .6rem; white-space: nowrap; }
header .konto a.aktiv { color: #fff; }
header .konto .btn { background: transparent; border: 1px solid rgba(255, 255, 255, .5); color: #fff; padding: .3rem .7rem; font-size: .85rem; }
header .konto .btn:hover { background: rgba(255, 255, 255, .12); }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
main.breit { max-width: none; }
main.schmal { max-width: 40rem; }

/* Meldungen und Hinweise */
.meldung { padding: .7rem 1rem; border-radius: 6px; margin-bottom: 1.25rem; border: 1px solid transparent; }
.meldung.fehler { background: var(--rot-hell); color: var(--rot); border-color: #f2b8b3; }
.meldung.ok { background: var(--gruen-hell); color: var(--gruen); border-color: #b9dfc2; }
.hinweis { color: var(--gedaempft); font-size: .9rem; }
.intro { color: var(--gedaempft); max-width: 48rem; margin-bottom: 1.25rem; }

/* Karten und Boxen */
.box, .karte {
  background: var(--karte);
  border: 1px solid var(--rahmen);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}
.box > h2:first-child, .box > h3:first-child, .karte > h2:first-child { margin-top: 0; }
.box.warnung { border-color: #e6c15a; background: #fff8e1; }
.box.warnung h3 { margin-top: 0; }
.box.warnung p:last-child { margin-bottom: 0; }
.vorformatiert { white-space: pre-line; }
.feld-schmal { width: 5rem; }
form.karte > h3:first-child { margin-top: 0; }

/* Kennzahlen (Preise, Cockpit) */
.preise, .kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.preis, .kennzahl { background: var(--karte); border: 1px solid var(--rahmen); border-radius: 8px; padding: 1rem 1.25rem; }
.preis .titel, .kennzahl .titel { color: var(--gedaempft); font-size: .85rem; }
.preis .wert { font-size: 2rem; font-weight: 700; line-height: 1.2; margin: .2rem 0; }
.kennzahl .wert { font-size: 1.4rem; font-weight: 700; line-height: 1.3; margin: .15rem 0; }
.preis .hinweis, .kennzahl .hinweis { margin: 0; }

/* Buttons: eine Groesse, drei Varianten (Standard, sekundaer, gefahr) plus Textlink */
.btn, button, a.button {
  display: inline-block;
  background: var(--akzent);
  color: #fff;
  border: 1px solid var(--akzent);
  padding: .5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-size: .95rem;
  line-height: 1.3;
}
.btn:hover, button:hover, a.button:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); text-decoration: none; }
.btn.sekundaer, button.sekundaer, a.button.sekundaer { background: var(--karte); color: var(--akzent); }
.btn.sekundaer:hover, button.sekundaer:hover, a.button.sekundaer:hover { background: var(--akzent-hell); color: var(--akzent-dunkel); border-color: var(--akzent); }
.btn.gefahr, button.gefahr { background: var(--karte); color: var(--rot); border-color: #d9a39d; }
.btn.gefahr:hover, button.gefahr:hover { background: var(--rot-hell); border-color: var(--rot); }
.btn.klein, button.klein, a.button.klein { padding: .3rem .7rem; font-size: .85rem; }
button.link { background: none; border: 0; padding: 0; color: var(--akzent); font: inherit; border-radius: 0; }
button.link:hover { background: none; text-decoration: underline; color: var(--akzent-dunkel); }
button.link.gefahr { color: var(--rot); }
.aktionen { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.aktionen form { margin: 0; }
.aktion-gruppe { display: inline-flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.aktion-gruppe select { width: auto; padding: .3rem .4rem; font-size: .85rem; }
form.inline { display: inline; }

/* Gefaehrliche Aktionen stehen abgesetzt unter dem Formular */
.gefahrenzone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rahmen); }
.gefahrenzone form { margin: 0; }

/* Formulare */
form.karte { max-width: 36rem; }
label { display: block; margin: 0 0 .9rem; font-weight: 500; }
label input, label select, label textarea { display: block; width: 100%; margin-top: .3rem; font-weight: 400; }
input, select, textarea {
  font: inherit;
  padding: .45rem .6rem;
  border: 1px solid var(--rahmen);
  border-radius: 6px;
  background: var(--karte);
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: var(--akzent); }
textarea { min-height: 4rem; resize: vertical; }
input[type=file] { padding: .35rem; }
label:has(> input[type=checkbox]) { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
label > input[type=checkbox] { width: auto; margin: .3rem 0 0; }
form .hinweis { margin-top: -.4rem; }
form button { margin-top: .25rem; }
.kopierfeld { display: flex; gap: .4rem; align-items: center; }
.kopierfeld input { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; flex: 1; min-width: 0; padding: .3rem .5rem; }

/* Tabellen: nur waagerechte Linien, Kopf gedaempft, auf schmalen Bildschirmen scrollbar */
.tabelle { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--rahmen); border-radius: 8px; background: var(--karte); }
.tabelle table { min-width: 36rem; margin: 0; }
.tabelle td.hinweis { min-width: 18rem; }
.tabelle td:first-child, .tabelle th:first-child { white-space: nowrap; }
table { border-collapse: collapse; width: 100%; background: var(--karte); }
th, td { border: 0; border-bottom: 1px solid var(--rahmen-hell); padding: .55rem .75rem; text-align: left; vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--gedaempft); font-weight: 600; background: #f8f9fa; }
tr:last-child td { border-bottom: 0; }
td.aktion, th.aktion { text-align: right; white-space: nowrap; }
td .aktion-gruppe { justify-content: flex-end; }
tr.status-verbindlich td:first-child { box-shadow: inset 4px 0 0 #7fc08f; }
tr.status-unverbindlich td:first-child { box-shadow: inset 4px 0 0 #e9c46a; }
.badge { display: inline-block; font-size: .8rem; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; }
.badge.status-verbindlich { background: var(--gruen-hell); color: var(--gruen); }
.badge.status-unverbindlich { background: var(--gelb-hell); color: var(--gelb); }
td.frei { color: var(--gruen); font-weight: 600; }
td.voll { color: var(--rot); }

/* Belegungsplan: Zeilen = Naechte, Spalten = Raeume. Auf dem Handy waagerecht wischen,
   die Datumsspalte bleibt stehen. */
.plan { overflow-x: auto; border: 1px solid var(--rahmen); border-radius: 8px; background: var(--karte); margin: 1rem 0; }
.plan table { table-layout: fixed; min-width: 80rem; }
.plan th, .plan td { font-size: .8rem; padding: .25rem .35rem; white-space: normal; overflow-wrap: normal; vertical-align: top; border-bottom: 1px solid var(--rahmen-hell); }
.plan th { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.plan tr:first-child th { vertical-align: bottom; }
.plan th.raum a { font-weight: 600; color: var(--text); }
.plan th.raum small { display: block; color: var(--gedaempft); font-weight: 400; }
.plan th.nacht { width: 5.5rem; position: sticky; left: 0; background: #f8f9fa; z-index: 1; white-space: nowrap; color: var(--text); }
.plan .neu-gebaeude { border-left: 2px solid var(--rahmen); }
.plan td span { display: block; border-radius: 4px; padding: .05rem .35rem; line-height: 1.35; margin: 1px 0; font-size: .75rem; }
.plan td span.status-verbindlich { background: var(--gruen-hell); color: var(--gruen); }
.plan td span.status-unverbindlich { background: var(--gelb-hell); color: var(--gelb); }
.plan td span a { color: inherit; font-weight: 600; }
.plan td > a { text-decoration: none; display: block; }
.plan td > a:hover span, .plan td > a:focus-visible span { outline: 2px solid currentColor; outline-offset: -2px; }
.plan td br { display: none; }
.plan tr.wochenende th.nacht { background: var(--akzent-hell); }
.plan.stellplaetze table { min-width: 40rem; }
.nur-handy { display: none; }

/* Fotos */
.fotos { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.fotos figure { margin: 0; max-width: 20rem; }
.fotos img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rahmen); }
.fotos figcaption { font-size: .85rem; color: var(--gedaempft); margin-top: .3rem; display: flex; gap: .6rem; align-items: center; justify-content: space-between; }

/* Drop-Zone fuer Fotos */
.dropzone { border: 2px dashed var(--rahmen); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; background: #fafbfc; transition: border-color .15s, background .15s; }
.dropzone p:first-child { margin: 0 0 .75rem; }
.dropzone label { margin-bottom: .5rem; }
.dropzone.aktiv { border-color: var(--akzent); background: var(--akzent-hell); }
.dropzone-liste { margin: 0; }

/* Fehlerseite */
.fehlerseite { text-align: center; padding: 3rem 1rem; }
.fehlerseite .code { font-size: 4rem; font-weight: 700; color: var(--rahmen); line-height: 1; }
.fehlerseite h1 { margin: .5rem 0 1.5rem; }

/* Verlauf eingeklappt */
details.verlauf summary { cursor: pointer; color: var(--akzent); margin: .5rem 0; }

@media (max-width: 720px) {
  main { padding: 1rem .9rem 3rem; }
  h1 { font-size: 1.5rem; }
  header { padding: 0 .9rem; }
  header .brand { padding: .6rem 0; }
  header nav { order: 3; flex-basis: 100%; gap: 0; padding-bottom: .1rem; }
  header nav a { padding: .5rem .5rem .55rem; font-size: .95rem; }
  header .konto a { padding: .5rem .4rem; }
  .preis .wert { font-size: 1.6rem; }
  .box, .karte { padding: 1rem; }
  .nur-handy { display: block; }
}
