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

:root {
  --bg:      #e5e5ea;   /* iOS Secondary System Fill — etwas dunkler als default #f2f2f7 */
  --surface: #ffffff;
  --label:   #000000;
  --label2:  rgba(60,60,67,.6);
  --label3:  rgba(60,60,67,.3);
  --sep:     rgba(60,60,67,.29);
  --green:   #34c759;
  --red:     #ff3b30;
  --blue:    #007aff;
  --orange:  #ff9500;

  --nav-h:     44px;
  --nav-sub-h: 42px;
  --tab-h:  49px;
  --safe-t: env(safe-area-inset-top,    0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left,   0px);
  --safe-r: env(safe-area-inset-right,  0px);

  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  color: var(--label);
  background: var(--bg);
  color-scheme: light;
}

html, body { height: 100%; height: 100dvh; overflow: hidden; overscroll-behavior: none; }

.hidden { display: none !important; }

/* ─── Views ──────────────────────────────────────────────────────────────── */
.view { position: fixed; inset: 0; }

/* ─── Login ──────────────────────────────────────────────────────────────── */
#loginView {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top:    calc(var(--safe-t) + 24px);
  padding-bottom: calc(var(--safe-b) + 24px);
}

.login-wrap {
  width: 100%;
  max-width: 360px;
}

.login-logo {
  text-align: center;
  margin-bottom: 20px;
}
.login-logo img {
  border-radius: 22px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

.field-group {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.field {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  font-family: inherit;
  color: var(--label);
  background: transparent;
  border: none;
  border-bottom: 0.5px solid var(--sep);
  outline: none;
}
.field:last-child { border-bottom: none; }
.field::placeholder { color: var(--label3); }

.remember-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--label2);
  margin-bottom: 16px;
  cursor: pointer;
}
.remember-label input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--blue);
  cursor: pointer;
}

.login-error {
  font-size: 15px;
  color: var(--red);
  text-align: center;
  margin-top: 12px;
}

/* ─── Nav Bar (zweizeilig: Marke + Untertitel, wie iOS Large Title) ───────── */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--nav-sub-h) + var(--safe-t));
  padding-top: var(--safe-t);
  z-index: 20;
  background: rgba(242,242,247,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
  display: flex;
  flex-direction: column;
  padding-left:  calc(var(--safe-l) + 16px);
  padding-right: calc(var(--safe-r) + 8px);
}

.nav-top {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Title-1-Skala (28px/34px Bold) aus den iOS-Design-Guidelines */
.nt-brand, .nt-sub {
  display: block;
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.nt-brand { color: var(--label); }
.nt-sub   { color: var(--label2); padding-bottom: 8px; }

.nav-right { display: flex; align-items: center; justify-content: flex-end; }

.nav-icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--blue);
  border-radius: 8px;
}
#menuBtn { color: var(--label); }
.nav-icon-btn:active { background: rgba(0,0,0,.06); }

.nav-text-btn {
  font-size: 17px;
  color: var(--blue);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-text-btn:active { opacity: .6; }

/* ─── Content ────────────────────────────────────────────────────────────── */
#content {
  position: absolute;
  top:    calc(var(--nav-h) + var(--nav-sub-h) + var(--safe-t));
  bottom: calc(var(--tab-h) + var(--safe-b));
  left: 0; right: 0;
  overflow: hidden;
}

.tab-content {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}

/* ─── Tab Bar ────────────────────────────────────────────────────────────── */
.tabbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  z-index: 20;
  background: rgba(242,242,247,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
  display: flex;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--label3);
  font-size: 10px;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 0 2px;
}
.tab-btn.active { color: var(--blue); }
.tab-btn span { font-weight: 500; }

/* ─── Day Card (eine Kachel pro Tag) ─────────────────────────────────────── */
.day-card {
  background: var(--surface);
  border-radius: 18px;
  margin: 8px 12px 0;
  overflow: hidden;
}
.day-card + .day-card { margin-top: 16px; }

.day-tile {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 16px 16px 12px;
}

.day-tile-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--label);
}
.day-tile-name-dim { color: var(--label2); }

.day-tile-date {
  font-size: 15px;
  font-weight: 500;
  color: var(--label2);
}

.day-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--label2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 20px 20px 6px;
}

/* ─── Session Cards ──────────────────────────────────────────────────────── */
.sessions-group {
  background: var(--surface);
  border-radius: 12px;
  margin: 0 16px 4px;
  overflow: hidden;
}

.session-card {
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--sep);
}
.session-card:last-child { border-bottom: none; }

.session-card.is-dim { opacity: .38; }
.session-card.is-booked  { background: rgba(52,199,89,.05); }
.session-card.is-waiting { background: rgba(255,149,0,.05);  }

/* Top row: time left, action button right */
.session-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.session-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--label2);
}

.session-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.session-cap {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--label2);
  background: rgba(120,120,128,.12);
  border-radius: 8px;
  padding: 2px 8px;
}
.session-cap.is-full { color: var(--red); background: rgba(255,59,48,.1); }

/* ─── Member List ──────────────────────────────────────────────────────────── */
.members-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 0.5px solid var(--sep);
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.members-chevron {
  font-size: 20px;
  line-height: 1;
  opacity: .5;
  transition: transform .2s;
}
.members-row.is-open .members-chevron { transform: rotate(90deg); }

.members-panel { padding-top: 4px; padding-bottom: 2px; }

.m-names {
  font-size: 14px;
  color: var(--label2);
  line-height: 1.6;
}
.m-sep {
  margin: 0 5px;
  color: var(--label3);
}

.m-loading {
  padding: 8px 0;
  display: flex;
  justify-content: flex-start;
}
.spinner-sm {
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,.08);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.m-empty {
  font-size: 13px;
  color: var(--label3);
  padding: 4px 0 2px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 18px;
  min-height: 36px;
  min-width: 44px;
  cursor: pointer;
  transition: opacity .12s;
  margin-top: 8px;
  align-self: flex-start;
}
.btn:active { opacity: .65; }
.btn:disabled { opacity: .45; cursor: default; }
/* Inline variant: sits in the top row next to the time, no top margin */
.btn.btn-inline { margin-top: 0; padding: 6px 14px; font-size: 14px; min-height: 32px; }

.btn-blue   { background: var(--blue);   color: #fff; }
.btn-green  { background: var(--green);  color: #fff; }
.btn-red    { background: var(--red);    color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange-ghost { background: rgba(255,149,0,.12); color: var(--orange); }

.btn-full {
  width: 100%;
  padding: 15px;
  font-size: 17px;
  border-radius: 12px;
  align-self: auto;
}

.status-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--label3);
}

/* ─── Empty State ────────────────────────────────────────────────────────── */
.empty {
  text-align: center;
  color: var(--label2);
  font-size: 16px;
  padding: 56px 24px;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: .5;
}

/* ─── Loading Overlay ────────────────────────────────────────────────────── */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(242,242,247,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(0,0,0,.08);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: absolute;
  left: 16px; right: 16px;
  bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  z-index: 40;
  animation: fadeUp .2s ease;
  pointer-events: none;
}
.toast-green { background: var(--green); color: #fff; }
.toast-red   { background: var(--red);   color: #fff; }
.toast-blue  { background: var(--blue);  color: #fff; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Session Tile Grid ──────────────────────────────────────────────────── */
.session-tile {
  background: var(--bg);
  border-radius: 14px;
  padding: 12px 12px 10px;
  min-height: 104px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .12s;
  position: relative;
  overflow: hidden;
}
.session-tile:active { opacity: .7; }

.tile-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--label2);
  margin-bottom: 5px;
  letter-spacing: .1px;
}

.tile-name {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  line-height: 1.25;
}

.tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.tile-cap {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--label2);
  background: rgba(120,120,128,.1);
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  min-height: 28px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tile-cap:active { opacity: .6; }
.tile-cap.is-full { color: var(--red); background: rgba(255,59,48,.1); }

.tile-foot-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tile-fav {
  font-size: 13px;
  color: #ffb400;
  line-height: 1;
}
.session-tile.tile-selected .tile-fav { color: #fff; }

.tile-infinity {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}
.session-tile.tile-selected .tile-infinity { color: #fff; }

.tile-family-avatars {
  display: flex;
  align-items: center;
}
.tile-family-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(120,120,128,.18);
  color: var(--label2);
  font-size: 8px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg);
  margin-left: -5px;
}
.tile-family-dot:first-child { margin-left: 0; }
.session-tile.tile-selected .tile-family-dot { border-color: var(--green); }

/* Status badges on tile */
.tile-check {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.tile-wait {
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  background: rgba(255,149,0,.12);
  border-radius: 6px;
  padding: 2px 6px;
}

.tile-lbl {
  font-size: 11px;
  font-weight: 500;
  color: var(--label3);
}

/* Tile states */
.session-tile.tile-selected {
  background: var(--green);
  color: #fff;
}
.session-tile.tile-selected .tile-time { color: rgba(255,255,255,.75); }
.session-tile.tile-selected .tile-cap  { background: rgba(255,255,255,.25); color: #fff; }

.session-tile.tile-booked {
  background: rgba(52,199,89,.1);
  border: 1.5px solid rgba(52,199,89,.3);
}

.session-tile.tile-waiting {
  background: rgba(255,149,0,.08);
  border: 1.5px solid rgba(255,149,0,.25);
}

.session-tile.tile-waitlist {
  border: 1.5px solid rgba(255,149,0,.4);
}

.session-tile.tile-dim {
  opacity: .32;
  cursor: default;
}
.session-tile.tile-dim:active { opacity: .32; }

/* ─── Floating Book Bar ──────────────────────────────────────────────────── */
.book-bar {
  position: absolute;
  left: 16px; right: 16px;
  bottom: calc(var(--tab-h) + var(--safe-b) + 10px);
  z-index: 25;
  animation: fadeUp .2s ease;
  background: var(--surface);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
}

.book-bar-btn {
  width: 100%;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(52,199,89,.45);
}
.book-bar-btn:active { opacity: .8; }

.book-person-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.book-person-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 9999px;
  background: rgba(120,120,128,.12);
  color: var(--label2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.book-person-chip.is-selected { background: var(--green); color: #fff; }
.book-person-chip:active { opacity: .7; }

/* ─── Detail Sheet ───────────────────────────────────────────────────────── */
.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 45;
  transition: opacity .25s;
}

.detail-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  max-height: 82vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 50;
  padding-bottom: calc(var(--safe-b) + 24px);
  animation: slideUp .22s cubic-bezier(.32,.72,0,1);
  transition: transform .25s cubic-bezier(.32,.72,0,1);
  will-change: transform;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.sheet-handle {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.sheet-handle::after {
  content: '';
  width: 36px; height: 4px;
  background: var(--sep);
  border-radius: 2px;
}

/* Detail content */
.d-head {
  background: var(--surface);
  border-radius: 14px;
  margin: 12px 16px 0;
  padding: 16px;
}

.d-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--label2);
  margin-bottom: 4px;
}

.d-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.d-cap {
  font-size: 14px;
  color: var(--label2);
}

.d-section {
  background: var(--surface);
  border-radius: 14px;
  margin: 10px 16px 0;
  padding: 14px 16px;
}

.d-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--label2);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 10px;
}

.d-msg {
  margin-bottom: 10px;
}
.d-msg:last-child { margin-bottom: 0; }

.d-msg-sender {
  font-size: 12px;
  font-weight: 600;
  color: var(--label2);
  margin-bottom: 3px;
}

.d-msg-text {
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.d-member-name {
  font-size: 15px;
  color: var(--label);
}

.d-loading {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.d-empty {
  text-align: center;
  color: var(--label3);
  font-size: 15px;
  padding: 24px 16px;
}

.d-my-booking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
}
.d-my-booking-row:not(:last-child) { border-bottom: 0.5px solid var(--sep); }
.d-my-booking-name { font-size: 15px; font-weight: 500; color: var(--label); }

/* ─── Side Menu (helles Bottom-Sheet, wie Detail-Sheet) ──────────────────── */
.menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 55;
  transition: opacity .25s;
}

.menu-drawer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  max-height: 82vh;
  z-index: 60;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--safe-b) + 24px);
  animation: slideUp .22s cubic-bezier(.32,.72,0,1);
  transition: transform .25s cubic-bezier(.32,.72,0,1);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 0.5px solid var(--sep);
}

.menu-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--label);
}

.menu-close-btn {
  width: 30px; height: 30px;
  background: rgba(120,120,128,.16);
  border: none;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  color: var(--label2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.menu-close-btn:active { opacity: .5; }

.menu-section {
  padding: 20px 16px 0;
}

.menu-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--label2);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 8px;
}

.menu-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 0 16px;
  overflow: hidden;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--sep);
}
.setting-row:last-child { border-bottom: none; }

.setting-info { flex: 1; min-width: 0; }
.setting-label { font-size: 16px; font-weight: 500; color: var(--label); }
.setting-sub   { font-size: 12px; color: var(--label2); margin-top: 2px; }

.setting-row-block { padding: 14px 0 4px; }
.setting-row-block .setting-sub { margin-bottom: 10px; }

.hidden-pattern-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.hidden-pattern-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 12px;
  border-radius: 9999px;
  background: rgba(120,120,128,.12);
  color: var(--label2);
  font-size: 13px;
  font-weight: 600;
}
.hidden-pattern-chip button {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(120,120,128,.22);
  border: none;
  color: var(--label2);
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.hidden-pattern-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
}
.hidden-pattern-add .acct-input { border-top: none; padding: 8px 0; }

/* iOS-style Toggle */
.toggle {
  position: relative;
  display: inline-block;
  width: 51px; height: 31px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(120,120,128,.24);
  border-radius: 31px;
  transition: background .2s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 27px; height: 27px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: transform .2s cubic-bezier(.32,.72,0,1);
}
.toggle input:checked ~ .toggle-track { background: var(--green); }
.toggle input:checked ~ .toggle-track::after { transform: translateX(20px); }

/* Time filter row */
.time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 14px;
}

.time-field { flex: 1; }

.time-label {
  font-size: 12px;
  color: var(--label2);
  margin-bottom: 4px;
  font-weight: 500;
}

.time-input {
  width: 100%;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  padding: 9px 10px;
  background: rgba(120,120,128,.12);
  border: none;
  border-radius: 10px;
  color: var(--label);
  outline: none;
  -webkit-appearance: none;
  color-scheme: light;
}
.time-input:focus { background: rgba(120,120,128,.18); }

.time-sep {
  font-size: 18px;
  color: var(--label3);
  flex-shrink: 0;
  margin-top: 20px;
}

/* Day picker */
.day-picker {
  display: flex;
  gap: 6px;
  padding: 0 0 14px;
}

.day-btn {
  flex: 1;
  padding: 7px 0;
  border: none;
  border-radius: 10px;
  background: rgba(120,120,128,.12);
  color: var(--label2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.day-btn.day-active {
  background: var(--green);
  color: #fff;
}
.day-btn:active { opacity: .7; }

/* Logout button in menu */
.menu-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: none;
  border-radius: 14px;
  padding: 15px 16px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  color: var(--red);
  cursor: pointer;
  text-align: left;
}
.menu-logout:active { opacity: .6; }
.menu-logout svg { opacity: .8; }

/* ─── Konten (Familienmitglieder) ────────────────────────────────────────── */
.acct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 0.5px solid var(--sep);
}
.acct-row:last-child { border-bottom: none; }

.acct-row-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--label);
  cursor: pointer;
  padding: 4px 0;
  flex: 1;
  min-width: 0;
}
.acct-row.is-active .acct-row-name { color: var(--blue); font-weight: 600; }

.acct-active-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

.acct-remove-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,59,48,.12);
  color: var(--red);
  border: none;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.acct-remove-btn:active { opacity: .6; }

.acct-add-card { margin-top: 8px; padding: 4px 16px; }

.acct-add-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--blue);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  padding: 11px 0;
  text-align: left;
  cursor: pointer;
}
.acct-add-btn:active { opacity: .6; }

.acct-add-form { padding-bottom: 14px; }

.acct-input {
  display: block;
  width: 100%;
  padding: 11px 0;
  font-size: 16px;
  font-family: inherit;
  color: var(--label);
  background: transparent;
  border: none;
  border-top: 0.5px solid var(--sep);
  outline: none;
}
.acct-input::placeholder { color: var(--label3); }

/* ─── Mitglieder-Zeile mit Inline-Expand (großes Bild + Favorit) ─────────── */
.d-member-row {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.d-member-row:not(:last-child) { border-bottom: 0.5px solid var(--sep); }

.d-member-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.d-member-favdot {
  font-size: 12px;
  color: #ffb400;
}

.d-member-expand {
  max-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: max-height .28s ease;
}
.d-member-row.is-expanded .d-member-expand {
  max-height: 520px;
  padding: 4px 0 18px;
}

.d-member-big-img,
.d-member-big-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.d-member-big-img { object-fit: cover; background: var(--surface); }
.d-member-big-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: var(--blue);
  background: rgba(0,122,255,.12);
}

.d-member-fav-btn {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(120,120,128,.1);
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--label);
  cursor: pointer;
}
.d-member-fav-btn:active { opacity: .65; }
.d-member-fav-icon { font-size: 16px; color: var(--label3); }

/* ─── Automatische-Buchung-Bestätigung ───────────────────────────────────── */
.autobook-overlay {
  position: absolute;
  inset: 0;
  z-index: 75;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeUp .2s ease;
}

.autobook-card {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.autobook-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 4px;
}

.autobook-sub {
  font-size: 13px;
  color: var(--label2);
  margin-bottom: 14px;
}

.autobook-candidate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--sep);
}
.autobook-candidate-row:last-child { border-bottom: none; }

.autobook-candidate-info { min-width: 0; }
.autobook-candidate-name { font-size: 15px; font-weight: 600; color: var(--label); }
.autobook-candidate-sub  { font-size: 12px; color: var(--label2); margin-top: 1px; }

.autobook-candidate-remove {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(120,120,128,.14);
  border: none;
  color: var(--label2);
  font-size: 11px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.autobook-actions { margin-top: 16px; }
.autobook-actions .btn-full { margin-top: 0; }
.autobook-dismiss {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 6px;
  padding: 10px;
}
