/* Planung – ruhige Arbeitsoberfläche, Halbtage als Raster */
:root {
  --grund: #f3f4f1;
  --flaeche: #ffffff;
  --tinte: #1c2733;
  --leise: #5d6874;
  --linie: #d6dbd4;
  --akzent: #24564a;
  --akzent-hell: #e3eeea;
  --gefahr: #9b2c2c;
  --gesperrt: #e4e6e1;
  --radius: 6px;
  --schrift: "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--tinte); font: 16px/1.5 var(--schrift); }
a { color: var(--akzent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #e0a43a; outline-offset: 2px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 1rem; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 1.5rem 0 .6rem; font-weight: 650; }
.leise { color: var(--leise); font-weight: 400; }
.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopf */
.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: .75rem 1.25rem; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.marke { font-weight: 700; font-size: 1.1rem; color: var(--tinte); text-decoration: none; padding-left: .7rem; border-left: 4px solid var(--akzent); }
.nav { display: flex; gap: 1.1rem; flex: 1; overflow-x: auto; }
.nav a { color: var(--leise); text-decoration: none; padding: .3rem 0; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { color: var(--tinte); border-bottom-color: var(--akzent); }
.abmelden { margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--leise); font: inherit; text-decoration: underline; cursor: pointer; }

.inhalt { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.fuss { text-align: center; color: var(--leise); font-size: .8rem; padding: 1rem; }

/* Meldungen */
.meldung { padding: .7rem 1rem; border-radius: var(--radius); border-left: 4px solid var(--akzent); background: var(--akzent-hell); margin: 0 0 1rem; }
.meldung-fehler { border-left-color: var(--gefahr); background: #f7e6e6; }
.meldung-info { border-left-color: var(--leise); background: #eceeea; }

/* Formulare */
.schmal { max-width: 560px; }
.formular { display: grid; gap: .9rem; margin: 0 0 1.25rem; }
.formular label { display: grid; gap: .3rem; font-size: .9rem; color: var(--leise); }
.formular label.wahl { display: flex; align-items: center; gap: .5rem; color: var(--tinte); }
.zeile { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
input, select { font: inherit; color: var(--tinte); padding: .55rem .65rem; border: 1px solid #b9c0b8; border-radius: var(--radius); background: var(--flaeche); width: 100%; min-height: 2.6rem; }
input[type="radio"], input[type="checkbox"] { width: auto; min-height: 0; accent-color: var(--akzent); }
fieldset { border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem; display: grid; gap: .5rem; margin: 0; }
legend { padding: 0 .3rem; font-size: .9rem; color: var(--leise); }
button, .knopf { font: inherit; font-weight: 600; padding: .6rem 1rem; border-radius: var(--radius); border: 1px solid var(--akzent); background: var(--akzent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; min-height: 2.6rem; }
button.zweit, .knopf.zweit { background: var(--flaeche); color: var(--akzent); border-color: #b9c8c2; }
button.gefahr { background: var(--flaeche); color: var(--gefahr); border-color: #d9b3b3; }
.hinweis { font-size: .85rem; color: var(--leise); }
.leer { padding: 1rem; background: var(--flaeche); border: 1px dashed var(--linie); border-radius: var(--radius); }
.aufklapp { margin: 1rem 0; }
.aufklapp summary { cursor: pointer; color: var(--akzent); margin-bottom: .8rem; }
.schritte li { margin-bottom: .5rem; }
.schluessel { display: block; font-size: 1.15rem; letter-spacing: .05em; background: var(--flaeche); border: 1px solid var(--linie); padding: .6rem .8rem; margin: .4rem 0; border-radius: var(--radius); word-break: break-all; }
.belegung { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .9rem 1rem; }

/* Kalender */
.kalender-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.kalender-kopf h1 { margin: 0; }
.wochennav { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.wochennav .knopf { padding: .45rem .8rem; }
.sprung { display: flex; gap: .4rem; margin: 0; }
.sprung input { width: auto; }
.woche { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; }
.tag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem; min-width: 0; }
.tag.heute { border-color: var(--akzent); box-shadow: inset 0 3px 0 var(--akzent); }
.tag h2 { margin: 0 0 .5rem; font-size: .95rem; }
.feiertagsname { display: block; font-weight: 400; font-size: .8rem; color: var(--leise); }
.raster { width: 100%; border-collapse: collapse; table-layout: fixed; }
.raster th, .raster td { padding: 2px; font-size: .8rem; }
.raster thead th { color: var(--leise); font-weight: 500; text-align: center; }
.raster thead th:first-child { width: 34%; }
.raster tbody th { text-align: left; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zelle { display: block; height: 2.4rem; line-height: 2.4rem; border-radius: 4px; padding: 0 .35rem; font-size: .78rem; text-decoration: none; color: var(--tinte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.zelle.frei { border: 1px dashed #c3cac1; background: var(--flaeche); }
.zelle.frei:hover { background: var(--akzent-hell); border-style: solid; border-color: var(--akzent); }
.zelle.projekt { border-left: 3px solid rgba(0,0,0,.35); }
.zelle.abwesend { background: repeating-linear-gradient(135deg, #e7e9e5 0 6px, #d7dbd4 6px 12px); color: var(--leise); }
.zelle.gesperrt { background: var(--gesperrt); color: #9aa19a; }

/* Projektfarben (gedeckt, gut lesbar) */
.p0 { background: #cfe3da; } .p1 { background: #dcd3ec; } .p2 { background: #f2d9c4; } .p3 { background: #cfe0ee; } .p4 { background: #efe3b8; }
.p5 { background: #e9cfd6; } .p6 { background: #d3e6c5; } .p7 { background: #d9d9e8; } .p8 { background: #f0d0be; } .p9 { background: #c9e2e3; }
/* Beraterfarben */
.punkt { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .4rem; vertical-align: baseline; }
.c1 { background: #24564a; } .c2 { background: #2f5f8a; } .c3 { background: #6b4c8a; } .c4 { background: #a33b3b; }
.c5 { background: #c46a2b; } .c6 { background: #a88a2a; } .c7 { background: #4f7a3a; } .c8 { background: #6d7570; }

/* Verfügbarkeit */
.ergebnis { background: var(--flaeche); border: 1px solid var(--linie); border-left: 5px solid var(--akzent); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; }
.ergebnis p { margin: .2rem 0; }
.ergebnis-label { color: var(--leise); font-size: .9rem; }
.ergebnis-datum { font-size: 2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }

/* Tabellen */
.scroll { overflow-x: auto; }
.liste { width: 100%; border-collapse: collapse; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.liste th, .liste td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--linie); font-size: .9rem; }
.liste th { color: var(--leise); font-weight: 500; }
.zahl { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Umsatz */
.summe { font-size: 1.05rem; }
.balken { width: 100%; border-collapse: collapse; background: var(--flaeche); border: 1px solid var(--linie); }
.balken th, .balken td { padding: .45rem .7rem; border-bottom: 1px solid var(--linie); font-size: .9rem; text-align: left; }
.balken thead th { color: var(--leise); font-weight: 500; }
.balken tbody th { font-weight: 500; width: 7.5rem; }
.balken td:nth-child(2) { display: flex; align-items: center; gap: .7rem; }
.balken-spur { flex: 1; height: .9rem; background: #eef0ec; border-radius: 3px; overflow: hidden; }
.balken-wert { display: block; height: 100%; background: var(--akzent); }
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; } .w30 { width: 30%; }
.w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; }
.w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }

/* Stammdaten */
.spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem; }
.block h2 { margin-top: 0; }
.formular.kompakt { gap: .7rem; }
.eintraege { list-style: none; margin: 0; padding: 0; }
.eintraege li { padding: .5rem 0; border-top: 1px solid var(--linie); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.eintraege li a { margin-left: auto; font-size: .85rem; }
.eintraege li.inaktiv { color: var(--leise); }

/* Mobil */
@media (max-width: 1000px) {
  .woche { grid-template-columns: 1fr; }
  .spalten { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .inhalt { padding: 1rem .8rem 2.5rem; }
  .zeile { grid-template-columns: 1fr; }
  h1 { font-size: 1.35rem; }
  .ergebnis-datum { font-size: 1.6rem; }
  .balken tbody th { width: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
