:root {
  --bg: #f4f6f5;
  --card: #ffffff;
  --ink: #15201b;
  --muted: #6a766f;
  --line: #e7ebe8;
  --line-strong: #d7ddd9;
  --brand: #1c7a52;
  --brand-dark: #166544;
  --brand-tint: #e9f4ee;
  --danger: #cf4636;
  --danger-tint: #fbeae7;
  --r: 14px;
  --shadow-sm: 0 1px 2px rgba(16,40,28,.07);
  --shadow: 0 1px 3px rgba(16,40,28,.05), 0 10px 28px rgba(16,40,28,.06);
  --shadow-lg: 0 16px 48px rgba(16,40,28,.22);
  --tabbar-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; }
svg { display: block; }
/* Doppeltipp-Zoom unterbinden (v. a. im Kalender) – Pinch-Zoom & Scrollen bleiben erhalten */
button, a, label, .chip, #timelineHost, #timelineHost * { touch-action: manipulation; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  padding: 11px 16px; border-radius: 11px; font-weight: 600; letter-spacing: -.01em;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, transform .05s;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn.secondary:hover { background: #f1f4f2; border-color: var(--line-strong); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #b93a2c; border-color: #b93a2c; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.btn.small svg { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.google { background: #fff; color: #3c4043; border-color: var(--line-strong); box-shadow: none; text-decoration: none; }
.btn.google:hover { background: #f1f4f2; border-color: var(--line-strong); }
.btn.google .ic { display: inline-flex; }
.or-sep { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: 12.5px; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }

.iconbtn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--muted); border-radius: 10px;
  transition: background .15s, color .15s, border-color .15s;
}
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn:hover { background: #f1f4f2; color: var(--ink); border-color: var(--line-strong); }
.iconbtn.danger:hover { background: var(--danger-tint); color: var(--danger); border-color: #f0c8c2; }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; min-height: 100dvh; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(140deg, #16a06a 0%, #12855a 34%, #0d5f40 68%, #0a3d29 100%);
  background-size: 220% 220%; animation: authGradient 18s ease-in-out infinite;
}
/* soft blurred colour blobs for depth */
.login-wrap::before, .login-wrap::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; z-index: 0;
}
.login-wrap::before { width: 62vmax; height: 62vmax; top: -28vmax; right: -22vmax; background: #2ee59a; opacity: .5; }
.login-wrap::after  { width: 48vmax; height: 48vmax; bottom: -24vmax; left: -18vmax; background: #063a26; opacity: .55; }
@keyframes authGradient { 0%,100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }

.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 36px 32px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 26px;
  box-shadow: 0 28px 70px rgba(3,24,16,.42); backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.brandmark {
  width: 66px; height: 66px; border-radius: 21px; margin: 0 auto 20px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(255,255,255,.28), rgba(255,255,255,.1));
  border: 1px solid rgba(255,255,255,.28); box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.brandmark svg { width: 34px; height: 34px; color: #fff; }
.login-card h1 { margin: 0 0 6px; font-size: 30px; font-weight: 820; letter-spacing: -.035em; color: #fff; text-align: center; }
.login-card p.sub { margin: 0 0 26px; color: rgba(255,255,255,.74); font-size: 14.5px; line-height: 1.5; text-align: center; }

/* login-scoped form styling (glass fields on the gradient; global .field stays untouched) */
.login-wrap .field { margin-bottom: 14px; }
.login-wrap .field label { color: rgba(255,255,255,.82); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.login-wrap .field input {
  padding: 14px 15px; font-size: 15px; border-radius: 14px; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.login-wrap .field input::placeholder { color: rgba(255,255,255,.55); }
.login-wrap .field input:focus { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.16); box-shadow: 0 0 0 3px rgba(255,255,255,.14); }
/* keep autofilled fields on-theme instead of the browser's solid yellow/white */
.login-wrap .field input:-webkit-autofill,
.login-wrap .field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff; caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(17,74,50,.6) inset; transition: background-color 9999s ease-in-out 0s;
}

/* primary action: bright, high-contrast against the green */
.login-wrap .btn { padding: 14px 16px; border-radius: 14px; }
.login-wrap .btn:not(.secondary):not(.google) {
  margin-top: 6px; font-weight: 800; color: var(--brand-dark); border: none;
  background: linear-gradient(180deg, #ffffff, #eafff4); box-shadow: 0 12px 28px rgba(0,0,0,.26);
}
.login-wrap .btn:not(.secondary):not(.google):hover { background: linear-gradient(180deg, #ffffff, #e0fbee); transform: translateY(-1px); box-shadow: 0 16px 34px rgba(0,0,0,.3); }
.login-wrap .btn:not(.secondary):not(.google):active { transform: translateY(0); }

/* Google + separators + helper text on the gradient */
.login-wrap .btn.google { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); box-shadow: none; }
.login-wrap .btn.google:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }
.login-wrap .or-sep { color: rgba(255,255,255,.6); margin: 18px 0; }
.login-wrap .or-sep::before, .login-wrap .or-sep::after { background: rgba(255,255,255,.24); }
.login-wrap .hint { color: rgba(255,255,255,.72); }
.login-wrap .hint a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.login-wrap .err { color: #ffdad2; }
.login-wrap .cred-val { color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 12px 14px; font-weight: 600; }

/* mobile: fullscreen, no card */
@media (max-width: 560px) {
  .login-wrap { padding: 0; align-items: stretch; }
  .login-card {
    max-width: none; border: none; border-radius: 0; box-shadow: none;
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    display: flex; flex-direction: column; justify-content: center; min-height: 100dvh;
    padding: 32px 26px calc(34px + env(safe-area-inset-bottom));
  }
  .login-card h1 { font-size: 33px; }
  .brandmark { width: 72px; height: 72px; border-radius: 23px; }
  .brandmark svg { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .login-wrap { animation: none; } }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.field input[type=checkbox], .field input[type=radio], .checks input { width: auto; padding: 0; accent-color: var(--brand); }
.err { color: var(--danger); font-size: 13px; margin: 8px 0 0; min-height: 18px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 16px; text-align: center; }
.notice { display: flex; gap: 10px; align-items: flex-start; margin: 4px 2px 14px; padding: 11px 13px;
  background: var(--brand-tint); border: 1px solid rgba(28,122,82,.18); border-radius: 12px;
  color: var(--brand-dark); font-size: 12.5px; line-height: 1.5; text-align: left; }
.notice .notice-ico { flex: 0 0 auto; display: grid; place-items: center; margin-top: .5px; color: var(--brand); }
.notice .notice-ico svg { width: 16px; height: 16px; display: block; }
.notice strong { font-weight: 700; }

/* ---------- shell ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--ink); background: none; border: none; padding: 0; cursor: pointer; }
.topbar .logo svg { width: 22px; height: 22px; color: var(--brand); }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; max-width: 36vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.container { max-width: 1100px; margin: 0 auto; padding: 12px 10px 20px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar-h); background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(12px); border-top: 1px solid var(--line); display: flex; z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; background: none; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar button .ic { display: inline-flex; padding: 4px 18px; border-radius: 999px; transition: background .18s, color .18s; }
.tabbar button .ic svg { width: 23px; height: 23px; }
.tabbar button.active { color: var(--brand-dark); }
.tabbar button.active .ic { background: var(--brand-tint); color: var(--brand); }

.fab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 31;
  background: linear-gradient(180deg, #229863, #1a7049); color: #fff; border: none; border-radius: 30px; padding: 14px 22px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 8px 22px rgba(28,122,82,.42); display: flex; align-items: center; gap: 8px; }
.fab .ic svg { width: 20px; height: 20px; }
.fab:active { transform: translateY(1px); }

/* ---------- calendar control bar (slim: day nav + field switcher) ---------- */
.cal-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-bar .navbtn { display: grid; place-items: center; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; width: 38px; height: 50px; color: var(--muted); flex: 0 0 auto; }
.cal-bar .navbtn svg { width: 20px; height: 20px; }
.cal-bar .navbtn:hover { background: #f1f4f2; color: var(--ink); }
.cal-bar .today-btn { background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; height: 50px; padding: 0 12px; font-weight: 600; flex: 0 0 auto; }
.cal-bar .today-btn:hover { background: #f1f4f2; }
.cal-ctl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cal-field { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; background: var(--brand-tint); color: var(--brand-dark); border: 1px solid var(--brand-tint); border-radius: 9px; font-weight: 700; font-size: 13px; letter-spacing: -.01em; padding: 0 12px; overflow: hidden; }
.cal-field > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-field .cd { display: inline-flex; flex: 0 0 auto; }
.cal-field .cd svg { width: 14px; height: 14px; }
.datewrap { position: relative; width: 100%; }
.datewrap .date { width: 100%; height: 30px; background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.datewrap input[type=date] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: none; cursor: pointer; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 9px; margin-bottom: 4px; -webkit-overflow-scrolling: touch; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); user-select: none; white-space: nowrap; transition: all .12s; }
.chip:not(.off) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }
.chip.off { color: var(--muted); }

/* ---------- day timeline ---------- */
.day-scroll { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; box-shadow: var(--shadow); position: relative; max-height: calc(100vh - 142px); }
@supports (height: 100dvh) { .day-scroll { max-height: calc(100dvh - 142px); } }
/* impersonation banner adds 40px of chrome above the timeline */
.topbar.with-imp ~ .container .day-scroll { max-height: calc(100vh - 182px); }
@supports (height: 100dvh) { .topbar.with-imp ~ .container .day-scroll { max-height: calc(100dvh - 182px); } }
.tg { display: flex; min-width: min-content; }
.time-gutter { position: sticky; left: 0; z-index: 6; background: var(--card); border-right: 1px solid var(--line); flex: 0 0 48px; }
.tg-spacer { height: 34px; position: sticky; top: 0; background: var(--card); z-index: 7; border-bottom: 1px solid var(--line); }
.tg-hour { font-size: 11px; color: var(--muted); padding: 3px 6px 0 0; text-align: right; box-sizing: border-box; }
.fg { border-right: 2px solid var(--line-strong); }
.fg:last-child { border-right: none; }
.fg-head { position: sticky; top: 0; z-index: 4; height: 34px; background: #f8faf9; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.fg-title { display: flex; align-items: center; flex: 0 0 auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--brand-dark); padding: 6px 8px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-secs { flex: 1; display: flex; }
.fg-secs .s { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; padding: 0 6px; font-size: 12px; font-weight: 600; border-left: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-secs .s:first-child { border-left: none; }
.fg-secs .s.simple { color: var(--muted); font-weight: 500; }
.fg-body { position: relative; }
.evt { position: absolute; border-radius: 9px; color: #fff; padding: 5px 9px; font-size: 11px; line-height: 1.25; overflow: hidden; box-shadow: 0 2px 5px rgba(16,40,28,.18), inset 0 0 0 1px rgba(255,255,255,.18); }
.evt .t { font-weight: 700; letter-spacing: -.01em; }
.evt .ttl { opacity: .96; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evt .meta { opacity: .82; font-size: 10px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evt .rec { position: absolute; top: 4px; right: 6px; font-size: 10px; opacity: .85; }
/* Sperrung: neutral slate block with diagonal hatching, no group color */
.evt.block { color: #fff; background-color: #5b6b63; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.14) 0, rgba(255,255,255,.14) 6px, transparent 6px, transparent 12px); box-shadow: 0 2px 5px rgba(16,40,28,.18), inset 0 0 0 1px rgba(255,255,255,.22); }
.club-muted { font-weight: 500; font-size: 12px; color: var(--muted); }
.ph-titles { min-width: 0; }
.ph-titles h3 { margin: 0; }
.ph-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ---------- panels / lists ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.panel-head .spacer { flex: 1; }
.subnav { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 4px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.subnav button { flex: 1; border: none; background: none; padding: 10px; border-radius: 10px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.subnav button.active { background: var(--brand); color: #fff; }

.list-row { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow .ttl { font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.list-row .grow .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.list-row .actions { display: flex; gap: 7px; flex: 0 0 auto; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #eef1ef; color: var(--muted); }
.tag.admin { background: #f3e4d6; color: #9a4a1f; }
.tag.role { background: #e2ecf6; color: #2a527e; }
.tag.gadmin { background: #ece2f5; color: #5d3c8c; }
.badge-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; vertical-align: middle; }
/* in inline text (list rows) the dot needs its own spacing + a touch of optical centering;
   in flex headers (panel-head h3) the gap handles spacing, so scope the margin to text contexts */
.ttl .badge-dot, .sub .badge-dot { margin-right: 6px; position: relative; top: -1px; }
.empty { padding: 40px 22px; text-align: center; color: var(--muted); }
/* a polished empty state: icon in a tinted circle + title + subtext, vertically balanced */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 24px 48px; }
.empty-state .empty-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand); margin-bottom: 14px; }
.empty-state .empty-ico svg { width: 26px; height: 26px; }
.empty-state .empty-title { font-size: 15.5px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.empty-state .empty-sub { margin: 6px 0 0; max-width: 330px; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(14,24,18,.5); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal { background: var(--card); border-radius: 22px 22px 0 0; width: 100%; max-width: 480px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slideup .2s cubic-bezier(.2,.8,.3,1); }
@keyframes slideup { from { transform: translateY(28px); opacity: .5; } to { transform: none; opacity: 1; } }
.modal-head { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.modal-head .x { display: grid; place-items: center; margin-left: auto; background: none; border: none; color: var(--muted); width: 34px; height: 34px; border-radius: 9px; }
.modal-head .x svg { width: 18px; height: 18px; }
.modal-head .x:hover { background: #f1f4f2; color: var(--ink); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.modal-foot .btn { flex: 1; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chkrow { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.chkrow input[type=checkbox] { width: auto; padding: 0; accent-color: var(--brand); }
.seg { display: flex; background: #f1f4f2; border-radius: 11px; padding: 4px; gap: 4px; }
.seg button { flex: 1; background: none; border: none; padding: 9px; border-radius: 8px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.seg button.active { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.optchips { display: flex; flex-wrap: wrap; gap: 8px; }
.optchip { border: 1px solid var(--line-strong); background: #fff; border-radius: 10px; padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--ink); transition: all .12s; }
.optchip.sel { background: var(--brand); color: #fff; border-color: var(--brand); }
.optchip.all { border-style: dashed; border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); }
.optchip.all.sel { border-style: solid; color: #fff; background: var(--brand); }
.checks { display: flex; flex-direction: column; gap: 2px; max-height: 190px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 11px; padding: 8px 12px; }
.checks label { display: flex; align-items: center; gap: 10px; font-weight: 500; padding: 6px 0; }

/* static (single-choice) value instead of a dropdown */
.static-val { padding: 10px 0 2px; font-weight: 600; }

/* generated credentials */
.cred-val { font-weight: 600; }
.cred-pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; font-weight: 700; letter-spacing: 3px; background: var(--brand-tint); color: var(--brand-dark); border-radius: 11px; padding: 13px 14px; text-align: center; user-select: all; }
.cred-actions { display: flex; gap: 10px; margin-top: 8px; }
.cred-actions .btn { flex: 1; }
.cred-actions .btn .ic svg { width: 18px; height: 18px; }

/* contact person on a booking */
.contact-row { display: flex; align-items: center; gap: 10px; }
.contact-row .grow { flex: 1; min-width: 0; }
.contact-actions { display: flex; gap: 8px; flex: 0 0 auto; }
a.iconbtn { text-decoration: none; }
.iconbtn.wa:hover { background: var(--brand-tint); color: var(--brand-dark); border-color: #bfe0cf; }

/* delete section in the booking detail modal */
.del-area { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- impersonation banner ---------- */
.imp-bar { position: sticky; top: 0; z-index: 40; height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 14px; background: linear-gradient(180deg, #a8531f, #8f4015); color: #fff; font-size: 13px; }
.imp-bar .ic { display: inline-flex; }
.imp-bar .ic svg { width: 18px; height: 18px; }
.imp-bar .btn { margin-left: auto; background: #fff; color: #8f4015; border-color: #fff; }
.imp-bar .btn:hover { background: #f3ece6; border-color: #f3ece6; }
.topbar.with-imp { top: 40px; }

.toast { position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: #15201b; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 100; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; text-align: center; font-size: 14px; }
.toast.show { opacity: 1; }
.toast.error { background: var(--danger); }

/* ---------- desktop ---------- */
@media (min-width: 820px) {
  .container { padding: 20px 20px 28px; }
  /* calendar uses the full screen width on desktop; the control bar stays compact */
  .container.wide { max-width: none; }
  .container.wide .cal-bar { max-width: 600px; }
  .overlay { align-items: center; padding: 24px; }
  .modal { border-radius: 22px; }
  .day-scroll { max-height: calc(100vh - 150px); }
}
@supports (height: 100dvh) { @media (min-width: 820px) { .day-scroll { max-height: calc(100dvh - 150px); } } }

/* menu / field-picker sheet rows */
.sheet-hint { padding: 0 4px 12px; color: var(--muted); font-size: 12.5px; }
.menu-head { padding: 2px 4px 12px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.menu-row { width: 100%; background: none; border: none; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.menu-row:last-of-type { border-bottom: none; }
.menu-row.active { background: var(--brand-tint); }
.menu-row.active .ttl { color: var(--brand-dark); }
.mi { display: inline-flex; align-items: center; color: var(--muted); flex: 0 0 auto; }
.mi svg { width: 20px; height: 20px; }
.mi.check { color: var(--brand); }

/* ---------- Freigabemodus (approvals) ---------- */
/* a pending request isn't a firm booking yet: faded, hatched, dashed outline */
.evt.pending { opacity: .92; box-shadow: 0 1px 4px rgba(16,40,28,.14), inset 0 0 0 1.5px rgba(255,255,255,.5);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.22) 0, rgba(255,255,255,.22) 5px, transparent 5px, transparent 11px); }
.evt.pending::after { content: ''; position: absolute; inset: 0; border: 1.5px dashed rgba(255,255,255,.85); border-radius: 9px; pointer-events: none; }
.evt .pend-badge { position: absolute; top: 3px; right: 5px; font-size: 10.5px; line-height: 1; }
.evt.pending .rec { right: 20px; }
/* count badge on the "Freigaben" menu row */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; vertical-align: middle; }
/* note in the booking-detail modal + hint in the booking modal */
.pending-note { margin-top: 14px; padding: 11px 13px; border-radius: 11px; background: #fdf3e2; color: #8a5a12;
  font-size: 13px; font-weight: 600; border: 1px solid #f2e0bf; }
.approval-hint { color: #8a5a12 !important; }

/* ---------- Doppelbelegung (conflicting bookings) ---------- */
/* a double-booked block keeps its colour but gets a red ring + ⚠ badge so the clash is obvious */
.evt.conflict { box-shadow: 0 2px 6px rgba(207,70,54,.35), inset 0 0 0 2px var(--danger); }
.evt .conf-badge { position: absolute; top: 3px; right: 5px; font-size: 11px; line-height: 1; z-index: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.evt.conflict .rec { right: 22px; }
.evt.conflict.pending .rec { right: 38px; }
/* note in the booking-detail modal listing the overlapping bookings */
.conflict-note { margin-top: 14px; padding: 11px 13px; border-radius: 11px; background: var(--danger-tint);
  color: #8f2c20; font-size: 13px; font-weight: 600; border: 1px solid #f2c9c2; }
.conflict-note ul { margin: 6px 0 0; padding-left: 18px; font-weight: 500; }
.conflict-note li { margin-top: 2px; }
