/* ===== Themes ===== */
:root,
:root[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e6e8eb;
  --text: #1b1f24;
  --text-muted: #6b7280;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-soft: #fff1e8;
  --green: #16a34a;
  --green-soft: #e7f6ec;
  --amber: #d97706;
  --amber-soft: #fdf3e7;
  --yellow: #b45309;
  --yellow-soft: #fef6da;
  --slate: #64748b;
  --slate-soft: #eef1f5;
  --red: #e11d48;
  --red-soft: #fdeaee;
  --social: #4f46e5;
  --social-soft: #eef0fd;
  --task: #0d9488;
  --task-soft: #d9f2ee;
  --hotel: #9a6a34;
  --hotel-soft: #f4ecdf;
  --starclip: #1d63d8;
  --starclip-soft: #e6eefc;
  --lbl-summerfield: #2563eb;
  --lbl-summerfield-soft: #e7effe;
  --lbl-privat: #f97316;
  --lbl-privat-soft: #fdefe0;
  --lbl-scheppert: #dc2626;
  --lbl-scheppert-soft: #fdeaea;
  --logo-fg: #010101;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1e222b;
  --border: #2a2f3a;
  --text: #e8eaed;
  --text-muted: #9aa2ad;
  --accent: #fb7a3c;
  --accent-hover: #fd8f57;
  --accent-soft: #2a1c12;
  --green: #4ade80;
  --green-soft: #17301f;
  --amber: #fbbf24;
  --amber-soft: #33280f;
  --yellow: #fcd34d;
  --yellow-soft: #352b0f;
  --slate: #94a3b8;
  --slate-soft: #232833;
  --red: #fb7185;
  --red-soft: #3a1620;
  --social: #a5b4fc;
  --social-soft: #20233a;
  --task: #2dd4bf;
  --task-soft: #123330;
  --hotel: #cba36a;
  --hotel-soft: #2c2214;
  --starclip: #6aa8ff;
  --starclip-soft: #15233d;
  --lbl-summerfield: #60a5fa;
  --lbl-summerfield-soft: #16233f;
  --lbl-privat: #fb923c;
  --lbl-privat-soft: #33230f;
  --lbl-scheppert: #f87171;
  --lbl-scheppert-soft: #331717;
  --logo-fg: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
}

:root {
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ===== Login-Gate ===== */
.app { display: none; }
body.is-authed .app { display: flex; }
.auth-gate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: var(--bg);
}
body.is-authed .auth-gate { display: none; }
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow); padding: 32px 28px;
}
.auth-card .brand { justify-content: center; margin-bottom: 20px; }
.auth-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 20px; }
#authForm { display: flex; flex-direction: column; gap: 12px; }
#authForm input {
  font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; width: 100%;
}
#authForm input:focus { outline: none; border-color: var(--accent); }
#authForm .btn-primary { padding: 12px; margin-top: 4px; font-size: 15px; }
.auth-error { color: var(--red); font-size: 13.5px; text-align: center; margin-top: 4px; }

/* ===== Topbar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px;
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.2px; }

.tabs { display: flex; gap: 4px; }
.tab {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.is-active { background: var(--accent-soft); color: var(--accent); }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  border: none; background: transparent; font-size: 18px;
  cursor: pointer; padding: 6px; border-radius: 8px; line-height: 1;
  color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--slate-soft); color: var(--slate);
  display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
}

/* ===== Content ===== */
.content { padding: 28px 24px; max-width: 1180px; width: 100%; margin: 0 auto; }
.view { display: none; }
.view.is-active { display: block; }

.view-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px;
}
.view-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.4px; }
.subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.btn-primary {
  border: none; background: var(--accent); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); }

/* ===== Grid ===== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.stats { grid-column: 1 / -1; }

/* ===== Panels ===== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.panel-head h2 { font-size: 16px; font-weight: 650; }

.badge {
  font-size: 12px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 20px;
}
.badge--muted { color: var(--slate); background: var(--slate-soft); }

/* ===== Tasklist ===== */
.tasklist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.task {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 10px;
  transition: background 0.12s;
}
.task:hover { background: var(--surface-2); }
.task input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex: none;
}
.task label { display: flex; flex-direction: column; gap: 2px; cursor: pointer; flex: 1; }
.task-title { font-size: 14.5px; font-weight: 500; }
.task-meta { font-size: 12.5px; color: var(--text-muted); }
.task.is-done .task-title { text-decoration: line-through; color: var(--text-muted); }

.task-empty { color: var(--text-muted); font-size: 14px; padding: 12px; list-style: none; }
.task-add { display: flex; gap: 8px; margin-top: 12px; }
.task-add[hidden] { display: none; }
.task-add input {
  flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 14px;
}
.task-add input:focus { outline: none; border-color: var(--accent); }
.task-add .btn-primary { padding: 9px 14px; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot--high { background: var(--red); }
.dot--mid { background: var(--amber); }
.dot--low { background: var(--slate); }

/* ===== Bookings ===== */
.bookinglist { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.booking {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border: 1px solid var(--border); border-radius: 11px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.booking:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.booking-date {
  width: 46px; flex: none; text-align: center;
  background: var(--surface-2); border-radius: 9px; padding: 6px 0;
}
.booking-day { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.5px; }
.booking-num { display: block; font-size: 18px; font-weight: 700; }
.booking-body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.booking-title { font-size: 14.5px; font-weight: 600; }
.booking-meta { font-size: 12.5px; color: var(--text-muted); }

.pill {
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px; flex: none;
}
.pill--confirmed { color: var(--green); background: var(--green-soft); }
.pill--option { color: var(--yellow); background: var(--yellow-soft); }
.pill--cancelled { color: var(--red); background: var(--red-soft); }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 4px;
}
.stat-num { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat--link { cursor: pointer; font-family: inherit; text-align: left; transition: border-color 0.12s, transform 0.08s; }
.stat--link:hover { border-color: var(--accent); }
.stat--link:active { transform: translateY(1px); }
.stat--link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Starclip-App-Kachel (öffnet die zweite App) */
.stat--app { text-decoration: none; justify-content: space-between; }
.stat--app:hover { border-color: var(--starclip); }
.stat--app:focus-visible { outline-color: var(--starclip); }
.app-brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 20px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--starclip);
}
.app-logo {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  background: var(--starclip-soft); color: var(--starclip);
  display: inline-flex; align-items: center; justify-content: center;
}
.app-ext { opacity: 0.55; font-weight: 600; }

/* ===== Mein Tag ===== */
.panel--today { grid-column: 1 / -1; }
.today-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.today-col-head {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px;
}
.today-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.today-item {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: border-color 0.12s;
}
.today-item:hover { border-color: var(--accent); }
.today-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.today-item-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-item-meta { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.today-plat .plogo { width: 15px; height: 15px; }
.today-time { margin-left: 4px; }
.today-empty { font-size: 13px; color: var(--text-muted); padding: 8px 2px; list-style: none; }

.flash { animation: sb-flash 1.6s ease; }
@keyframes sb-flash { 0% { box-shadow: 0 0 0 2px var(--accent); } 100% { box-shadow: var(--shadow); } }

@media (max-width: 860px) {
  .today-cols { grid-template-columns: 1fr; gap: 16px; }
}

.btn-secondary {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 15px; border-radius: 10px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-secondary:disabled { opacity: 0.6; cursor: default; }
.btn-secondary.is-loading { animation: sb-pulse 0.9s ease-in-out infinite; }
@keyframes sb-pulse { 50% { opacity: 0.5; } }

.booking-empty { color: var(--text-muted); font-size: 14px; padding: 10px 2px; list-style: none; }

/* ===== Filterleiste ===== */
.filterbar {
  display: flex; flex-wrap: wrap; gap: 22px;
  margin-bottom: 20px;
}
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-muted); margin-right: 2px;
}
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 20px; cursor: pointer;
  transition: all 0.13s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.is-active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.chip--sm { padding: 5px 12px; font-size: 12.5px; }
.chip--done { margin-left: 10px; }

/* Unterauswahl-Zeile */
.filterbar--sub {
  gap: 8px; margin-top: -8px; margin-bottom: 20px;
  padding-bottom: 4px; align-items: center;
}
.filterbar--sub:empty { display: none; }

/* ===== Auftritte-Tab ===== */
.auftritte-list { display: flex; flex-direction: column; gap: 10px; }
.month-head {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-muted); margin: 14px 4px 4px;
}
.auftritte-list .month-head:first-child { margin-top: 0; }

.gig {
  display: flex; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px;
  transition: border-color 0.12s;
}
.gig:hover { border-color: var(--accent); }
.gig-date {
  width: 58px; flex: none; text-align: center;
  background: var(--surface-2); border-radius: 10px; padding: 8px 0; height: fit-content;
}
.gig-day { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.5px; }
.gig-num { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; }
.gig-mon { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.gig-body { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.gig-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gig-title { font-size: 16px; font-weight: 650; }
.gig-meta { font-size: 13px; color: var(--text-muted); }
.gig-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; margin-top: 2px; }
.gig-link:hover { text-decoration: underline; }

/* klickbare Termine */
.booking { cursor: pointer; }
.booking:focus-visible, .gig:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gig { cursor: pointer; align-items: center; }
.gig-chevron { color: var(--text-muted); font-size: 24px; flex: none; padding: 0 4px; }
.gig--cancelled { opacity: 0.6; }
.gig--cancelled .gig-title { text-decoration: line-through; }

/* ===== Kalender ===== */
.cal-nav { display: flex; gap: 8px; }
.cal-nav .btn-secondary { padding: 9px 14px; min-width: 42px; }

.cal-legend {
  display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px;
  font-size: 13px; color: var(--text-muted);
}
.cal-legend span { display: flex; align-items: center; gap: 7px; }
.cal-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cal-dot--D { background: var(--green); }
.cal-dot--O { background: var(--yellow); }
.cal-dot--C { background: var(--red); }

.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px;
}
.cal-weekday {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; padding-left: 4px;
}

.cal-note {
  background: var(--surface-2); border: 1px dashed var(--border);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 14px;
  font-size: 13.5px; color: var(--text-muted);
}

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-cell {
  min-width: 0; min-height: 108px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px; display: flex; flex-direction: column; gap: 4px; overflow: hidden;
}
.cal-cell--out { background: var(--surface-2); opacity: 0.5; }
.cal-cell--today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cal-daynum { font-size: 12.5px; font-weight: 600; color: var(--text-muted); padding: 1px 3px; }
.cal-cell--today .cal-daynum { color: var(--accent); font-weight: 700; }

.cal-ev {
  display: flex; flex-direction: column; gap: 1px; width: 100%; min-width: 0; text-align: left;
  border: none; border-left: 3px solid transparent; border-radius: 5px;
  padding: 4px 7px; font-family: inherit; cursor: pointer;
}
.cal-ev-title, .cal-ev-line {
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-ev-title { font-size: 11.5px; font-weight: 700; }
.cal-ev-line { font-size: 10.5px; font-weight: 500; opacity: 0.85; }
.cal-ev--D { background: var(--green-soft); color: var(--green); border-left-color: var(--green); }
.cal-ev--O { background: var(--yellow-soft); color: var(--yellow); border-left-color: var(--yellow); }
.cal-ev--C { background: var(--red-soft); color: var(--red); border-left-color: var(--red); }
.cal-ev--C .cal-ev-title { text-decoration: line-through; }
.cal-ev--social { background: var(--social-soft); color: var(--text); border-left-color: var(--social); }
.cal-ev--task { background: var(--task-soft); color: var(--text); border-left-color: var(--task); }
.cal-ev--task .cal-ev-title { color: var(--task); font-weight: 700; }
.cal-ev--hotel { background: var(--hotel-soft); color: var(--text); border-left-color: var(--hotel); }
.cal-ev--hotel .cal-ev-title { color: var(--hotel); font-weight: 700; }
.cal-ev--task-done { opacity: 0.55; }
.cal-ev--task-done .cal-ev-title { text-decoration: line-through; }
.cal-ev:hover { filter: brightness(1.05); }

/* Social-Kachel: Art / Name / Logos / Uhrzeit+Ampel */
.cal-ev-type { font-size: 10.5px; font-weight: 700; color: var(--social); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-name { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-plat { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.plogo { position: relative; display: inline-flex; width: 16px; height: 16px; flex: none; }
.plogo svg { width: 100%; height: 100%; display: block; }
.plogo--off { filter: grayscale(100%); opacity: 0.26; }
/* Status-Ampel am Logo */
.pdot { position: absolute; right: -3px; bottom: -3px; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--surface); }
.pdot--offen { background: var(--yellow); }
.pdot--live { background: var(--green); }
.pdot--fehler { background: var(--red); }
.cal-ev--social .pdot { box-shadow: 0 0 0 1.5px var(--social-soft); }
.cal-ev-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 3px; }
.cal-ev-time { font-size: 10.5px; font-weight: 500; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Detail: Status je Plattform */
.det-status-list { display: flex; flex-direction: column; gap: 6px; }
.det-status-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; margin: 0 -8px; border-radius: 9px;
  cursor: pointer; transition: background 0.12s;
}
.det-status-row:hover { background: var(--surface-2); }
.det-status-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.det-plat-single { display: inline-flex; width: 20px; height: 20px; flex: none; }
.det-plat-single svg { width: 100%; height: 100%; }
.det-plat-name { flex: 1; font-weight: 500; }
.det-hint { margin-top: 8px; font-size: 12px; color: var(--text-muted); }

/* Caption + Kopieren */
.det-caption {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 12px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap;
  margin-bottom: 8px;
}
.det-copy {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.det-copy:hover { border-color: var(--accent); color: var(--accent); }

/* Material-Badge */
.mat { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.mat--todo { color: var(--red); background: var(--red-soft); }
.mat--wip { color: var(--yellow); background: var(--yellow-soft); }
.mat--done { color: var(--green); background: var(--green-soft); }
.mat--none { color: var(--slate); background: var(--slate-soft); }

/* Links zu Live-Posts */
.det-links { display: flex; flex-direction: column; gap: 8px; }
.det-link { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
.det-link svg { width: 17px; height: 17px; }
.det-link:hover { text-decoration: underline; }

/* Aktionen + Bearbeiten-Formular */
.det-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.det-form { display: flex; flex-direction: column; gap: 14px; }
.det-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.det-field[hidden] { display: none; }
.det-field input, .det-field select, .det-field textarea {
  font-family: inherit; font-size: 14px; font-weight: 400; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px; width: 100%;
}
.det-field textarea { resize: vertical; line-height: 1.5; }
.det-field input:focus, .det-field select:focus, .det-field textarea:focus { outline: none; border-color: var(--accent); }
.det-field-row { display: flex; gap: 12px; }
.det-field-row .det-field { flex: 1; }

/* Kopf-Buttons (mehrere nebeneinander) */
.head-actions { display: flex; align-items: center; gap: 10px; }

/* Plattform-Picker im Social-Formular */
.plat-picker { display: flex; gap: 12px; }
.plat-btn {
  width: 50px; height: 50px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.plat-btn svg { width: 28px; height: 28px; }
.plat-btn:not(.plat-btn--off) { border-color: var(--accent); background: var(--accent-soft); }
.plat-btn--off svg { filter: grayscale(100%); opacity: 0.3; }
.plat-btn--off:hover { border-color: var(--slate); }

/* Kategorie-Chips im Aufgaben-Formular */
.label-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.lblchip { font-weight: 400; }
.lblchip.is-active { font-weight: 600; }
.lblchip[data-label="summerfield"].is-active { background: var(--lbl-summerfield); border-color: var(--lbl-summerfield); color: #fff; }
.lblchip[data-label="privat"].is-active { background: var(--lbl-privat); border-color: var(--lbl-privat); color: #fff; }
.lblchip[data-label="scheppert"].is-active { background: var(--lbl-scheppert); border-color: var(--lbl-scheppert); color: #fff; }
.lblchip.is-active .lbl-dot { background: #fff; }

/* Social-Status-Punkte (Legende & Liste) */
.sdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 2px; }
.sdot--offen { background: var(--yellow); }
.sdot--live { background: var(--green); }
.sdot--fehler { background: var(--red); }
.det-plat .plogo { width: 18px; height: 18px; }

/* Social-Status-Pills (Liste & Detail) */
.pill--soc-offen { color: var(--yellow); background: var(--yellow-soft); }
.pill--soc-live { color: var(--green); background: var(--green-soft); }
.pill--soc-fehler { color: var(--red); background: var(--red-soft); }

@media (max-width: 720px) {
  .cal-cell { min-height: 72px; padding: 4px; }
  .cal-ev-title { font-size: 10px; }
  .cal-ev-line { font-size: 9px; }
  .cal-daynum { font-size: 11px; }
}

/* ===== Modal ===== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: flex-start; justify-content: center;
  background: rgba(10, 12, 16, 0.55); backdrop-filter: blur(2px);
  padding: 40px 20px; overflow-y: auto;
}
.modal.is-open { display: flex; }
.modal-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 100%; max-width: 560px; padding: 24px;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  border: none; background: var(--surface-2); color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 15px;
}
.modal-close:hover { background: var(--border); color: var(--text); }

.det-head { margin-bottom: 16px; padding-right: 36px; }
.det-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 8px; }

.det-map {
  width: 100%; height: 220px; border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 8px; display: block;
}
.det-nomap {
  padding: 24px; text-align: center; color: var(--text-muted);
  background: var(--surface-2); border-radius: 12px; margin-bottom: 8px; font-size: 14px;
}
.det-maplinks { display: flex; gap: 16px; margin-bottom: 18px; }
.det-maplinks a { font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
.det-maplinks a:hover { text-decoration: underline; }

.det-grid { display: flex; flex-direction: column; }
.det-row {
  display: flex; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.det-row:last-child { border-bottom: none; }
.det-label { flex: none; width: 110px; color: var(--text-muted); }
.det-value { flex: 1; font-weight: 500; word-break: break-word; }
.det-value a { color: var(--accent); text-decoration: none; }
.det-value a:hover { text-decoration: underline; }

/* ===== Aufgaben-Reiter ===== */
.task-board { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.taskcard {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 15px 18px; cursor: pointer; transition: border-color 0.12s;
}
.taskcard:hover { border-color: var(--accent); }
.taskcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.taskcard.is-marked { box-shadow: var(--shadow), inset 3px 0 0 0 var(--accent); }
.taskcard.is-marked.taskcard--summerfield,
.taskcard.is-marked.taskcard--privat,
.taskcard.is-marked.taskcard--scheppert { box-shadow: var(--shadow); }

/* Kategorie-Marker */
.lbl-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; vertical-align: middle; }
.lbl-dot--summerfield { background: var(--lbl-summerfield); }
.lbl-dot--privat { background: var(--lbl-privat); }
.lbl-dot--scheppert { background: var(--lbl-scheppert); }
.taskcard-tags { display: flex; align-items: center; gap: 8px; flex: none; }
.tasklabel { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.tasklabel--summerfield { color: var(--lbl-summerfield); background: var(--lbl-summerfield-soft); }
.tasklabel--privat { color: var(--lbl-privat); background: var(--lbl-privat-soft); }
.tasklabel--scheppert { color: var(--lbl-scheppert); background: var(--lbl-scheppert-soft); }
.taskcard--summerfield { border-left-width: 4px; border-left-color: var(--lbl-summerfield); }
.taskcard--privat { border-left-width: 4px; border-left-color: var(--lbl-privat); }
.taskcard--scheppert { border-left-width: 4px; border-left-color: var(--lbl-scheppert); }
.cal-ev--task.lbl-summerfield { border-left-color: var(--lbl-summerfield); }
.cal-ev--task.lbl-privat { border-left-color: var(--lbl-privat); }
.cal-ev--task.lbl-scheppert { border-left-color: var(--lbl-scheppert); }
.taskcard input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--accent); cursor: pointer; flex: none; margin-top: 2px; }
.taskcard-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.taskcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.taskcard-title { font-size: 15.5px; font-weight: 650; }
.taskcard-desc { font-size: 13.5px; color: var(--text-muted); }
.taskcard-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.taskcard.is-done .taskcard-title { text-decoration: line-through; color: var(--text-muted); }
.mark-star { color: var(--accent); }
.task .task-title .mark-star { margin-right: 2px; }

/* Prioritäts-Badge */
.prio { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; flex: none; white-space: nowrap; }
.prio--high { color: var(--red); background: var(--red-soft); }
.prio--mid { color: var(--amber); background: var(--amber-soft); }
.prio--low { color: var(--slate); background: var(--slate-soft); }

/* Markieren-Schalter (Toggle) */
.task-mark-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px; }
.task-mark-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.task-mark-label small { font-weight: 400; color: var(--text-muted); }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; cursor: pointer; border-radius: 26px;
  background: var(--border); transition: background 0.15s;
}
.switch-slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

.btn-danger {
  border: 1px solid var(--red); background: transparent; color: var(--red);
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 15px; border-radius: 10px; cursor: pointer; margin-right: auto;
}
.btn-danger:hover { background: var(--red); color: #fff; }

/* ===== Placeholder ===== */
.placeholder {
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 60px 24px;
  text-align: center; color: var(--text-muted); font-size: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tabs { gap: 0; }
  .tab { padding: 8px 11px; font-size: 14px; }
  .brand-name { display: none; }
}
