/* Sabine Jentsch – Meetings · Grundgestaltung */
:root {
  --rose: #f4a7ab;
  --rose-strong: #ef9399;
  --rose-soft: #fde6e7;
  --rose-tint: #fff5f5;
  --rose-ink: #8e3d46;
  --on-rose: #3b1d22;

  --ink: #2a2124;
  --ink-2: #66585c;
  --ink-3: #8f8085;
  --line: #ecdfe1;
  --bg: #fbf7f6;
  --card: #ffffff;

  --danger: #c93a52;
  --success: #24774b;
  --success-soft: #e3f4ea;

  --night: #1c1618;
  --night-2: #272022;
  --night-3: #352c2f;
  --night-4: #43383b;
  --night-text: #f6eeef;
  --night-muted: #b9aaae;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(42, 33, 36, .05), 0 10px 30px rgba(42, 33, 36, .07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .4em; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
a { color: var(--rose-ink); }
img { max-width: 100%; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
:focus-visible { outline: 3px solid rgba(244, 167, 171, .85); outline-offset: 2px; }

.ic { width: 20px; height: 20px; flex: none; display: block; }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 11px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--rose-tint); border-color: var(--rose); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--rose); border-color: var(--rose); color: var(--on-rose); }
.btn-primary:hover { background: var(--rose-strong); border-color: var(--rose-strong); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b3304a; border-color: #b3304a; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--rose-tint); border-color: transparent; }
.btn-lg { min-height: 54px; font-size: 17px; padding: 14px 22px; width: 100%; border-radius: 13px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn-on-dark { background: transparent; color: #f3e7e9; border-color: rgba(255, 255, 255, .22); }
.btn-on-dark:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .4); }

/* ------------------------------------------------------------------ Formulare */
label { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=password], input[type=date], input[type=time], input:not([type]), select, textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(244, 167, 171, .4); }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr 1fr; }
.row > div { min-width: 0; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr 1fr; } .row > div:first-child { grid-column: 1 / -1; } }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 0; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check + .check { border-top: 1px solid var(--line); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--rose-ink); }
.check small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13.5px; }
.form-error { color: var(--danger); font-size: 14px; font-weight: 600; margin: 12px 0 0; }
fieldset { border: 0; padding: 0; margin: 18px 0 0; }
legend { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 2px; }

/* ------------------------------------------------------------------ Karten, Kopfzeile */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 28px; width: 100%; max-width: 440px;
}
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--ink);
}
.topbar-logo { display: block; height: 30px; width: auto; }
.topbar nav { display: flex; gap: 8px; align-items: center; }
@media (max-width: 520px) { .topbar-logo { height: 22px; } }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; line-height: 1;
  padding: 4px 8px; border-radius: 999px;
  background: var(--rose-soft); color: var(--rose-ink);
}
.badge .ic { width: 13px; height: 13px; }
.badge-live { background: var(--success-soft); color: var(--success); }
.badge-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ------------------------------------------------------------------ Startseite */
.home { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.15fr 1fr; }
.home-hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(32px, 6vw, 88px);
  background: radial-gradient(120% 90% at 0% 0%, #3a2c31 0%, var(--ink) 55%, #1f181a 100%);
  color: #fff;
}
.home-hero::after {
  content: ""; position: absolute; right: -90px; bottom: -40px; width: 460px; height: 460px;
  background: url(/icon.svg) no-repeat center / contain; opacity: .07; pointer-events: none;
}
.home-logo { position: relative; z-index: 1; width: min(400px, 100%); height: auto; margin-bottom: 56px; }
.home-hero h1 { position: relative; z-index: 1; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 18px; }
.home-hero h1 em { font-style: normal; color: var(--rose); }
.home-hero p { position: relative; z-index: 1; color: #d8c9cc; font-size: 18px; max-width: 34ch; margin: 0; }
.home-steps { position: relative; z-index: 1; list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 12px; color: #eadde0; }
.home-steps li { display: flex; gap: 12px; align-items: center; }
.home-steps b { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(244, 167, 171, .16); color: var(--rose); font-size: 14px; }
.home-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding: 40px 20px; }
.join-card h2 { margin-bottom: 4px; }
.join-card .btn-lg { margin-top: 18px; }
#joinId { font-size: 20px; letter-spacing: .04em; padding: 14px 16px; }
.host-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.host-link:hover { color: var(--rose-ink); background: var(--rose-tint); }
.host-link .ic { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .home { grid-template-columns: 1fr; }
  .home-hero { padding: 36px 24px 40px; }
  .home-logo { width: 250px; margin-bottom: 30px; }
  .home-hero::after { width: 260px; height: 260px; right: -70px; bottom: -50px; }
  .home-steps { display: none; }
  .home-panel { padding: 28px 16px 40px; justify-content: flex-start; }
}

/* ------------------------------------------------------------------ Anmeldung */
.center-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(120% 90% at 0% 0%, #3a2c31 0%, var(--ink) 55%, #1f181a 100%); }
.login-card { text-align: left; }
.logo-plate { margin: 0 0 26px; padding: 20px 22px; background: var(--ink); border-radius: 14px; }
.logo-plate img { display: block; width: 100%; height: auto; }
.login-card .btn-lg { margin-top: 20px; }
.back-link { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--ink-2); }

/* ------------------------------------------------------------------ Planer */
.planner { max-width: 1060px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 72px; }
.greeting { margin-bottom: 22px; }
.greeting h1 { font-size: clamp(24px, 3vw, 30px); margin-bottom: 4px; }
.greeting p { margin: 0; color: var(--ink-2); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 40px; }
.quick-btn {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  font: inherit; color: var(--ink); text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .12s, border-color .15s, box-shadow .15s;
}
.quick-btn:hover { transform: translateY(-2px); border-color: var(--rose); }
.quick-btn strong { display: block; font-size: 17px; }
.quick-btn small { display: block; color: var(--ink-2); font-size: 14px; }
.quick-ic { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--rose-soft); color: var(--rose-ink); }
.quick-ic .ic { width: 26px; height: 26px; }
.quick-primary { background: var(--rose); border-color: var(--rose); }
.quick-primary:hover { border-color: var(--rose-strong); }
.quick-primary .quick-ic { background: rgba(255, 255, 255, .5); color: var(--on-rose); }
.quick-primary strong, .quick-primary small { color: var(--on-rose); }
@media (max-width: 780px) { .quick { grid-template-columns: 1fr; gap: 10px; } .quick-btn { padding: 14px; } }

.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.list-head h2 { margin: 0; }
.group-title { margin: 28px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.mtg {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 16px 18px; margin-bottom: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
}
.mtg.is-live { border-color: #9fd7b5; box-shadow: 0 0 0 3px var(--success-soft); }
.mtg-time strong { display: block; font-size: 19px; letter-spacing: -0.01em; }
.mtg-time span { display: block; font-size: 13px; color: var(--ink-2); }
.mtg-time .ic { width: 26px; height: 26px; color: var(--rose-ink); }
.mtg-title { font-weight: 700; font-size: 16.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mtg-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 3px; font-size: 14px; color: var(--ink-2); }
.mtg-meta span { display: inline-flex; gap: 5px; align-items: center; }
.mtg-meta .ic { width: 14px; height: 14px; }
.mtg-actions { display: flex; gap: 8px; align-items: center; }
.past .mtg { opacity: .75; }
details.past summary { cursor: pointer; list-style: none; }
details.past summary::-webkit-details-marker { display: none; }
details.past summary::after { content: " anzeigen"; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--rose-ink); }
details.past[open] summary::after { content: " ausblenden"; }
.empty { text-align: center; padding: 48px 24px; background: #fff; border: 1px dashed var(--line); border-radius: 18px; color: var(--ink-2); }
.empty img { width: 64px; margin-bottom: 8px; }
.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
@media (max-width: 760px) {
  .mtg { grid-template-columns: 1fr; gap: 10px; }
  .mtg-time { display: flex; gap: 10px; align-items: baseline; }
  .mtg-time strong { font-size: 17px; }
  .mtg-actions { flex-wrap: wrap; }
  .mtg-actions .btn-primary { flex: 1; }
}

/* ------------------------------------------------------------------ Dialoge */
dialog.dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: none; border-radius: 20px;
  color: var(--ink); background: #fff;
  box-shadow: 0 30px 80px rgba(20, 12, 15, .35);
}
dialog.dialog-sm { width: min(420px, calc(100vw - 24px)); }
dialog.dialog::backdrop { background: rgba(28, 22, 24, .55); backdrop-filter: blur(3px); }
dialog.dialog[open] { animation: pop .16s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.dialog form { margin: 0; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 24px 4px; }
.dialog-head h2 { margin: 0; font-size: 20px; }
.dialog-body { padding: 6px 24px 8px; overflow: auto; max-height: calc(100dvh - 190px); }
.dialog-body p:last-child { margin-bottom: 0; }
.dialog-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 24px 22px; }
.invite-box {
  margin: 8px 0 0; padding: 16px; white-space: pre-wrap; word-break: break-word;
  font: inherit; font-size: 14.5px; line-height: 1.55;
  background: var(--rose-tint); border: 1px solid var(--rose-soft); border-radius: 14px;
}
.invite-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.invite-actions .btn-primary { grid-column: 1 / -1; }
@media (max-width: 480px) { .invite-actions { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 14px; align-items: center; margin: 6px 0 4px; }
.kv dt { color: var(--ink-2); font-size: 14px; }
.kv dd { margin: 0; font-weight: 600; word-break: break-all; }

/* ------------------------------------------------------------------ Hinweise (Toasts) */
.toasts {
  position: fixed; z-index: 1000; left: 50%; bottom: 96px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  width: min(480px, calc(100vw - 24px)); pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 15px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
  animation: toastIn .2s ease-out;
}
.toast-text { flex: 1; min-width: 160px; }
.toast-success { border-left: 4px solid #7fd3a0; }
.toast-error { border-left: 4px solid #ff8a9a; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .2s; }
.toast-btn { font: inherit; font-size: 14px; font-weight: 700; padding: 7px 12px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; cursor: pointer; }
.toast-btn.primary { background: var(--rose); border-color: var(--rose); color: var(--on-rose); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
