/* ============================================================
   Martin's Personal Agent — Design System (aus Handoff portiert)
   Pink als präziser Akzent · cool-neutrale Flächen · kompakt
   ============================================================ */

:root {
  /* Brand */
  --pink-50:  oklch(0.97 0.02 350);
  --pink-100: oklch(0.93 0.06 350);
  --pink-200: oklch(0.86 0.12 351);
  --pink-300: oklch(0.76 0.19 352);
  --pink-500: oklch(0.62 0.255 353);   /* primary */
  --pink-600: oklch(0.56 0.255 354);
  --pink-700: oklch(0.49 0.23 355);

  /* Neutrals (cool slate) */
  --bg:       oklch(0.985 0.003 280);
  --bg-soft:  oklch(0.965 0.004 280);
  --surface:  #ffffff;
  --surface-2:oklch(0.985 0.003 280);
  --border:   oklch(0.92 0.006 280);
  --border-2: oklch(0.88 0.008 280);
  --ink:      oklch(0.27 0.02 281);
  --ink-2:    oklch(0.45 0.02 281);
  --ink-3:    oklch(0.60 0.016 281);
  --ink-4:    oklch(0.72 0.012 281);

  /* Semantic */
  --red:    oklch(0.60 0.21 24);
  --red-bg: oklch(0.95 0.04 24);
  --amber:    oklch(0.72 0.15 70);
  --amber-bg: oklch(0.95 0.05 80);
  --blue:    oklch(0.60 0.16 252);
  --blue-bg: oklch(0.95 0.03 252);
  --green:    oklch(0.62 0.15 155);
  --green-bg: oklch(0.95 0.04 155);
  --violet:  oklch(0.58 0.20 300);
  --cyan:    oklch(0.68 0.12 215);

  /* Radii */
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* Shadow */
  --sh-xs: 0 1px 2px oklch(0.3 0.02 281 / 0.05);
  --sh-sm: 0 1px 3px oklch(0.3 0.02 281 / 0.07), 0 1px 2px oklch(0.3 0.02 281 / 0.04);
  --sh-md: 0 4px 14px oklch(0.3 0.02 281 / 0.08), 0 2px 4px oklch(0.3 0.02 281 / 0.04);
  --sh-lg: 0 12px 32px oklch(0.3 0.02 281 / 0.12), 0 4px 8px oklch(0.3 0.02 281 / 0.05);
  --sh-pink: 0 6px 18px oklch(0.62 0.255 353 / 0.35);

  --grad-pink: linear-gradient(135deg, var(--pink-500), var(--pink-600));

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-size: 14px; line-height: 1.45;
}
a { color: var(--pink-600); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--pink-200); }
h1, h2, h3 { margin: 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: oklch(0.85 0.01 281); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: oklch(0.78 0.01 281); background-clip: content-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: auto 1fr; height: 100%; overflow: hidden; }

.sidebar {
  width: 240px; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; transition: width .22s cubic-bezier(.4,0,.2,1); overflow: hidden;
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .lbl,
.sidebar.collapsed .sb-brand-text,
.sidebar.collapsed .sb-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sb-user-text { display: none; }
.sidebar.collapsed .nav-item,
.sidebar.collapsed .sb-brand,
.sidebar.collapsed .sb-user { justify-content: center; gap: 0; padding-left: 0; padding-right: 0; }
.sidebar.collapsed .sb-section { padding-left: 8px; padding-right: 8px; }
.sb-brand { display: flex; align-items: center; gap: 11px; padding: 16px 16px 14px; height: 60px; }
.sb-logo { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-pink); display: grid; place-items: center; color: #fff; flex: none; box-shadow: var(--sh-pink); }
.sb-brand-text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.sb-brand-text b { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.sb-brand-text span { font-size: 11px; color: var(--ink-4); font-weight: 600; }

.sb-section { padding: 14px 12px 4px; }
.sb-label { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; color: var(--ink-4); padding: 0 10px 7px; text-transform: uppercase; white-space: nowrap; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; border: none; background: none;
  padding: 9px 11px; border-radius: var(--r-md); color: var(--ink-2); font-size: 13.5px; font-weight: 600;
  text-align: left; position: relative; transition: background .12s, color .12s; white-space: nowrap;
}
.nav-item svg { flex: none; }
.nav-item:hover { background: var(--bg-soft); color: var(--ink); }
.nav-item.active { background: var(--grad-pink); color: #fff; box-shadow: var(--sh-pink); }
.nav-item.active:hover { color: #fff; }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 800; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--bg-soft); color: var(--ink-3); display: grid; place-items: center; }
.nav-item.active .nav-badge { background: rgba(255,255,255,.25); color: #fff; }
.nav-badge.alert { background: var(--red-bg); color: var(--red); }
.nav-item.active .nav-badge.alert { background: rgba(255,255,255,.25); color: #fff; }
.sb-spacer { flex: 1; }
.sb-foot { padding: 12px; border-top: 1px solid var(--border); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-md); white-space: nowrap; color: var(--ink); }
.sb-user:hover { background: var(--bg-soft); }
.sb-version { font-size: 10.5px; font-weight: 600; color: var(--ink-4); text-align: center; letter-spacing: .02em; margin: 8px 0 0; padding: 0; }
.avatar { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--violet), var(--pink-500)); color:#fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.sb-user-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sb-user-text b { font-size: 12.5px; font-weight: 700; }
.sb-user-text span { font-size: 11px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--bg); }
.topbar { height: 60px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 20px; border-bottom: 1px solid var(--border); background: oklch(0.985 0.003 280 / 0.8); backdrop-filter: blur(8px); }
.icon-btn { width: 36px; height: 36px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); transition: all .12s; flex: none; position: relative; }
.icon-btn:hover { border-color: var(--border-2); color: var(--ink); background: var(--bg-soft); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 99px; background: var(--pink-500); border: 1.5px solid var(--surface); }

.page-title { font-size: 17px; font-weight: 800; letter-spacing: -.015em; }
.page-sub { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }

/* Quick add */
.quickadd { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 4px 4px 4px 14px; transition: border-color .14s, box-shadow .14s; }
.quickadd:focus-within { border-color: var(--pink-300); box-shadow: 0 0 0 3px var(--pink-50); }
.quickadd input { flex: 1; border: none; outline: none; background: none; font-size: 13.5px; color: var(--ink); min-width: 0; }
.quickadd input::placeholder { color: var(--ink-4); }
.qa-mic { width: 32px; height: 32px; border-radius: 9px; border: none; background: var(--bg-soft); color: var(--ink-2); display: grid; place-items: center; transition: all .12s; }
.qa-mic:hover { background: var(--pink-50); color: var(--pink-600); }
.qa-mic.rec { background: var(--grad-pink); color: #fff; animation: pulse 1.3s infinite; }
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 var(--pink-200);} 50%{ box-shadow: 0 0 0 6px transparent;} }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: var(--r-md); font-weight: 700; font-size: 13px; padding: 8px 14px; border: 1px solid transparent; transition: all .13s; white-space: nowrap; color: var(--ink-2); background: var(--surface); }
.btn-primary { background: var(--grad-pink); color: #fff; box-shadow: var(--sh-pink); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--border-2); }
.btn-soft { background: var(--pink-50); color: var(--pink-700); border-color: transparent; }
.btn-soft:hover { background: var(--pink-100); }
.btn-danger { background: var(--surface); border-color: var(--border); color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: var(--r-sm); }

.scroll-area { flex: 1; overflow: auto; min-height: 0; }
.page { padding: 24px 28px 40px; max-width: 1500px; margin: 0 auto; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.card-pad { padding: 18px; }
.card-title { font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-4); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; line-height: 1.3; }
.badge-dot { width: 7px; height: 7px; border-radius: 99px; flex: none; }
.prio-dringend, .prio-urgent { background: var(--red-bg); color: var(--red); }
.prio-hoch, .prio-high { background: var(--amber-bg); color: oklch(0.52 0.13 60); }
.prio-normal { background: var(--blue-bg); color: var(--blue); }
.prio-niedrig, .prio-low { background: var(--bg-soft); color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); transition: all .12s; }
.chip:hover { border-color: var(--border-2); color: var(--ink); }
.chip.active { background: var(--grad-pink); color: #fff; border-color: transparent; box-shadow: var(--sh-pink); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.tag .badge-dot { width: 6px; height: 6px; }

.muted { color: var(--ink-3); }
.flash { padding: 11px 14px; border-radius: var(--r-md); margin-bottom: 14px; font-weight: 600; font-size: 13px; }
.flash.ok { background: var(--green-bg); color: oklch(0.42 0.12 155); }
.flash.err { background: var(--red-bg); color: var(--red); }
.spacer { height: 14px; }

.fade-in { animation: fade .28s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce { 0%,60%,100%{ transform: translateY(0); opacity:.4;} 30%{ transform: translateY(-5px); opacity:1;} }

/* Inputs */
.field { display: block; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 9px 12px; font-size: 13.5px; color: var(--ink); transition: border-color .14s, box-shadow .14s; }
.field:focus { outline: none; border-color: var(--pink-300); box-shadow: 0 0 0 3px var(--pink-50); }
.lbl { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px; }

/* ---------- Kanban ---------- */
.board-wrap { overflow-x: auto; overflow-y: hidden; padding: 16px 28px 24px; flex: 1; min-height: 0; }
.board-row { display: flex; gap: 16px; height: 100%; min-height: 0; align-items: flex-start; }
.kcol { width: 304px; flex: none; display: flex; flex-direction: column; min-height: 0; max-height: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-lg); transition: background .12s, box-shadow .12s, border-color .12s; }
.kcol.over { background: var(--pink-50); border-color: var(--pink-200); box-shadow: 0 0 0 3px var(--pink-100); }
.kcol-head[data-coldrag] { cursor: grab; touch-action: none; }
.kcol-head[data-coldrag]:active { cursor: grabbing; }
.kcol-placeholder { width: 304px; flex: none; align-self: stretch; min-height: 120px; border: 2px dashed var(--pink-300); border-radius: var(--r-lg); background: var(--pink-50); pointer-events: none; }
.kcol-ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .92; box-shadow: 0 14px 32px rgba(0,0,0,.20); border-radius: var(--r-lg); overflow: hidden; transform: rotate(1.5deg); }
.kcol-mv { width: 24px; height: 24px; border-radius: 7px; border: none; background: none; color: var(--ink-4); display: grid; place-items: center; cursor: pointer; }
.kcol-mv:hover:not(:disabled) { background: var(--surface); color: var(--ink-2); }
.kcol-mv:disabled { opacity: .25; cursor: default; }
.kcol-name { border-radius: 5px; padding: 1px 4px; margin: -1px -4px; }
.kcol-name:hover { background: var(--surface); }
.kcol-head { display: flex; align-items: center; gap: 9px; padding: 13px 14px 11px; }
.kcol-head b { font-size: 14px; font-weight: 800; }
.kcol-x { width: 26px; height: 26px; border-radius: 7px; border: none; background: none; color: var(--ink-4); display: grid; place-items: center; cursor: pointer; }
.kcol-x:hover { background: var(--surface); color: var(--ink-2); }
.kcol-body { flex: 1; overflow-y: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 9px; }
.kcol-new { width: 48px; flex: none; align-self: flex-start; min-height: 120px; border: 1.5px dashed var(--border-2); border-radius: var(--r-lg); background: none; color: var(--ink-4); display: grid; place-items: center; transition: all .12s; }
.kcol-new:hover { border-color: var(--pink-300); color: var(--pink-500); background: var(--pink-50); }

.task-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-xs); padding: 12px 13px; cursor: grab; transition: box-shadow .12s, transform .12s; border-left: 3px solid var(--border-2); }
.task-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.task-card.dragging { opacity: .4; }
.task-card.prio-l-urgent { border-left-color: var(--red); }
.task-card.prio-l-high { border-left-color: var(--amber); }
.task-card.prio-l-normal { border-left-color: var(--blue); }
.task-card.prio-l-low { border-left-color: var(--border-2); }
.tcheck { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-2); background: var(--surface); flex: none; padding: 0; display: grid; place-items: center; color: #fff; transition: all .12s; margin-top: 1px; -webkit-appearance: none; appearance: none; }
.tcheck:hover { border-color: var(--pink-500); }
.tcheck:checked, .tcheck.done { background: var(--grad-pink); border-color: transparent; }
.tcheck:checked::after { content: "✓"; font-size: 12px; font-weight: 900; }
.tc-title { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.task-card.done .tc-title { text-decoration: line-through; color: var(--ink-4); }
/* Fälligkeits-Tönung der ganzen Karte (nur offen): heute rot, morgen orange, übermorgen gelb */
.task-card.due-today { background: oklch(0.965 0.03 25); }
.task-card.due-tom   { background: oklch(0.965 0.045 70); }
.task-card.due-soon  { background: oklch(0.97 0.05 100); }
.task-card.due-today.prio-l-normal, .task-card.due-today.prio-l-low { border-left-color: var(--red); }
.task-card.due-tom.prio-l-normal,   .task-card.due-tom.prio-l-low   { border-left-color: oklch(0.7 0.16 60); }
.task-card.due-soon.prio-l-normal,  .task-card.due-soon.prio-l-low  { border-left-color: oklch(0.78 0.15 95); }
.task-card.done { opacity: .6; }
.task-card.done:hover { opacity: .85; }
.card-trash { flex: none; width: 24px; height: 24px; border: none; background: none; color: var(--ink-4); border-radius: 6px; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .12s, color .12s, background .12s; }
.task-card:hover .card-trash { opacity: .65; }
.card-trash:hover { opacity: 1 !important; color: var(--red); background: var(--red-bg); }
@media (hover: none) { .card-trash { opacity: .55; } }
.card-info { flex: none; width: 22px; height: 22px; border: none; background: none; color: var(--ink-4); border-radius: 6px; display: grid; place-items: center; cursor: pointer; opacity: .5; transition: opacity .12s, color .12s, background .12s; }
.task-card:hover .card-info { opacity: .85; }
.card-info:hover { opacity: 1 !important; color: var(--blue); background: var(--blue-bg); }
.card-info-tip { position: fixed; z-index: 2000; max-width: 320px; background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-lg, 0 12px 32px rgba(0,0,0,.18)); padding: 10px 12px; font-size: 12.5px; line-height: 1.5; pointer-events: none; }
.kcol-done { background: var(--green-bg); }
.kcol-done .kcol-head b { color: oklch(0.5 0.12 155); }
.tc-note { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.tc-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 9px; }
.kadd { display: flex; align-items: center; gap: 7px; width: 100%; padding: 10px 12px; border: 1.5px dashed var(--border-2); border-radius: var(--r-md); background: none; color: var(--ink-4); font-size: 12.5px; font-weight: 600; transition: all .12s; }
.kadd:hover { border-color: var(--pink-300); color: var(--pink-600); background: var(--pink-50); }

/* ---------- Toggle switch ---------- */
.switch { position: relative; width: 40px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border-2); border-radius: 99px; transition: background .18s; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 99px; background: #fff; box-shadow: var(--sh-sm); transition: transform .18s cubic-bezier(.4,0,.2,1); }
.switch input:checked + .track { background: var(--grad-pink); }
.switch input:checked + .track + .thumb, .switch input:checked ~ .thumb { transform: translateX(17px); }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md); padding: 3px; gap: 3px; }
.seg a, .seg button { border: none; background: none; padding: 6px 14px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.seg a.active, .seg button.active { background: var(--grad-pink); color: #fff; box-shadow: var(--sh-pink); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 99px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 9px; box-shadow: var(--sh-lg); z-index: 100; }
.toast .ic { color: var(--green); display: grid; }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: var(--r-xl); padding: 22px; box-shadow: var(--sh-lg); width: 480px; max-width: 92vw; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: oklch(0.3 0.02 281 / 0.4); backdrop-filter: blur(3px); }

/* ---------- Kalender ---------- */
.cal-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cal-head { display: flex; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 2; }
.cal-gut { width: 52px; flex: none; }
.cal-dh { flex: 1; text-align: center; padding: 7px 4px; border-left: 1px solid var(--border); font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.cal-dh b { display: inline-block; font-size: 16px; color: var(--ink); font-weight: 800; min-width: 27px; line-height: 27px; margin-top: 2px; }
.cal-dh.today b { background: var(--grad-pink); color: #fff; border-radius: 8px; }
.cal-allday { display: flex; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cal-allday .ad-gut { width: 52px; flex: none; font-size: 10px; color: var(--ink-4); padding: 6px 6px 0 0; text-align: right; }
.cal-allday .ad { flex: 1; border-left: 1px solid var(--border); padding: 5px; display: flex; flex-direction: column; gap: 3px; min-height: 26px; }
.cal-chip { font-size: 10.5px; font-weight: 600; border-radius: 6px; padding: 2px 7px; border-left: 3px solid; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-body { display: flex; position: relative; }
.cal-gutter { width: 52px; flex: none; }
.cal-hour { font-size: 10.5px; color: var(--ink-4); text-align: right; padding-right: 7px; padding-top: 2px; box-sizing: border-box; }
.cal-col { flex: 1; position: relative; border-left: 1px solid var(--border); }
.cal-ev { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 3px 8px; font-size: 11.5px; overflow: hidden; border-left: 3px solid; box-shadow: var(--sh-sm); line-height: 1.3; }
.cal-ev b { font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev span { font-size: 10px; opacity: .8; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-m365 { background: var(--blue-bg); border-color: var(--blue); color: oklch(0.42 0.1 252); }
.src-google { background: oklch(0.95 0.04 150); border-color: var(--green); color: oklch(0.4 0.1 155); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--pink-500); z-index: 3; }
.cal-now::before { content: ''; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink-500); }
.cal-agent { width: 320px; flex: none; border-left: 1px solid var(--border); background: var(--surface); overflow: auto; padding: 16px; }
.cal-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); }

/* ---------- Login (zentriert) ---------- */
.center-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1100px 460px at 50% -10%, var(--pink-50), var(--bg) 60%); }
.login-card { width: 360px; }

/* ---------- Mobile-Schublade & Hamburger (Basis: versteckt) ---------- */
.mobile-menu-btn { display: none; width: 38px; height: 38px; flex: none; border: none; background: none; color: var(--ink-2); border-radius: 9px; place-items: center; }
.mobile-menu-btn:hover { background: var(--bg-soft); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(20,16,30,.42); z-index: 90; opacity: 0; transition: opacity .2s; }
.sidebar-backdrop.show { opacity: 1; }

/* ============================================================
   Responsive — Tablet/Phone (≤ 860px)
   ============================================================ */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }

  /* Sidebar → Off-Canvas-Schublade */
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 270px; max-width: 84vw; z-index: 100; overflow-y: auto;
    transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 12px 40px rgba(20,16,30,.28); }
  .sidebar.mobile-open { transform: none; }
  .sidebar.collapsed { width: 270px; }           /* Collapse-Zustand auf Mobile ignorieren */
  .sidebar.collapsed .lbl, .sidebar.collapsed .sb-brand-text, .sidebar.collapsed .sb-label,
  .sidebar.collapsed .nav-badge, .sidebar.collapsed .sb-user-text { display: revert; }
  .sidebar.collapsed .nav-item, .sidebar.collapsed .sb-brand, .sidebar.collapsed .sb-user { justify-content: flex-start; }
  .js-sidebar-toggle { display: none; }           /* Desktop-Einklappen ausblenden */
  .sidebar-backdrop.show { display: block; }
  .mobile-menu-btn { display: grid; }

  /* Topbar entschlacken */
  .topbar { height: 56px; padding: 0 12px; gap: 10px; }
  .topbar .quickadd, .topbar .icon-btn { display: none; }
  .page-title { font-size: 15.5px; }
  .page-sub { font-size: 11.5px; }

  /* Inhaltsflächen */
  .page { padding: 16px 14px 36px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Kanban: eine Spalte fast bildschirmbreit, horizontal wischen */
  .board-wrap { padding: 12px 12px 20px; scroll-snap-type: x proximity; }
  .kcol { width: 84vw; max-width: 330px; scroll-snap-align: start; }
  .kcol-placeholder { width: 84vw; max-width: 330px; }

  /* Dashboard-Grids stapeln */
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .home-grid { grid-template-columns: 1fr !important; }

  /* Kalender: Seiten-Agenda ausblenden, Stundenraster volle Breite */
  .cal-agent { display: none; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .page { padding: 14px 11px 32px; }
}
