/* ==========================================================================
   caligatus Dashboard — Design nach verbindlichem caligatus-Branding
   Quelle: Vault „00 Kontext/Branding.md" + Live-Site caligatus.de
   HELLES Layout (Branding-konform): Hellgrau-Fläche, weiße Karten, Navy-Text,
   Amber punktuell. Navy-Verlauf NUR im Kopfbereich (Header = Hero-Zone).
   Schrift: Inter. Referenz-Ästhetik: Stripe / Linear.
   ========================================================================== */
:root {
  /* Marken-Tokens (identisch zur Website) */
  --navy-1:   #070e20;
  --navy-2:   #1a3264;
  --gradient: linear-gradient(140deg, #070e20 0%, #1a3264 100%);
  --amber:    #f59e0b;
  --amber-hover: #d98806;
  --white:    #ffffff;
  --lightgray:#f5f5f7;
  --muted:    #7a8399;
  --green:    #1f8a5b;

  /* Text & Linien (auf hellem Grund) */
  --text:       #1a3264;                       /* Navy als Grundtext */
  --text-body:  #4a5470;
  --text-faint: #7a8399;
  --line:       rgba(26, 50, 100, 0.10);
  --line-soft:  rgba(26, 50, 100, 0.06);

  --shadow-card: 0 4px 16px rgba(26, 50, 100, .07);
  --shadow-lg:   0 20px 50px rgba(26, 50, 100, .18);

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

/* hidden-Attribut muss explizite display-Regeln (flex/grid) schlagen */
[hidden] { display: none !important; }

html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--lightgray);
  height: 100vh;            /* feste Höhe → Spalten scrollen intern, nicht die Seite */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Topbar (Navy-Verlauf = Hero-Zone) ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 30px;
  background: var(--gradient);
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 6px 24px rgba(7, 14, 32, .18);
}
/* Kalender-Verbindungs-Banner: sofort sichtbar, wenn die Google-Verbindung abgelaufen ist */
.cal-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 30px;
  background: #fff7e6; border-bottom: 1px solid rgba(245, 158, 11, .45);
  box-shadow: inset 0 3px 0 var(--amber);
  position: sticky; top: 0; z-index: 19;
}
.cal-banner-icon { font-size: 18px; color: var(--amber-hover); flex: none; }
.cal-banner-text { font-size: 14px; color: #7a5312; font-weight: 500; flex: 1 1 auto; }
.cal-banner-text strong { color: #b45309; }
.cal-banner-btn { flex: none; padding: 8px 16px; }
@media (max-width: 640px) {
  .cal-banner { padding: 10px 16px; flex-wrap: wrap; }
  .cal-banner-text { flex-basis: 100%; }
}

.brand { display: flex; align-items: baseline; gap: 12px; }
.brand-name { font-weight: 800; font-size: 23px; letter-spacing: -.4px; color: var(--white); text-decoration: none; transition: opacity .15s ease; }
.brand-name:hover { opacity: .82; }
.brand-name:hover .wm-g { text-decoration: underline; text-underline-offset: 3px; }
.brand-name .wm-g { color: var(--amber); }
.brand-sub {
  position: relative;
  color: rgba(255, 255, 255, .55); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 2.6px;
  cursor: help;
}
.brand-sub::after {
  content: attr(data-explain);
  position: absolute; top: 100%; left: 0; margin-top: 10px;
  width: max-content; max-width: 240px;
  background: var(--white); color: var(--text-body);
  font-size: 12.5px; font-weight: 400; text-transform: none; letter-spacing: normal;
  line-height: 1.5;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .12s ease;
  z-index: 100;
}
.brand-sub:hover::after, .brand-sub:focus-visible::after {
  opacity: 1; visibility: visible;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.clock { color: rgba(255, 255, 255, .72); font-size: 13px; font-weight: 500; padding-left: 4px; }

/* Ghost-Buttons im dunklen Header hell darstellen */
.topbar .btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .9); }
.topbar .btn-ghost:hover { border-color: var(--amber); color: var(--white); background: rgba(245, 158, 11, .16); }
.topbar .btn-ghost[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #241703; }
.topbar .icon-btn { color: rgba(255, 255, 255, .7); }
.topbar .icon-btn:hover { color: var(--white); background: rgba(255, 255, 255, .12); }

/* ---------- Buttons (Pill) ---------- */
.btn {
  font-family: var(--font); font-size: 14px; font-weight: 600;
  border: 1px solid transparent; border-radius: 999px;
  padding: 9px 18px; cursor: pointer; color: var(--text);
  transition: transform .06s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); border-color: var(--amber); color: #241703; box-shadow: 0 4px 14px rgba(245, 158, 11, .3); }
.btn-primary:hover { background: var(--amber-hover); border-color: var(--amber-hover); }
.btn-ghost { background: var(--white); border-color: var(--line); color: var(--text-body); }
.btn-ghost:hover { border-color: var(--amber); color: var(--text); }
.btn-success { background: rgba(31, 138, 91, .1); border-color: rgba(31, 138, 91, .4); color: #17754c; }
.btn-success:hover { background: rgba(31, 138, 91, .18); border-color: var(--green); }
.btn-danger { background: var(--white); border-color: var(--line); color: var(--text-body); }
.btn-danger:hover { border-color: #c77f8a; color: #b0505f; background: rgba(199, 127, 138, .08); }

.icon-btn {
  background: transparent; border: none; color: var(--text-faint);
  font-size: 17px; cursor: pointer; padding: 4px 9px; border-radius: 999px;
}
.icon-btn:hover { color: var(--text); background: rgba(26, 50, 100, .06); }

/* ---------- Footer (Impressum/Datenschutz, immer sichtbar) ---------- */
.app-footer {
  flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 7px 30px; font-size: 11.5px; color: var(--text-faint);
  background: var(--white);
  border-top: 1px solid var(--line);
}
.app-footer a { color: var(--text-faint); text-decoration: underline; text-underline-offset: 2px; }
.app-footer a:hover { color: var(--navy-2); }

/* ---------- Board ---------- */
.board {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: minmax(0, 1fr);
  gap: 26px; align-items: stretch;
  padding: 28px 30px 24px; max-width: 1560px; width: 100%; margin: 0 auto;
}
.column { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.column[data-col="jetzt"]       { --accent: var(--amber);   --accent-text: var(--amber-hover); }
.column[data-col="diese-woche"] { --accent: var(--navy-2);  --accent-text: var(--navy-2); }
.column[data-col="spaeter"]     { --accent: var(--muted);   --accent-text: var(--muted); }

/* Scroll-Hinweise: Fade + Chevron, wenn ober-/unterhalb noch Karten sind */
.column::before, .column::after {
  content: ""; position: absolute; left: 0; right: 8px; height: 44px;
  pointer-events: none; opacity: 0; transition: opacity .18s ease; z-index: 3;
  display: flex; justify-content: center; font-size: 15px; color: var(--text-faint);
}
.column::before { top: 32px; align-items: flex-start;
  background: linear-gradient(to bottom, var(--lightgray) 30%, transparent); }
.column::after  { bottom: 0; align-items: flex-end; padding-bottom: 6px;
  background: linear-gradient(to top, var(--lightgray) 30%, transparent); }
.column.more-above::before { opacity: 1; }
.column.more-below::after  { opacity: 1; }

/* Deutlicher „mehr Zettel"-Hinweis mit Anzahl (klickbar → scrollt) */
.col-more {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 4;
  border: none; cursor: pointer; white-space: nowrap;
  background: var(--amber); color: #241703;
  font-family: var(--font); font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 5px 14px rgba(245, 158, 11, .45);
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.col-more.visible { opacity: 1; pointer-events: auto; }
.col-more:hover { background: var(--amber-hover); }
.col-more-bottom { bottom: 10px; }
.col-more-bottom.visible { animation: more-bounce 1.7s ease-in-out infinite; }
.col-more-top { top: 40px; }
@keyframes more-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(3px); }
}

.column-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 14px; flex: none;
}
.column-head h2 {
  margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--accent-text);
  display: flex; align-items: center; gap: 9px;
}
.column-head h2::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.col-count {
  font-size: 12px; font-weight: 600; color: var(--text-faint);
  background: rgba(26, 50, 100, .05); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 9px; min-width: 24px; text-align: center;
}

.cards {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 13px; padding: 2px 8px 40px 2px;
  scrollbar-width: thin; scrollbar-color: rgba(26, 50, 100, .25) transparent;
}
.cards::-webkit-scrollbar { width: 8px; }
.cards::-webkit-scrollbar-thumb { background: rgba(26, 50, 100, .2); border-radius: 999px; }
.cards::-webkit-scrollbar-thumb:hover { background: rgba(26, 50, 100, .35); }
.cards.dragover { background: rgba(245, 158, 11, .07); border-radius: 14px; outline: 2px dashed rgba(245, 158, 11, .4); outline-offset: 2px; }
.cards-empty {
  color: var(--text-faint); font-size: 13px; text-align: center;
  padding: 22px 8px; border: 1px dashed var(--line); border-radius: var(--r-md);
}

/* ---------- Zettel-Karte ---------- */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--card-color, var(--muted));
  border-radius: var(--r-md);
  padding: 14px 15px 13px; cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform .09s ease, border-color .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card.dragging { opacity: .5; }
/* Bewusst gewählte Farbe → GANZE Fläche in dieser Farbe (Signalwirkung), im hellen Ton der Farbe,
   damit Text und Badges lesbar bleiben. „Neutral" = keine Farbe → Karte bleibt weiß. */
.card.tinted {
  background: color-mix(in srgb, var(--card-color) 20%, #fff);
  border-color: color-mix(in srgb, var(--card-color) 45%, #fff);
  border-left-width: 5px;
  border-left-color: var(--card-color);
}
.card.tinted .badge { background: rgba(255, 255, 255, .72); border-color: rgba(255, 255, 255, .9); }
.card.tinted .card-preview { color: color-mix(in srgb, var(--navy-2) 62%, transparent); }
.card.tinted .card-complete { background: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .95); }
.card-title { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--navy-2); word-break: break-word; }
.card-preview {
  color: var(--text-faint); font-size: 12.5px; margin-top: 5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; align-items: center; }
.badge {
  font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 999px;
  background: rgba(26, 50, 100, .05); color: var(--text-body); border: 1px solid var(--line-soft);
  display: inline-flex; align-items: center; gap: 5px;
}
.badge svg { flex: none; opacity: .75; }
.badge.due.soon    { color: var(--text-body); }
.badge.due.now     { color: var(--amber-hover); border-color: rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .12); }
.badge.due.overdue { color: #241703; background: var(--amber); border-color: var(--amber); font-weight: 600; }
.badge.recur       { color: var(--navy-2); }
.overdue-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #dc2626; flex: none;
  animation: overdue-pulse 1.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .overdue-dot { animation: none; opacity: .75; }
}
@keyframes overdue-pulse {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}
/* Trennt in „Später" die geparkten (oben) von den datierten Zetteln */
.cards-divider {
  display: flex; align-items: center; gap: 9px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-faint); margin: 6px 2px 0; user-select: none;
}
.cards-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.card-handle {
  position: absolute; top: 12px; right: 36px; color: var(--text-faint);
  font-size: 12px; opacity: 0; transition: opacity .15s ease; cursor: grab; user-select: none;
}
.card:hover .card-handle { opacity: .6; }
.card-complete {
  position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--white);
  color: var(--muted); font-size: 12px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.card:hover .card-complete { opacity: 1; }
.card-complete:hover { background: var(--green, #1f8a5b); border-color: var(--green, #1f8a5b); color: #fff; }

/* ---------- Farb-Picker ---------- */
/* min-height wie ein Eingabefeld → Farbfeld fluchtet mit den übrigen Feldern der Reihe */
.color-picker { display: inline-flex; align-items: center; gap: 8px; min-height: 41px; }
/* Wochentags-Auswahl für „Mo+Mi+Fr"-Serien */
.byday-picker { display: inline-flex; align-items: center; gap: 4px; min-height: 41px; }
/* Monats-Muster-Auswahl breit genug für „am zweiten Dienstag" */
#f-month-mode { min-width: 172px; }
.byday-day {
  min-width: 30px; padding: 6px 0; text-align: center; cursor: pointer; user-select: none;
  font-size: 12px; font-weight: 700; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: #f7f8fb; color: var(--text-faint);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.byday-day:hover { border-color: var(--amber); }
.byday-day[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #241703; }
.swatch {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; outline: 1px solid var(--line);
}
.swatch[aria-checked="true"] { border-color: var(--navy-2); outline-color: var(--navy-2); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(7, 14, 32, .45); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px;
}
/* Ebenen nach Verschachtelung staffeln — sonst entscheidet die HTML-Reihenfolge und ein Dialog,
   der ÜBER einem anderen geöffnet wird, verschwindet dahinter. (Toast liegt mit 80 über allem.) */
#series-overview-backdrop { z-index: 60; }  /* öffnet über dem Zettel-Editor */
#cal-import-backdrop      { z-index: 65; }  /* Termin-Import — öffnet über den Einstellungen */
#choice-backdrop          { z-index: 70; }  /* Serien-Rückfrage über dem Editor */
#occ-edit-backdrop        { z-index: 75; }  /* Einzeltermin ändern — über der Serien-Übersicht */
.modal {
  width: 100%; max-width: 620px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  max-height: 88vh; display: flex; flex-direction: column;
}
.modal-head { display: flex; align-items: center; gap: 8px; padding: 20px 20px 8px; }
.f-title {
  flex: 1; background: transparent; border: none; color: var(--navy-2);
  font-size: 20px; font-weight: 700; font-family: var(--font); padding: 6px 4px;
  border-bottom: 2px solid var(--line);
}
.f-title::placeholder { color: var(--text-faint); font-weight: 500; }
.f-title:focus { outline: none; border-bottom-color: var(--amber); }
.modal-body { padding: 8px 20px 4px; overflow-y: auto; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 13px 0; flex: 1; }
.field-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
/* align-items:flex-end → Eingabefelder fluchten, auch wenn ein Label zweizeilig umbricht */
.field-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
textarea, input[type="text"], input[type="date"], input[type="time"], input[type="number"], select {
  background: #f7f8fb; border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--navy-2); font-family: var(--font); font-size: 14px; padding: 10px 12px; width: 100%;
}
textarea { resize: vertical; line-height: 1.55; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--amber); background: var(--white); }
.rec-hint { color: var(--text-faint); font-size: 12.5px; margin: 4px 2px 12px; }
/* Hinweise im Editor — beide auffällig, aber unterscheidbar: Konflikt = Amber (Warnung),
   Kontext = Navy (Info). Beides bleibt ein Hinweis, nie ein Blocker. */
.conflict-box { display: flex; flex-direction: column; gap: 6px; margin: 2px 2px 10px; }
.hint-row {
  font-size: 13px; line-height: 1.5; padding: 10px 12px; font-weight: 600;
  border-radius: var(--r-sm); border: 1px solid; border-left-width: 4px;
}
.hint-conflict { background: rgba(245, 158, 11, .18); border-color: rgba(245, 158, 11, .55); border-left-color: var(--amber); color: #241703; }
.hint-context  { background: rgba(91, 134, 201, .20); border-color: rgba(91, 134, 201, .55); border-left-color: var(--navy-2); color: var(--navy-2); }
.cal-export-row { display: flex; align-items: center; gap: 12px; margin: 6px 2px 2px; }
.cal-export-status { font-size: 12px; font-weight: 600; color: #17754c; }
.cal-export-status.muted { color: var(--text-faint); font-weight: 500; }
.cal-sync-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.cal-sync-toggle input { width: 16px; height: 16px; accent-color: var(--amber); cursor: pointer; }
.cal-sync-toggle span { font-size: 13.5px; font-weight: 600; color: var(--navy-2); }
.series-overview { max-width: 480px; }
.series-overview-sub { color: var(--text-faint); font-size: 13px; margin: 0 0 14px; line-height: 1.5; }
.series-overview-list { display: flex; flex-direction: column; gap: 7px; }
.series-occ { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 13px; background: #f7f8fb; border: 1px solid var(--line); border-radius: var(--r-sm); }
.series-occ.next { border-color: var(--amber); background: rgba(245, 158, 11, .1); }
.series-occ.skipped { opacity: .6; }
.series-occ.skipped .series-occ-date { text-decoration: line-through; }
.series-occ-actions { display: flex; gap: 6px; flex: none; }
.series-occ-actions .btn { padding: 4px 10px; font-size: 12px; }
.series-occ-tag.changed { color: var(--navy-2); }
.series-occ-tag.skipped { color: var(--muted); }
.series-occ-tag.conflict { color: #8a4b00; background: rgba(245, 158, 11, .18); border: 1px solid rgba(245, 158, 11, .55); border-radius: 999px; padding: 2px 8px; cursor: help; }
.series-occ-date { color: var(--navy-2); font-weight: 600; font-size: 13.5px; }
.series-occ-time { color: var(--text-faint); font-size: 12.5px; margin-top: 1px; }
.series-occ-tag { color: var(--amber-hover); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; flex: none; }
.series-occ-more { color: var(--text-faint); font-size: 12.5px; text-align: center; padding: 8px 0 2px; }
.choice-modal { max-width: 440px; padding: 24px; }
.choice-msg { color: var(--navy-2); font-size: 15px; line-height: 1.5; margin: 0 0 18px; }
.choice-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 20px; border-top: 1px solid var(--line);
}
.foot-left, .foot-right { display: flex; gap: 8px; }

/* ---------- Einstellungen / Integrationen ---------- */
.settings-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--navy-2); flex: 1; }
.settings-intro { color: var(--text-body); font-size: 14px; line-height: 1.55; margin: 6px 2px 18px; }
.settings-note { color: var(--text-faint); font-size: 12.5px; line-height: 1.5; margin: 16px 2px 6px; }
.integration {
  display: flex; align-items: center; gap: 14px;
  background: #f7f8fb; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 15px 16px; margin: 12px 0;
}
.integration-icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--white); border: 1px solid var(--line);
}
.integration-body { flex: 1; min-width: 0; }
.integration-name { font-weight: 600; font-size: 14.5px; color: var(--navy-2); }
.integration-desc { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; line-height: 1.45; }
.integration-status { font-size: 12px; font-weight: 600; color: var(--text-faint); margin-top: 7px; }
.cal-pick-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cal-pick-row select { flex: 1; max-width: 320px; }
.cal-pick-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; flex: none; }
.cal-pick-head { margin-top: 12px; }
.cal-conflict-list { display: flex; flex-direction: column; gap: 6px; margin-top: 7px; }
.cal-conflict { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cal-conflict input { width: 15px; height: 15px; accent-color: var(--amber); cursor: pointer; }
.cal-conflict span { font-size: 13px; color: var(--navy-2); }
/* Import-Auswahl (Google-Termine → Pensum) */
.cal-import-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.cal-import-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.cal-import-item:hover { border-color: var(--amber); background: #fcfcfd; }
.cal-import-item input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--amber); cursor: pointer; flex: none; }
.cal-import-title { font-size: 14px; font-weight: 600; color: var(--navy-2); }
.cal-import-meta { font-size: 12.5px; color: var(--text-faint); margin-top: 1px; }
/* Freischaltungs-Hinweis (Soft-Launch): Google-Anbindung ist auf 100 Nutzer begrenzt */
.access-note {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 15px; margin: 4px 0 2px;
  background: #f0f5ff; border: 1px solid rgba(91, 134, 201, .30); border-radius: var(--r-md);
}
.access-note-icon { font-size: 17px; flex: none; line-height: 1.4; }
.access-note-body { font-size: 13px; color: var(--navy-2); line-height: 1.5; }
.access-note-body strong { display: block; margin-bottom: 2px; }
.access-note-link, a.access-note-link { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--amber-hover); text-decoration: none; }
.access-note-link:hover { text-decoration: underline; }
.settings-num { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.settings-num input { width: 68px; text-align: center; }
.settings-num span { font-size: 12.5px; color: var(--text-faint); font-weight: 600; }
.integration.connected { border-color: rgba(31, 138, 91, .4); background: rgba(31, 138, 91, .06); }
.integration.connected .integration-status { color: #17754c; }
.settings-legal {
  font-size: 12.5px; color: var(--text-faint); margin: 2px 2px 14px; display: flex; gap: 8px; align-items: center;
}
.settings-legal a { color: var(--navy-2); text-decoration: underline; text-underline-offset: 2px; }
.settings-legal a:hover { color: var(--amber-hover); }

/* ---------- Datenschutz-Modal ---------- */
.legal-text { padding-bottom: 18px; }
.legal-text h3 {
  font-size: 13.5px; font-weight: 700; color: var(--navy-2); margin: 20px 0 6px;
  text-transform: uppercase; letter-spacing: .4px;
}
.legal-text h3:first-child { margin-top: 4px; }
.legal-text p { font-size: 13.5px; line-height: 1.6; color: var(--text-body); margin: 0 0 4px; }
.legal-text a { color: var(--navy-2); text-decoration: underline; text-underline-offset: 2px; }
.legal-text a:hover { color: var(--amber-hover); }
.legal-text code {
  background: rgba(26, 50, 100, .06); border-radius: 4px; padding: 1px 5px; font-size: 12.5px;
}

/* ---------- Archiv ---------- */
.archive-view { flex: 1; min-height: 0; padding: 30px; max-width: 900px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; }
.archive-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex: none; }
.archive-head h2 { margin: 0; color: var(--navy-2); }
.archive-head-actions { display: flex; gap: 10px; }
.archive-list { display: flex; flex-direction: column; gap: 11px; flex: 1; min-height: 0; overflow-y: auto; padding: 2px 4px 20px 2px; }
.archive-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 16px; box-shadow: var(--shadow-card);
}
.archive-item .a-title s { color: var(--text-faint); font-weight: 500; }
.archive-item .a-title { color: var(--navy-2); font-weight: 600; }
.archive-item .a-meta { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.archive-actions { display: flex; gap: 8px; }
.archive-empty { color: var(--text-faint); text-align: center; padding: 46px; }
.series-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.series-badge {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-soft); flex: none;
}
.series-badge.queued { color: var(--muted); background: rgba(26, 50, 100, .05); }
.series-badge.active { color: var(--amber-hover); background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .45); }
.series-badge.serie { color: var(--navy-2); background: rgba(26, 50, 100, .08); }

/* ---------- Toast (Navy für Kontrast auf hellem Grund) ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); border: 1px solid rgba(245, 158, 11, .6);
  color: var(--white); padding: 12px 20px; border-radius: 999px;
  box-shadow: var(--shadow-lg); z-index: 80; font-size: 14px; font-weight: 500;
  animation: toast-in .18s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 900px) {
  body { height: auto; overflow: auto; }
  .board { grid-template-columns: 1fr; grid-template-rows: none; }
  .column { overflow: visible; min-height: auto; }
  .cards { overflow: visible; padding-bottom: 8px; }
  .column::before, .column::after { display: none; }
}
