:root {
  --bg: #fbf8f3;
  --panel: #ffffff;
  --ink: #1d2530;
  --muted: #657181;
  --line: #e7ded2;
  --brand: #24564f;
  --brand-dark: #163b36;
  --red: #941b1f;
  --gold: #d3a449;
  --gold-soft: #f6e7c8;
  --green-soft: #dbece8;
  --warn-soft: #fff2cf;
  --danger-soft: #f6dada;
  --shadow: 0 18px 55px rgba(29, 37, 48, 0.11);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: radial-gradient(circle at top left, #fff1d2 0, transparent 34rem), var(--bg); line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.portal-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: rgba(251,248,243,.9); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { width: min(330px, 60vw); height: auto; display: block; }
.portal-header nav { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.portal-header nav a { text-decoration: none; color: var(--muted); font-weight: 800; padding: .62rem .76rem; border-radius: 999px; }
.portal-header nav a:hover { background: #efe7dd; color: var(--ink); }
main { padding-bottom: 3rem; }
.hero { padding: clamp(2.4rem, 6vw, 5rem) clamp(1rem, 5vw, 5rem) 1rem; }
.hero.slim { max-width: 1100px; }
.eyebrow { margin: 0 0 .65rem; color: var(--brand); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.04em; }
h1 { font-size: clamp(2.35rem, 5.4vw, 4.8rem); max-width: 12ch; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }
.lead { max-width: 870px; margin: 1.1rem 0 0; color: #3c4652; font-size: clamp(1.04rem, 2vw, 1.24rem); }
.notice { margin-top: 1rem; background: var(--warn-soft); border: 1px solid #ead48e; border-radius: 18px; padding: .9rem 1rem; color: #5b4915; font-weight: 750; }
.panel { margin: clamp(1rem, 4vw, 2rem) clamp(1rem, 5vw, 5rem); padding: clamp(1rem, 3vw, 2rem); background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.panel-head p { color: var(--muted); margin-bottom: 0; max-width: 750px; }
.month-controls { display: flex; align-items: center; gap: .65rem; background: #f4eee6; border: 1px solid var(--line); border-radius: 999px; padding: .4rem; white-space: nowrap; }
.month-controls button { width: 40px; height: 40px; border: 0; border-radius: 999px; background: white; color: var(--brand-dark); font-weight: 900; cursor: pointer; box-shadow: 0 4px 12px rgba(29,37,48,.06); }
.month-controls strong { min-width: 160px; text-align: center; }
.room-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
.room-pill { border: 1px solid var(--line); background: white; border-radius: 18px; padding: .8rem; }
.room-pill strong { display: block; color: var(--brand-dark); }
.room-pill span { display: block; color: var(--muted); font-size: .9rem; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .55rem; }
.weekday { color: var(--muted); font-weight: 900; text-transform: uppercase; font-size: .76rem; letter-spacing: .08em; padding: .3rem .2rem; }
.day { min-height: 154px; background: white; border: 1px solid var(--line); border-radius: 18px; padding: .7rem; display: flex; flex-direction: column; gap: .45rem; }
.day.is-other { opacity: .35; }
.day.today { outline: 2px solid var(--gold); }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-weight: 900; }
.free-line { font-size: .82rem; color: #2f665f; background: var(--green-soft); border-radius: 999px; padding: .18rem .45rem; width: fit-content; }
.event { display: block; border-radius: 12px; padding: .45rem .5rem; font-size: .82rem; font-weight: 750; border: 1px solid transparent; }
.event.pending, .status-pending { background: var(--warn-soft); border-color: #ead48e; color: #5b4915; }
.event.confirmed, .event.belegt, .status-confirmed { background: var(--danger-soft); border-color: #ebb2b2; color: #6d1717; }
.event.blocked, .event.blockiert, .status-blocked { background: #e7e9ee; border-color: #cfd3dc; color: #3f4654; }
.event small { display: block; color: inherit; opacity: .78; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid label { display: flex; flex-direction: column; gap: .35rem; font-weight: 850; color: var(--brand-dark); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; border: 1px solid var(--line); background: white; border-radius: 14px; padding: .85rem .9rem; color: var(--ink); }
.form-grid textarea { resize: vertical; }
.check { flex-direction: row !important; align-items: flex-start; font-weight: 650 !important; color: var(--ink) !important; background: #fff9ef; border: 1px solid var(--line); border-radius: 16px; padding: .8rem; }
.check input { width: auto; margin-top: .2rem; }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .85rem 1.2rem; border-radius: 999px; font-weight: 900; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.button.primary { color: white; background: var(--brand); box-shadow: 0 12px 28px rgba(36,86,79,.2); }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { background: white; border-color: var(--line); color: var(--ink); }
.button.danger { background: var(--red); color: white; }
.result { font-weight: 800; }
.result.ok { color: #1f695d; }
.result.error { color: var(--red); }
.portal-footer { padding: 2rem clamp(1rem, 5vw, 5rem); color: rgba(255,255,255,.75); background: #1a2523; }
.portal-footer strong { color: white; }
.portal-footer a { color: white; }
.admin-toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.admin-grid { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(0, 1.35fr); gap: 1rem; align-items: start; }
.admin-list { display: grid; gap: .7rem; max-height: 760px; overflow: auto; padding-right: .3rem; }
.admin-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: .9rem; box-shadow: 0 8px 18px rgba(29,37,48,.05); }
.admin-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.admin-card strong { display: block; color: var(--brand-dark); }
.admin-card p { margin: .35rem 0; color: var(--muted); }
.status-badge { display: inline-flex; border-radius: 999px; padding: .2rem .55rem; font-size: .78rem; font-weight: 900; border: 1px solid transparent; }
.admin-actions { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .7rem; }
.admin-actions button { border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: .45rem .65rem; cursor: pointer; font-weight: 800; }
.login-box { max-width: 520px; margin: clamp(3rem, 8vw, 7rem) auto; }
.login-box input { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: .85rem .9rem; }
.warning { background: #fff0f0; border: 1px solid #f1bbbb; color: #7a1616; border-radius: 16px; padding: .85rem 1rem; font-weight: 780; }
@media (max-width: 1100px) {
  .room-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .portal-header { position: static; flex-direction: column; align-items: flex-start; }
  .panel-head { flex-direction: column; }
  .calendar { grid-template-columns: 1fr; }
  .weekday { display: none; }
  .day { min-height: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .room-legend { grid-template-columns: 1fr; }
  .month-controls strong { min-width: 120px; }
}
