/* ============================================================
   Wochenplaner Prototyp — Graf Hauswartungen
   Brand: Blau #69b1e2 / #3f6a88 / #203544, Grün #96c11f
   Ruhig, hell, frisch. Keine Muster-Hintergründe.
   ============================================================ */

:root {
  --bg: #F2F6F9;
  --card: #FFFFFF;
  --ink: #203544;
  --ink-soft: #5E7385;
  --line: #DCE5EC;
  --line-strong: #C3D2DD;
  --blue: #69B1E2;
  --blue-deep: #3F6A88;
  --blue-tint: #D2E8F6;
  --green: #96C11F;
  --green-dark: #5A7413;
  --green-tint: #DFECBC;
  --slot-h: 30px;
  --radius: 12px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(32, 53, 68, .06), 0 8px 24px rgba(32, 53, 68, .07);
  font-size: 15px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Albert Sans", sans-serif;
  background: linear-gradient(180deg, #EAF2F8 0%, var(--bg) 220px);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .display {
  font-family: "Bricolage Grotesque", sans-serif;
  letter-spacing: -0.015em;
}

/* ---------------------------------------------------- Masthead */

.masthead {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(32,53,68,.03);
}

.back-hub {
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 1.1rem;
  border-right: 1px solid var(--line);
  transition: all .12s;
}
.back-hub:hover { color: var(--blue-deep); background: var(--bg); }

.masthead-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px 16px 16px;
  min-width: 280px;
}

.brand-mark {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 60%, var(--ink) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  flex: none;
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: -7px; bottom: -7px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green);
}

.masthead h1 {
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1;
}
.brand-sub {
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-top: 4px;
}

.variant-nav { display: flex; flex: 1; gap: 8px; padding: 10px 12px; }

.variant-nav button {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, border-color .15s ease;
}
.variant-nav button:hover { background: var(--bg); border-color: var(--line); }
.variant-nav button.active { background: var(--ink); color: #fff; }
.variant-nav button.active .variant-desc { color: #9FB4C2; }

.variant-letter {
  grid-row: 1 / 3;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--blue-deep);
}
.variant-nav button.active .variant-letter { color: var(--green); }
.variant-name {
  font-weight: 700;
  font-size: .88rem;
}
.variant-desc { font-size: .72rem; color: var(--ink-soft); }

.masthead-note {
  padding: 14px 28px;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  text-align: right;
}

/* ---------------------------------------------------- Toolbar */

main { flex: 1; padding: 0 0 80px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px 4px;
  flex-wrap: wrap;
  animation: rise .35s ease both;
}

.kw-stepper {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.kw-stepper button {
  width: 44px; height: 50px;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--blue-deep);
  font-family: inherit;
  transition: background .12s;
}
.kw-stepper button:hover { background: var(--blue-tint); }
.kw-display {
  padding: 5px 18px;
  text-align: center;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 132px;
}
.kw-display .kw-num {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.1;
}
.kw-display .kw-range { font-size: .68rem; color: var(--ink-soft); }

.parity-flag {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--blue-tint);
  color: var(--blue-deep);
}
.parity-flag.gerade { background: var(--green-tint); color: var(--green-dark); }

.ma-select { display: flex; gap: 6px; flex-wrap: wrap; }
.ma-select button {
  font-family: inherit;
  font-weight: 600;
  font-size: .8rem;
  padding: 9px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .12s;
}
.ma-select button:hover { border-color: var(--blue); color: var(--ink); }
.ma-select button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.toggle-sa {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}
.toggle-sa .switch {
  width: 38px; height: 22px;
  border-radius: 99px;
  background: var(--line-strong);
  position: relative;
  transition: background .15s;
}
.toggle-sa .switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(32,53,68,.25);
  transition: transform .15s ease;
}
.toggle-sa.on .switch { background: var(--green); }
.toggle-sa.on .switch::after { transform: translateX(16px); }

.legend {
  display: flex;
  gap: 16px;
  font-size: .72rem;
  color: var(--ink-soft);
  align-items: center;
}
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; display: inline-block; border-radius: 4px; }
.legend .l-holiday {
  background: repeating-linear-gradient(-45deg, var(--blue-tint) 0 4px, #fff 4px 8px);
  border: 1px solid var(--blue);
}
.legend .l-vacation {
  background: repeating-linear-gradient(-45deg, var(--green-tint) 0 4px, #fff 4px 8px);
  border: 1px solid var(--green);
}

/* ---------------------------------------------------- Variante A: Wochenraster */

.week-grid-wrap {
  padding: 18px 28px 26px;
  overflow-x: auto;
  animation: rise .4s .05s ease both;
}

.week-grid {
  display: grid;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 900px;
  overflow: hidden;
}

.wg-corner, .wg-dayhead {
  border-bottom: 1px solid var(--line-strong);
  padding: 12px 14px;
  background: var(--card);
}
.wg-dayhead { border-left: 1px solid var(--line); position: relative; }
.wg-dayhead .day-name {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: .95rem;
}
.wg-dayhead .day-date { font-size: .74rem; color: var(--ink-soft); }
.wg-dayhead .holiday-tag {
  position: absolute;
  top: 12px; right: 10px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--blue-deep);
  background: var(--blue-tint);
  border-radius: 99px;
  padding: 3px 8px;
}

.wg-timecol {
  display: grid;
  border-right: 1px solid var(--line-strong);
  background: var(--card);
}
.wg-time {
  height: var(--slot-h);
  font-size: .68rem;
  color: var(--ink-soft);
  padding: 2px 10px 0 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wg-time.hour { color: var(--ink); font-weight: 600; }

.wg-daycol {
  position: relative;
  border-left: 1px solid var(--line);
  /* nur Stundenlinien, bewusst dezent */
  background:
    repeating-linear-gradient(to bottom,
      transparent 0,
      transparent calc(var(--slot-h) * 2 - 1px),
      var(--line) calc(var(--slot-h) * 2 - 1px),
      var(--line) calc(var(--slot-h) * 2));
}
.wg-daycol.is-holiday {
  background-image: repeating-linear-gradient(-45deg, rgba(105,177,226,.14) 0 8px, transparent 8px 16px);
}
.wg-daycol.is-vacation {
  background-image: repeating-linear-gradient(-45deg, rgba(150,193,31,.16) 0 8px, transparent 8px 16px);
}
.col-overlay-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: .95rem;
  color: var(--blue-deep);
  opacity: .5;
  pointer-events: none;
}
.is-vacation .col-overlay-label { color: var(--green-dark); }

.appt {
  position: absolute;
  left: 5px; right: 5px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--c, var(--blue-deep));
  background: color-mix(in srgb, var(--c, #999) 16%, #fff);
  padding: 5px 8px 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.appt:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(32,53,68,.18);
  z-index: 5;
}
.appt .a-time {
  font-size: .64rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.appt .a-name {
  font-weight: 700;
  font-size: .78rem;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.appt .a-meta {
  font-size: .68rem;
  color: var(--ink-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* 30-Min-Blöcke: nur Name zeigen, Rest würde überlaufen */
.appt.tiny { padding-top: 3px; }
.appt.tiny .a-time, .appt.tiny .a-meta, .appt.tiny .a-badge { display: none; }
.appt.tiny .a-name { font-size: .7rem; }

.appt .a-badge {
  display: inline-block;
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--green-tint);
  color: var(--green-dark);
  border-radius: 99px;
  padding: 1px 7px;
  margin-top: 2px;
}

.unplanned-tray {
  margin: 0 28px 28px;
  border: 1.5px dashed var(--blue);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--blue-tint) 40%, #fff);
}
.unplanned-tray .tray-label {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: .82rem;
  color: var(--blue-deep);
  margin-right: 10px;
}
.unplanned-tray .appt { position: static; width: 220px; }

/* ---------------------------------------------------- Variante B: Mobile Agenda */

.mobile-stage {
  display: flex;
  gap: 60px;
  justify-content: center;
  align-items: flex-start;
  padding: 46px 28px;
  flex-wrap: wrap;
  animation: rise .4s .05s ease both;
}

.phone {
  width: 392px;
  border: 10px solid var(--ink);
  border-radius: 44px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(32,53,68,.22);
  overflow: hidden;
  flex: none;
}
.phone-notch {
  height: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
}
.phone-notch::after {
  content: "";
  width: 100px; height: 8px;
  background: var(--ink);
  border-radius: 99px;
}
.phone-screen {
  height: 700px;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.m-head {
  padding: 14px 20px 12px;
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}
.m-head .m-greeting {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--blue);
}
.m-head h2 {
  font-size: 1.45rem;
  font-weight: 800;
}
.m-head .m-kw { font-size: .75rem; color: #9FB4C2; margin-top: 2px; }

.day-chips {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: var(--ink);
  position: sticky;
  top: 84px;
  z-index: 2;
  border-radius: 0 0 20px 20px;
}
.day-chips button {
  flex: 1;
  border: none;
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 8px 0 6px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  color: #C7D5DF;
  transition: all .12s;
}
.day-chips button .c-day { display: block; font-size: .62rem; font-weight: 700; text-transform: uppercase; }
.day-chips button .c-date { display: block; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.day-chips button.active { background: var(--green); color: #fff; }
.day-chips button.is-holiday:not(.active) { color: var(--blue); }

.m-list { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.m-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(32,53,68,.07);
  display: grid;
  grid-template-columns: 88px 1fr;
  overflow: hidden;
  animation: rise .3s ease both;
}
.m-card:nth-child(2) { animation-delay: .05s; }
.m-card:nth-child(3) { animation-delay: .1s; }
.m-card:nth-child(4) { animation-delay: .15s; }
.m-card:nth-child(5) { animation-delay: .2s; }

.m-card .mc-time {
  background: var(--c-bg, var(--bg));
  border-left: 5px solid var(--c, var(--blue-deep));
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.m-card .mc-time .t-start {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
}
.m-card .mc-time .t-end { font-size: .72rem; color: var(--ink-soft); margin-top: 3px; }
.m-card .mc-time .t-dur {
  font-size: .64rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-top: 6px;
  text-transform: uppercase;
}

.m-card .mc-body { padding: 12px 14px; }
.m-card .mc-body h3 { font-size: 1rem; font-weight: 700; }
.m-card .mc-addr { font-size: .82rem; color: var(--ink-soft); margin-top: 2px; }
.mc-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.mc-tags span {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--bg);
  color: var(--ink-soft);
}
.mc-tags .tag-zutritt { background: var(--green-tint); color: var(--green-dark); }
.mc-tags .tag-fenster { background: var(--blue-tint); color: var(--blue-deep); }

.m-empty {
  text-align: center;
  padding: 60px 30px;
  color: var(--ink-soft);
}
.m-empty .e-big {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--green-dark);
}
.m-empty.holiday .e-big { color: var(--blue-deep); }

.m-summary {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  font-weight: 600;
  background: #fff;
  position: sticky;
  bottom: 0;
}
.m-summary b { font-variant-numeric: tabular-nums; color: var(--green-dark); }

.mobile-aside { max-width: 330px; padding-top: 30px; }
.mobile-aside h2 {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.02;
}
.mobile-aside h2 em { color: var(--blue-deep); font-style: normal; }
.mobile-aside p { margin-top: 16px; font-size: .92rem; line-height: 1.55; color: var(--ink-soft); }
.mobile-aside ul { margin: 14px 0 0 18px; font-size: .88rem; line-height: 1.7; color: var(--ink-soft); }
.mobile-aside li::marker { color: var(--green); }

/* ---------------------------------------------------- Variante C: Team */

.team-wrap { padding: 18px 28px 26px; animation: rise .4s .05s ease both; }

.team-grid {
  display: grid;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 980px;
  overflow: hidden;
}
.tg-corner, .tg-mahead {
  border-bottom: 1px solid var(--line-strong);
  padding: 12px 14px;
}
.tg-mahead { border-left: 1px solid var(--line); }
.tg-mahead .ma-name {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: .95rem;
}
.tg-mahead .ma-load { font-size: .72rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tg-mahead .load-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 99px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.tg-mahead .load-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 99px;
  width: var(--w, 0%);
}

.tg-macol {
  position: relative;
  border-left: 1px solid var(--line);
  background:
    repeating-linear-gradient(to bottom,
      transparent 0,
      transparent calc(var(--slot-h) * 2 - 1px),
      var(--line) calc(var(--slot-h) * 2 - 1px),
      var(--line) calc(var(--slot-h) * 2));
}
.tg-macol.is-vacation {
  background-image: repeating-linear-gradient(-45deg, rgba(150,193,31,.16) 0 8px, transparent 8px 16px);
}
.tg-macol.is-holiday {
  background-image: repeating-linear-gradient(-45deg, rgba(105,177,226,.14) 0 8px, transparent 8px 16px);
}

.week-mini {
  display: flex;
  gap: 6px;
  margin: 0 0 16px;
}
.week-mini button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 99px;
  font-family: inherit;
  padding: 8px 16px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all .12s;
}
.week-mini button:hover { border-color: var(--blue); color: var(--ink); }
.week-mini button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.week-mini button.is-holiday { border-color: var(--blue); color: var(--blue-deep); }
.week-mini button.active.is-holiday { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }

/* ---------------------------------------------------- Detail-Panel */

.detail-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 360px;
  z-index: 100;
  display: flex;
}
.detail-panel[hidden] { display: none; }
.detail-inner {
  background: var(--ink);
  color: #EDF3F7;
  flex: 1;
  padding: 34px 30px;
  border-radius: 22px 0 0 22px;
  box-shadow: -10px 0 40px rgba(32,53,68,.35);
  animation: slide-in .22s ease both;
  overflow-y: auto;
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }

.detail-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: none;
  color: #EDF3F7;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}
.detail-kicker {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--blue);
}
.detail-inner h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 6px 0 4px;
}
.detail-color-strip {
  height: 6px;
  border-radius: 99px;
  margin: 14px 0 20px;
  background: var(--c, var(--green));
}
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #35495A;
  font-size: .88rem;
}
.detail-row dt { color: #9FB4C2; flex: none; }
.detail-row dd { text-align: right; font-weight: 600; }
.detail-foot { margin-top: 22px; font-size: .72rem; color: #7E94A5; line-height: 1.5; }

.detail-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.da-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: .88rem;
  text-align: left;
  border: 1px solid #3A5366;
  background: #2A4255;
  color: #EDF3F7;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  cursor: pointer;
  transition: all .12s;
}
.da-btn:hover { border-color: var(--blue); background: #31506A; }
.da-btn small { display: block; font-weight: 500; font-size: .7rem; color: #9FB4C2; }
.da-btn.danger { border-color: #6E4A4A; }
.da-btn.danger:hover { border-color: #C0392B; background: #4A3340; }

/* ---------------------------------------------------- Sonstiges */

.colophon {
  border-top: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--ink-soft);
  background: var(--card);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------- Buttons */

.btn-primary, .btn-ghost, .btn-reset {
  font-family: inherit;
  font-weight: 700;
  font-size: .82rem;
  border-radius: 99px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all .12s;
}
.btn-primary {
  background: var(--green);
  border: 1px solid var(--green);
  color: #fff;
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--blue-deep);
}
.btn-ghost:hover { border-color: var(--blue); }
.btn-reset {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  font-weight: 600;
}
.btn-reset:hover { border-color: var(--ink-soft); color: var(--ink); }

.hint-line {
  padding: 0 28px 8px;
  font-size: .74rem;
  color: var(--ink-soft);
}
.team-wrap .hint-line { padding: 10px 0 0; }

.view-title {
  font-size: 1.4rem;
  font-weight: 800;
}
.count-pill {
  font-size: .72rem;
  font-weight: 700;
  background: var(--blue-tint);
  color: var(--blue-deep);
  border-radius: 99px;
  padding: 6px 12px;
}

/* ---------------------------------------------------- Abgesagte Termine */

.appt.cancelled {
  border-left-color: var(--line-strong);
  background: repeating-linear-gradient(-45deg, #F4F1EA 0 6px, #fff 6px 12px);
  color: var(--ink-soft);
  cursor: pointer;
}
.appt.cancelled .a-name { text-decoration: line-through; font-weight: 600; }
.appt.cancelled .a-meta { font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---------------------------------------------------- Drag & Drop */

.appt { touch-action: none; }
.drag-ghost {
  position: fixed;
  z-index: 300;
  pointer-events: none;
  opacity: .9;
  box-shadow: 0 14px 34px rgba(32,53,68,.3);
  transform: rotate(1.5deg);
}
.drag-source { opacity: .35; }
.drop-hover {
  outline: 2px dashed var(--green);
  outline-offset: -2px;
  background-color: color-mix(in srgb, var(--green-tint) 40%, transparent) !important;
}

/* ---------------------------------------------------- Scope-Popover */

.scope-popover {
  position: fixed;
  z-index: 400;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(32,53,68,.28);
  padding: 14px;
  width: 270px;
  animation: rise .15s ease both;
}
.scope-popover .sp-title { font-weight: 800; font-size: .92rem; }
.scope-popover .sp-sub { font-size: .75rem; color: var(--ink-soft); margin: 2px 0 12px; }
.scope-popover button {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-weight: 700;
  font-size: .85rem;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 6px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  transition: all .12s;
}
.scope-popover button small { display: block; font-weight: 500; font-size: .7rem; color: var(--ink-soft); }
.scope-popover .sp-week { border-color: var(--blue); }
.scope-popover .sp-week:hover { background: var(--blue-tint); }
.scope-popover .sp-rule { border-color: var(--green); }
.scope-popover .sp-rule:hover { background: var(--green-tint); }
.scope-popover .sp-cancel { border: none; color: var(--ink-soft); font-weight: 600; text-align: center; }

/* ---------------------------------------------------- Modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 350;
  background: rgba(32,53,68,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade .15s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(32,53,68,.35);
  padding: 28px 30px;
  width: min(560px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  animation: rise .2s ease both;
}
.modal h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.modal .modal-sub { font-size: .8rem; color: var(--ink-soft); margin-bottom: 6px; }
.modal h4.list-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin: 18px 0 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-top: 16px;
}
.form-grid .span2 { grid-column: span 2; }
.form-grid label.hidden { display: none; }

.modal label, .customer-form-wrap label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: .74rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.modal label small, .customer-form-wrap label small { font-weight: 500; }
.modal input, .modal select, .customer-form-wrap input {
  font-family: inherit;
  font-size: .9rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: #fff;
  transition: border-color .12s;
}
.modal input:focus, .modal select:focus, .customer-form-wrap input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-tint);
}

.conflict-hint {
  min-height: 0;
  margin-top: 10px;
  font-size: .8rem;
  font-weight: 600;
  color: #A8541E;
  background: #FCEFE3;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  max-height: 0;
  overflow: hidden;
  transition: all .15s;
}
.conflict-hint.show { padding: 9px 12px; max-height: 80px; }

.scope-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.scope-choice label {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.scope-choice label:has(input:checked) {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green-tint) 40%, #fff);
}
.scope-choice small { display: block; font-weight: 500; color: var(--ink-soft); }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.vac-list { list-style: none; max-height: 180px; overflow-y: auto; }
.vac-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
}
.vac-list li.empty { color: var(--ink-soft); border: none; }
.vac-remove {
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.vac-remove:hover { color: #C0392B; }

/* ---------------------------------------------------- Variante D: Kunden */

.customer-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  padding: 18px 28px 26px;
  align-items: start;
  animation: rise .4s .05s ease both;
}

.customer-table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.customer-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.customer-table th {
  text-align: left;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-strong);
}
.customer-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.customer-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.customer-table tbody tr { cursor: pointer; transition: background .1s; }
.customer-table tbody tr:hover { background: var(--bg); }
.customer-table tbody tr.selected { background: var(--blue-tint); }

.customer-form-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 84px;
}
.customer-form-wrap h3 { font-size: 1.1rem; font-weight: 800; }
.form-placeholder {
  text-align: center;
  color: var(--ink-soft);
  font-size: .85rem;
  padding: 30px 10px;
  line-height: 1.6;
}

/* ---------------------------------------------------- Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 16px);
  z-index: 500;
  background: var(--ink);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  border-radius: 99px;
  padding: 11px 20px;
  box-shadow: 0 10px 30px rgba(32,53,68,.3);
  opacity: 0;
  transition: all .25s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .masthead { flex-wrap: wrap; }
  .masthead-note { display: none; }
  .variant-nav button { padding: 8px 10px; }
  .variant-desc { display: none; }
}
