/* ===== Loggimo Theme ===== */
:root {
  --bg: #f4f5fa;
  --bg-soft: #eceef6;
  --card: #ffffff;
  --ink: #1b1f2a;
  --muted: #6b7280;
  --line: #e6e8ef;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef0ff;
  --ok: #059669;
  --ok-soft: #e7f6ee;
  --danger: #dc2626;
  --danger-soft: #fde8e8;
  --warn: #d97706;
  --warn-soft: #fdf0dc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,18,30,.04), 0 6px 20px rgba(16,18,30,.05);
}
html[data-theme="dark"] {
  --bg: #0f1117;
  --bg-soft: #161a23;
  --card: #1a1f2b;
  --ink: #e8eaf0;
  --muted: #9aa3b2;
  --line: #2a3140;
  --brand: #818cf8;
  --brand-dark: #6366f1;
  --brand-soft: #20243a;
  --ok: #34d399;
  --ok-soft: #142a22;
  --danger: #f87171;
  --danger-soft: #2c1a1c;
  --warn: #fbbf24;
  --warn-soft: #2a2316;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--card); padding: 9px 22px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.3px; display: inline-flex; align-items: center; }
.brand-logo { height: 54px; display: block; border-radius: 8px; }
.topnav { flex: 1; display: flex; justify-content: center; gap: 6px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topnav a { color: var(--muted); font-weight: 600; font-size: 14px; padding: 7px 13px; border-radius: 9px; transition: background .15s ease, color .15s ease; }
.topnav a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
/* einfache Text-Links rechts (Vorschau, Login, Abmelden) */
.topbar-actions a:not(.btn):not(.account-chip) { color: var(--muted); font-weight: 600; font-size: 14px; }
.topbar-actions a:not(.btn):not(.account-chip):hover { color: var(--ink); text-decoration: none; }
.topbar-logout:hover { color: var(--danger) !important; }
/* Konto-Chip mit Avatar */
.account-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 22px; padding: 4px 13px 4px 4px; text-decoration: none !important; transition: border-color .15s ease; }
.account-chip:hover { border-color: var(--brand); }
.ac-ava { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 28px; }
.ac-mail { font-size: 13px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topslogan { color: var(--ink); font-weight: 700; font-size: 18px; white-space: nowrap; transition: opacity .35s ease, transform .35s ease; }
@media (max-width: 720px) {
  .brand-logo { height: 44px; }
  .topnav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 16px; flex-wrap: wrap; }
  .topslogan { display: none; }
}
.theme-toggle {
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink);
  width: 36px; height: 36px; border-radius: 9px; cursor: pointer; font-size: 16px;
}

/* Layout */
.container { max-width: 1000px; margin: 30px auto; padding: 0 18px; }
h1 { margin: 0 0 6px; font-size: 27px; letter-spacing: -.4px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.page-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom: 18px; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff !important;
  padding: 10px 16px; border-radius: 10px; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 600; text-decoration: none !important; transition: background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-ghost { background: var(--bg-soft); color: var(--ink) !important; border: 1px solid var(--line); }
.btn-danger { background: var(--danger-soft); color: var(--danger) !important; }

/* Forms */
label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; font-family: inherit; background: var(--card); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.field-group { margin-bottom: 16px; }
.chk { font-weight: 400; display: inline-flex; align-items: center; gap: 6px; }
.chk input, .field-row input[type=checkbox] { width: auto; }

/* Auth box */
.auth { max-width: 410px; margin: 6vh auto; }

/* Messages */
.errors { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger);
  padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; }
.errors ul { margin: 0; padding-left: 18px; }

/* ===== Dashboard widgets ===== */
.widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.widget {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); display: block; color: var(--ink) !important;
  text-decoration: none !important; transition: transform .12s, border-color .12s;
}
.widget:hover { transform: translateY(-2px); border-color: var(--brand); }
.widget .w-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.widget .w-ico { font-size: 26px; }
.widget .w-name { font-weight: 700; font-size: 16px; }
.widget .w-meta { color: var(--muted); font-size: 12px; margin-left: auto; }
.widget .w-value { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin: 6px 0 2px; }
.widget .w-value small { font-size: 14px; font-weight: 600; color: var(--muted); }
.widget .w-spark { height: 46px; margin-top: 8px; position: relative; }
.widget .w-spark canvas { display: block; width: 100% !important; height: 100% !important; }
.widget .w-empty { color: var(--muted); font-size: 13px; padding: 10px 0; }

/* Badges & goals */
.badge { display:inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-bad { background: var(--danger-soft); color: var(--danger); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.goalbar { height: 7px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; margin-top: 8px; }
.goalbar > span { display:block; height:100%; border-radius:6px; background: var(--brand); }
.goalbar.ok > span { background: var(--ok); }
.goalbar.bad > span { background: var(--danger); }

/* Field builder */
.field-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr auto auto;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.field-row .req { font-weight: 400; font-size: 13px; white-space: nowrap; }
.field-row .remove {
  background: var(--danger-soft); color: var(--danger); border: 0; border-radius: 8px;
  width: 36px; height: 36px; cursor: pointer; font-size: 15px;
}
@media (max-width: 680px) { .field-row { grid-template-columns: 1fr 1fr; } }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; cursor: default; }
th a { color: var(--muted); }
tbody tr:hover { background: var(--bg-soft); }

/* Inputs grid for entry form */
.grid-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.stat { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.stat .lbl { color: var(--muted); font-size: 12px; }
.stat .big { font-size: 22px; font-weight: 800; }

/* Toolbar (search/filter) */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.toolbar .field-group { margin: 0; }
.toolbar .grow { flex: 1; min-width: 160px; }

/* Hero / landing */
.hero { text-align: center; padding: 46px 0 10px; }
.hero h1 { font-size: 42px; line-height: 1.08; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin: 14px auto 24px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; margin-top: 30px; }
/* Haupt-Feature-Raster: 8 Kacheln immer in geraden Reihen (4×2 bzw. 2×4) */
@media (min-width: 920px) { .feat-main { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 560px) and (max-width: 919px) { .feat-main { grid-template-columns: repeat(2, 1fr); } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature .fi { font-size: 26px; }
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; margin-top: 16px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--brand); }
.plan .price { font-size: 30px; font-weight: 800; margin: 8px 0; }

.foot { text-align: center; color: var(--muted); padding: 30px; font-size: 13px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.inline-form { display: inline; }
.tracker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.ico { font-size: 30px; }

/* ===== Kanban Board ===== */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.column {
  min-width: 270px; max-width: 270px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; flex: 0 0 auto;
}
.col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.col-head strong { flex: 1; }
.col-menu { list-style: none; cursor: pointer; padding: 2px 8px; border-radius: 7px; background: var(--card); border: 1px solid var(--line); }
.card-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 11px; margin-bottom: 9px; box-shadow: var(--shadow);
}
.card-item[draggable="true"] { cursor: grab; }
.card-item.dragging { opacity: .4; cursor: grabbing; }
.col-cards { min-height: 24px; }
.card-item.done { opacity: .6; }
.card-item.done .ci-title { text-decoration: line-through; }
.card-item.is-hidden, .canvas-card.is-hidden, .column.is-hidden { border-style: dashed !important; }
.card-item.is-hidden, .canvas-card.is-hidden { opacity: .72; }
.hide-tag { margin-left: 4px; font-size: 12px; }
.ci-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.ci-notes { font-size: 12px; margin-top: 5px; }
.ci-actions { display: flex; gap: 3px; margin-top: 8px; flex-wrap: wrap; }
.ci-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--ink) !important; cursor: pointer; font-size: 12px;
  text-decoration: none !important;
}
.ci-btn:hover { border-color: var(--brand); }
.ci-btn[disabled] { opacity: .3; cursor: default; }
.add-card input { font-size: 14px; background: transparent; border: 1px dashed var(--line); }
.add-card input:focus { background: var(--card); border-style: solid; }

/* ===== Karten-Editor: Farben & Checkliste ===== */
.color-swatches { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.swatch { cursor: pointer; line-height: 0; }
.swatch input { display: none; }
.swatch span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 13px;
}
.swatch input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatch-btn { width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-size: 12px; line-height: 1; padding: 0; }
.swatch-btn.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.tool-active { border-color: var(--brand) !important; color: var(--brand) !important; }
.content-picks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.content-picks label { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.content-picks input { width: auto; }

/* Zeichnen-Karte */
#drawBlock canvas {
  width: 100%; max-width: 760px; aspect-ratio: 760 / 420; height: auto;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  touch-action: none; cursor: crosshair; display: block;
}
.draw-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.draw-colors { display: inline-flex; gap: 5px; }
.dc { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card); cursor: pointer; padding: 0; box-shadow: 0 0 0 1px var(--line); }
.dc.on { outline: 2px solid var(--ink); outline-offset: 1px; }
#drawErase.on { border-color: var(--brand); color: var(--brand); }
.draw-tools select { width: auto; }
.item-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.item-row .remove {
  background: var(--danger-soft); color: var(--danger); border: 0;
  border-radius: 8px; width: 34px; height: 34px; cursor: pointer;
}

/* Checkliste auf den Karten */
.ci-check { list-style: none; padding: 0; margin: 7px 0 0; }
.ci-check li { margin-bottom: 3px; }
.ci-check .tog {
  display: flex; gap: 6px; align-items: flex-start; width: 100%;
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  font-size: 12px; color: var(--ink); font-family: inherit;
}
.ci-check .box {
  flex: 0 0 auto; width: 14px; height: 14px; border: 1.4px solid var(--line);
  border-radius: 4px; margin-top: 1px; text-align: center; line-height: 12px; font-size: 11px;
}
.ci-check li.on .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.ci-check li.on .txt { text-decoration: line-through; color: var(--muted); }
.ci-progress { font-size: 11px; color: var(--muted); margin-top: 5px; }
.cc-pad { padding: 0 11px; }
.card-notes { font-size: 12px; margin-top: 6px; }
.card-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 12px; font-weight: 600; color: var(--brand); word-break: break-all; }
.card-link span { text-decoration: underline; }
.card-img { display: block; width: 100%; border-radius: 8px; margin-top: 8px; border: 1px solid var(--line); }
/* Mal-Tafel-Kachel: Vorschau + Öffnen-Hinweis */
.card-wb { display: block; position: relative; margin-top: 8px; text-decoration: none; }
.card-wb .wb-preview { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.card-wb .wb-open {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  background: rgba(17,20,28,.82); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px; opacity: 0; transition: opacity .15s;
  pointer-events: none; white-space: nowrap;
}
.card-wb:hover .wb-open { opacity: 1; }
.wb-live {
  margin-top: 6px; background: var(--warn-soft); color: var(--warn);
  display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  animation: wbpulse 1.2s ease-in-out infinite;
}
@keyframes wbpulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.card-video { position: relative; margin-top: 8px; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.card-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.card-code {
  margin: 8px 0 0; background: #0f1117; color: #e8eaf0; border-radius: 8px;
  padding: 8px 10px; font-size: 12px; line-height: 1.45; overflow: auto; max-height: 220px;
  white-space: pre-wrap; word-break: break-word; font-family: Consolas, "Courier New", monospace;
}

/* Karten-Palette */
.palette { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.palette-btn {
  text-align: left; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 14px; color: var(--ink);
}
.palette-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Volle Mal-Seite */
.draw-page { display: flex; flex-direction: column; height: 100vh; }
.draw-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.draw-bar input[name="title"] { width: 220px; }
.draw-stage { flex: 1; overflow: auto; background: var(--bg-soft); display: flex; justify-content: center; align-items: flex-start; padding: 16px; }
.draw-page #wbCanvas {
  width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 90px);
  background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: crosshair;
  touch-action: none; box-shadow: var(--shadow);
}

/* Haftnotiz-Look */
.canvas-card.sticky, .card-item.sticky { background: #fff7cc; border-color: #f3e08a; }
.canvas-card.sticky .cc-head { background: #ffefa3; border-bottom-color: #f3e08a; }

/* Notiz-Info-Symbol mit Hover-Tooltip */
.note-info { position: relative; display: inline-flex; cursor: help; margin-top: 7px; outline: none; }
.ni-icon {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--brand);
  color: var(--brand); font-size: 12px; font-weight: 700; font-style: italic;
  font-family: Georgia, "Times New Roman", serif; display: inline-flex;
  align-items: center; justify-content: center; line-height: 1;
}
.note-info:hover .ni-icon, .note-info:focus .ni-icon { background: var(--brand); color: #fff; }
.note-pop {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 60;
  background: #1f2330; color: #fff; padding: 8px 10px; border-radius: 8px;
  font-size: 12px; line-height: 1.45; width: max-content; max-width: 230px;
  box-shadow: 0 8px 22px rgba(0,0,0,.3); display: none;
}
.note-info:hover .note-pop, .note-info:focus .note-pop, .note-info:focus-within .note-pop { display: block; }

/* ===== Pinnwand / Canvas ===== */
.canvas {
  position: relative;
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--card);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  overflow: auto;
}
.canvas-card {
  position: absolute;
  width: 210px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0 0 8px;
  user-select: none;
}
.canvas-card.done { opacity: .6; }
.canvas-card.done .cc-head span { text-decoration: line-through; }
.canvas-card.dragging { box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 50; cursor: grabbing; }
.cc-head {
  display: flex; gap: 6px; align-items: center;
  font-weight: 600; font-size: 14px; padding: 9px 11px;
  cursor: grab; border-bottom: 1px solid var(--line);
  background: var(--brand-soft); border-radius: 10px 10px 0 0;
}
.cc-head span { flex: 1; }
.cc-body { font-size: 12px; padding: 8px 11px 0; }
.canvas-card .badge { margin: 6px 0 0 11px; }
.cc-actions { display: flex; gap: 4px; padding: 8px 11px 0; }

/* ===== Verbindungslinien ===== */
.conn-svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.conn-line { stroke: #6366f1; stroke-width: 2.5; fill: none; }
.conn-temp { stroke-dasharray: 5 4; }
.conn-del { fill: var(--card); stroke: var(--danger); stroke-width: 1.5; pointer-events: all; cursor: pointer; }
.conn-x { fill: var(--danger); font-size: 13px; text-anchor: middle; font-weight: 700; pointer-events: none; user-select: none; }
.conn-handle {
  position: absolute; right: -11px; top: 14px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; cursor: crosshair; opacity: .45; transition: opacity .12s, transform .12s; z-index: 4;
  box-shadow: 0 1px 5px rgba(0,0,0,.3);
}
.canvas-card:hover .conn-handle { opacity: 1; transform: scale(1.1); }
.canvas-empty { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.mode-pick {
  display: block; border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  cursor: pointer; font-weight: 400;
}
.mode-pick strong { display: block; margin: 4px 0; }
.mode-pick input { width: auto; margin-right: 6px; }

/* ===== Board-Leinwand (Pan-Fläche + Werkzeugleiste) ===== */
.board-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
/* Modus-Label (Kanban/Pinnwand) + geteilt-Hinweis */
.board-mode { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px; background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.board-mode.is-shared { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.board-hint { font-size: 12px; }
/* Aktions-Chips oben rechts (Kalender / Papierkorb / Verlauf) */
.board-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.board-action { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 10px; background: var(--card); color: var(--ink) !important;
  border: 1px solid var(--line); text-decoration: none !important; line-height: 1;
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease; }
.board-action .ba-ico { font-size: 15px; line-height: 1; }
.board-action:hover { border-color: var(--accent, #6366f1); color: var(--accent, #6366f1) !important;
  background: var(--bg-soft); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(15, 23, 42, .08); }
@media (max-width: 640px) {
  .board-actions { width: 100%; margin-left: 0; }
  .board-hint { display: none; }
}
.board-wrap {
  position: relative; width: 100vw; left: 50%; margin-left: -50vw;
  height: calc(100vh - 150px); min-height: 460px; display: flex;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.board-tools {
  flex: 0 0 58px; width: 58px; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0;
}
.tool {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--ink); display: flex; align-items: center;
  justify-content: center; font-size: 18px; cursor: pointer; text-decoration: none !important;
}
.tool:hover { border-color: var(--brand); color: var(--brand); }
.tool-danger:hover { border-color: var(--danger); color: var(--danger); }
.tool-dd { position: relative; }
.tool-dd > summary { list-style: none; }
.tool-dd > summary::-webkit-details-marker { display: none; }
.board-tools .dd-pop { left: calc(100% + 8px); top: 0; right: auto; }

/* Ausgeklappte Werkzeugleiste mit Beschriftung (gut für neue Nutzer) */
.board-tools.is-expanded { flex: 0 0 196px; width: 196px; align-items: stretch; padding: 12px 10px; }
.board-tools.is-expanded .tool-dd,
.board-tools.is-expanded > a.tool,
.board-tools.is-expanded > button.tool,
.board-tools.is-expanded > form.inline-form { width: 100%; }
.board-tools.is-expanded .tool {
  width: 100%; justify-content: flex-start; gap: 10px; padding: 0 12px; font-size: 17px;
}
.board-tools.is-expanded .tool::after {
  content: attr(data-label); font-size: 13px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.board-tools.is-expanded .tool:hover::after { color: var(--brand); }
.board-tools.is-expanded .tool-danger:hover::after { color: var(--danger); }
.board-tools.is-expanded .tools-toggle::after { color: var(--muted); }

/* Team-Panel */
.team-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.team-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.team-list .team-mail { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 26px;
  overflow: hidden;
}
/* Profilbilder füllen ihre runden Avatar-Container randlos aus */
.ava img, .ac-ava img, .cmt-ava img, .profile-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%;
}
.profile-avatar {
  width: 88px; height: 88px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700;
  flex: 0 0 88px; overflow: hidden;
}
/* Rechnungsdaten-Karte hervorheben, wenn von der Pro-Buchung hierher geleitet */
.billing-highlight { border: 2px solid var(--brand); box-shadow: 0 0 0 4px var(--brand-soft, rgba(99,102,241,.15)); }
.team-msg { font-size: 12px; background: var(--ok-soft); color: var(--ok); padding: 6px 8px; border-radius: 8px; margin: 6px 0 0; }
.team-avatars { display: inline-flex; align-items: center; }
.team-avatars .ava { position: relative; margin-left: -7px; border: 2px solid var(--card); width: 28px; height: 28px; flex-basis: 28px; opacity: .5; }
.team-avatars .ava:first-child { margin-left: 0; }
.team-avatars .ava.online { opacity: 1; }
.team-avatars .ava.online::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--ok); border: 2px solid var(--card);
}

/* Live-Banner: Änderungen im Team verfügbar */
.live-banner {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 9999;
  background: var(--brand); color: #fff; border: none; border-radius: 24px;
  padding: 11px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 26px rgba(0,0,0,.28); animation: wbpulse 1.6s ease-in-out infinite;
}
.live-banner:hover { filter: brightness(1.08); }

.board-stage {
  flex: 1; position: relative; overflow: auto; background: var(--bg);
  cursor: grab; touch-action: none;
}
.board-stage.panning { cursor: grabbing; }
/* Bild per Drag&Drop: Hervorhebung der Ablagefläche */
.board-stage.drop-target { outline: 3px dashed var(--brand); outline-offset: -8px; }
.board-stage.drop-target::after {
  content: "🖼  Bild hier ablegen"; position: absolute; left: 50%; top: 18px;
  transform: translateX(-50%); z-index: 40; pointer-events: none;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 20px; box-shadow: var(--shadow);
}
.board-surface {
  position: relative; width: 3200px; height: 2200px;
  background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
}
.board-content {
  position: relative; width: 3200px; height: 2200px; transform-origin: 0 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
}
.zoom-ctl {
  position: absolute; left: 70px; bottom: 14px; z-index: 25;
  display: flex; align-items: center; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 4px 6px; box-shadow: var(--shadow);
  transition: left .16s ease;
}
/* Aufgeklappte Werkzeugleiste (196px) ist breiter → Zoom-Fenster nach rechts neben
   die Leiste rücken, damit es nicht mehr über dem Löschen-Button liegt. */
.board-tools.is-expanded ~ .zoom-ctl { left: 208px; }
.zoom-ctl button {
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--ink); cursor: pointer; font-size: 16px; line-height: 1;
}
.zoom-ctl button:hover { border-color: var(--brand); color: var(--brand); }
.zoom-ctl span { min-width: 44px; text-align: center; color: var(--muted); font-size: 13px; }
.board-surface .column { position: absolute; box-shadow: var(--shadow); }
@keyframes loggimoFlash { 0%, 100% { box-shadow: var(--shadow); } 35% { box-shadow: 0 0 0 3px var(--brand); } }
.board-surface .column.flash { animation: loggimoFlash 1.6s ease; }
.board-surface .col-head { cursor: grab; user-select: none; }
.board-surface .col-head:active { cursor: grabbing; }
.col-grip { color: var(--muted); font-size: 13px; }
.col-head.colored {
  margin: -12px -12px 10px -12px; padding: 12px; border-radius: 12px 12px 0 0;
}
.col-head.colored strong, .col-head.colored .muted, .col-head.colored .col-grip { color: #fff; }
.col-head.colored .col-menu { background: rgba(255,255,255,.22); color: #fff; border-color: transparent; }
.column.dragging { opacity: .85; box-shadow: 0 12px 34px rgba(0,0,0,.28); z-index: 40; }

/* Dropdowns (details) */
.dd { position: relative; display: inline-block; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; box-shadow: var(--shadow); min-width: 220px;
}
.column .dd-pop { right: auto; left: 0; }

/* ===== Inline-Bearbeiten: Titel direkt auf der Karte umbenennen (Doppelklick) ===== */
.cc-head > span, .ci-title { cursor: text; }
.cc-head > span[contenteditable="true"],
.ci-title[contenteditable="true"] {
  outline: 2px solid var(--brand);
  background: #fff; color: #111;
  border-radius: 5px; padding: 0 4px; min-width: 24px;
  white-space: pre-wrap; cursor: text;
}
/* „Noch leer"-Hinweis nicht anklickbar, damit der Doppelklick die Notiz erzeugt */
.canvas-empty { pointer-events: none; }

/* ===== Notiztext direkt auf der Karte (Doppelklick = bearbeiten) ===== */
.card-note {
  font-size: 13px; line-height: 1.45; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; margin-top: 7px; cursor: text;
}
.card-note.empty { margin-top: 0; min-height: 0; }
/* Leere Notiz: erst beim Überfahren der Karte ein dezenter „＋ Notiz"-Hinweis */
.canvas-card:hover .card-note.empty::before,
.card-item:hover .card-note.empty::before {
  content: "＋ Notiz \2026"; color: var(--muted); font-size: 12px; font-style: italic; opacity: .7;
}
.card-note[contenteditable="true"] {
  outline: 2px solid var(--brand); background: #fff; color: #111;
  border-radius: 6px; padding: 4px 6px; margin-top: 7px; min-height: 1.4em; cursor: text;
}
.card-note[contenteditable="true"]::before { content: none !important; }

/* ===== Link-Vorschau (Open Graph) ===== */
.card-linkprev {
  display: flex; flex-direction: column; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--bg-soft); text-decoration: none !important;
}
.card-linkprev:hover { border-color: var(--brand); }
.card-linkprev .lp-img {
  width: 100%; height: 120px; object-fit: cover; display: block; background: var(--line);
}
.card-linkprev .lp-meta { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.card-linkprev .lp-title {
  font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-linkprev .lp-host { font-size: 11px; color: var(--muted); }

/* ===== Unter-Board-Karte (Boards-in-Boards) ===== */
.card-subboard {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--brand-soft); text-decoration: none !important;
}
.card-subboard:hover { border-color: var(--brand); }
.card-subboard .sb-ico { font-size: 22px; flex: 0 0 auto; }
.card-subboard .sb-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.card-subboard .sb-name { font-weight: 700; font-size: 13px; color: var(--brand); }
.card-subboard .sb-meta { font-size: 11px; color: var(--muted); }

/* Breadcrumb über dem Board */
.board-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0 0; font-size: 14px; }
.board-crumbs a { color: var(--muted); font-weight: 600; }
.board-crumbs a:hover { color: var(--brand); text-decoration: none; }
.board-crumbs .crumb-sep { color: var(--line); }
.board-crumbs .crumb-cur { font-weight: 700; }

/* Kommentar-Zähler auf der Karte */
.card-cmt { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none !important; }
.card-cmt:hover { color: var(--brand); }

/* ===== Kommentare (Karten-Editor) ===== */
.cmt-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cmt { display: flex; gap: 10px; }
.cmt-ava { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 30px; }
.cmt-body { flex: 1; min-width: 0; }
.cmt-head { display: flex; align-items: center; gap: 8px; }
.cmt-text { font-size: 14px; line-height: 1.5; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.cmt-form { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.cmt-form textarea { flex: 1; }

/* ===== Rechtsseiten (Impressum / Datenschutz) & Konto ===== */
.legal { max-width: 760px; margin: 24px auto; line-height: 1.6; }
.legal h1 { margin-top: 0; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }
.account-wrap { max-width: 920px; margin: 24px auto; }
.account-wrap h2 { font-size: 18px; }
.danger-zone { border-color: var(--danger); }
.danger-zone h2 { color: var(--danger); }

/* Konto-Hero */
.acc-hero {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--brand-soft), var(--card));
  border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; margin-bottom: 20px;
}
.acc-hero-ava.profile-avatar { width: 76px; height: 76px; flex-basis: 76px; font-size: 30px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.acc-hero-info { flex: 1; min-width: 200px; }
.acc-hero-info h1 { margin: 0 0 2px; font-size: 24px; }
.acc-hero-mail { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.acc-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-hero-action { margin-left: auto; }
.acc-hero .sub-status { margin-top: 10px; }

/* Konto-Karten-Grid */
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.acc-grid .acc-card:first-child,
.acc-grid .acc-card:nth-child(2) { grid-row: span 1; }
.acc-card { margin: 0; }
.acc-card-title { margin: 0 0 14px; font-size: 17px; }
.acc-profile-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 6px; }
.profile-avatar-sm { width: 64px; height: 64px; flex-basis: 64px; font-size: 26px; }
.acc-profile-fields { flex: 1; min-width: 180px; }
.acc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-two-zip { grid-template-columns: 130px 1fr; }
@media (max-width: 760px) {
  .acc-grid { grid-template-columns: 1fr; }
  .acc-hero-action { margin-left: 0; width: 100%; }
}

/* ===== Admin / Kundenverwaltung ===== */
.admin-wrap { max-width: 1080px; margin: 24px auto; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; }
.admin-stats { display: flex; gap: 12px; }
.astat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; text-align: center; min-width: 72px; }
.astat-num { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.astat-lbl { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.astat-pro { border-color: var(--brand); background: var(--brand-soft); }
.admin-search { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.admin-search input[type=search] { flex: 1; min-width: 200px; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--brand-soft); }
.adm-user { display: flex; align-items: center; gap: 10px; }
.adm-user .ava { width: 34px; height: 34px; flex-basis: 34px; font-size: 14px; }
/* Übersichts-Dashboard */
.adm-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.dash-tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.dash-tile .dt-num { font-size: 26px; font-weight: 800; line-height: 1.1; }
.dash-tile .dt-lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 5px; }
.dash-tile .dt-sub { font-size: 12px; margin-top: 7px; font-weight: 600; color: var(--muted); }
.dash-tile.dt-pro { border-color: var(--brand); }
.dash-tile.dt-pro .dt-sub { color: var(--brand); }
.dash-tile.dt-revenue { background: var(--brand-soft); border-color: var(--brand); }
.dash-tile.dt-revenue .dt-num { color: var(--brand); }
.dash-tile.dt-warn { border-color: var(--warn); }
.dash-tile.dt-warn .dt-num { color: var(--warn); }
.dash-tile .dt-sub a { color: var(--brand); text-decoration: none; }
/* Admin-Tab-Navigation */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 22px; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.admin-nav a {
  padding: 10px 16px; border-radius: 10px 10px 0 0; font-weight: 600; color: var(--muted);
  text-decoration: none; border: 1px solid transparent; border-bottom: none; margin-bottom: -1px;
}
.admin-nav a:hover { color: var(--ink); background: var(--brand-soft); }
.admin-nav a.active { color: var(--brand); background: var(--card); border-color: var(--line); }
/* Dashboard-Grid (Neueste + Schnellzugriff) */
.adm-grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .adm-grid2 { grid-template-columns: 1fr; } }
.adm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.adm-latest { list-style: none; margin: 0; padding: 0; }
.adm-latest li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.adm-latest li:last-child { border-bottom: none; }
.adm-latest .ava { width: 32px; height: 32px; flex-basis: 32px; font-size: 13px; }
.adm-latest-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-latest-info strong { font-size: 14px; }
.adm-latest-info .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-latest-date { font-size: 12px; flex: 0 0 auto; }
.adm-quick { display: flex; flex-direction: column; gap: 10px; }
.adm-quick a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; transition: all .15s;
}
.adm-quick a:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.adm-quick a span { font-size: 22px; flex: 0 0 auto; }
.adm-quick a small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.sub-status { font-size: 13px; padding: 8px 11px; border-radius: 8px; margin: 6px 0 0; line-height: 1.4; }
.sub-status.ok { background: var(--ok-soft); color: var(--ok); }
.sub-status.cancel { background: var(--warn-soft); color: var(--warn); }

/* Feedback-Liste (Inhaber-Ansicht) */
.fb-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fb-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.fb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.fb-msg { font-size: 14px; line-height: 1.5; }

/* ===== Dashboard: Status-Kacheln + Termine ===== */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.dstat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); text-decoration: none !important; color: var(--ink);
}
a.dstat:hover { border-color: var(--brand); }
.ds-lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ds-val { font-size: 26px; font-weight: 800; }
.ds-val small { font-size: 15px; font-weight: 500; color: var(--muted); }
.ds-sub { font-size: 12px; color: var(--muted); }

.due-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.due-item a {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none !important; color: var(--ink); border-left-width: 4px;
}
.due-item a:hover { background: var(--bg-soft); }
.due-item.overdue a { border-left-color: var(--danger); }
.due-item.today a   { border-left-color: var(--warn); }
.due-item.soon a    { border-left-color: var(--warn); }
.due-item.later a   { border-left-color: var(--line); }
.due-date { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.due-item.overdue .due-date { background: var(--danger-soft); color: var(--danger); }
.due-item.today .due-date, .due-item.soon .due-date { background: var(--warn-soft); color: var(--warn); }
.due-item.later .due-date { background: var(--bg-soft); color: var(--muted); }
.due-title { font-weight: 600; flex: 1; min-width: 120px; }
.due-board { font-size: 13px; color: var(--muted); }

/* „Erledigt"-Spalte: ✓-Badge im Spaltenkopf */
.done-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 11px; font-weight: 700; flex: 0 0 auto;
}
.foot-links { display: flex; gap: 16px; justify-content: center; margin-top: 6px; }
.foot-links a { color: var(--muted); font-size: 13px; }
.foot-links a:hover { color: var(--brand); }

/* ===== Tarif-Grenzen & Preisseite ===== */
.upgrade-note {
  background: var(--brand-soft); border: 1px solid var(--brand); color: var(--ink);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px;
}
.upgrade-note a { color: var(--brand); font-weight: 600; white-space: nowrap; }
.pricing-wrap { max-width: 760px; margin: 24px auto; }
.pricing-wrap > h1 { text-align: center; }
.pricing-wrap .sub { text-align: center; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
@media (max-width: 640px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-pro { position: relative; border: 2px solid var(--brand); }
.plan-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 20px;
}
.plan-price { font-size: 34px; font-weight: 800; margin: 6px 0; }
.plan-price span { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan-feat { list-style: none; padding: 0; margin: 14px 0; text-align: left; display: inline-block; }
.plan-feat li { margin: 7px 0; font-size: 14px; }

/* ===== Vorlagen-Galerie ===== */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.tpl-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.tpl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tpl-ico { font-size: 24px; }
.tpl-name { font-weight: 700; font-size: 16px; }
.tpl-desc { color: var(--muted); font-size: 13px; margin: 8px 0 10px; flex: 1; }
.tpl-cols { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.tpl-col {
  font-size: 11px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 7px; color: var(--muted);
}
.tpl-card .btn { width: 100%; }

/* ===== Tracker-Diagramme ===== */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.chart-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.chart-box-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.chart-title { font-weight: 600; font-size: 14px; }
.chart-box canvas { height: 200px !important; max-height: 200px; }
.chart-sub { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.chart-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.chart-toggle button {
  border: none; background: var(--bg-soft); color: var(--muted); cursor: pointer;
  padding: 3px 9px; font-size: 14px; line-height: 1.4;
}
.chart-toggle button.on { background: var(--brand); color: #fff; }

/* ===== Startseite (Landing) ===== */
.btn-lg { padding: 13px 26px; font-size: 16px; }
.hero-badge {
  display: inline-block; background: var(--brand-soft); color: var(--brand);
  font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 20px; margin-bottom: 18px;
}
.hero h1 { font-size: 44px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.hero-trust { color: var(--muted); font-size: 14px; margin-top: 6px; }
/* Dekoratives Mini-Mockup im Hero */
.hero-mock { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.hm-card {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--c);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); font-size: 14px; font-weight: 600;
  min-width: 150px; text-align: left;
}
.hm-card:nth-child(odd) { transform: rotate(-2deg); }
.hm-card:nth-child(even) { transform: rotate(2deg); }
.hm-bars { display: flex; align-items: flex-end; gap: 4px; height: 44px; margin-top: 8px; }
.hm-bars i { display: block; width: 12px; background: var(--c); border-radius: 3px 3px 0 0; }

.superpowers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 50px; }
@media (max-width: 640px) { .superpowers { grid-template-columns: 1fr; } }
.super {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.super-ico { font-size: 34px; }
.super h2 { margin: 8px 0 8px; }

.compare { margin-top: 54px; }
.compare-table { max-width: 660px; margin: 18px auto 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ct-row { display: grid; grid-template-columns: 2fr 1fr 1fr; align-items: center; border-top: 1px solid var(--line); }
.ct-row:first-child { border-top: none; }
.ct-row > span { padding: 12px 14px; font-size: 14px; }
.ct-row > span:nth-child(2), .ct-row > span:nth-child(3) { text-align: center; }
.ct-head { background: var(--bg-soft); font-weight: 700; }
.ct-head > span:nth-child(2) { color: var(--brand); }
.ct-row .yes { color: var(--ok); font-weight: 700; }
.ct-row .no { color: var(--muted); }

.cta-final {
  text-align: center; margin: 60px auto 20px; max-width: 620px;
  background: var(--brand-soft); border-radius: var(--radius); padding: 36px 24px;
}
.cta-final h2 { margin: 0 0 6px; }
.cta-final .btn { margin-top: 16px; }

/* ===== Anwendungsfall-Links (interne Verlinkung) ===== */
.usecase-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 760px; margin: 22px auto 0; }
.usecase-links a {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-weight: 600; color: var(--ink); text-decoration: none; transition: all .15s;
}
.usecase-links a:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* ===== FAQ (Landingpages) ===== */
.faq { max-width: 720px; margin: 24px auto 0; }
.faq details { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: var(--card); }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--muted); font-weight: 700; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { margin: 0; padding: 0 16px 14px; color: var(--muted); line-height: 1.5; }

/* ===== Tour / Vorschau-Seite ===== */
.tour { max-width: 1080px; margin: 0 auto; }
.tour-hero { text-align: center; padding: 28px 0 6px; }
.tour-hero h1 { font-size: 38px; margin: 6px 0 8px; }

.tour-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 44px; align-items: center; margin: 80px 0; perspective: 1600px; }
.tour-desc h2 { font-size: 26px; margin: 0 0 8px; }
.tour-desc p { color: var(--muted); line-height: 1.65; font-size: 15px; }
.tour-row.reverse .shot { order: 2; }
.tour-row.reverse .tour-desc { order: 1; }

.shot { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.shot img { display: block; width: 100%; height: auto; }

/* 3D-Neigung – richtet sich beim Drüberfahren auf */
.tour-row .shot { transform: rotateY(9deg) rotateX(3deg); transition: transform .5s ease, box-shadow .5s ease; box-shadow: -28px 26px 60px rgba(16,18,30,.22); }
.tour-row.reverse .shot { transform: rotateY(-9deg) rotateX(3deg); box-shadow: 28px 26px 60px rgba(16,18,30,.22); }
.tour-row .shot:hover { transform: rotateY(0) rotateX(0) scale(1.02); box-shadow: 0 26px 64px rgba(16,18,30,.28); }

.tour-dark { text-align: center; margin: 90px 0 70px; }
.tour-dark h2 { font-size: 26px; }
.tour-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 26px; }
.tour-pair .shot { box-shadow: 0 18px 50px rgba(16,18,30,.2); transition: transform .4s ease; }
.tour-pair .shot:hover { transform: scale(1.03); }

@media (max-width: 760px) {
  .tour-row { grid-template-columns: 1fr; perspective: none; gap: 22px; margin: 50px 0; }
  .tour-row .shot, .tour-row.reverse .shot { transform: none; order: 0; box-shadow: 0 14px 40px rgba(16,18,30,.18); }
  .tour-row.reverse .tour-desc { order: 0; }
  .tour-pair { grid-template-columns: 1fr; }
}

/* ======================================================================
   Trello/Milanote-Erweiterungen: Cover, Etiketten, Priorität, Zuständige,
   WIP, Filterleiste, Etiketten-/Zuständigen-Auswahl, Archiv, Kalender
   ==================================================================== */

/* Cover-Streifen oben auf der Karte */
.card-cover { height: 30px; border-radius: 8px 8px 0 0; margin: -12px -12px 8px; }
.canvas-card .card-cover { margin: -10px -10px 8px; }
.card-cover-img { height: 90px; background-size: cover; background-position: center; }

/* Etiketten-Chips */
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.clabel { font-size: 11px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 6px;
  line-height: 1.5; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clabel-empty { min-width: 34px; height: 8px; padding: 0; border-radius: 5px; }

/* Meta-Zeile (Priorität, Zuständige, Kommentare) */
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge.prio { color: #fff; }
.prio-low    { background: #22c55e; }
.prio-medium { background: #eab308; color: #422006 !important; }
.prio-high   { background: #f97316; }
.prio-urgent { background: #ef4444; }

/* Zuständigen-Avatare auf der Karte */
.card-assignees { display: inline-flex; align-items: center; }
.ca-ava { width: 24px; height: 24px; border-radius: 50%; background: var(--accent, #6366f1); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
  margin-left: -6px; border: 2px solid var(--card); overflow: hidden; }
.ca-ava:first-child { margin-left: 0; }
.ca-ava img { width: 100%; height: 100%; object-fit: cover; }

/* Spalten-Zähler + WIP */
.col-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.col-count.wip-over { background: var(--danger, #ef4444); color: #fff; padding: 1px 7px; border-radius: 10px; }
.column .col-head.wip-warn { box-shadow: inset 0 -2px 0 var(--danger, #ef4444); }

/* Karten-Editor: Prioritäts-Auswahl */
.prio-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.prio-opt { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 12px; font-size: 13px; font-weight: 600; background: var(--bg-soft); }
.prio-opt input { display: none; }
.prio-opt.on, .prio-opt:has(input:checked) { border-color: var(--accent, #6366f1); background: var(--card); box-shadow: 0 0 0 2px var(--accent, #6366f1) inset; }

/* Karten-Editor: Etiketten- und Zuständigen-Auswahl */
.label-picks, .assignee-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.label-pick, .assignee-pick { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; background: var(--bg-soft); font-size: 13px; }
.label-pick input, .assignee-pick input { margin: 0; }
.label-pick:has(input:checked), .assignee-pick:has(input:checked) { border-color: var(--accent, #6366f1); background: var(--card); }
.assignee-pick .ca-ava { margin: 0; width: 22px; height: 22px; }

/* Etiketten verwalten */
.label-manage { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.label-manage li { display: flex; align-items: center; gap: 10px; }
.label-create { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.label-create input[type=text] { flex: 1; min-width: 180px; width: auto; }
.label-color-sel { width: auto; }

/* Board-Filterleiste */
.board-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0 0 10px; }
.board-filter .bf-search { flex: 1; min-width: 160px; width: auto; padding: 7px 10px; }
.board-filter select { width: auto; padding: 7px 10px; }
.board-filter .bf-chip { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-soft); cursor: pointer; color: var(--ink); }
.board-filter .bf-chip.on { background: var(--accent, #6366f1); color: #fff; border-color: var(--accent, #6366f1); }
.board-filter .bf-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.board-filter .bf-clear { font-size: 12px; color: var(--muted); background: none; border: none; cursor: pointer; text-decoration: underline; }
.card-item.filtered-out, .canvas-card.filtered-out { display: none !important; }

/* Board-Favorit (Stern) */
.star-btn { background: none; border: none; cursor: pointer; font-size: 20px; line-height: 1; padding: 2px; color: #f59e0b; }
.star-btn.off { color: var(--muted); opacity: .55; }
.widget-wrap .w-star { position: absolute; top: 8px; right: 8px; z-index: 2; }
.widget-wrap .widget { height: 100%; }
.widget-wrap .w-top { padding-right: 26px; }

/* Archiv-Liste */
.archive-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.archive-list li { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; }
.archive-list .al-title { font-weight: 600; }
.archive-list .al-meta { color: var(--muted); font-size: 12px; }
.archive-list .al-actions { margin-left: auto; display: flex; gap: 6px; }

/* Aktivitäts-Protokoll */
.activity-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.activity-list li { display: flex; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.activity-list .ac-when { color: var(--muted); font-size: 12px; min-width: 116px; }
.activity-list .ac-who { font-weight: 600; }

/* Kalenderansicht */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; padding: 4px 0; }
.cal-cell { min-height: 96px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--card); }
.cal-cell.other { background: var(--bg-soft); opacity: .55; }
.cal-cell.today { border-color: var(--accent, #6366f1); box-shadow: 0 0 0 1px var(--accent, #6366f1); }
.cal-daynum { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-ev { display: block; font-size: 11px; font-weight: 600; color: #fff; background: var(--accent, #6366f1);
  border-radius: 5px; padding: 2px 6px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.cal-ev.ev-overdue { background: #ef4444; }
.cal-ev.ev-done { background: #22c55e; }

/* Checklisten-Fortschrittsbalken auf der Karte */
.ci-progress { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.cip-bar { flex: 1; height: 6px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; min-width: 40px; }
.cip-bar > span { display: block; height: 100%; background: var(--accent, #6366f1); border-radius: 4px; transition: width .2s ease; }
.cip-bar.full > span { background: #22c55e; }
.cip-num { flex: 0 0 auto; font-weight: 600; }

/* Globale Suche */
.gsearch-box { display: flex; gap: 8px; margin-bottom: 18px; }
.gsearch-box input { flex: 1; }
.search-res { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.search-res li a { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; text-decoration: none; color: var(--ink); }
.search-res li a:hover { border-color: var(--accent, #6366f1); }
.search-res .sr-board { color: var(--muted); font-size: 12px; margin-left: auto; }
