/* Helles Design, angelehnt an Google Kalender: weiße Flächen, feine graue Linien, kräftige Akzentfarben */
:root {
  --bg: #f6f8fc;
  --flaeche: #ffffff;
  --flaeche2: #f1f3f4;
  --linie: #dadce0;
  --linie-fein: #eceff1;
  --text: #202124;
  --leise: #5f6368;
  --akzent: #1a73e8;
  --akzent-hell: #e8f0fe;
  --gruen: #188038;
  --gelb: #f9ab00;
  --lila: #9334e6;
  --rot: #d93025;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 "Segoe UI", Roboto, system-ui, -apple-system, Arial, sans-serif; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.laden { padding: 40px 16px; text-align: center; color: var(--leise); }

.marke { font-weight: 600; letter-spacing: .01em; white-space: nowrap; font-size: 17px; }
.marke b { color: var(--gruen); }
.marke span { color: var(--leise); font-weight: 400; margin-left: 4px; }

/* Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px; }
.login-karte { width: 100%; max-width: 380px; padding: 28px 24px; box-shadow: 0 1px 3px rgba(60, 64, 67, .15); }
.login h1 { font-size: 22px; margin: 14px 0 18px; font-weight: 500; }
.login label { display: block; color: var(--leise); font-size: 13px; margin-bottom: 6px; }
.login input { width: 100%; padding: 11px 12px; background: #fff; border: 1px solid var(--linie); border-radius: 8px; margin-bottom: 14px; }
.login input:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: transparent; }
#code { font-size: 24px; letter-spacing: 8px; text-align: center; }
.login button[type=submit] { width: 100%; padding: 11px; border: 0; border-radius: 8px; background: var(--akzent); color: #fff; font-weight: 600; cursor: pointer; }
.login button[type=submit]:hover { background: #1765cc; }
.login p { color: var(--leise); }
.meldung { min-height: 1.4em; margin: 12px 0 0; }
.meldung.fehler { color: var(--rot); }
button.link { background: none; border: 0; color: var(--akzent); cursor: pointer; padding: 6px 0; }
.login button.link { margin-top: 10px; }

/* Kopf und Reiter */
.kopf { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--linie); background: var(--flaeche); }
.kopf .marke { margin-right: auto; }
.kopf select { background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: 6px 8px; max-width: 45vw; }
.reiter { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--linie); overflow-x: auto; background: var(--flaeche); }
.reiter button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 12px 9px; color: var(--leise); cursor: pointer; white-space: nowrap; font-weight: 500; }
.reiter button:hover { color: var(--text); }
.reiter button.aktiv { color: var(--akzent); border-bottom-color: var(--akzent); }
main { padding: 16px; max-width: 1400px; margin: 0 auto; }

/* Werkzeugleiste */
.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.leiste h2 { font-size: 20px; font-weight: 500; margin: 0 8px 0 0; }
.knopf { background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: 6px 14px; cursor: pointer; color: var(--text); }
.knopf:hover { background: var(--flaeche2); }
.knopf.an { background: var(--akzent-hell); color: var(--akzent); border-color: #aecbfa; font-weight: 600; }
.gruppe { display: inline-flex; }
.gruppe .knopf { border-radius: 0; }
.gruppe .knopf:first-child { border-radius: 8px 0 0 8px; }
.gruppe .knopf:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.rechts { margin-left: auto; }
.info { color: var(--leise); font-size: 13px; }

.legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--leise); margin: 0 0 10px; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Kalender */
.kal-rahmen { overflow-x: auto; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); }
.kal { display: grid; min-width: 100%; }
.kal-kopf { position: sticky; top: 0; z-index: 3; background: var(--flaeche); border-bottom: 1px solid var(--linie); padding: 10px 6px; font-size: 13px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.kal-kopf small { display: block; font-weight: 400; color: var(--leise); }
.kal-kopf.heute { color: var(--akzent); }
.woche .kal-kopf.tag { height: 38px; border-bottom: 0; }
.woche .kal-kopf.name { top: 38px; padding: 4px 2px 5px; font-size: 11.5px; font-weight: 600; border-bottom: 3px solid var(--linie); color: var(--text); }
.woche .kal-kopf.tagende, .woche .kal-kopf.tag { border-right: 1px solid var(--linie); }
.zeitachse { position: relative; border-right: 1px solid var(--linie); background: var(--flaeche); }
.zeitachse span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--leise); }
/* ohne Arbeitszeit: hellgrau schraffiert */
.spalte { position: relative; border-right: 1px solid var(--linie-fein); background: repeating-linear-gradient(135deg, #f1f3f4 0 6px, #f8f9fa 6px 12px); }
.spalte:last-child { border-right: 0; }
.stunde { position: absolute; left: 0; right: 0; border-top: 1px solid var(--linie-fein); }
.arbeit { position: absolute; left: 0; right: 0; background: #fff; }
.abwesend { position: absolute; left: 0; right: 0; background: rgba(217, 48, 37, .07); border: 1px dashed rgba(217, 48, 37, .45); color: var(--rot); font-size: 12px; font-weight: 600; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; z-index: 1; }
.termin { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 2px 6px; font-size: 11.5px; line-height: 1.3; overflow: hidden; z-index: 2; border-left: 4px solid; cursor: default; box-shadow: 0 1px 1px rgba(60, 64, 67, .12); }
.termin b { font-weight: 600; }
.termin.bestand { background: #e8eaed; border-color: #80868b; color: #3c4043; }
.termin.lisa { background: #e6f4ea; border-color: var(--gruen); color: #0d652d; }
.termin.test { background: #f3e8fd; border-color: var(--lila); color: #681da8; }
.termin.reserviert { background: #fef7e0; border: 1px dashed var(--gelb); border-left: 4px solid var(--gelb); color: #8a5a00; }
.woche .termin { left: 1px; right: 1px; padding: 1px 3px; font-size: 10px; border-left-width: 3px; }
.woche .tagende { border-right: 1px solid var(--linie); }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* Listen und Karten */
.raster { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.raster .karte { box-shadow: 0 1px 2px rgba(60, 64, 67, .1); }
.karte h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.karte .unter { color: var(--leise); font-size: 13px; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--flaeche2); border: 1px solid var(--linie); color: var(--text); }
.chip.gruen { background: #e6f4ea; border-color: #a8dab5; color: #0d652d; }
.chip.gelb { background: #fef7e0; border-color: #fdd663; color: #8a5a00; }
.chip.rot { background: #fce8e6; border-color: #f6aea9; color: #a50e0e; }
.abschnitt { margin-top: 12px; }
.abschnitt h4 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); font-weight: 600; }
.zeilen { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.zeilen li { padding: 4px 0; border-bottom: 1px solid var(--linie-fein); }
.zeilen li:last-child { border-bottom: 0; }
.hinweis { background: var(--akzent-hell); border: 1px solid #aecbfa; color: #174ea6; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.leer { color: var(--leise); text-align: center; padding: 40px 16px; border: 1px dashed var(--linie); border-radius: var(--radius); background: var(--flaeche); }

table.tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabelle th, .tabelle td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--linie-fein); vertical-align: top; }
.tabelle th { color: var(--leise); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; background: #f8f9fa; }
.tabelle-rahmen { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }

@media (max-width: 640px) {
  main { padding: 12px; }
  .kopf { padding: 10px 12px; gap: 8px; }
  .reiter { padding: 0 8px; }
  .marke span { display: none; }
}
