/* PRISMA Crew – im Look von prisma.love */
:root {
  --bg: #F2F0EA;
  --card: #F7F5F0;
  --ink: #0A0908;
  --mid: #5C5952;
  --faint: #A8A59E;
  --line: rgba(10, 9, 8, .3);
  --line-soft: rgba(10, 9, 8, .18);
  --urgent: #B42C2C;
  --spectrum: linear-gradient(90deg, #D93A3A, #D97C1A, #C8A818, #50168B, #3898B8, #3558C0, #8044BC);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
p, h1, h2, h3, li { text-wrap: pretty; }
a { color: var(--ink); }
a:hover { color: var(--mid); }
[hidden] { display: none !important; }

/* ---------- Grundbausteine ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 22px 64px; display: flex; flex-direction: column; gap: 32px; }
.narrow { max-width: 600px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.logo { font-family: var(--serif); font-weight: 300; font-size: 26px; letter-spacing: .22em; text-transform: uppercase; line-height: 1; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo-sm { font-size: 22px; }
.label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.muted { color: var(--mid); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; line-height: 1.5; }
.spectrum { height: 1.5px; background: var(--spectrum); }
.serif { font-family: var(--serif); font-weight: 300; }
.nowrap { white-space: nowrap; }
.back { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }

h1.display { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(42px, 8vw, 64px); line-height: 1.02; letter-spacing: -.01em; }
h1.title { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(36px, 6vw, 48px); line-height: 1.05; }
h2.area { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 36px; line-height: 1; }
.lead { margin: 0; color: var(--mid); max-width: 36em; }

.holo {
  background: linear-gradient(90deg, #D93A3A 0%, #D97C1A 16%, #C8A818 32%, #50168B 48%, #3898B8 64%, #3558C0 80%, #8044BC 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: holo-shift 6s linear infinite;
  font-style: italic;
}
@keyframes holo-shift { to { background-position: 200% center; } }
.perlmutt {
  background: linear-gradient(121deg, #FCFFAC, #F6EBFC, #FFD9DE, #FCFFAC);
  background-size: 300% 300%;
  animation: perlmutSpritz 8s ease-in-out infinite;
}
@keyframes perlmutSpritz {
  0% { background-position: 0% 0%; background-size: 300% 300%; }
  33% { background-position: 100% 50%; background-size: 400% 400%; }
  66% { background-position: 50% 100%; background-size: 350% 350%; }
  100% { background-position: 0% 0%; background-size: 300% 300%; }
}
@media (prefers-reduced-motion: reduce) { .holo, .perlmutt { animation: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  text-decoration: none; cursor: pointer; border-radius: 0;
  border: .5px solid var(--ink); background: var(--ink); color: var(--bg);
}
.btn:hover { color: var(--bg); opacity: .88; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); background: rgba(10, 9, 8, .04); opacity: 1; }
.btn-perl, .btn.perlmutt {
  color: var(--ink); border-color: var(--line);
  background: linear-gradient(121deg, #FCFFAC, #F6EBFC, #FFD9DE, #FCFFAC);
  background-size: 300% 300%;
}
.btn-perl:hover, .btn.perlmutt:hover { color: var(--ink); opacity: 1; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 11px; }
.btn-lg { min-height: 54px; font-size: 13px; }
button.btn { font-family: var(--mono); }
.btn:focus-visible, .input:focus-visible, .chip:focus-visible { outline: 2px solid #3558C0; outline-offset: 2px; }

/* ---------- Kopf der Übersicht ---------- */
.hero { display: flex; flex-direction: column; gap: 20px; max-width: 640px; }
.stats { border-top: .5px solid var(--line); border-bottom: .5px solid var(--line); padding: 18px 0; display: flex; flex-direction: column; gap: 12px; }
.stats-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.stats-num { font-family: var(--serif); font-size: 30px; line-height: 1; white-space: nowrap; }
.bar { height: 3px; background: rgba(10, 9, 8, .1); }
.bar > span { display: block; height: 100%; background: var(--spectrum); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  min-height: 44px; padding: 0 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; border: .5px solid var(--line); background: transparent; color: var(--ink); border-radius: 0;
  display: inline-flex; align-items: center; text-decoration: none;
}
.chip[aria-pressed="true"], .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Bereiche & Blöcke ---------- */
.area-sec { display: flex; flex-direction: column; gap: 14px; }
.area-head { display: flex; flex-direction: column; gap: 6px; }
.area-head .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.area-desc { margin: 0; font-size: 13px; color: var(--mid); max-width: 44em; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }

.card { border: .5px solid rgba(10, 9, 8, .35); background: var(--card); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.card.is-full { background: transparent; border-color: var(--line-soft); opacity: .6; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.slot-time { font-family: var(--serif); font-size: 28px; line-height: 1.1; white-space: nowrap; }
.slot-time-lg { font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 1.05; white-space: nowrap; }
.slot-day { font-size: 12px; color: var(--mid); white-space: nowrap; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--mid); }
.urgent-note { font-size: 13px; font-style: italic; color: var(--urgent); }
.card .btn { margin-top: auto; }

.pill { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; padding: 6px 10px; line-height: 1.2; border: .5px solid var(--ink); }
.pill-urgent { background: var(--urgent); color: var(--bg); border-color: var(--urgent); }
.pill-full { color: var(--mid); border-color: var(--line); }

.dots { display: inline-flex; gap: 6px; flex-wrap: wrap; flex: none; }
.dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--ink); }
.dot.on { background: var(--ink); }
.dot.urgent { border-color: var(--urgent); }

.foot { border-top: .5px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mid); }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.input {
  min-height: 50px; width: 100%; padding: 0 14px;
  border: .5px solid rgba(10, 9, 8, .45); background: var(--card); color: var(--ink);
  font: inherit; font-size: 16px; border-radius: 0; -webkit-appearance: none; appearance: none;
}
textarea.input { padding: 10px 14px; line-height: 1.5; min-height: 80px; resize: vertical; }
select.input { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input::placeholder { color: var(--faint); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; min-height: 44px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border: .5px solid var(--urgent); color: var(--urgent); padding: 14px 16px; font-size: 13px; line-height: 1.55; }
.notice-ok { border-color: var(--ink); color: var(--ink); }

/* ---------- Meins (tauschen / austragen) ---------- */
.list { display: flex; flex-direction: column; }
.list-row { border-top: .5px solid var(--line-soft); padding: 14px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.list-row:last-child { border-bottom: .5px solid var(--line-soft); }
.section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 20px; }
.h2-serif { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; }

/* ---------- Admin ---------- */
.admin-top { padding: 18px 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.admin-top-l, .admin-top-r { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.admin-main { max-width: 1180px; margin: 0 auto; padding: 36px 28px 72px; display: flex; flex-direction: column; gap: 40px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: .5px solid var(--line); border-bottom: .5px solid var(--line); gap: 0 24px; }
.kpi { padding: 20px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-num { font-family: var(--serif); font-weight: 300; font-size: 48px; line-height: 1; white-space: nowrap; }
.kpi-link { overflow-wrap: anywhere; }
.area-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.area-bar-l { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
h2.area-lg { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 40px; line-height: 1; }
.scroll-x { overflow-x: auto; }
.tbl { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mid); font-weight: 400; padding: 10px 12px; border-bottom: .5px solid var(--ink); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl td { padding: 14px 12px; vertical-align: top; border-bottom: .5px solid var(--line-soft); }
.tbl .t-time { font-family: var(--serif); font-size: 24px; line-height: 1.15; white-space: nowrap; }
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.person { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; padding: 2px 4px 2px 10px; border: .5px solid var(--line); white-space: nowrap; }
.person-x { border: 0; background: transparent; cursor: pointer; width: 26px; height: 26px; color: var(--mid); font: inherit; font-size: 15px; line-height: 1; }
.person-x:hover { color: var(--urgent); }
.status { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.status-urgent { color: var(--urgent); }
.status-full { color: var(--mid); }
.mini-bar { height: 3px; background: rgba(10, 9, 8, .1); margin-top: 8px; }
.mini-bar > span { display: block; height: 100%; background: var(--ink); }
.mini-bar.urgent > span { background: var(--urgent); }
.mini-bar.full > span { background: var(--spectrum); }
.dashed { border: .5px dashed rgba(10, 9, 8, .4); padding: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.dashed .field { min-width: 180px; flex: 1 1 180px; }

/* Erfassen */
.edit-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.edit-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 44px; }
.edit-aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 20px; }
.step { display: flex; flex-direction: column; gap: 20px; }
.step-h { display: flex; align-items: baseline; gap: 14px; }
.step-h span { font-size: 11px; letter-spacing: .18em; color: var(--mid); }
.step-h h2 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 36px; line-height: 1; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.panel { border: .5px solid rgba(10, 9, 8, .35); background: var(--card); padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.panel .input { background: var(--bg); }
.block-row { border-top: .5px solid rgba(10, 9, 8, .25); padding: 16px 0; display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-end; }
.block-n { display: flex; flex-direction: column; gap: 2px; width: 74px; padding-bottom: 12px; }
.block-row .field .input { min-height: 48px; padding: 0 10px; }
.w-time .input { text-align: center; font-variant-numeric: tabular-nums; }
.w-day { width: 136px; }
.w-time { width: 88px; }
.w-note { width: 128px; }
.stepper { display: flex; align-items: center; border: .5px solid rgba(10, 9, 8, .45); background: var(--bg); min-height: 48px; }
.stepper button { width: 42px; height: 46px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 18px; cursor: pointer; }
.stepper button:disabled { color: var(--faint); cursor: default; }
.stepper output { width: 34px; text-align: center; font-size: 16px; font-weight: 500; }
.block-meta { font-size: 12px; color: var(--mid); min-height: 48px; display: flex; flex-direction: column; justify-content: center; line-height: 1.4; white-space: nowrap; }
.icon-btn { margin-left: auto; width: 44px; height: 48px; border: .5px solid rgba(10, 9, 8, .25); background: transparent; color: var(--mid); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn:not(:disabled):hover { color: var(--urgent); border-color: var(--urgent); }
.savebar { position: sticky; bottom: 0; z-index: 5; background: var(--bg); border-top: .5px solid var(--ink); padding: 14px 28px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.savebar-msg { font-size: 13px; }
.live-box { border-top: .5px solid var(--line); border-bottom: .5px solid var(--line); padding: 20px 0; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.live-title { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.live-title.draft { color: var(--mid); font-style: italic; }
.how { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.55; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.danger-zone { display: flex; justify-content: flex-end; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--mid); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--urgent); }

/* Login */
.login { min-height: 100vh; min-height: 100dvh; max-width: 440px; margin: 0 auto; padding: 28px 22px 40px; display: flex; flex-direction: column; gap: 24px; }
.login-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; }

@media (max-width: 600px) {
  .admin-top, .savebar { padding-left: 18px; padding-right: 18px; }
  .admin-main { padding: 28px 18px 64px; }
  .panel { padding: 18px; }
  .edit-aside { position: static; }
  .w-day { width: 100%; }
}

/* ---------- Druck ---------- */
.print-page { background: #fff; }
.print-bar { padding: 16px 28px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; background: var(--bg); border-bottom: .5px solid var(--ink); }
.sheet { max-width: 794px; margin: 0 auto; padding: 48px 56px; background: #fff; display: flex; flex-direction: column; gap: 24px; }
.sheet + .sheet { border-top: 1px dashed var(--faint); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.sheet-title { font-family: var(--serif); font-weight: 300; font-size: 60px; line-height: .95; }
.ptbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptbl th { text-align: left; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--mid); font-weight: 400; padding: 8px 10px; border-bottom: 1px solid var(--ink); }
.ptbl th:first-child, .ptbl td:first-child { padding-left: 0; }
.ptbl td { padding: 9px 10px; vertical-align: top; }
.ptbl tr.first td { border-top: 1px solid var(--ink); }
.ptbl tr.more td { border-top: .5px solid #D5D1C9; }
.ptbl .p-time { font-family: var(--serif); font-size: 21px; line-height: 1.15; white-space: nowrap; }
.ptbl .open { color: #8C8692; font-style: italic; }
.box { display: inline-block; width: 15px; height: 15px; border: 1px solid var(--ink); }
.sheet-foot { border-top: .5px solid var(--ink); padding-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; font-size: 12px; }

@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  body { background: #fff; font-size: 12px; }
  .print-bar { display: none; }
  .sheet { padding: 0; max-width: none; }
  .sheet + .sheet { border-top: 0; break-before: page; }
  .ptbl tr { break-inside: avoid; }
  .spectrum { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
