:root {
  /* Öffentlich / hell (Variante C) */
  --bg: #f6f1ea;
  --fg: #1c1712;
  --muted: #6b5e52;
  --gold: #9a7b1a;
  --gold-dim: #d4c4a0;
  --card: #fffdf9;

  --admin-bg: #f3efe8;
  --admin-card: #fffdf9;
  --ink: #1c1712;
  --ink-muted: #6b5e52;
  --line: #e4ddd3;
  --accent: #9a7b1a;
  --accent-hover: #7d6414;
  --green: #1d6e48;
  --warn: #a5641a;
  --danger: #c25450;
  --danger-ink: #9a3b38;
  --side: #16120e;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --display: "Source Serif 4", Georgia, serif;
  --mono: "Source Sans 3", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--fg);
  background:
    radial-gradient(ellipse 90% 45% at 50% -8%, rgba(154, 123, 26, 0.14) 0%, transparent 55%),
    var(--bg);
}
body.layout-landing { color: var(--fg); }
body.layout-admin {
  background: var(--admin-bg);
  color: var(--ink);
  overflow: hidden;
  height: 100vh;
}
body.layout-login {
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(154, 123, 26, 0.14) 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-muted); }

.env-badge {
  position: fixed;
  top: 0.6rem;
  right: 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  background: #2d6a4f;
  color: #fff;
  border-radius: 4px;
  z-index: 2147483647;
  pointer-events: none;
}
.env-badge.staging { background: #b08900; }

/* —— Landing —— */
.wrap {
  max-width: 28rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2rem;
}
.brand { text-align: left; }
.brand-logo {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(28, 23, 18, 0.06);
}
.brand .eyebrow {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.brand h1 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand .note {
  color: var(--muted);
  margin: 0 0 1.75rem;
  line-height: 1.45;
}
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.landing-link {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(28, 23, 18, 0.04);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.landing-link:hover {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 6px 18px rgba(28, 23, 18, 0.08);
  text-decoration: none;
}
.landing-link.muted { opacity: 0.85; border-style: dashed; }
.landing-link.admin { border-color: var(--gold-dim); }
.landing-link .t { font-weight: 600; margin-bottom: 0.2rem; color: var(--ink); }
.landing-link .s { font-size: 0.85rem; color: var(--muted); }
.foot {
  font-size: 0.85rem;
  color: var(--muted);
}
.foot a { color: var(--accent); }
.foot code { font-size: 0.8rem; color: var(--ink); }

/* —— Forms / buttons —— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff !important; border: none;
  border-radius: 10px; padding: 12px 22px;
  font-weight: 700; font-size: 14.5px; font-family: inherit;
  cursor: pointer; text-decoration: none !important; transition: background .12s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none !important; }
.btn.warn { background: var(--danger); }
.btn.warn:hover { background: #b03c39; }
.btn.ghost {
  background: #f6f3ee; color: #3a322a !important; border: 1px solid var(--line);
  padding: 8px 12px; font-size: 13px; border-radius: 8px;
}
.btn.ghost:hover { background: #efeae3; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }

.flash {
  border-radius: 9px; padding: 11px 14px; margin-bottom: 16px;
  font-size: 13px; font-weight: 500; border: 1px solid transparent;
}
.flash.warn, .flash.err {
  background: #fbecec; border-color: #e8bcbb; color: var(--danger-ink);
}
.flash.ok { background: #e7f5ee; border-color: #b8dfcb; color: var(--green); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 1000; max-width: min(420px, calc(100% - 32px));
  padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 28px rgba(28, 23, 18, .18);
  animation: toastIn .35s ease; pointer-events: none;
}
.toast.ok { background: var(--side); color: #fff; }
.toast.warn { background: #fff7e8; color: var(--warn); border: 1px solid #f0d9a8; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

label.field {
  display: block; font-size: 12px; font-weight: 600; color: var(--ink-muted); margin-bottom: 6px;
}
input, textarea, select {
  width: 100%; padding: 11px 13px; border: 1.5px solid #d8d0c4; border-radius: 10px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fff;
  transition: border-color .12s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
}

/* —— Login —— */
.login-screen { width: 100%; max-width: 400px; padding: 24px 20px; }
.login-screen .logo-row { text-align: center; margin-bottom: 28px; color: var(--ink); }
.login-logo {
  display: block;
  width: min(100%, 220px);
  height: auto;
  margin: 0 auto 16px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(28, 23, 18, 0.06);
}
.login-mark {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 14px; background: linear-gradient(145deg, #e0c35a, #9a7b1a);
  color: #1a1510; font-family: var(--display); font-weight: 700; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.login-screen h1 {
  margin: 0; font-family: var(--display); font-size: 1.75rem; font-weight: 700;
  color: var(--ink); letter-spacing: -.02em;
}
.login-screen .sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.login-card {
  background: var(--admin-card); border: 1px solid var(--line);
  border-radius: 16px; padding: 28px 24px;
  box-shadow: 0 8px 28px rgba(28, 23, 18, 0.08);
}
.login-card label.field { margin-top: 14px; }
.login-card label.field:first-of-type { margin-top: 0; }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--ink-muted); text-align: center; }
.login-back { text-align: center; margin-top: 18px; }
.login-back a { font-size: 13px; font-weight: 600; color: var(--muted); }

/* —— Admin shell —— */
.admin-app {
  display: flex; height: 100vh; width: 100%; overflow: hidden;
}
.admin-side {
  width: 260px; flex-shrink: 0; background: var(--side);
  display: flex; flex-direction: column; padding: 18px 14px; color: #d4c9ba;
  height: 100%; max-height: 100vh; min-height: 0; overflow: hidden;
}
.side-brand {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  padding: 4px 4px 16px; margin-bottom: 6px; text-decoration: none; color: inherit;
  border-bottom: 1px solid #2a241c;
}
.side-brand:hover { text-decoration: none; opacity: .95; }
.side-logo {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
}
.side-brand-text { text-align: center; }
.side-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(145deg, #e0c35a, #9a7b1a);
  color: #1a1510; font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.side-brand .name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -.2px; }
.side-brand .role { font-size: 11px; color: #8a7d6e; font-weight: 500; }
.admin-side nav {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto;
  scrollbar-width: none;
}
.admin-side nav::-webkit-scrollbar { display: none; }
.side-link {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 11px; border: none; border-radius: 10px;
  background: transparent; color: #d4c9ba; cursor: pointer;
  text-align: left; font-family: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none !important; transition: background .12s;
}
.side-link:hover {
  background: rgba(255,255,255,.04); text-decoration: none !important; color: #fff;
}
.side-link.active { background: rgba(201,162,39,.22); color: #fff; }
.side-sub { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px; }
.side-group { margin: 0; }
.side-group > .side-sub { display: none; }
.side-group[open] > .side-sub { display: flex; }
.side-toggle { width: 100%; cursor: pointer; list-style: none; }
.side-toggle::-webkit-details-marker { display: none; }
.side-toggle::marker { content: ''; }
.side-toggle .side-chev {
  margin-left: auto; flex-shrink: 0; opacity: .65;
  transition: transform .15s ease;
}
.side-group[open] > .side-toggle .side-chev { transform: rotate(180deg); }
.side-link-sub {
  font-size: 13px !important; font-weight: 500 !important;
  padding: 8px 11px 8px 34px !important; color: #9a8f82 !important;
}
.side-link-sub:hover { color: #fff !important; }
.side-link-sub.active { color: #fff !important; background: rgba(201,162,39,.18); }
.side-divider {
  height: 1px; background: rgba(255,255,255,.12);
  margin: 8px 6px 10px; flex-shrink: 0;
}
.side-meta {
  margin-top: auto; background: #221c16; border-radius: 13px; padding: 12px 14px;
}
.side-meta .cap {
  font-size: 10.5px; font-weight: 600; color: #8a7d6e;
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px;
}
.side-meta .vn { font-size: 13px; font-weight: 700; color: #f0e8dc; }
.side-logout {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid #2a241c;
}
.side-logout a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-radius: 9px; color: #6b5e52; font-size: 13px; font-weight: 600;
  text-decoration: none !important;
}
.side-logout a:hover { background: #221c16; color: #d4c9ba; }

.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-top {
  height: 70px; flex-shrink: 0; background: var(--admin-card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 0 24px; gap: 12px;
}
.admin-top .titles h1 {
  margin: 0; font-family: var(--display); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em;
}
.admin-top .titles .sub { font-size: 12.5px; color: var(--ink-muted); margin-top: 1px; }
.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-body { flex: 1; overflow: auto; padding: 24px 28px 60px; }

.dash { max-width: 1180px; }
.dash-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 18px;
}
.tile {
  background: var(--admin-card); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.tile-link { color: inherit; text-decoration: none !important; transition: border-color .12s; }
.tile-link:hover { border-color: var(--gold-dim); }
.tile .cap {
  font-size: 11.5px; font-weight: 600; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: .5px;
}
.tile .big {
  font-family: var(--mono); font-size: 30px; font-weight: 500;
  margin-top: 8px; color: var(--ink); line-height: 1.1;
}
.tile .hint { font-size: 12.5px; color: var(--ink-muted); margin-top: 8px; }

.panel {
  background: var(--admin-card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px;
  max-width: 960px;
}
.panel h2 {
  margin: 0 0 10px; font-family: var(--display); font-size: 1.2rem; font-weight: 700;
}
.panel p { margin: 0 0 8px; line-height: 1.5; color: #3a322a; }

.coming {
  max-width: 520px;
  background: var(--admin-card); border: 1px dashed #c9bdaa; border-radius: 14px;
  padding: 28px 26px;
}
.coming h3 {
  margin: 0 0 8px; font-family: var(--display); font-size: 1.2rem;
}
.coming p { margin: 0; color: var(--ink-muted); line-height: 1.5; }

.table {
  width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px;
}
.table th, .table td {
  text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.table td.actions { white-space: nowrap; width: 1%; }
.row-combo {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
}
.row-combo select {
  min-width: 10rem; max-width: 14rem;
  padding: 6px 8px; font: inherit; font-size: 13px;
  border: 1.5px solid #d8d0c4; border-radius: 8px; background: #fff; color: var(--ink);
}
.row-combo .btn { flex-shrink: 0; padding-left: 12px; padding-right: 12px; }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end;
  margin-bottom: 14px; padding: 12px 14px;
  background: var(--admin-card); border: 1px solid var(--line); border-radius: 12px;
}
.filter-bar .field {
  display: flex; flex-direction: column; gap: 4px; margin: 0;
  font-size: 12px; font-weight: 600; color: var(--ink-muted);
  flex: 0 0 auto; width: auto; max-width: 100%;
}
.filter-bar select,
.filter-bar .field select,
.filter-bar .field input {
  width: auto; min-width: 10rem; max-width: 18rem;
  padding: 8px 10px; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink);
  border: 1.5px solid #d8d0c4; border-radius: 8px; background: #fff;
}
.filter-bar .btn { flex: 0 0 auto; }
.status-help {
  margin: 0 0 14px; padding: 12px 14px;
  background: #f7f3ec; border: 1px solid var(--line); border-radius: 12px;
  font-size: 13px; color: var(--ink-muted); line-height: 1.55; max-width: 960px;
}
.status-help summary {
  cursor: pointer; font-weight: 700; color: var(--ink); list-style: none;
}
.status-help summary::-webkit-details-marker { display: none; }
.status-help summary::after { content: ' ▾'; font-weight: 500; color: var(--ink-muted); }
.status-help[open] summary::after { content: ' ▴'; }
.status-help dl { margin: 10px 0 0; display: grid; gap: 8px; }
.status-help .status-help-row { margin: 8px 0 0; }
.status-help .status-help-row strong { color: var(--ink); }
.req-actions .row-combo { margin-right: 4px; }
.req-book-row,
.req-reject-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  width: 100%; margin-top: 6px;
}
.req-book-row input,
.req-reject-row input {
  padding: 7px 10px; font: inherit; font-size: 13px;
  border: 1.5px solid #d8d0c4; border-radius: 8px; background: #fff;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.inline-form {
  display: inline-flex; align-items: center; gap: 6px; margin: 2px 4px 2px 0;
}
.inline-form input[type="password"] { width: 140px; padding: 7px 10px; font-size: 13px; }
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-top: 8px;
}
.form-actions { display: flex; align-items: end; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }
textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid #d8d0c4; border-radius: 10px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fff; resize: vertical;
}
.wrap-wide { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.miete-grid {
  display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start;
  max-width: 720px;
}
.miete-form h2 { margin-top: 0; }
.request-card { margin-bottom: 14px; max-width: 960px; }
.req-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.pill {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; background: #ebe4da; color: var(--ink);
}
.req-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.public-form .flash { max-width: 960px; }

.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }
.check input { width: auto; }
.check-row { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.subtabs { display: flex; gap: 8px; margin-bottom: 14px; }
.subtabs a {
  padding: 8px 14px; border-radius: 999px; background: #ebe4da; color: var(--ink);
  font-size: 13px; font-weight: 600; text-decoration: none !important;
}
.subtabs a.active { background: var(--accent); color: #fff; }
.room-edit-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.room-edit-row input[type="text"] { flex: 1; min-width: 140px; }
.room-edit-row input[type="number"] { width: 5.5rem; }

/* —— Public info (Räume / Anreise) —— */
.public-nav {
  display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 0 0 1.25rem;
  padding-bottom: 0.85rem; border-bottom: 1px solid var(--line);
  grid-column: 1 / -1;
}
.public-nav a {
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; text-decoration: none !important;
}
.public-nav a:hover { color: var(--ink); background: rgba(28, 23, 18, 0.05); }
.public-nav a.active { color: #fff; background: var(--accent); }
.public-footer {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
  font-size: 13px; color: var(--muted);
}
.public-footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.public-footer a:hover { color: var(--accent); }
.info-page .info-section { margin-top: 1.75rem; }
.info-page .prog-section { color: var(--ink); }
.room-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.room-card {
  background: var(--admin-card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 18px 16px;
}
.room-card h2 {
  margin: 0 0 6px; font-family: var(--display); font-size: 1.25rem; color: var(--ink);
}
.room-meta { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.room-card p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.room-suit { font-size: 12px !important; }
.room-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.plan-card {
  margin: 0; background: var(--admin-card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
}
.plan-card img {
  display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover;
}
.plan-card figcaption {
  padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--ink-muted);
}
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
  margin-top: 0.5rem;
}
.info-panel {
  background: var(--admin-card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px;
}
.info-panel h2 {
  margin: 0 0 10px; font-family: var(--display); font-size: 1.15rem; color: var(--ink);
}
.info-panel p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
.info-panel a { color: var(--accent); }

/* —— Calendar —— */
.cal-admin, .public-cal {
  display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start;
  max-width: 720px;
}
.cal-card {
  background: var(--admin-card); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
}
.public-cal {
  margin: 0 auto; padding: 2rem 1.25rem 3rem; max-width: 720px;
  color: var(--ink);
}
.public-cal-head {
  grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  margin-bottom: 8px;
}
.public-cal-head .eyebrow { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.public-cal-head h1 { margin: 0.35rem 0; font-family: var(--display); font-size: 2rem; color: var(--ink); }
.public-cal-head .note { color: var(--muted); margin: 0; max-width: 36rem; }
.public-cal .cal-card { box-shadow: 0 8px 24px rgba(28, 23, 18, 0.06); }
.public-cal .cal-side {
  background: var(--admin-card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
  color: var(--ink);
}
.cal-side {
  background: var(--admin-card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
  color: var(--ink);
}
.public-cal .cal-side h2, .cal-side h2 {
  margin: 0 0 12px; font-family: var(--display); font-size: 1.15rem;
}
.cal-toolbar {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.cal-toolbar .field { margin-bottom: 0; }
.cal-toolbar select { max-width: 100%; }
.cal-viewbar {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
}
.cal-view-btn {
  font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #ebe4da; color: var(--ink); cursor: pointer;
}
.cal-view-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.cal-view-btn:hover:not(.active) { background: #e2d9cc; }
.cal-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px;
}
.cal-title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.cal-dows, .cal-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-dows-week {
  grid-template-columns: 44px repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-muted); padding: 4px 0;
}
.cal-dow.wknd { color: #a5641a; }
.cal-dow.today { color: var(--accent); }
.cal-dow-num { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.cal-week-gutter { min-width: 44px; }
.cal-week {
  display: grid; grid-template-columns: 44px repeat(7, 1fr); gap: 4px;
  min-height: 420px;
}
.cal-week .cal-week-gutter,
.cal-dayview .cal-week-gutter {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 4px 0; font-size: 10px; color: var(--ink-muted); font-variant-numeric: tabular-nums;
}
.cal-hour-lab { flex: 1; line-height: 1; transform: translateY(-0.4em); }
.cal-week-day, .cal-dayview-body {
  position: relative; background: #f7f3ec; border: 1px solid var(--line); border-radius: 10px;
  min-height: 420px; padding: 0; overflow: hidden; cursor: default;
}
button.cal-week-day, button.cal-dayview-body { font: inherit; width: 100%; text-align: left; }
.cal-week-day.today, .cal-dayview-body.today { border-color: var(--accent); }
.cal-week-day.past, .cal-dayview-body.past { opacity: .55; }
.cal-week-day.has-booked, .cal-dayview-body.has-booked { background: #fdf6f6; }
.cal-week-day.has-requested, .cal-dayview-body.has-requested { background: #fdf8f0; }
.cal-week-day.sel-start, .cal-week-day.sel-end, .cal-week-day.sel-both, .cal-week-day.in-range,
.cal-dayview-body.sel-start, .cal-dayview-body.sel-end, .cal-dayview-body.sel-both {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.cal-week-track { position: absolute; inset: 0; }
.cal-block {
  position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 5px;
  font-size: 10px; line-height: 1.25; overflow: hidden; color: #3a322a;
  background: rgba(154, 123, 26, 0.22); border: 1px solid rgba(154, 123, 26, 0.35);
}
.cal-block.booked { background: rgba(194, 84, 80, 0.2); border-color: rgba(194, 84, 80, 0.4); color: var(--danger-ink); }
.cal-block.requested { background: rgba(165, 100, 26, 0.2); border-color: rgba(165, 100, 26, 0.4); color: #a5641a; }
.cal-block.kind-programm { background: rgba(27, 95, 184, 0.18); border-color: rgba(27, 95, 184, 0.35); color: #1b5fb8; }
.cal-block-time { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-block-ttl { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-dayview {
  display: grid; grid-template-columns: 44px 1fr; gap: 4px; min-height: 420px;
}
.cal-day {
  aspect-ratio: 1; border: 1px solid transparent; border-radius: 10px;
  background: #f7f3ec; color: var(--ink); font-size: 13px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: default; position: relative;
}
button.cal-day { font: inherit; }
.cal-day.empty { background: transparent; border: none; }
.cal-day.past { opacity: .45; }
.cal-day.today { border-color: var(--accent); }
.cal-day.booked { background: #fbecec; color: var(--danger-ink); }
.cal-day.requested { background: #fdf3e6; color: #a5641a; }
.cal-day .dot {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7;
}
.cal-day.sel-start, .cal-day.sel-end, .cal-day.sel-both, .cal-day.in-range {
  background: rgba(154, 123, 26, .18); border-color: var(--accent);
}
@media (max-width: 720px) {
  .cal-week { grid-template-columns: 36px repeat(7, minmax(36px, 1fr)); min-height: 320px; }
  .cal-dows-week { grid-template-columns: 36px repeat(7, minmax(36px, 1fr)); }
  .cal-block-ttl { display: none; }
  .cal-week-day, .cal-dayview-body { min-height: 320px; }
}
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px;
  font-size: 12px; color: var(--ink-muted); align-items: center;
}
.cal-legend .lg {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px;
}
.cal-legend .lg.free { background: #f7f3ec; border: 1px solid var(--line); }
.cal-legend .lg.requested { background: #fdf3e6; }
.cal-legend .lg.booked { background: #fbecec; }
.cal-legend .sync { margin-left: auto; font-size: 11px; }
.cal-event-list { list-style: none; padding: 0; margin: 0; }
.cal-event-list li {
  padding: 10px 0; border-bottom: 1px solid var(--line);
  display: grid; gap: 2px;
}
.cal-event-list .when { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.cal-event-list .ttl { font-weight: 600; color: var(--ink); }
.cal-event-list .meta { font-size: 12px; color: var(--ink-muted); }
.cal-event-list li.kind-programm .ttl { color: #1b5fb8; }
.cal-event-list li.kind-sperre .ttl { color: #5a6675; }

.color-picker {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px;
}
.color-pick {
  position: relative; cursor: pointer; margin: 0; padding: 0;
}
.color-pick input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.color-swatch {
  display: block; width: 28px; height: 28px; border-radius: 8px;
  border: 2px solid #d8d0c4; box-sizing: border-box;
  background: #f7f3ec; color: #6b5e52;
  font-size: 14px; line-height: 24px; text-align: center; font-weight: 700;
}
.color-pick.none .color-swatch { background: #fff; }
.color-pick input:focus-visible + .color-swatch {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.color-pick input:checked + .color-swatch {
  border-color: #1c1712; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1c1712;
}
.booking-color-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  vertical-align: middle; margin-right: 4px; border: 1px solid rgba(0,0,0,.15);
}

.prog-section {
  font-family: var(--display); font-size: 1.35rem; margin: 0 0 1rem; color: var(--ink);
}
.prog-card {
  background: var(--admin-card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.1rem 1.25rem; margin-bottom: 0.85rem;
  box-shadow: 0 4px 16px rgba(28, 23, 18, 0.05);
}
.prog-card.past { opacity: 0.72; }
.prog-card h2 {
  margin: 0.35rem 0 0.4rem; font-family: var(--display); font-size: 1.25rem;
}
.prog-when { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.prog-org { font-size: 13px; margin-top: 2px; }
.prog-extra { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prog-card .pill {
  background: #ebe4da; color: var(--ink); font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.prog-card p { margin: 0.5rem 0 0; line-height: 1.45; }

/* Gantt */
.gantt { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.gantt-head, .gantt-row {
  display: grid; grid-template-columns: 140px 1fr; min-width: 720px; border-bottom: 1px solid var(--line);
}
.gantt-head { background: #f6f3ee; font-size: 11px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .03em; }
.gantt-label { padding: 10px 12px; display: flex; align-items: center; border-right: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.gantt-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.gantt-day { padding: 10px 4px; text-align: center; border-right: 1px solid #efeae3; }
.gantt-day:last-child { border-right: none; }
.gantt-track {
  position: relative; min-height: 44px;
  background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 7 - 1px), #efeae3 calc(100% / 7 - 1px), #efeae3 calc(100% / 7));
}
.gantt-bar {
  position: absolute; top: 8px; bottom: 8px; border-radius: 6px; padding: 0 6px;
  font-size: 11px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: rgba(194, 84, 80, 0.22); border: 1px solid rgba(194, 84, 80, 0.4); color: var(--danger-ink);
  display: flex; align-items: center;
}
.gantt-bar.st-requested { background: rgba(165, 100, 26, 0.22); border-color: rgba(165, 100, 26, 0.4); color: #a5641a; }
.gantt-bar.kind-programm { background: rgba(27, 95, 184, 0.2); border-color: rgba(27, 95, 184, 0.4); color: #1b5fb8; }
.gantt-bar.kind-sperre { background: rgba(80, 80, 80, 0.18); border-color: rgba(80, 80, 80, 0.35); color: #444; }

.util-bar {
  height: 8px; background: #efeae3; border-radius: 999px; overflow: hidden; margin-bottom: 4px; max-width: 160px;
}
.util-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* Statistik */
.stat-toolbar {
  display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px 14px;
  align-items: flex-end; margin-bottom: 16px;
}
.stat-toolbar.filter-bar {
  flex-direction: row;
}
.stat-toolbar .field {
  display: flex; flex-direction: column; gap: 4px; margin: 0;
  font-size: 12px; font-weight: 600; color: var(--ink-muted);
  flex: 0 0 auto; width: auto;
}
.stat-toolbar .field input[type="text"],
.stat-toolbar .field input[type="date"],
.stat-toolbar .field select {
  width: auto; min-width: 10rem;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 8px 10px; border: 1.5px solid #d8d0c4; border-radius: 8px; background: #fff;
}
.stat-toolbar .field input[name="from"],
.stat-toolbar .field input[name="to"] { min-width: 8.5rem; max-width: 10rem; }
.stat-toolbar .btn { flex: 0 0 auto; align-self: flex-end; }
.stat-kpis {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 16px 0 20px;
}
.stat-kpi {
  background: var(--admin-card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.stat-kpi .cap { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.stat-kpi .big { font-family: var(--display); font-size: 1.45rem; font-weight: 700; color: var(--ink); margin-top: 4px; }
.stat-kpi .hint { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px;
}
.stat-card {
  background: var(--admin-card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.stat-card h3 { margin: 0 0 10px; font-size: 0.95rem; font-family: var(--display); }
.stat-card-wide { grid-column: 1 / -1; }
.stat-chart { position: relative; height: 240px; }
.stat-heat { overflow-x: auto; }
.heat-grid {
  display: grid;
  grid-template-columns: 36px repeat(24, minmax(14px, 1fr));
  gap: 2px; min-width: 420px; font-size: 10px; color: var(--ink-muted);
}
.heat-corner { min-height: 16px; }
.heat-h { text-align: center; line-height: 16px; }
.heat-d { display: flex; align-items: center; font-weight: 700; }
.heat-cell { aspect-ratio: 1; border-radius: 3px; background: rgba(154,123,26,.06); min-height: 14px; }

dialog.admin-modal {
  border: none; padding: 0; background: transparent;
  max-width: min(920px, calc(100vw - 24px));
  width: 100%;
  max-height: calc(100vh - 32px);
}
dialog.admin-modal::backdrop {
  background: rgba(28, 23, 18, 0.48);
}
.admin-modal-card {
  background: var(--admin-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(28, 23, 18, 0.22);
  max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
}
.admin-modal-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.admin-modal-head h2 { margin: 0; font-size: 1.15rem; font-family: var(--display); }
.admin-modal-body {
  padding: 16px 18px 22px; overflow: auto;
}

.tariff-matrix { width: 100%; border-collapse: collapse; margin: 10px 0 18px; }
.tariff-matrix th, .tariff-matrix td { border: 1px solid var(--line); padding: 8px 10px; text-align: right; }
.tariff-matrix th:first-child, .tariff-matrix td:first-child { text-align: left; }
.tariff-matrix thead th { background: #f6f3ee; font-weight: 600; }
.tariff-notes { font-size: 0.92rem; color: var(--ink-muted); }
.tariff-notes p { margin: 0 0 10px; }
.eq-grid { display: grid; gap: 10px; }
.eq-qty-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#price-suggest { margin: 0; padding: 10px 12px; background: #f6f3ee; border-radius: 10px; }

@media (max-width: 860px) {
  body.layout-admin { height: auto; overflow: auto; }
  .admin-app { flex-direction: column; height: auto; min-height: 100vh; }
  .admin-side { width: 100%; height: auto; max-height: none; }
  .admin-side nav { overflow: visible; }
}
