/* Corporate Design von vogelfrei-solutions.de: fast schwarz, Lime als Akzent, Urbanist im Text, Be Vietnam Pro in Überschriften. */
@font-face { font-family: "Urbanist"; src: url("/static/fonts/urbanist-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/static/fonts/be-vietnam-pro-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/static/fonts/be-vietnam-pro-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/static/fonts/be-vietnam-pro-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #0a0a09; --bg: #0a0a09; --panel: #111110; --card: #161615; --raised: #1f1f1e;
  --white: #feffff; --text: #e0e0e0; --muted: #a2a2a2; --faint: #8c8c86;
  --line: rgba(254, 255, 255, .09); --line-strong: rgba(254, 255, 255, .2); --fill: rgba(254, 255, 255, .05); --fill-hover: rgba(254, 255, 255, .1);
  --lime: #9edb1a; --lime-hover: #b4ec36; --lime-soft: rgba(158, 219, 26, .13); --lime-line: rgba(158, 219, 26, .4);
  --danger: #ff6568; --danger-soft: rgba(255, 101, 104, .13); --warn: #f2b84f; --warn-soft: rgba(242, 184, 79, .13);
  --info: #86b6ff; --info-soft: rgba(134, 182, 255, .13); --wa: #25d366; --wa-soft: rgba(37, 211, 102, .13); --mail: #86b6ff; --mail-soft: rgba(134, 182, 255, .13);
  --radius: 14px; --radius-lg: 24px; --pill: 999px; --shadow-lg: 0 16px 60px rgba(0, 0, 0, .6);
  --font: "Urbanist", system-ui, -apple-system, "Segoe UI", sans-serif; --display: "Be Vietnam Pro", "Urbanist", system-ui, sans-serif;
  --hero: url("/static/bilder/hero-hintergrund.jpg");
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 400 15.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; font-weight: 500; line-height: 1.2; color: var(--white); }
h1 { font-size: 30px; } h2 { font-size: 21px; } h3 { font-size: 16.5px; } h4 { font-size: 14.5px; }
p { margin: 0; }
a { color: var(--lime); }
strong { color: var(--white); font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
option { background: var(--card); color: var(--text); }
.icon { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13.5px; } .strong { font-weight: 600; color: var(--white); } .nowrap { white-space: nowrap; }
a.strong { color: var(--lime); }
.center { text-align: center; } .grow { flex: 1; min-width: 0; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; } .between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; } .stack.lg { gap: 20px; } .stack.sm { gap: 6px; }
.mt { margin-top: 12px; } .mt-lg { margin-top: 24px; } .mb { margin-bottom: 12px; } .mb-lg { margin-bottom: 24px; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
::selection { background: var(--lime); color: var(--ink); }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }

/* Knöpfe: Pillen wie auf der Website */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--fill); color: var(--white); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--fill-hover); border-color: var(--line-strong); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 700; }
.btn.primary:hover { background: var(--lime-hover); border-color: var(--lime-hover); }
.btn.primary:disabled:hover { background: var(--lime); border-color: var(--lime); }
.btn.dark { background: var(--raised); }
.btn.danger { color: var(--danger); border-color: rgba(255, 101, 104, .35); background: transparent; }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--fill-hover); border-color: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; } .btn.lg { padding: 13px 26px; font-size: 15.5px; }
.btn.icon-only { padding: 8px; }
.linklike { background: none; border: 0; padding: 0; color: var(--lime); text-decoration: underline; cursor: pointer; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: 14px; color: var(--white); }
.hint { font-size: 13.5px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--fill); color: var(--white); min-height: 40px; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: 2px solid var(--lime); outline-offset: 0; border-color: transparent; }
.input[readonly] { color: var(--text); }
textarea.input { resize: vertical; min-height: 92px; line-height: 1.5; }
.input.mini { width: 78px; text-align: center; }
.input.time { width: 112px; }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--lime); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.switch { position: relative; display: inline-block; width: 40px; height: 23px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 23px; transition: background .15s; }
.switch span::before { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; background: var(--white); border-radius: 50%; transition: transform .15s; }
.switch input:checked + span { background: var(--lime); }
.switch input:checked + span::before { transform: translateX(17px); background: var(--ink); }
.switch input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 13px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: transparent; color: var(--text); cursor: pointer; font-size: 13.5px; font-weight: 600; transition: background .15s, border-color .15s; }
.chip:hover { background: var(--fill-hover); }
.chip.on { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.var-chip { padding: 2px 9px; border: 1px dashed var(--line-strong); background: transparent; border-radius: var(--pill); font-size: 12.5px; cursor: pointer; color: var(--muted); }
.var-chip:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-soft); }

/* Karten und Hinweise */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card.pad { padding: 24px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); font-size: 14.5px; }
.banner .icon { margin-top: 3px; }
.banner.info { background: var(--info-soft); color: #c6dcff; }
.banner.warn { background: var(--warn-soft); color: #f9dca6; }
.banner.danger { background: var(--danger-soft); color: #ffc0c1; }
.banner.ok { background: var(--lime-soft); color: #d6f28f; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--fill-hover); color: var(--text); }
.badge.ok { background: var(--lime-soft); color: var(--lime); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.mail { background: var(--mail-soft); color: var(--mail); }
.badge.wa { background: var(--wa-soft); color: var(--wa); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { margin-bottom: 6px; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--lime); animation: drehen .7s linear infinite; margin: 40px auto; }
@keyframes drehen { to { transform: rotate(360deg); } }

/* Marke */
.brand { display: flex; align-items: center; gap: 9px; font: 600 16.5px var(--display); color: var(--white); text-decoration: none; min-width: 0; }
.brand img { height: 30px; width: auto; flex: none; }
.brand span { white-space: nowrap; }
.brand i { color: var(--lime); font-style: normal; }

/* App-Rahmen */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 2px 8px 18px; }
.sidebar .btn.primary { margin: 0 4px 14px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 13px; margin-bottom: 2px; border-radius: var(--pill); color: var(--white); text-decoration: none; font-weight: 600; transition: background .15s; }
.nav-item:hover { background: var(--fill-hover); }
.nav-item.on { background: var(--lime-soft); color: var(--lime); }
.nav-sep { margin: auto 0 0; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--line); margin-top: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; font: 600 12.5px var(--display); flex: none; }
.avatar.lg { width: 60px; height: 60px; font-size: 20px; }
.main { padding: 32px 36px 64px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 5px; }
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 22px; overflow: auto hidden; scrollbar-width: none; }
.tab { padding: 10px 15px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.tab:hover { color: var(--white); }
.tab.on { color: var(--white); border-bottom-color: var(--lime); }
.mobile-top { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters .input { width: auto; min-width: 180px; }

/* Link-Karten */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.link-card { position: relative; padding: 20px 22px 14px; border-top: 3px solid var(--c, var(--lime)); display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: border-color .15s; }
.link-card.aus { opacity: .55; }
.link-card h3 a { color: inherit; text-decoration: none; }
.link-card h3 a:hover { color: var(--lime); }
.link-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: auto; padding-top: 12px; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--raised); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-lg); min-width: 225px; padding: 6px; z-index: 40; }
.menu.oben { top: auto; bottom: calc(100% + 4px); }
.menu button, .menu a { display: flex; gap: 9px; align-items: center; width: 100%; padding: 8px 11px; background: none; border: 0; border-radius: 10px; text-align: left; cursor: pointer; color: var(--white); text-decoration: none; font-size: 14.5px; }
.menu button:hover, .menu a:hover { background: var(--fill-hover); }
.menu button.rot { color: var(--danger); }
.profil-leiste { display: flex; align-items: center; gap: 12px; padding: 14px 20px; margin-bottom: 18px; flex-wrap: wrap; }

/* Modal und Toast */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 16px; z-index: 100; overflow-y: auto; }
.modal { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(540px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.gross { width: min(880px, 100%); }
.modal-head { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; width: min(460px, calc(100vw - 32px)); }
.toast { background: var(--raised); border: 1px solid var(--line-strong); color: var(--white); padding: 12px 18px; border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; gap: 9px; align-items: flex-start; }
.toast.err { background: #4a1c1d; border-color: var(--danger); }
.toast .icon { color: var(--lime); margin-top: 3px; } .toast.err .icon { color: var(--danger); }

/* Anmeldung und öffentliche Seiten: das Wellenmotiv der Website */
.auth-page, .pub { position: relative; isolation: isolate; }
.auth-page::before, .pub::before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto 0; height: min(760px, 100%); pointer-events: none;
  background: linear-gradient(to bottom, rgba(10, 10, 9, .05) 40%, var(--bg) 100%), linear-gradient(to right, rgba(10, 10, 9, .25), rgba(10, 10, 9, .75) 55%, rgba(10, 10, 9, .85)), var(--hero) top left / cover no-repeat; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px; width: min(430px, 100%); box-shadow: var(--shadow-lg); }
.auth-box .brand { margin-bottom: 26px; font-size: 18px; }
.auth-box .brand img { height: 36px; }
.demo-box { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }

/* Link-Editor */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; align-items: start; }
.editor-grid > form.card { overflow: hidden; }
.editor-preview { position: sticky; top: 20px; }
.section { border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 22px; background: none; border: 0; cursor: pointer; text-align: left; transition: background .15s; }
.section-head:hover { background: var(--fill); }
.section-head .summary { color: var(--muted); font-size: 13.5px; font-weight: 400; display: block; margin-top: 1px; }
.section-body { padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.art-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.art { padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: transparent; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.art:hover { background: var(--fill); }
.art.on { border-color: var(--lime); background: var(--lime-soft); }
.art:disabled { opacity: .45; cursor: not-allowed; }
.farben { display: flex; flex-wrap: wrap; gap: 8px; }
.farbe { width: 27px; height: 27px; border-radius: 50%; border: 2px solid var(--card); outline: 1px solid var(--line-strong); cursor: pointer; padding: 0; }
.farbe.on { outline: 2.5px solid var(--white); }
.frage { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }
.ort-zeile { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.vorschau-kopf { padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }

/* Buchungsseite */
.pub { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 26px 16px 24px; }
.pub-kopf { width: min(1040px, 100%); margin-bottom: 20px; }
.pub-kopf .brand { font-size: 17px; }
.pub-kopf .brand img { height: 36px; }
.pub-kopf.schmal { width: min(640px, 100%); }
.pub-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(1040px, 100%); display: grid; grid-template-columns: 330px minmax(0, 1fr); overflow: hidden; }
.pub-card.schmal { width: min(640px, 100%); display: block; padding: 36px; }
.pub-info { padding: 28px 26px; border-right: 1px solid var(--line); box-shadow: inset 0 3px 0 var(--c, var(--lime)); }
.pub-org { color: var(--lime); font-weight: 600; font-size: 14px; }
.pub-info h1 { font-size: 25px; margin: 6px 0 16px; }
.pub-meta { display: flex; flex-direction: column; gap: 9px; color: var(--muted); font-weight: 500; }
.pub-meta > div { display: flex; gap: 9px; align-items: flex-start; }
.pub-meta .icon { margin-top: 3px; }
.pub-desc { margin-top: 16px; white-space: pre-wrap; color: var(--text); }
.pub-main { padding: 28px; min-width: 0; }
.pub-main h2 { margin-bottom: 18px; }
.waehler { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 26px; }
.waehler.ohne-zeiten { grid-template-columns: minmax(0, 430px); justify-content: center; }
.monat-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.monat-kopf strong { font: 500 16px var(--display); }
.monat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.wt { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.tag { aspect-ratio: 1; border-radius: 50%; border: 0; background: none; color: var(--faint); font-weight: 500; display: grid; place-items: center; font-size: 15px; position: relative; max-height: 48px; max-width: 48px; margin: auto; width: 100%; }
.tag.frei { background: var(--lime-soft); color: var(--lime); font-weight: 700; cursor: pointer; transition: background .15s; }
.tag.frei:hover { background: rgba(158, 219, 26, .28); }
.tag.an, .tag.an:hover { background: var(--lime); color: var(--ink); }
.tag.heute::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.zeiten { display: flex; flex-direction: column; gap: 7px; max-height: 430px; overflow-y: auto; padding-right: 4px; }
.zeit { display: flex; gap: 6px; }
.zeit button { flex: 1; padding: 10px 6px; border: 1px solid var(--lime-line); color: var(--lime); background: transparent; border-radius: var(--pill); font-weight: 700; cursor: pointer; min-width: 0; transition: background .15s; }
.zeit button:hover { background: var(--lime-soft); }
.zeit.an button:first-child { background: var(--raised); border-color: var(--line-strong); color: var(--white); }
.zeit button.weiter, .zeit button.weiter:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.plaetze { display: block; font-size: 12px; font-weight: 500; }
.tz-zeile { margin-top: 16px; display: flex; align-items: center; gap: 7px; color: var(--muted); }
.tz-zeile select { border: 0; background: none; padding: 4px; cursor: pointer; font-weight: 500; color: var(--muted); max-width: 100%; min-width: 0; }
.pub-fuss { margin-top: 20px; font-size: 13.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.pub-fuss a { color: var(--muted); }
.pub-fuss a:hover { color: var(--lime); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ok-kreis { width: 58px; height: 58px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; color: var(--ink); margin: 0 auto 16px; }
.ok-kreis.aus { background: var(--danger-soft); color: var(--danger); }
.ok-kreis.warte { background: var(--warn-soft); color: var(--warn); }
.detail-liste { display: flex; flex-direction: column; gap: 11px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 20px 0; }
.detail-liste > div { display: flex; gap: 10px; align-items: flex-start; }
.detail-liste .icon { color: var(--lime); margin-top: 3px; }
.profil-kopf { text-align: center; margin-bottom: 22px; }
.profil-kopf .avatar { margin: 0 auto 12px; }
.profil-links { display: grid; gap: 10px; }
.profil-link { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--c); border-radius: var(--radius); text-decoration: none; color: inherit; background: var(--panel); transition: background .15s, border-color .15s; }
.profil-link:hover { background: var(--fill-hover); border-color: var(--line-strong); }

/* Meetings */
.tag-kopf { font: 500 14px var(--display); margin: 22px 0 9px; color: var(--muted); }
.tag-kopf:first-child { margin-top: 0; }
.meeting { display: grid; grid-template-columns: 116px 12px minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; transition: background .15s; }
.meeting:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.meeting:last-child { border-bottom: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.meeting:only-child { border-radius: var(--radius-lg); }
.meeting:hover { background: var(--fill); }
.punkt { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--lime)); }
.meeting-detail { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 18px; align-items: start; }
.verlauf { display: flex; flex-direction: column; gap: 11px; }
.verlauf-eintrag { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.verlauf-eintrag .icon { margin-top: 3px; color: var(--muted); }

/* Wochenkalender */
.kal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.woche { display: grid; grid-template-columns: 48px repeat(7, minmax(0, 1fr)); overflow: hidden; }
.woche-scroll { overflow-x: auto; }
.woche-kopf { padding: 8px 4px; text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.woche-kopf b { display: block; font: 500 17px var(--display); color: var(--white); }
.woche-kopf.heute b { background: var(--lime); color: var(--ink); border-radius: var(--pill); width: 32px; margin: 0 auto; }
.stunden { position: relative; }
.stunde-label { font-size: 12px; color: var(--faint); text-align: right; padding-right: 6px; transform: translateY(-8px); }
.tag-spalte { position: relative; border-left: 1px solid var(--line); background: var(--bg); cursor: copy; min-width: 86px; }
.frei-zone { position: absolute; left: 0; right: 0; background: var(--raised); }
.raster { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.block { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 3px 7px; font-size: 12.5px; line-height: 1.3; overflow: hidden; cursor: pointer; text-decoration: none; color: var(--white); background: color-mix(in srgb, var(--c, var(--lime)) 30%, var(--card)); border-left: 3px solid var(--c, var(--lime)); }
.block strong { color: inherit; }
.block.extern { background: repeating-linear-gradient(135deg, #2a2a27, #2a2a27 5px, #1f1f1e 5px, #1f1f1e 10px); border-left-color: var(--faint); cursor: default; color: var(--text); }
.block.blocker { background: #33332e; color: var(--white); border-left-color: var(--muted); }
.block.anfrage { border-style: dashed; border-width: 1px 1px 1px 3px; border-color: var(--c, var(--lime)); }
.jetzt-linie { position: absolute; left: 0; right: 0; border-top: 2px solid var(--danger); z-index: 3; pointer-events: none; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 12px; }
.legende span { display: inline-flex; gap: 6px; align-items: center; }
.leg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line-strong); }
.leg.arbeit { background: var(--raised); } .leg.aus { background: var(--bg); }
.leg.termin { background: color-mix(in srgb, var(--lime) 30%, var(--card)); }
.leg.extern { background: repeating-linear-gradient(135deg, #2a2a27, #2a2a27 3px, #1f1f1e 3px, #1f1f1e 6px); }
.leg.geblockt { background: #33332e; }
.konto { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }

/* Verfügbarkeit */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tag-zeile { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tag-zeile:last-child { border-bottom: 0; }
.zeitblock { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.zeitblock:last-child { margin-bottom: 0; }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 12px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabelle td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tbody tr.klick { cursor: pointer; }
.tabelle tbody tr.klick:hover { background: var(--fill); }
.tabelle-wrap { overflow-x: auto; }
.tabelle-wrap .menu { text-align: left; }

/* Erinnerungs-Baukasten */
.bk { display: grid; grid-template-columns: 320px minmax(0, 1fr) 372px; gap: 16px; align-items: start; }
.bk-spalte { min-width: 0; }
.zs { position: relative; }
.zs-gruppe { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 16px 0 7px 28px; }
.zs-gruppe:first-child { margin-top: 0; }
.zs-eintrag { position: relative; padding-left: 28px; margin-bottom: 7px; }
.zs-eintrag::before { content: ""; position: absolute; left: 9px; top: -7px; bottom: -7px; width: 2px; background: var(--line-strong); }
.zs-eintrag::after { content: ""; position: absolute; left: 4px; top: 19px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); }
.zs-eintrag.an::after { background: var(--lime); border-color: var(--lime); }
.zs-karte { width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 13px; cursor: pointer; display: block; transition: border-color .15s; }
.zs-karte:hover { border-color: var(--line-strong); }
.zs-karte.gewaehlt { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.zs-karte.aus { opacity: .55; }
.zs-zeit { font-size: 12.5px; color: var(--lime); font-weight: 600; }
.zs-karte.aus .zs-zeit { color: var(--muted); }
.zs-name { font-weight: 600; font-size: 14.5px; margin: 1px 0 6px; color: var(--white); }
.zs-termin { position: relative; margin: 13px 0; padding: 11px 14px 11px 30px; background: var(--lime); color: var(--ink); border-radius: var(--pill); font-weight: 700; font-size: 14px; }
.zs-termin::before { content: ""; position: absolute; left: 11px; top: 50%; margin-top: -5px; width: 10px; height: 10px; border-radius: 3px; background: var(--ink); }
.zs-add { margin: 12px 0 0 28px; }
.kanal-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kanal { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: transparent; cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.kanal:hover { background: var(--fill); }
.kanal.on.mail { border-color: var(--mail); background: var(--mail-soft); }
.kanal.on.wa { border-color: var(--wa); background: var(--wa-soft); }
.kanal .kreuz { margin-left: auto; width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.kanal.on .kreuz { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.anhang { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: inherit; }
.anhang-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--fill-hover); }
.anhang-icon.pdf { background: var(--danger-soft); color: var(--danger); }
.anhang-icon.video { background: var(--info-soft); color: var(--info); }
.anhang-icon.bild { background: var(--lime-soft); color: var(--lime); }
.vorschau-rahmen { border: 1px solid var(--line); border-radius: var(--radius); width: 100%; height: 560px; background: var(--bg); display: block; }
.vorschau-betreff { padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; font-size: 14px; }
/* WhatsApp-Vorschau bleibt bewusst in den Farben von WhatsApp */
.telefon { width: min(320px, 100%); margin: 0 auto; background: #000; border: 1px solid var(--line-strong); border-radius: 30px; padding: 9px; }
.telefon-kopf { background: #075e54; color: #fff; padding: 12px 14px; border-radius: 22px 22px 0 0; font-weight: 600; font-size: 14px; display: flex; gap: 9px; align-items: center; }
.telefon-chat { background: #e8dfd2; min-height: 420px; max-height: 520px; overflow-y: auto; padding: 12px; border-radius: 0 0 22px 22px; }
.wa-blase { background: #fff; color: #111; border-radius: 8px 8px 8px 2px; padding: 7px 9px; font: 400 13.5px/1.42 system-ui, sans-serif; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 92%; margin-bottom: 6px; }
.wa-blase strong { color: inherit; }
.wa-datei { display: flex; gap: 8px; align-items: center; background: #f2f2ee; border-radius: 6px; padding: 8px; margin: -2px -4px 6px; font-size: 12.5px; font-weight: 500; }
.wa-zeit { display: block; text-align: right; font-size: 10.5px; color: #777; margin-top: 2px; }
.meta-box { font-family: Consolas, Menlo, monospace; font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.medien-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.drop { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 24px; text-align: center; cursor: pointer; display: block; background: transparent; transition: background .15s, border-color .15s; }
.drop:hover, .drop.ueber { border-color: var(--lime); background: var(--lime-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.schritte { counter-reset: s; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.schritte li { counter-increment: s; position: relative; padding-left: 32px; }
.schritte li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.kopier-zeile { display: flex; gap: 6px; }
.kopier-zeile .input { font-family: Consolas, Menlo, monospace; font-size: 13px; }

@media (max-width: 1320px) {
  .bk { grid-template-columns: 300px minmax(0, 1fr); }
  .bk-vorschau { grid-column: 1 / -1; }
  .vorschau-rahmen { height: 480px; }
}
@media (max-width: 1100px) {
  .editor-grid, .kal-layout, .plan-grid, .meeting-detail { grid-template-columns: minmax(0, 1fr); }
  .editor-preview { position: static; }
}
@media (max-width: 900px) {
  .pub-card { grid-template-columns: minmax(0, 1fr); }
  .pub-info { border-right: 0; border-bottom: 1px solid var(--line); }
  .bk { grid-template-columns: minmax(0, 1fr); }
  .meeting { grid-template-columns: 82px 10px minmax(0, 1fr) auto; }
  .meeting .nur-breit { display: none; }
}
@media (max-width: 760px) {
  :root { --radius-lg: 20px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 90; transform: translateX(-100%); transition: transform .18s; }
  .sidebar.offen { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 80; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 16px; position: sticky; top: 0; z-index: 70; }
  .mobile-top .brand { font-size: 15px; }
  .main { padding: 20px 16px 48px; }
  h1 { font-size: 25px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .waehler { grid-template-columns: minmax(0, 1fr); }
  .zeiten { max-height: none; }
  .link-grid { grid-template-columns: minmax(0, 1fr); }
  .pub { padding: 14px 10px; }
  .pub-kopf { margin-bottom: 14px; padding: 0 6px; }
  .pub-card.schmal { padding: 24px 18px; }
  .pub-main, .pub-info { padding: 20px 18px; }
  .ort-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .ort-zeile > :first-child { grid-column: 1 / -1; }
  .tag-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .tag-zeile > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .art-grid, .kanal-wahl { grid-template-columns: minmax(0, 1fr); }
  .filters .input { width: 100%; }
  .auth-box { padding: 24px 20px; }
  .input.time { width: 98px; }
}
