/* Nordkontor · Termine – schlicht, tablettauglich (große Tippflächen), druckbar */
:root {
  --grund: #f6f4ef; --karte: #fff; --text: #1f2a33; --leise: #66717a; --linie: #d9d4c8;
  --akzent: #1f4e5f; --akzent-hell: #e3eef1; --anfrage: #fff4cc; --anfrage-rand: #c9a227;
  --zu: #e9e6df; --rot: #a33a2b; --ok: #e5f3e8; --ok-rand: #2f7d45;
}
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--grund); color: var(--text); }
main { max-width: 1400px; margin: 0 auto; padding: 16px; }
a { color: var(--akzent); }
h1 { font-size: 1.45rem; margin: 8px 0 14px; }
h2 { font-size: 1.15rem; margin: 18px 0 10px; }
code { background: var(--akzent-hell); padding: 1px 5px; border-radius: 4px; font-size: .9em; }

.kopf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 16px; background: var(--akzent); }
.kopf a, .kopf .leise { color: #fff; text-decoration: none; padding: 12px 14px; border-radius: 8px; font-weight: 600; }
.kopf a:hover { background: rgba(255,255,255,.15); }
.kopf .marke { color: #fff; font-weight: 700; margin-right: 12px; }
.kopf .knopf { background: #fff; color: var(--akzent); }
.kopf .abmelden { margin-left: auto; }
.kopf button.leise { background: none; border: 0; font: inherit; cursor: pointer; opacity: .85; }

.knopf { display: inline-block; min-height: 48px; padding: 11px 18px; border-radius: 10px; border: 2px solid var(--akzent);
  background: var(--akzent); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.knopf.leise { background: #fff; color: var(--akzent); }
.knopf.gross { min-height: 56px; padding: 14px 24px; font-size: 1.05rem; }
.knopf.rot { background: #fff; color: var(--rot); border-color: var(--rot); }
.knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.knoepfe form { margin: 0; }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.karte.schmal { max-width: 420px; margin: 40px auto; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; min-height: 48px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
textarea { min-height: 80px; }
form.inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
form.inline input, form.inline select { width: auto; }
.formular { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.formular .breit { grid-column: 1 / -1; }
.feldname { font-weight: 600; font-size: .95rem; display: block; margin-bottom: 4px; }
.karte.schmal form { display: grid; gap: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-weight: 700; margin-bottom: 8px; }
fieldset.zeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }

/* Auswahl-Kacheln (Terminart, Uhrzeit) */
.knopfgruppe { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl { position: relative; display: block; }
.wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.wahl span { display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 10px 16px;
  border: 2px solid var(--linie); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; }
.wahl small { font-weight: 400; color: var(--leise); }
.wahl input:checked + span { border-color: var(--akzent); background: var(--akzent-hell); }
.wahl input:focus-visible + span { outline: 3px solid var(--anfrage-rand); }
.wahl.klein span { min-width: 84px; align-items: center; }

.meldung { padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; border-left: 5px solid var(--akzent); background: var(--akzent-hell); }
.meldung.fehler { border-color: var(--rot); background: #fbe9e6; }
.meldung.ok { border-color: var(--ok-rand); background: var(--ok); }
.meldung.hinweis { border-color: var(--anfrage-rand); background: var(--anfrage); }
.meldung.gross { font-size: 1.1rem; }
.warnung { color: var(--rot); font-weight: 600; }
.leise { color: var(--leise); }
.klein { font-size: .85rem; }
.etikett { font-size: .8rem; padding: 2px 8px; border-radius: 20px; background: var(--akzent-hell); }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tages-/Wochenraster */
.leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.rasterbox { overflow-x: auto; background: #fff; border: 1px solid var(--linie); border-radius: 12px; }
table.raster { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 640px; }
.raster th, .raster td { border: 1px solid var(--linie); padding: 0; vertical-align: top; }
.raster thead th { background: var(--akzent-hell); padding: 10px 6px; font-size: .95rem; }
.raster .zeitspalte { width: 64px; text-align: center; font-weight: 600; font-size: .9rem; padding-top: 6px; background: #faf9f6; }
.raster td { height: 52px; }
.raster td.zu { background: repeating-linear-gradient(45deg, var(--zu), var(--zu) 6px, #f2f0ea 6px, #f2f0ea 12px); }
.raster td.frei .slot, .raster td.frei form { display: block; height: 100%; margin: 0; }
.raster .slot { display: flex; width: 100%; height: 100%; min-height: 52px; align-items: center; justify-content: center;
  color: var(--linie); text-decoration: none; font-size: 1.6rem; background: none; border: 0; cursor: pointer; font-family: inherit; }
.raster .slot:hover, .raster .slot:active { background: var(--akzent-hell); color: var(--akzent); }
.raster .slot.ziel { font-size: .95rem; color: var(--akzent); font-weight: 700; background: #eef6f0; }
.raster td.belegt { background: var(--akzent-hell); border-left: 5px solid var(--akzent); }
.raster td.belegt.anfrage { background: var(--anfrage); border-left-color: var(--anfrage-rand); border-left-style: dashed; }
.raster .termin { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; height: 100%; color: var(--text); text-decoration: none; overflow: hidden; }
.raster .termin span { font-size: .85rem; }
.raster .termin .notiz { color: var(--leise); font-style: italic; }
.legende { font-size: .85rem; color: var(--leise); }
.legende .l { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin: 0 4px 0 12px; border: 1px solid var(--linie); }
.l.bestaetigt { background: var(--akzent-hell); } .l.anfrage { background: var(--anfrage); } .l.frei { background: #fff; } .l.zu { background: var(--zu); }
ul.abgesagt { color: var(--leise); text-decoration: line-through; }

table.liste { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .95rem; }
table.liste th, table.liste td { border-bottom: 1px solid var(--linie); padding: 8px; text-align: left; }
.snippet { font-family: ui-monospace, monospace; font-size: .85rem; }
.anfrage-karte { display: grid; gap: 6px; }
.anfrage-karte .kopfzeile { display: flex; justify-content: space-between; gap: 8px; font-size: 1.1rem; }

body.oeffentlich main { max-width: 760px; }

/* Druck: Terminbuch A4 quer */
@page { size: A4 landscape; margin: 10mm; }
@media print {
  body { background: #fff; font-size: 10pt; }
  .kopf, .nicht-drucken, .meldung, .legende, script { display: none !important; }
  main { max-width: none; padding: 0; }
  h1 { font-size: 14pt; margin: 0 0 6px; }
  .rasterbox { border: 0; overflow: visible; }
  table.raster { min-width: 0; }
  .raster td { height: 24px; }
  .raster th, .raster td { border-color: #888; }
  .raster .slot { min-height: 0; color: transparent; }
  .raster td.zu { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .raster td.belegt { background: #fff; border-left: 3px solid #000; }
  .raster td.belegt.anfrage { border-left-style: dashed; }
  .raster .termin { padding: 2px 4px; }
  .raster .termin span { font-size: 8pt; }
  tr { page-break-inside: avoid; }
}
