/* InfLogger – Designsystem (Dark Mode) */

:root {
  color-scheme: dark;
  --bg: #0c0d11;
  --surface: #15161c;
  --surface-2: #1c1e26;
  --surface-3: #252833;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f3f4f7;
  --muted: #8d91a1;
  --dim: #5c6070;
  --accent: #ff5a6e;
  --accent-press: #e9475c;

  --violet: #8a8ffd; --violet-deep: #6f74ec;
  --orange: #ff7a45; --orange-deep: #e5602f;
  --green: #45c48b;  --green-deep: #33a974;
  --blue: #5a9de0;   --blue-deep: #4483c9;
  --red: #ee5d78;    --red-deep: #d6465f;
  --locked: #22242c; --locked-deep: #1d1f26;

  --radius: 28px;
  --radius-sm: 16px;
  --pad: 20px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", "Nunito", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.round { font-family: var(--font-round); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Grundlayout ---------- */

#app { max-width: 540px; margin: 0 auto; min-height: 100dvh; }
.page {
  padding: calc(var(--safe-top) + 18px) var(--pad) calc(var(--tabbar-h) + var(--safe-bottom) + 36px);
}
.page.no-tabbar { padding-bottom: calc(var(--safe-bottom) + 32px); }
.view { animation: viewIn .28s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; margin-bottom: 22px;
}
.topbar h1 {
  margin: 0; font: 800 32px/1.1 var(--font-round); letter-spacing: -0.02em;
}
.topbar .sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.topbar-actions { display: flex; gap: 10px; flex-shrink: 0; }

.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text);
  transition: transform .15s var(--ease), background .15s;
}
.icon-btn:active { transform: scale(.92); background: var(--surface-3); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .badge {
  position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #fff; font: 700 11px/18px var(--font);
  text-align: center; box-shadow: 0 0 0 3px var(--bg);
}

.avatar {
  --c: var(--violet);
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: var(--c); color: #fff;
  font: 800 16px/1 var(--font-round); letter-spacing: .02em;
}
.avatar.lg { width: 76px; height: 76px; font-size: 28px; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.c0 { --c: var(--violet); } .c1 { --c: var(--orange); } .c2 { --c: var(--green); }
.c3 { --c: var(--blue); } .c4 { --c: var(--red); } .c5 { --c: #b07cf0; }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 30px 2px 14px; font: 800 20px/1.2 var(--font-round);
}
.section-title small { font: 500 14px var(--font); color: var(--muted); }

.stack { display: grid; gap: 14px; }

/* ---------- Karten ---------- */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card.tight { padding: 16px 18px; }
.card h3 { margin: 0 0 4px; font: 800 18px/1.25 var(--font-round); }
.card p { margin: 0; }

/* Farbkarten im Stil der Referenz: Basisfarbe + dunklere Wellenfläche rechts */
.tile {
  --base: var(--violet); --deep: var(--violet-deep);
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 124px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--base); color: #fff; text-align: left;
  transition: transform .18s var(--ease), filter .18s;
}
button.tile:active, a.tile:active { transform: scale(.975); filter: brightness(.95); }
.tile .wave {
  position: absolute; z-index: -1; top: 0; right: 0; width: 40%; height: 100%; color: var(--deep);
}
.tile .tile-title { font: 800 22px/1.15 var(--font-round); letter-spacing: -.01em; max-width: 62%; }
.tile .tile-sub { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; opacity: .85; }
.tile .tile-sub svg { width: 15px; height: 15px; }
.tile .tile-icon { width: 60px; height: 60px; flex-shrink: 0; margin-right: 6px; }
.tile.violet { --base: var(--violet); --deep: var(--violet-deep); }
.tile.orange { --base: var(--orange); --deep: var(--orange-deep); }
.tile.green  { --base: var(--green);  --deep: var(--green-deep); }
.tile.blue   { --base: var(--blue);   --deep: var(--blue-deep); }
.tile.red    { --base: var(--red);    --deep: var(--red-deep); }
.tile.locked { --base: var(--locked); --deep: var(--locked-deep); color: var(--dim); cursor: default; }
.tile.locked .tile-icon { opacity: .5; }

/* Großer Status-Karte (Heute) */
.hero {
  --base: var(--orange); --deep: var(--orange-deep);
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 32px; padding: 24px; background: var(--base); color: #fff; min-height: 214px;
  display: flex; flex-direction: column;
}
.hero .wave { position: absolute; z-index: -1; right: 0; top: 0; width: 46%; height: 100%; color: var(--deep); }
.hero .eyebrow { font: 700 13px/1 var(--font); text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.hero .big { margin: 10px 0 6px; font: 800 28px/1.12 var(--font-round); letter-spacing: -.015em; max-width: 78%; }
.hero .meta { font-size: 15px; opacity: .9; max-width: 78%; }
.hero .hero-actions { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; align-items: center; }
.hero.done { --base: var(--green); --deep: var(--green-deep); }
.hero.free { --base: var(--blue); --deep: var(--blue-deep); }
.hero.urgent { --base: var(--red); --deep: var(--red-deep); }
.hero .hero-icon { position: absolute; right: 22px; top: 24px; width: 54px; height: 54px; opacity: .95; }
.hero .hero-icon svg { width: 100%; height: 100%; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 26px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
  transition: transform .15s var(--ease), background .15s, opacity .15s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); background: var(--accent-press); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { display: flex; width: 100%; }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.secondary:active { background: var(--surface-3); }
.btn.white { background: #fff; color: #111; }
.btn.white:active { background: #e9e9ee; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.danger { background: rgba(238, 93, 120, .14); color: var(--red); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 20px; }
.btn.on-color { background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn.on-color:active { background: rgba(255, 255, 255, .3); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn .spinner { width: 18px; height: 18px; }

.link-btn { color: var(--violet); font-weight: 600; padding: 8px 4px; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; opacity: .9;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Formulare ---------- */

.field { display: grid; gap: 8px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); padding-left: 4px; }
.input {
  width: 100%; min-height: 54px; padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1.5px solid transparent; outline: none;
  font-size: 16px; /* verhindert Zoom auf iOS */
  transition: border-color .15s, background .15s;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--violet); background: var(--surface-3); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.4; }
.form-error {
  min-height: 22px; margin: 2px 4px 12px; color: var(--red); font-size: 14px; font-weight: 600;
}
.hint { font-size: 13px; color: var(--dim); padding: 0 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  padding: 9px 14px; border-radius: 999px; background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 600; transition: background .15s;
}
.chip:active, .chip.on { background: var(--surface-3); }

/* ---------- Auth-Screens ---------- */

.auth {
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--safe-top) + 32px) var(--pad) calc(var(--safe-bottom) + 32px);
}
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.brand-mark { width: 58px; height: 58px; border-radius: 18px; flex-shrink: 0; }
.brand-name { font: 800 30px/1 var(--font-round); letter-spacing: -.02em; }
.brand-sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.auth h2 { font: 800 26px/1.2 var(--font-round); margin: 0 0 6px; }
.auth .lead { color: var(--muted); margin: 0 0 24px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 15px; }

.state-screen { text-align: center; align-items: center; }
.state-icon {
  width: 96px; height: 96px; border-radius: 32px; display: grid; place-items: center;
  margin: 0 auto 26px; background: var(--surface-2); color: var(--violet);
}
.state-icon svg { width: 44px; height: 44px; }
.state-screen p { color: var(--muted); max-width: 340px; margin: 0 auto 26px; }

/* ---------- Tab-Leiste ---------- */

.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: rgba(12, 13, 17, .82); border-top: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  transform: translateZ(0);
}
.tabbar-inner {
  max-width: 540px; height: var(--tabbar-h); margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.tab {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--dim); font-size: 11px; font-weight: 600; transition: color .15s;
}
.tab svg { width: 25px; height: 25px; }
.tab.active { color: var(--accent); }
.tab:active svg { transform: scale(.9); }
.tab-fab { display: grid; place-items: center; height: 100%; }
.fab {
  width: 54px; height: 54px; border-radius: 20px; display: grid; place-items: center;
  background: var(--accent); color: #fff; transform: translateY(-10px);
  box-shadow: 0 10px 24px -6px rgba(255, 90, 110, .55);
  transition: transform .15s var(--ease);
}
.fab:active { transform: translateY(-10px) scale(.92); }
.fab svg { width: 28px; height: 28px; }
.fab.done { background: var(--green); box-shadow: 0 10px 24px -6px rgba(69, 196, 139, .5); }

/* ---------- Statistik-Chart ---------- */

.chart-card { --base: var(--blue); background: var(--base); color: #fff; border-radius: var(--radius); padding: 22px 20px 18px; }
.chart-card h3 { margin: 0; text-align: center; font: 800 18px/1.2 var(--font-round); }
.chart-sub { text-align: center; font-size: 14px; opacity: .85; margin-top: 4px; }
.chart {
  position: relative; display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px;
  align-items: end; height: 130px; margin-top: 18px;
  background: repeating-linear-gradient(to top, transparent 0 32px, rgba(255,255,255,.14) 32px 33px);
}
.bar { height: var(--h, 10%); border-radius: 7px; background: rgba(255, 255, 255, .78); transform-origin: bottom; animation: barIn .5s var(--ease) both; }
.bar.missed { background: #ff8a9c; --h: 16%; }
.bar.exempt { background: transparent; border: 1.5px dashed rgba(255, 255, 255, .55); --h: 34%; }
.bar.open { background: transparent; border: 1.5px solid rgba(255, 255, 255, .8); --h: 24%; }
.bar.none { background: rgba(255, 255, 255, .12); --h: 6%; }
@keyframes barIn { from { transform: scaleY(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.chart-x { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; margin-top: 8px; font-size: 11px; text-align: center; opacity: .8; }
.chart-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12px; opacity: .9; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: rgba(255,255,255,.78); }
.chart-legend i.m { background: #ff8a9c; }
.chart-legend i.e { background: transparent; border: 1.5px dashed rgba(255,255,255,.7); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px 14px; }
.stat b { display: block; font: 800 26px/1.1 var(--font-round); }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- Verwarnungen ---------- */

.pips { display: inline-flex; gap: 6px; }
.pip { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); }
.pip.on { background: var(--red); box-shadow: 0 0 0 3px rgba(238, 93, 120, .18); }
.on-color .pip { background: rgba(255,255,255,.28); }
.on-color .pip.on { background: #fff; box-shadow: none; }

.person {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
}
.person .name { font-weight: 700; font-size: 17px; line-height: 1.25; }
.person .handle { color: var(--muted); font-size: 14px; }
.count {
  font: 800 22px/1 var(--font-round); text-align: right;
}
.count small { font-size: 14px; color: var(--muted); font-weight: 700; }
.count.warn { color: var(--orange); }
.count.max { color: var(--red); }
.me-tag {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: rgba(138, 143, 253, .16); color: var(--violet); font-size: 12px; font-weight: 700; vertical-align: 2px;
}
.reasons { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; list-style: none; }
.reason { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: 14px; }
.reason .r-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(238,93,120,.14); color: var(--red); }
.reason .r-ico svg { width: 16px; height: 16px; }
.reason .r-meta { color: var(--dim); font-size: 12px; margin-top: 1px; }
.expiry { margin-top: 12px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.expiry svg { width: 15px; height: 15px; }
.person-card.limit { border-color: rgba(238, 93, 120, .45); background: linear-gradient(180deg, rgba(238,93,120,.10), transparent 60%), var(--surface); }

.rules {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 22px;
  background: var(--surface-2); color: var(--muted); font-size: 14px; margin-bottom: 18px;
}
.rules svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--violet); margin-top: 1px; }

/* ---------- Listen ---------- */

.list { display: grid; gap: 10px; }
.row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  text-align: left; width: 100%;
}
button.row:active { background: var(--surface-2); }
.row .t { font-weight: 700; }
.row .s { font-size: 13px; color: var(--muted); }
.row .chev { width: 20px; height: 20px; color: var(--dim); }
.ico-box {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted); flex-shrink: 0;
}
.ico-box svg { width: 22px; height: 22px; }
.ico-box.violet { background: rgba(138,143,253,.16); color: var(--violet); }
.ico-box.red { background: rgba(238,93,120,.15); color: var(--red); }
.ico-box.green { background: rgba(69,196,139,.15); color: var(--green); }
.ico-box.orange { background: rgba(255,122,69,.15); color: var(--orange); }
.ico-box.blue { background: rgba(90,157,224,.15); color: var(--blue); }

.thumb {
  position: relative; width: 58px; height: 78px; border-radius: 14px; overflow: hidden;
  background: var(--surface-3); flex-shrink: 0; display: grid; place-items: center; color: var(--dim);
}
.thumb > svg { width: 26px; height: 26px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .dur {
  position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 1px 0; border-radius: 6px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700; text-align: center;
}

.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.tag.green { background: rgba(69,196,139,.15); color: var(--green); }
.tag.red { background: rgba(238,93,120,.15); color: var(--red); }
.tag.orange { background: rgba(255,122,69,.15); color: var(--orange); }
.tag.violet { background: rgba(138,143,253,.16); color: var(--violet); }
.tag.blue { background: rgba(90,157,224,.15); color: var(--blue); }
.tag svg { width: 13px; height: 13px; }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--dim); }

.day-group { margin: 22px 4px 10px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Skeleton (verhindert Springen beim Laden) ---------- */

.skel {
  border-radius: var(--radius); background: var(--surface);
  background-image: linear-gradient(90deg, transparent, rgba(255,255,255,.035), transparent);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---------- Bottom Sheet ---------- */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55);
  opacity: 0; transition: opacity .25s var(--ease);
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 540px;
  max-height: calc(100dvh - var(--safe-top) - 24px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 30px 30px 0 0; border: 1px solid var(--line); border-bottom: 0;
  transform: translateY(100%); transition: transform .32s var(--ease);
  will-change: transform;
}
.sheet.open { transform: translateY(0); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 10px auto 0; flex-shrink: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px 6px; flex-shrink: 0; }
.sheet-head h2 { margin: 0; font: 800 22px/1.2 var(--font-round); }
.sheet-body {
  padding: 10px 20px calc(var(--safe-bottom) + 24px); overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
body.sheet-lock { overflow: hidden; }

/* ---------- Upload ---------- */

.upload-preview {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center;
  padding: 14px; border-radius: 22px; background: var(--surface-2); margin-bottom: 18px;
}
.upload-preview .thumb { width: 96px; height: 128px; border-radius: 16px; }
.upload-preview .fname { font-weight: 700; word-break: break-all; line-height: 1.3; }
.progress {
  height: 12px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 6px 0 10px;
}
.progress > i { display: block; height: 100%; width: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--violet), var(--accent)); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .3s linear; }
.progress-meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.done-badge {
  width: 84px; height: 84px; margin: 8px auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; animation: pop .45s var(--ease) both;
}
.done-badge svg { width: 42px; height: 42px; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Benachrichtigungen ---------- */

.notif { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif .t { font-weight: 700; line-height: 1.3; }
.notif .b { color: var(--muted); font-size: 14px; margin-top: 2px; }
.notif .w { color: var(--dim); font-size: 12px; margin-top: 4px; }
.notif.unread .t::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: 2px; }

/* ---------- Banner ---------- */

.banner {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 22px;
  background: rgba(138, 143, 253, .12); border: 1px solid rgba(138, 143, 253, .25); margin-bottom: 16px;
}
.banner svg { width: 26px; height: 26px; color: var(--violet); flex-shrink: 0; }
.banner .t { font-weight: 700; font-size: 15px; }
.banner .s { font-size: 13px; color: var(--muted); }
.banner.warn { background: rgba(255, 122, 69, .10); border-color: rgba(255, 122, 69, .28); }
.banner.warn svg { color: var(--orange); }

/* ---------- Toast ---------- */

.toast-wrap {
  position: fixed; z-index: 100; left: 0; right: 0; top: calc(var(--safe-top) + 12px);
  display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px;
}
.toast {
  max-width: 440px; padding: 13px 18px; border-radius: 18px; background: var(--surface-3); color: var(--text);
  font-weight: 600; font-size: 15px; box-shadow: 0 12px 30px -8px rgba(0,0,0,.6);
  animation: toastIn .3s var(--ease) both; display: flex; gap: 10px; align-items: center;
}
.toast svg { width: 20px; height: 20px; flex-shrink: 0; }
.toast.ok svg { color: var(--green); }
.toast.err svg { color: var(--red); }
.toast.out { animation: toastOut .25s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.97); } }

/* ---------- Profil ---------- */

.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.profile-head .name { font: 800 24px/1.15 var(--font-round); }
.profile-head .handle { color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }

.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; counter-increment: s; }
.steps li::before {
  content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); font-weight: 800; font-size: 14px;
}
.steps svg { display: inline; width: 18px; height: 18px; vertical-align: -3px; color: var(--blue); }

video.player { width: 100%; max-height: 70dvh; border-radius: 20px; background: #000; }

/* ---------- Kalender (Admin) ---------- */

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head b { font: 800 20px var(--font-round); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--dim); padding-bottom: 4px; }
.cal .d {
  aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: var(--surface-2); position: relative;
}
.cal .d.out { background: transparent; color: var(--dim); opacity: .45; }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--violet); }
.cal .d.ex { background: var(--blue); color: #fff; }
.cal .d.past { color: var(--dim); }
.cal .d:active { transform: scale(.94); }

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

@media (min-width: 700px) {
  :root { --pad: 28px; }
}

/* ---------- KI-Auswertung ---------- */

.ai-card { margin-top: 14px; padding: 18px; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--line); }
.ai-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.ai-head .t { font-weight: 700; }
.ai-head .s { font-size: 13px; color: var(--muted); }
.ai-score { font: 800 30px/1 var(--font-round); }
.ai-score small { font-size: 14px; color: var(--muted); }
.ai-score.green, .ai-bar.green { color: var(--green); }
.ai-score.orange, .ai-bar.orange { color: var(--orange); }
.ai-score.red, .ai-bar.red { color: var(--red); }
.ai-bar { height: 8px; border-radius: 4px; background: var(--surface-3); margin: 14px 0 2px; overflow: hidden; }
.ai-bar > i { display: block; height: 100%; border-radius: 4px; background: currentColor; transform-origin: left; transform: scaleX(var(--p, 0)); }
.ai-summary { margin: 12px 0 0; font-size: 15px; line-height: 1.5; }
.ai-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ai-acts { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }
.ai-note { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-3); font-size: 14px; }

/* ---------- Einstellungs-Formulare ---------- */

.fs-title { margin: 22px 2px 10px; font: 800 17px/1.2 var(--font-round); }
.fs-title:first-child { margin-top: 4px; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 120px; }
.input-suffix span { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; pointer-events: none; }
input.num::-webkit-inner-spin-button, input.num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input.num { -moz-appearance: textfield; appearance: textfield; }
.hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.hours .chip { padding: 10px 0; text-align: center; font-variant-numeric: tabular-nums; }
.chip.on { background: var(--accent); color: #fff; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; cursor: pointer; }
.switch .t { display: block; font-weight: 700; }
.switch .s { display: block; font-size: 13px; color: var(--muted); }
.toggle {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; position: relative; margin: 0;
  width: 52px; height: 32px; border-radius: 16px; background: var(--surface-3); transition: background .2s; cursor: pointer;
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .2s var(--ease);
}
.toggle:checked { background: var(--green); }
.toggle:checked::after { transform: translateX(20px); }
.opts { display: grid; gap: 8px; }
.opt {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 18px;
  background: var(--surface-2); border: 1.5px solid transparent; cursor: pointer; transition: border-color .15s;
}
.opt:has(input:checked) { border-color: var(--violet); }
.opt input { accent-color: var(--violet); width: 20px; height: 20px; margin: 2px 0 0; }
.opt .t { display: block; font-weight: 700; }
.opt .s { display: block; font-size: 13px; color: var(--muted); }
.opt .cost { color: var(--violet); margin-top: 2px; font-weight: 600; }

/* ---------- Geplante Nachrichten ---------- */

.msg-card { display: grid; gap: 10px; padding: 16px; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--line); transition: opacity .2s; }
.msg-card.off { opacity: .55; }
.msg-card .input, .msg-card .chip { background: var(--surface-3); }
.msg-card .chip.on { background: var(--accent); color: #fff; }
.msg-card textarea.input { min-height: 96px; }
.msg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.input.time { width: auto; min-width: 128px; min-height: 48px; padding: 8px 14px; font: 800 22px/1 var(--font-round); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days .chip { padding: 8px 0; text-align: center; font-size: 13px; }
.msg-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
