:root{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:#202733;background:#f5f6f8}*{box-sizing:border-box}body{margin:0}header{background:#2b48a1;color:#fff;padding:15px max(16px,calc((100vw - 1150px)/2));display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:78px}.brand{display:flex;align-items:center;gap:13px}.brand strong{font-size:1.4rem}.brand small{display:block;opacity:.85}.emblem{display:grid;place-items:center;background:#fff;color:#2b48a1;border-radius:12px;width:46px;height:46px;font-size:32px;font-weight:900}main{max-width:1150px;margin:24px auto;padding:0 16px}.intro{display:flex;align-items:center;justify-content:space-between;gap:12px}.intro h1{margin-bottom:3px}.intro p{margin-top:0;color:#647080}.panel{background:white;border:1px solid #e0e3e9;border-radius:13px;padding:24px;margin:14px 0;box-shadow:0 2px 7px #1b263308}.login{max-width:440px;margin:65px auto}.login h1{margin-top:0}h1{font-size:1.75rem}h2{font-size:1.3rem;margin-top:0}h3{margin-top:26px}p{line-height:1.5}form{display:grid;gap:14px}label{display:grid;gap:6px;font-weight:600;font-size:.95rem}input,select,textarea{width:100%;padding:11px;border:1px solid #bfc5cf;border-radius:8px;font:inherit;background:#fff;color:#202733}input:focus,select:focus,textarea:focus{outline:2px solid #2b48a1}button{background:#2b48a1;border:1px solid #2b48a1;color:white;border-radius:8px;padding:10px 14px;cursor:pointer;font:inherit;font-weight:650}button:hover{filter:brightness(.94)}button:disabled{opacity:.5;cursor:not-allowed}.subtle{background:#fff;color:#2b48a1;border-color:#aab6dc}.tabs{display:flex;gap:6px;overflow-x:auto;margin-top:20px;padding-bottom:3px}.tab{white-space:nowrap;background:#fff;color:#394350;border:1px solid #dfe2e8}.tab.active{background:#2b48a1;color:#fff}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.legend{display:flex;gap:16px;font-size:.85rem;color:#677180;margin:15px 0}.calendar-grid{overflow-x:auto}.calendar-table{border-collapse:collapse;width:100%;min-width:760px}.calendar-table th,.calendar-table td{border:1px solid #e4e7ec;vertical-align:top;padding:9px;min-width:90px}.calendar-table th{background:#f7f8fa;font-size:.83rem}.calendar-table th:first-child,.calendar-table td:first-child{min-width:130px;position:sticky;left:0;background:#fff;z-index:1}.event{border-left:4px solid #319b63;background:#edf9f1;border-radius:5px;padding:6px;margin:4px 0;font-size:.78rem;overflow-wrap:anywhere}.event.pending{border-color:#e69d21;background:#fff4de}.event.rejected,.event.cancelled{border-color:#a9a9a9;background:#f0f0f0}.entry{padding:14px 0;border-bottom:1px solid #e4e7ec;display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.entry:last-child{border-bottom:0}.entry .detail{font-size:.87rem;color:#596575;margin-top:5px}.actions{display:flex;gap:7px;flex-wrap:wrap}.actions button{padding:7px 10px}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.pill{display:inline-block;border-radius:50px;padding:3px 9px;background:#f1f2f4;font-size:.8rem}.pill.approved{background:#dcf7e5}.pill.pending{background:#fff0cf}.pill.rejected,.pill.cancelled{background:#ececee}#message{position:fixed;bottom:18px;right:18px;max-width:min(440px,calc(100vw - 36px));background:#26313c;color:#fff;padding:13px 18px;border-radius:10px;box-shadow:0 4px 20px #0003;display:none;z-index:10}#message.error{background:#a71920}#account{display:flex;align-items:center;gap:12px}#account[hidden],*[hidden]{display:none!important}@media(max-width:620px){header{padding:12px 16px}.brand strong{font-size:1.1rem}.panel{padding:16px}.two{grid-template-columns:1fr}.entry{flex-direction:column}.toolbar button{font-size:.8rem;padding:8px}.intro{align-items:flex-start;flex-direction:column}}/* Begrüßung beim Start */
#welcomeOverlay:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #2b48a1;
  color: white;
  text-align: center;
  padding: 20px;
}

.welcomeBox {
  max-width: 600px;
  animation: welcomeAppear 0.6s ease-out;
}

.welcomeBox h1 {
  font-size: clamp(24px, 5vw, 40px);
  margin-bottom: 20px;
  color: white;
}

.welcomeBox h2 {
  font-size: clamp(20px, 4vw, 30px);
  color: white;
}

@keyframes welcomeAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#profileOverlay:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  padding: 20px;
}

#profileOverlay[hidden] {
  display: none;
}

.profileBox {
  background: white;
  color: #222;
  padding: 25px;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}

.profileBox label {
  display: block;
  margin: 15px 0;
}

.profileBox input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 10px;
}

.profileBox button {
  margin: 8px 8px 0 0;
}

.avatar{flex-shrink:0;width:38px;height:38px;border-radius:50%;object-fit:cover;border:2px solid #fff;background:#fff}
.avatar.large{display:block;width:110px;height:110px;margin:0 auto 12px;border-color:#e0e3e9}

/* Handy: Kopfzeile umbrechen, damit Foto, Name und Buttons sichtbar bleiben */
@media (max-width: 620px) {
  header {
    flex-wrap: wrap;
  }

  #account {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  #who {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #account button {
    padding: 7px 10px;
    font-size: .85rem;
  }
}

/* Burgermenü für die Seiten der App */
header .brand {
  flex: 1;
  min-width: 0;
}

.menu-button {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: transparent;
  border-color: #ffffff80;
  font-size: 1rem;
}

.menu-button span[aria-hidden] {
  font-size: 1.4rem;
  line-height: 1;
}

.menu:not([hidden]) {
  position: absolute;
  left: max(16px, calc((100vw - 1150px) / 2));
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 240px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e0e3e9;
  border-radius: 12px;
  box-shadow: 0 8px 24px #0003;
}

.menu .tab {
  text-align: left;
  border-color: transparent;
  padding: 12px 14px;
}

@media (max-width: 620px) {
  .menu-button #menuLabel {
    display: none;
  }

  .menu:not([hidden]) {
    left: 16px;
    right: 16px;
  }
}

/* Haken für Serienbuchung */
label.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

label.check input {
  width: auto;
  margin: 0;
}

/* Eigenes Logo statt Kreuz */
.logo {
  width: 46px;
  height: 46px;
  padding: 3px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border-radius: 10px;
}

/* Feuerwehrauto fährt während der Begrüßung über den Bildschirm */
#welcomeOverlay {
  overflow: hidden;
}

.truck {
  display: block;
  width: clamp(170px, 45vw, 280px);
  margin: 30px auto 0;
  fill: #ff0000;
  animation: truckDrive 3s linear both;
}

.truck .cutout {
  fill: #2b48a1;
}

.truck .light {
  fill: #bfe0ff;
  animation: truckLight .4s steps(2, jump-none) infinite;
}

.truck .wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: truckWheel .5s linear infinite;
}

@keyframes truckDrive {
  from { transform: translateX(calc(-50vw - 100%)); }
  to { transform: translateX(calc(50vw + 100%)); }
}

@keyframes truckWheel {
  to { transform: rotate(360deg); }
}

@keyframes truckLight {
  from { opacity: 1; }
  to { opacity: .2; }
}

@media (prefers-reduced-motion: reduce) {
  .truck,
  .truck .wheel,
  .truck .light {
    animation: none;
  }
}

/* Eigene Regel für Serienbuchungen */
.repeat {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e0e3e9;
  border-radius: 10px;
  background: #f9fafb;
}

.repeat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.repeat-row input {
  width: 58px;
}

.repeat-row select {
  width: auto;
}

.weekdays,
.repeat-end {
  border: 0;
  padding: 0;
  margin: 0;
}

.weekdays legend,
.repeat-end legend {
  font-weight: 600;
  font-size: .95rem;
  padding: 0;
  margin-bottom: 8px;
}

.weekdays label {
  display: inline-block;
  position: relative;
  margin: 0 3px 4px 0;
}

.weekdays input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.weekdays span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #bfc5cf;
  border-radius: 50%;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}

.weekdays input:checked + span {
  background: #2b48a1;
  border-color: #2b48a1;
  color: #fff;
}

.weekdays input:focus-visible + span {
  outline: 2px solid #2b48a1;
}

.repeat-end {
  display: grid;
  gap: 8px;
}

.repeat-end label.check {
  font-weight: 400;
  flex-wrap: wrap;
}

.repeat-end input[type=number] {
  width: 70px;
}

.repeat-summary {
  margin: 0;
  font-size: .87rem;
  color: #596575;
}

/* Einzelne Termine einer Serie in "Alle Buchungen" */
.series-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #eef0f3;
}

.series-item button {
  padding: 5px 9px;
  font-size: .8rem;
}

/* Startseite mit großen Kacheln */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 150px;
  padding: 20px 12px;
  background: #fff;
  color: #202733;
  border: 1px solid #e0e3e9;
  border-radius: 14px;
  box-shadow: 0 2px 7px #1b263308;
  font-size: 1.05rem;
  text-align: center;
}

.tile span {
  hyphens: manual;
}

.tile:hover {
  filter: none;
  border-color: #2b48a1;
  box-shadow: 0 4px 14px #2b48a122;
}

.tile svg {
  width: 64px;
  height: 64px;
  padding: 14px;
  border-radius: 50%;
  background: #eef1fa;
  color: #2b48a1;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 13px;
  background: #a71920;
  color: #fff;
  font-size: .85rem;
}

@media (max-width: 620px) {
  .tiles {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tile {
    min-height: 130px;
    font-size: .95rem;
  }
}

/* Foto und Name in der Kopfzeile öffnen das Profil */
.who-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  min-width: 0;
  padding: 4px 10px 4px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-weight: 400;
}

.who-button:hover,
.who-button:focus-visible {
  filter: none;
  background: #ffffff1f;
  border-color: #ffffff59;
}

@media (max-width: 620px) {
  .who-button {
    flex: 1;
  }
}

/* Untermenü "Reservierungen" im Burgermenü */
.menu .menu-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 12px 14px;
  background: #fff;
  color: #394350;
  border-color: transparent;
}

.menu .menu-group.active {
  color: #2b48a1;
}

.menu .menu-group span {
  transition: transform .15s;
}

.menu .menu-group[aria-expanded="true"] span {
  transform: rotate(90deg);
}

.submenu:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: 14px;
  padding-left: 8px;
  border-left: 2px solid #e0e3e9;
}

.tiles-title {
  margin: 18px 0 0;
}

/* Kachel "Aktuell" ganz oben auf der Startseite */
.tile.tile-wide {
  flex-direction: row;
  justify-content: flex-start;
  width: 100%;
  min-height: 0;
  margin-top: 18px;
  padding: 16px 20px;
  gap: 16px;
  text-align: left;
}

.tile-wide div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tile-wide span {
  font-size: 1.2rem;
  font-weight: 700;
}

.tile-wide small {
  color: #596575;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-wide svg {
  flex: none;
}

/* Seite "Aktuell" */
.news-form {
  padding-bottom: 20px;
  margin-bottom: 6px;
  border-bottom: 1px solid #e4e7ec;
}

.news-form .check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.news-form .check input {
  width: auto;
}

.news-item {
  padding: 16px 0;
  border-bottom: 1px solid #e4e7ec;
}

.news-item:last-child {
  border-bottom: 0;
}

.news-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.news-head h3 {
  margin: 0 0 3px;
}

.news-head small {
  color: #677180;
}

.news-body {
  margin: 10px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .news-head {
    flex-direction: column;
  }
}

.tile-wide + .tiles {
  margin-top: 14px;
}

/* "Aktuell" auf der Startseite aufklappen */
.tile-wide .chevron {
  margin-left: auto;
  font-style: normal;
  color: #2b48a1;
  font-size: 1.3rem;
  transition: transform .15s;
}

.tile-wide[aria-expanded="true"] .chevron {
  transform: rotate(90deg);
}

.tile-wide .badge {
  position: static;
  flex: none;
}

.news-home {
  margin-top: 0;
  padding: 4px 20px 16px;
  background: #fff;
  border: 1px solid #e0e3e9;
  border-top: 0;
  border-radius: 0 0 14px 14px;
}

.tile-wide[aria-expanded="true"] {
  border-radius: 14px 14px 0 0;
}

.news-home > button {
  margin-top: 6px;
}

.news-home + .tiles {
  margin-top: 14px;
}

/* "FDISK" im Banner schräg durchgestrichen */
.slash {
  position: relative;
  text-decoration: none;
}

.slash::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 50%;
  border-top: 2px solid #e53935;
  transform: rotate(-15deg);
}

.actions select[data-role] {
  width: auto;
  padding: 6px 8px;
}

/* Tätigkeitsberichte in Schritten */
.steps {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  flex: 1;
  padding: 8px 6px;
  border-bottom: 3px solid #e0e3e9;
  color: #677180;
  font-size: .9rem;
  text-align: center;
  counter-increment: step;
}

.steps li::before {
  content: counter(step) ". ";
}

.steps li.done {
  border-color: #aab6dc;
  color: #2b48a1;
}

.steps li.active {
  border-color: #2b48a1;
  color: #2b48a1;
  font-weight: 700;
}

.step:not([hidden]) {
  display: grid;
  gap: 14px;
}

.step > button {
  justify-self: start;
}

.step .actions {
  justify-content: space-between;
}

.hint {
  margin: 0;
  color: #596575;
}

.rows {
  display: grid;
  gap: 10px;
}

.rows .row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.rows .row button {
  padding: 10px 12px;
}

.summary dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0;
}

.summary dt {
  font-weight: 600;
}

.summary dd {
  margin: 0;
}

@media (max-width: 620px) {
  .steps li {
    font-size: .75rem;
    padding: 6px 2px;
  }

  .rows .row {
    grid-template-columns: 1fr 1fr auto;
  }

  .summary dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .summary dd {
    margin-bottom: 8px;
  }
}

#activityadmin .filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#activityadmin .toolbar h2 {
  margin-bottom: 2px;
}

/* Zurück-Knopf rechts unten */
.back-button {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 4px 14px #1b263340;
}

.back-button svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Meldungen über dem Zurück-Knopf anzeigen */
#message {
  bottom: 84px;
}

main {
  padding-bottom: 70px;
}
