/* Corpus Assist – Demo-App. Design: Handy v2 / Desktop v2 (freigegeben 14.11.2026) */
:root {
  --lila: #CEACFF;
  --lila-weich: #FAF7FF;
  --ink: #0B0B0C;
  --ink-2: #2A2A2E;
  --text-2: #48484D;
  --text-3: #5B5B60;
  --text-4: #8E8E93;
  --bg: #EFEFF1;
  --card: #FFFFFF;
  --line: #E4E4E6;
  --line-2: #DADADB;
  --raum: #F6F4FA;
  --raum-2: #E4E2EA;
  --gruen: #B8E0C8;
  --gelb: #FFD27A;
  --ok: #1F7A4D;
  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { margin: 0; }

/* ---------- Grundgerüst ---------- */
.shell { min-height: 100%; display: flex; flex-direction: column; }
.sidebar { display: none; }
.main { flex: 1; outline: none; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.wrap { padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* Reiter unten (Handy) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  padding: 8px max(10px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.tab { height: 56px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; position: relative; }
.tab[aria-current="page"] { background: var(--lila); }
.tab .dot { position: absolute; top: 6px; right: calc(50% - 20px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: var(--lila); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ---------- Sunny ---------- */
.sunny { display: block; overflow: visible; }
.sunny .ray { transform-box: fill-box; transform-origin: 50% 100%; }
.sunny.idle .ray-l { animation: ray-l 3.2s ease-in-out infinite; }
.sunny.idle .ray-c { animation: ray-c 3.2s ease-in-out infinite; }
.sunny.idle .ray-r { animation: ray-r 3.2s ease-in-out infinite; }
.sunny.happy .ray-l { animation: ray-l 1.1s ease-in-out infinite; }
.sunny.happy .ray-r { animation: ray-r 1.1s ease-in-out infinite; }
.sunny .eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 5s infinite; }
.bob { animation: bob 3.2s ease-in-out infinite; }
@keyframes ray-l { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-9deg); } }
@keyframes ray-c { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes ray-r { 0%,100% { transform: rotate(0); } 50% { transform: rotate(9deg); } }
@keyframes blink { 0%,46%,50%,100% { transform: scaleY(1); } 48% { transform: scaleY(.1); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------- Kopfbereich ---------- */
.hero { background: var(--lila); border-radius: 0 0 32px 32px; padding: 26px 20px 20px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; }
.hero::after { content: ""; position: absolute; right: -70px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.28); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero-date { font-size: 14px; font-weight: 600; opacity: .72; }
.hero h1 { font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -0.035em; margin-top: 6px; }
.bubble-dark { background: var(--ink); color: #F5F5F5; border-radius: 18px 4px 18px 18px; padding: 10px 14px; font-size: 14px; line-height: 1.35; align-self: flex-end; max-width: 260px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: rgba(255,255,255,.55); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; font-weight: 600; opacity: .75; }

/* ---------- Karten ---------- */
.section-title { font-size: 19px; font-weight: 700; padding: 0 4px; display: flex; justify-content: space-between; align-items: baseline; }
.section-title small { font-size: 14px; font-weight: 500; color: var(--text-3); }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 20px; background: var(--card); width: 100%; border: 0; text-align: left; transition: transform .15s ease, box-shadow .15s ease; }
.task:hover { transform: translateY(-1px); }
.task[aria-current="true"] { box-shadow: 0 0 0 3px var(--lila), 0 10px 24px -14px rgba(60,30,110,.45); }
.task-icon { width: 40px; height: 40px; flex: none; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.task-head { display: flex; justify-content: space-between; gap: 8px; }
.task-head b { font-size: 16px; }
.task-head span { font-size: 13px; color: var(--text-3); flex: none; }
.task-note { font-size: 14px; color: var(--text-2); }
.empty { background: var(--card); border-radius: 20px; padding: 18px; display: flex; gap: 14px; align-items: center; color: var(--text-2); }

.done-card { background: var(--ink); color: #F5F5F5; border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.done-card b { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 6px 10px; border-radius: 999px; background: #222226; }
.chip.neu { background: var(--lila); color: var(--ink); font-weight: 600; }

.panel { background: var(--card); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { font-size: 20px; font-weight: 700; }
.muted { color: var(--text-3); font-size: 13px; }

/* ---------- Seitenkopf (Unterseiten) ---------- */
.page-head { padding: 26px 4px 4px; display: flex; flex-direction: column; gap: 4px; }
.page-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.back { align-self: flex-start; height: 38px; padding: 0 12px 0 6px; border-radius: 19px; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; background: var(--card); margin-bottom: 6px; }

/* ---------- Gastraum ---------- */
.slots { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.slot { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; font-weight: 600; border: 1px solid var(--line-2); background: var(--card); }
.slot[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.raum { position: relative; height: 320px; border-radius: 18px; background: var(--raum); overflow: hidden; }
.raum .fenster { position: absolute; left: 0; right: 0; top: 0; height: 7px; background: repeating-linear-gradient(90deg, #CFCFD6 0 34px, transparent 34px 44px); }
.raum .label { position: absolute; left: 12px; top: 14px; font-size: 11px; font-weight: 600; color: var(--text-4); }
.raum .theke { position: absolute; right: 0; top: 50px; bottom: 50px; width: 40px; background: var(--raum-2); border-radius: 10px 0 0 10px; display: flex; align-items: center; justify-content: center; }
.raum .theke span { font-size: 11px; font-weight: 600; color: var(--text-4); transform: rotate(-90deg); }
.tisch { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 0; padding: 0; transition: transform .15s ease; }
.tisch b { font-size: 14px; }
.tisch small { font-size: 10px; font-weight: 600; }
.tisch.rund { border-radius: 50%; }
.tisch.eckig { border-radius: 12px; }
.tisch.belegt { background: var(--ink-2); color: #fff; cursor: default; }
.tisch.frei { background: #fff; border: 2px dashed #A8A6B3; color: var(--text-2); cursor: default; }
.tisch.vorschlag { background: var(--lila); color: var(--ink); animation: pulse 2s ease-out infinite; }
.tisch.waehlbar { cursor: pointer; border-color: var(--ink); color: var(--ink); }
.tisch.waehlbar:hover { transform: scale(1.06); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(206,172,255,.85); } 100% { box-shadow: 0 0 0 12px rgba(206,172,255,0); } }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); padding: 0 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.pick-hint { background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 14px; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pick-hint button { border: 0; background: transparent; color: var(--lila); font-weight: 700; }

.kurve { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; align-items: end; height: 56px; }
.kurve div { border-radius: 5px 5px 2px 2px; background: #D7D5DF; }
.kurve div.jetzt { background: var(--lila); }
.kurve-labels { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; font-size: 10px; color: var(--text-4); text-align: center; }

.dark-card { background: var(--ink); color: #F5F5F5; border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dark-card .muted { color: #A9A9AE; }

/* ---------- Anfrage / Chat ---------- */
.anfrage-head { background: var(--card); padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.anfrage-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.anfrage-title h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.badge { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--lila); flex: none; }
.chat { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg-in { align-self: flex-start; max-width: 86%; background: var(--card); border-radius: 20px 20px 20px 6px; padding: 12px 14px; white-space: pre-line; }
.note-sunny { align-self: center; display: flex; gap: 10px; align-items: center; background: var(--lila); border-radius: 16px; padding: 10px 14px; max-width: 94%; font-size: 14px; }
.msg-out { align-self: flex-end; max-width: 88%; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.msg-out .label { font-size: 12px; font-weight: 600; color: var(--text-3); }
.msg-out .bubble { background: var(--ink); color: #F5F5F5; border-radius: 20px 20px 6px 20px; padding: 12px 14px; white-space: pre-line; }
.msg-out textarea { width: min(100%, 520px); min-height: 200px; border: 2px solid var(--ink); border-radius: 20px 20px 6px 20px; padding: 12px 14px; line-height: 1.5; resize: vertical; background: #fff; }
.actions { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.btn { height: 46px; padding: 0 18px; border-radius: 23px; border: 1px solid var(--line-2); background: var(--card); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { height: 54px; border-radius: 27px; border: 0; background: var(--lila); font-size: 17px; font-weight: 800; }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sent { height: 54px; border-radius: 27px; background: var(--ink); color: #F5F5F5; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 700; }

/* ---------- Testanfrage ---------- */
.feld { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.feld input, .feld textarea { font-weight: 400; font-size: 16px; border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; background: #fff; line-height: 1.45; }
.feld textarea { resize: vertical; min-height: 140px; }
.feld input:focus, .feld textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--lila); }
.chips-hell { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-hell { border: 1px solid var(--line-2); background: var(--lila-weich); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.fehler { margin: 0; color: #A8231B; background: #FDE7E5; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.btn[disabled] { opacity: .6; cursor: progress; }
a.btn.dark { color: #fff; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 20; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); max-width: calc(100% - 32px); }

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  .shell { flex-direction: row; }
  .tabbar { display: none; }
  .main { padding-bottom: 40px; min-width: 0; }
  .toast { bottom: 28px; }
  .sidebar { display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; flex: 0 0 240px; background: var(--ink); color: #F5F5F5; padding: 22px 14px; }
  .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
  .brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
  .sidenav { display: flex; flex-direction: column; gap: 2px; }
  .sidenav a { height: 46px; padding: 0 12px; border-radius: 12px; display: flex; gap: 12px; align-items: center; font-size: 15px; font-weight: 600; color: #D8D8DC; }
  .sidenav a:hover { background: #18181B; }
  .sidenav a[aria-current="page"] { background: var(--lila); color: var(--ink); }
  .sidenav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--lila); color: var(--ink); }
  .sidenav a[aria-current="page"] .count { background: var(--ink); color: var(--lila); }
  .sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 8px; }
  .sidebar-foot b { font-size: 14px; }
  .meter { height: 6px; border-radius: 3px; background: var(--ink-2); overflow: hidden; }
  .meter i { display: block; height: 100%; background: var(--lila); border-radius: 3px; }
  .sidebar-foot span { font-size: 12px; color: #A9A9AE; }

  .wrap { padding: 0 28px; }
  .desk { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; max-width: 1400px; }
  .hero { border-radius: 28px; padding: 26px 30px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
  .hero::after { right: -60px; top: auto; bottom: -120px; width: 360px; height: 360px; }
  .hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 18px; }
  .hero h1 { font-size: 50px; }
  .hero .stats { grid-template-columns: repeat(4, minmax(110px, max-content)); }
  .hero-sunny { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .hero-sunny .bubble-dark { align-self: flex-start; border-radius: 18px 18px 18px 4px; max-width: 220px; }
  .desk-cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
  .desk-left { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
  .desk-right { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
  .raum { height: 300px; }
  .desk-right .anfrage-head { border-radius: 24px 24px 0 0; }
  .desk-right .anfrage-card { background: var(--card); border-radius: 24px; overflow: hidden; }
  .desk-right .chat { background: var(--bg); }
  .desk-right .actions { background: var(--card); flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
  .desk-right .actions .btn-row { display: flex; }
  .desk-right .back { display: none; }
  .page { padding: 24px 28px; max-width: 1000px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
