/* Tasktopus PHP – Design-System nach DESIGN.md (Soft SaaS Shell) */

/* ===== Schriftart: Plus Jakarta Sans (lokal gehostet, DSGVO-konform) =====
   Variable Font: eine Datei deckt alle Stärken 400–800 ab. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/jakarta-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/jakarta-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --pink: #FF5D8E;
  --pink-soft: #FFE9F0;
  --pink-dark: #E94A7C;
  --yellow: #FFE066;
  --yellow-soft: #FFF7D6;
  --dark: #33363F;

  --background: #F7F8FA;
  --foreground: #33363F;
  --card: #FFFFFF;
  --border: #E8E9ED;
  --muted: #707585;

  --success: #28C76F;
  --warning: #FFB020;
  --error: #EA5455;
  --info: #3D8BFF;

  --radius-card: 20px;
  --radius-button: 14px;
  --radius-nav: 14px;
  --header-height: 4.25rem;
  --shadow-soft: 0 10px 30px rgba(51, 54, 63, 0.09);
  --shadow-lg: 0 24px 60px rgba(51, 54, 63, 0.14);

  --sidebar-expanded: 260px;
  --content-max: 1400px;
}

/* Dark Mode: nur Surfaces/Text, Akzentfarben bleiben (siehe DESIGN.md) */
:root[data-theme="dark"] {
  --background: #1B1D23;
  --foreground: #E8E9ED;
  --card: #23262E;
  --border: #343842;
  --muted: #9AA0AE;
  --dark: #E8E9ED;
  --pink-soft: #3A2733;
  --yellow-soft: #3A3520;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background: var(--background); color: var(--foreground); }

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Shell ===== */
.shell { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-expanded);
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: width .25s ease;
}
.sidebar-brand {
  height: var(--header-height);
  display: flex; align-items: center; gap: 10px;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand img { border-radius: 10px; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.brand-ai { color: var(--pink); }
.brand-ws { font-size: 10px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem; }
.nav-favorites { border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .5rem; }
.fav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); flex-shrink: 0; }
.nav-fav { font-weight: 500; font-size: .85rem; }

/* Collapse-Toggle am Rand */
.sidebar-collapse-btn {
  position: absolute; bottom: 84px; right: -13px; z-index: 10;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card);
  box-shadow: var(--shadow-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 1rem; line-height: 1;
}
.sidebar-collapse-btn:hover { background: var(--pink-soft); color: var(--pink); }

/* Eingeklappte Sidebar (nur Icons) */
:root.sidebar-collapsed .sidebar { width: 74px; }
:root.sidebar-collapsed .brand-text,
:root.sidebar-collapsed .nav-section-title,
:root.sidebar-collapsed .nav-label,
:root.sidebar-collapsed .sidebar-user-meta { display: none; }
:root.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }
:root.sidebar-collapsed .nav-item { justify-content: center; padding: .5rem; position: relative; }
:root.sidebar-collapsed .sidebar-user { justify-content: center; }
:root.sidebar-collapsed .collapse-icon { transform: rotate(180deg); display: inline-block; }
/* Tooltip im eingeklappten Zustand */
:root.sidebar-collapsed .nav-item:hover::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: var(--dark); color: #fff; padding: .3rem .6rem; border-radius: 8px;
  font-size: .78rem; font-weight: 600; white-space: nowrap; z-index: 50; box-shadow: var(--shadow-lg);
}
.nav-section { margin-bottom: 1rem; }
.nav-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
  padding: .4rem .75rem;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: .5rem .75rem;
  border-radius: var(--radius-nav);
  color: var(--foreground);
  font-weight: 600; font-size: .9rem;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--pink-soft); text-decoration: none; }
.nav-item.active {
  background: var(--pink-soft);
  border-left-color: var(--pink);
  color: var(--dark);
}
/* Einheitlicher Icon-Rahmen: alle 3D-Icons gleich groß, zentriert, ausgerichtet */
.nav-ico {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.nav-ico img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain; display: block;
}
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom { border-top: 1px solid var(--border); padding: .75rem; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: .5rem .75rem; }
.sidebar-user-meta { display: flex; flex-direction: column; font-size: .85rem; }
.sidebar-user-meta a { font-size: .78rem; color: var(--muted); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--pink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

.shell-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--header-height);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.25rem;
  position: sticky; top: 0; z-index: 40;
}
.hamburger { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--foreground); }

/* Globale Suche */
.topbar-search { position: relative; flex: 1; max-width: 560px; display: flex; align-items: center; }
.topbar-search .search-icon { position: absolute; left: .7rem; color: var(--muted); pointer-events: none; display: flex; }
.topbar-search input {
  width: 100%; padding: .55rem 2.4rem; border: 1.5px solid var(--border);
  border-radius: 12px; background: var(--background); font-family: inherit; font-size: .9rem; color: var(--foreground);
}
.topbar-search input:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; border-color: var(--pink); }
.search-ai { position: absolute; right: .6rem; color: var(--pink); text-decoration: none; display: flex; }
.search-ai:hover { text-decoration: none; color: var(--pink-dark); }
.hamburger .ic { display: block; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }

/* Inline-SVG-Icons: erben Textfarbe, konsistente Ausrichtung */
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* Icon-Buttons in der Topbar */
.tb-icon-btn {
  position: relative; background: none; border: none; cursor: pointer;
  width: 38px; height: 38px; border-radius: 10px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.tb-icon-btn:hover { background: var(--pink-soft); color: var(--pink); }
.tb-badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--pink); color: #fff; border-radius: 999px; font-size: .65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.tb-quick-btn { gap: 4px; }

/* Dropdowns (Schnellaktion + Benachrichtigungen) */
.tb-dropdown { position: relative; }
.tb-menu {
  position: absolute; top: calc(100% + 8px); min-width: 220px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: .4rem; z-index: 50;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .15s;
}
.tb-menu-right { right: 0; }
.tb-menu-wide { min-width: 320px; max-height: 70vh; overflow-y: auto; padding: 0; }
.tb-dropdown.open .tb-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.tb-menu-item {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 10px;
  font-size: .88rem; font-weight: 600; color: var(--foreground);
}
.tb-menu-item:hover { background: var(--pink-soft); text-decoration: none; }
.tb-menu-icon { width: 20px; text-align: center; }
.tb-menu-head { padding: .8rem 1rem; font-weight: 800; font-size: .9rem; border-bottom: 1px solid var(--border); }
.tb-menu-empty { padding: 1.5rem 1rem; text-align: center; color: var(--muted); font-size: .88rem; }
.tb-notif { display: flex; flex-direction: column; gap: 1px; padding: .7rem 1rem; border-bottom: 1px solid var(--border); position: relative; }
.tb-notif strong { font-size: .85rem; }
.tb-notif .muted { font-size: .8rem; }
.tb-notif-time { font-size: .7rem; color: var(--muted); margin-top: 2px; }
.tb-notif.unread { background: var(--pink-soft); }
.tb-notif.unread::before { content: ""; position: absolute; left: .35rem; top: 1rem; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }
.tb-menu-foot { display: block; text-align: center; padding: .7rem; font-size: .85rem; font-weight: 700; color: var(--pink); }
.tb-menu-foot:hover { background: var(--pink-soft); text-decoration: none; }

/* Theme-Umschalter: Icon je nach Modus */
.theme-toggle .theme-light { display: flex; }
.theme-toggle .theme-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-light { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-dark { display: flex; }

/* Avatar rechts */
.tb-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--pink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem;
  text-decoration: none; flex-shrink: 0;
}
.tb-avatar:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--pink-soft), 0 0 0 3px var(--pink); }

.main { flex: 1; overflow-y: auto; padding: 1.5rem; }
.content { max-width: var(--content-max); margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }

/* ===== Komponenten ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
}
.card h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: .75rem; }

.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.page-header h1 { font-size: 1.6rem; font-weight: 800; }
.page-header .sub { font-size: .9rem; color: var(--muted); }
/* Modul-Kopf mit thematischem Octopus */
.ph-title { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.page-octo { flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(51,54,63,.14)); }
@media (max-width: 560px) { .page-octo { width: 52px; height: 52px; } }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 1rem 1.25rem; box-shadow: var(--shadow-soft); }
.kpi .kpi-value { font-size: 1.6rem; font-weight: 800; }
.kpi .kpi-label { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ===== Octopus-Filter: zwei Trigger + Slide-in-Panel von rechts ===== */

/* (1) Oberer Button "Filter & Anzeige" */
.octo-filter-topbar { display: flex; justify-content: flex-end; }
.octo-open-btn { position: relative; }
.octo-btn-icon { font-weight: 800; }
.octo-btn-label-short { display: none; }
.octo-badge, .octo-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--pink); color: #fff; border-radius: 999px;
  font-size: .7rem; font-weight: 800;
}

/* (2) Seitliches Tab (rechts fixiert, nur Desktop) */
.octo-filter-tab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 60; display: none; flex-direction: column; align-items: center; gap: .3rem;
  width: 46px; padding: .9rem 0;
  background: var(--card); border: 1px solid var(--border); border-right: none;
  border-radius: 14px 0 0 14px; box-shadow: var(--shadow-soft);
  cursor: pointer; color: var(--pink);
}
.octo-filter-tab:hover { background: var(--pink-soft); }
.octo-tab-icon { font-size: 1.1rem; font-weight: 800; }
.octo-tab-text { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.octo-tab-badge { position: absolute; top: -6px; left: -6px; }
@media (min-width: 1024px) { .octo-filter-tab { display: flex; } }
/* Wenn Panel offen ist, Tab ausblenden */
body.octo-filter-active .octo-filter-tab { display: none; }

/* (3) Overlay */
.octo-filter-overlay {
  position: fixed; inset: 0; background: rgba(51,54,63,.4);
  opacity: 0; visibility: hidden; transition: opacity .3s; z-index: 100;
}
body.octo-filter-active .octo-filter-overlay { opacity: 1; visibility: visible; }

/* Slide-in-Panel */
.octo-filter-panel {
  position: fixed; top: 0; right: 0; height: 100vh; width: 380px; max-width: 90vw;
  background: var(--card); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .32s ease-out;
  z-index: 110; display: flex; flex-direction: column;
}
body.octo-filter-active .octo-filter-panel { transform: translateX(0); }
.octo-panel-form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.octo-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.25rem; border-bottom: 1px solid var(--border);
}
.octo-panel-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.octo-panel-close:hover { background: var(--background); color: var(--foreground); }
.octo-panel-body { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 1.5rem; }
.octo-section-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.octo-section h3 { font-size: .9rem; font-weight: 800; margin: 0 0 .8rem; }
.octo-section-head h3 { margin: 0; }
.octo-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.octo-field > label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.octo-search { position: relative; display: flex; align-items: center; }
.octo-search-icon { position: absolute; left: .7rem; font-size: .85rem; opacity: .6; pointer-events: none; }
.octo-search input { width: 100%; padding-left: 2.1rem; }
.octo-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.octo-pill {
  padding: .35rem .8rem; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--card);
  font-size: .8rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s;
}
.octo-pill:hover { border-color: var(--pink); color: var(--pink); }
.octo-pill.active { background: var(--pink); border-color: var(--pink); color: #fff; }
.octo-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.octo-panel-foot { flex-shrink: 0; border-top: 1px solid var(--border); padding: 1rem 1.25rem; background: var(--card); }

/* Anzeige anpassen: Checkbox-Liste + Spalten-Ausblenden */
.octo-display-list { display: flex; flex-direction: column; gap: .1rem; }
.octo-check { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: 8px; font-size: .9rem; cursor: pointer; }
.octo-check:hover { background: var(--pink-soft); }
.octo-check input { width: 17px; height: 17px; accent-color: var(--pink); cursor: pointer; }
/* Ausgeblendete Spalten (Container-Klasse hide-col-X versteckt Zellen mit data-col="X") */
.hide-col-project [data-col="project"],
.hide-col-assignee [data-col="assignee"],
.hide-col-priority [data-col="priority"],
.hide-col-dueDate [data-col="dueDate"],
.hide-col-customer [data-col="customer"],
.hide-col-manager [data-col="manager"],
.hide-col-timeframe [data-col="timeframe"],
.hide-col-opentasks [data-col="opentasks"],
.hide-col-progress [data-col="progress"] { display: none; }

/* Octopus, der beim Öffnen seitlich am Panel hervorlugt (nur Desktop) */
.octo-filter-mascot {
  position: fixed; top: 26px; right: 380px; z-index: 111;
  opacity: 0; transform: translateX(40px) rotate(6deg); transform-origin: bottom right;
  transition: opacity .4s .12s ease-out, transform .4s .12s ease-out;
  pointer-events: none; display: none;
  filter: drop-shadow(0 8px 16px rgba(51,54,63,.18));
}
@media (min-width: 1024px) { .octo-filter-mascot { display: block; } }
body.octo-filter-active .octo-filter-mascot { opacity: 1; transform: translateX(0) rotate(-8deg); }

/* Mobile: Panel volle Höhe von rechts, kein Octopus */
@media (max-width: 640px) {
  .octo-filter-panel { width: 100%; max-width: 100%; }
}

/* ===== Projekte: Ansicht-Umschalter (Raster/Liste/Tabelle) ===== */
.view-switcher-bar { display: flex; justify-content: flex-end; }
.view-switcher { display: inline-flex; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; }
.view-btn {
  background: none; border: none; cursor: pointer; color: var(--muted);
  width: 34px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
}
.view-btn:hover { background: var(--pink-soft); color: var(--pink); }
.view-btn.active { background: var(--pink); color: #fff; }

/* Karten-Container: Raster vs. Liste per data-view */
.pv-cards { display: grid; gap: 1rem; }
#projects-views[data-view="grid"] .pv-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
#projects-views[data-view="list"] .pv-cards { grid-template-columns: 1fr; }
#projects-views[data-view="table"] .pv-cards { display: none; }
#projects-views[data-view="grid"] .pv-table,
#projects-views[data-view="list"] .pv-table { display: none; }

.project-card { display: flex; flex-direction: column; padding: 1.25rem; transition: transform .2s, box-shadow .2s; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.pc-title { display: flex; flex-direction: column; min-width: 0; color: var(--foreground); }
.pc-title:hover { text-decoration: none; }
.pc-title strong { font-size: 1rem; }
.pc-title .muted { font-size: .82rem; }
.pc-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .78rem; color: var(--muted); align-items: center; }
.pc-meta a { color: var(--muted); }
.pc-meta a:hover { color: var(--pink); }
.pc-foot { display: flex; align-items: center; justify-content: space-between; }
.pc-progress { font-size: .8rem; font-weight: 700; }
/* Team-Avatare */
.avatar-group { display: flex; align-items: center; }
.avatar-mini {
  width: 26px; height: 26px; border-radius: 50%; background: var(--pink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700;
  border: 2px solid var(--card); margin-left: -7px;
}
.avatar-mini:first-child { margin-left: 0; }
.avatar-more { background: var(--muted); }

/* In der Listen-Ansicht Karten etwas kompakter/breiter */
#projects-views[data-view="list"] .project-card { flex-direction: column; }

/* ===== Aufgaben: Liste / Board ===== */
#tasks-views[data-view="list"] .tv-board { display: none; }
#tasks-views[data-view="board"] .tv-list { display: none; }
.btn .ic { vertical-align: -2px; }

.board-columns {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
  gap: .8rem; overflow-x: auto; padding-bottom: .5rem;
}
.board-col { background: var(--background); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; min-height: 120px; }
.board-col-head { display: flex; align-items: center; justify-content: space-between; padding: .7rem .8rem; border-bottom: 1px solid var(--border); }
.board-count { font-size: .78rem; font-weight: 800; color: var(--muted); background: var(--card); border-radius: 999px; padding: 0 .5rem; min-width: 22px; text-align: center; }
.board-col-body { padding: .6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.board-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: .7rem; box-shadow: var(--shadow-soft); }
.board-card-title { display: block; font-weight: 700; font-size: .88rem; color: var(--foreground); margin-bottom: .4rem; }
.board-card-title:hover { color: var(--pink); text-decoration: none; }
.board-card-meta { display: flex; align-items: center; gap: .5rem; font-size: .75rem; margin-bottom: .3rem; }
.board-card-foot { font-size: .75rem; }
.board-card-actions { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; }
.board-status-sel { font-size: .75rem; padding: .25rem .4rem; flex: 1; }
.board-empty { text-align: center; color: var(--muted); padding: .8rem; font-size: .85rem; }

/* ===== Dashboard KPI-Kacheln mit 3D-Icons ===== */
.kpi-tile-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .kpi-tile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .kpi-tile-grid { grid-template-columns: repeat(5, 1fr); } }
.kpi-tile {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-soft);
  padding: 1.1rem 1.25rem;
  transition: transform .2s, box-shadow .2s;
}
.kpi-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.kpi-tile-main { min-width: 0; flex: 1; }
.kpi-tile-title { font-size: .85rem; color: var(--muted); font-weight: 600; }
.kpi-tile-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; margin-top: .2rem; }
.kpi-tile-top img { flex-shrink: 0; object-fit: contain; }
.kpi-tile-trend { display: flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; margin-top: .35rem; }
.kpi-tile-trend.up { color: var(--success); }
.kpi-tile-trend.down { color: var(--error); }
.kpi-tile-trend span { color: var(--muted); font-weight: 500; }
.kpi-tile-bar { margin-top: .8rem; height: 6px; background: var(--background); border-radius: 999px; overflow: hidden; }
.kpi-tile-bar > span { display: block; height: 100%; background: var(--pink); border-radius: 999px; }

/* ===== Dashboard-Widgets (anpassbar) ===== */
.widgets-header { display: flex; align-items: center; justify-content: space-between; }
#customize-toggle.active { background: var(--pink); color: #fff; border-color: var(--pink); }
.widget-grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .widget-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1300px) { .widget-grid { grid-template-columns: 1fr 1fr 1fr; } }
.widget { padding: 1.1rem 1.25rem; align-self: start; }
.widget-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.widget-head h3 { flex: 1; font-size: .95rem; font-weight: 700; margin: 0; }
.widget-drag { display: none; cursor: grab; color: var(--muted); font-size: 1.1rem; user-select: none; }
.widget-hide { display: none; background: none; border: none; cursor: pointer; color: var(--muted); font-size: .9rem; padding: 2px 6px; border-radius: 6px; }
.widget-hide:hover { background: rgba(234,84,85,.12); color: var(--error); }
.widget-body { display: flex; flex-direction: column; gap: .1rem; }
.widget-row {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .45rem .5rem; border-radius: 8px; font-size: .88rem; color: var(--foreground);
}
a.widget-row:hover { background: var(--pink-soft); text-decoration: none; }

/* Bearbeitungsmodus */
body.dashboard-editing .widget { border-style: dashed; border-color: var(--pink); }
body.dashboard-editing .widget-drag,
body.dashboard-editing .widget-hide { display: inline-block; }
body.dashboard-editing .widget-body { opacity: .6; pointer-events: none; }
.widget.dragging { opacity: .4; }

.hidden-widgets-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  margin-top: 1rem; padding: .8rem 1rem;
  background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius-card);
}
.hidden-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.hidden-chip {
  background: var(--background); border: 1.5px solid var(--border); border-radius: 999px;
  padding: .3rem .8rem; font-family: inherit; font-size: .8rem; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: all .15s;
}
.hidden-chip:hover { border-color: var(--pink); color: var(--pink); }

/* Portfolio-Umschalter */
.scope-toggle { display: inline-flex; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-button); padding: .25rem; gap: .25rem; }
.scope-btn { padding: .45rem .95rem; border-radius: 10px; font-size: .85rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.scope-btn:hover { text-decoration: none; color: var(--foreground); }
.scope-btn.active { background: var(--pink); color: #fff; }
.scope-btn.active:hover { color: #fff; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; cursor: pointer;
  border-radius: var(--radius-button);
  font-family: inherit; font-weight: 700; font-size: .9rem;
  padding: .6rem 1.2rem;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); text-decoration: none; }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); color: #fff; }
.btn-secondary { background: var(--yellow); color: var(--dark); }
.btn-secondary:hover { background: #ffd84d; color: var(--dark); }
.btn-outline { background: transparent; color: var(--foreground); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--pink); color: var(--pink); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #23252c; color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--pink-soft); color: var(--pink); }
/* Löschen/Entfernen: dezent pink, füllt bei Hover */
.btn-danger { background: var(--pink-soft); color: var(--pink-dark); border: 1.5px solid transparent; }
.btn-danger:hover { background: var(--pink); color: #fff; }
.btn-danger-solid { background: var(--pink); color: #fff; }
.btn-danger-solid:hover { background: var(--pink-dark); color: #fff; }
/* Bearbeiten: dezent gelb, füllt bei Hover */
.btn-edit { background: var(--yellow-soft); color: #8a6f00; border: 1.5px solid transparent; }
.btn-edit:hover { background: var(--yellow); color: var(--dark); }
.btn-edit .ic { color: currentColor; }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }

/* Formulare */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
label { font-weight: 600; font-size: .85rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="month"], input[type="number"], select, textarea {
  font-family: inherit; font-size: .9rem;
  padding: .6rem .8rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--foreground);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 1px;
  border-color: var(--pink);
}
.form-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 700px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
  text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); padding: .6rem .75rem; border-bottom: 1px solid var(--border);
}
table.data td { padding: .7rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--background); }

/* Badges */
.badge {
  display: inline-block; padding: .15rem .6rem;
  border-radius: 999px; font-size: .75rem; font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: rgba(40,199,111,.14); color: #1D9E56; }
.badge-warning { background: rgba(255,176,32,.16); color: #C68612; }
.badge-error   { background: rgba(234,84,85,.13); color: var(--error); }
.badge-info    { background: rgba(61,139,255,.13); color: #2470E0; }
.badge-muted   { background: var(--background); color: var(--muted); }

/* Fortschrittsbalken */
.progress { background: var(--background); border-radius: 999px; height: 8px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--pink); border-radius: 999px; }

/* Flash */
.flash { padding: .8rem 1.1rem; border-radius: var(--radius-button); font-weight: 600; font-size: .9rem; }
.flash-success { background: rgba(40,199,111,.14); color: #1D9E56; }
.flash-error { background: rgba(234,84,85,.13); color: var(--error); }
.flash-info { background: rgba(61,139,255,.13); color: #2470E0; }

/* ===== Auth-Seiten ===== */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--background); padding: 1rem;
}
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-lg);
  padding: 2rem; width: 100%; max-width: 420px;
}
.auth-card .auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; margin-bottom: 1.25rem; }
.auth-card .auth-logo img { border-radius: 10px; }
.auth-footer { margin-top: 1rem; font-size: .85rem; color: var(--muted); }

/* ===== Mobile ===== */
.nav-overlay { display: none; }
@media (max-width: 1023px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    width: 280px; transform: translateX(-100%);
    transition: transform .25s ease-out;
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-overlay {
    display: block; position: fixed; inset: 0;
    background: rgba(51,54,63,.4); z-index: 50;
  }
  .hamburger { display: block; }
  .main { padding: 1rem; }
}

/* ===== Meilensteine ===== */
.milestone-list { display: flex; flex-direction: column; gap: .75rem; }
.milestone-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; }
.milestone-card.is-done { opacity: .65; }
.milestone-main { display: flex; align-items: center; gap: .8rem; }
.toggle-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff;
  cursor: pointer; font-size: .8rem; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.toggle-dot:hover { border-color: var(--success); }
.toggle-dot.done { background: var(--success); border-color: var(--success); }

/* Tools & Methoden – Zeile */
.tool-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem; }

/* Kapazitäts-Eingabe (Team-Verwaltung) */
.capacity-form { display: inline-flex; align-items: center; gap: .35rem; margin: 0; }
.capacity-form input[type="number"] { width: 68px; padding: .35rem .5rem; }

/* ===== Toolbox (PM-Methoden-Bibliothek) ===== */
.tb-search { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.tb-search input { flex: 1; border: none; background: transparent; font-size: 1rem; color: var(--foreground); outline: none; }
.tb-search input::placeholder { color: var(--muted); }

.tb-section { margin-bottom: 1.75rem; }
.tb-cat-title { display: flex; align-items: center; gap: .55rem; font-size: 1.05rem; margin: 0 0 .9rem; }
.tb-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tb-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.tb-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.07); border-color: var(--pink); }
.tb-card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tb-card h3 { margin: 0; font-size: 1rem; }
.tb-card p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.45; }

.tb-tag { font-size: .68rem; font-weight: 700; letter-spacing: .02em; padding: .2rem .5rem; border-radius: 999px; white-space: nowrap; }
.tb-used { font-size: .72rem; font-weight: 700; color: var(--pink-dark); background: var(--pink-soft); padding: .2rem .5rem; border-radius: 999px; white-space: nowrap; }

/* Kategorie-Farben (Marken-Set) */
.tb-pink   { background: var(--pink-soft);   color: var(--pink-dark); }
.tb-yellow { background: var(--yellow-soft); color: #8a6f00; }
.tb-black  { background: #33363F;            color: #fff; }
.tb-dot.tb-pink   { background: var(--pink); }
.tb-dot.tb-yellow { background: var(--yellow); }
.tb-dot.tb-black  { background: #33363F; }

/* Toolbox: Projektauswahl-Leiste + Karten-Aktionen */
.tb-projectbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.tb-projectbar select { max-width: 260px; }
.tb-card { position: relative; }
.tb-open { align-self: flex-start; margin-top: .2rem; }
.tb-sessions { display: flex; flex-direction: column; gap: .25rem; margin-top: .2rem; }
.tb-sessions a { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; }

/* Tool-Editor */
.tool-editor .card { margin-bottom: 1rem; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-grid-2 .span-2 { grid-column: 1 / -1; }
.tool-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.tool-list > label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .5rem; }
.tool-list-rows { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .5rem; }
.tool-line { display: flex; align-items: center; gap: .4rem; }
.tool-line input { flex: 1; }
.tool-line-del, .tool-row-del {
  flex: none; width: 30px; height: 30px; border: 1px solid var(--border); background: var(--card);
  border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1;
}
.tool-line-del:hover, .tool-row-del:hover { background: var(--pink-soft); color: var(--pink-dark); border-color: var(--pink); }
.tool-add-line, .tool-add-row {
  border: 1px dashed var(--border); background: transparent; color: var(--pink); font-weight: 700;
  font-size: .82rem; padding: .4rem .8rem; border-radius: 9px; cursor: pointer;
}
.tool-add-line:hover, .tool-add-row:hover { border-color: var(--pink); background: var(--pink-soft); }
.tool-add-row { margin-top: .7rem; }
.tool-table td { vertical-align: top; }
.tool-table input, .tool-table select { width: 100%; min-width: 90px; }
.tool-editor-actions { display: flex; gap: .6rem; align-items: center; margin-top: .4rem; }

@media (max-width: 640px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* Tool-„Blatt" (schreibgeschützte, druckbare Ansicht) */
.tool-sheet-head { border-bottom: 2px solid var(--pink); padding-bottom: .7rem; margin-bottom: 1.2rem; }
.tool-sheet-head h2 { margin: .4rem 0 .2rem; }
.sheet-lists { display: grid; gap: 1rem; margin-bottom: 1rem; }
.sheet-box { border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; background: var(--background); }
.sheet-box h4 { margin: 0 0 .5rem; font-size: .9rem; }
.sheet-box ul { margin: 0; padding-left: 1.1rem; }
.sheet-box li { font-size: .88rem; margin-bottom: .25rem; line-height: 1.4; }
.sheet-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem; }
.sheet-field.span-2 { grid-column: 1 / -1; }
.sheet-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin-bottom: .2rem; }
.sheet-value { font-size: .92rem; line-height: 1.5; }
.sheet-table th { background: var(--background); }

.sheet-canvas .sheet-box { min-height: 84px; }
@media (max-width: 720px) {
  .sheet-fields { grid-template-columns: 1fr; }
  .sheet-lists { grid-template-columns: 1fr !important; grid-template-areas: none !important; }
}

/* ===== Zoom-/Pan-Board (Miro-artig) ===== */
.board-controls { display: flex; align-items: center; gap: .4rem; margin: .4rem 0 .6rem; }
.board-btn { min-width: 34px; height: 34px; border: 1px solid var(--border); background: var(--card); border-radius: 8px; cursor: pointer; font-size: 1.05rem; font-weight: 700; color: var(--foreground); }
.board-btn:hover { border-color: var(--pink); color: var(--pink); }
.board-btn-wide { padding: 0 .8rem; font-size: .82rem; }
.board-zoom { font-size: .82rem; font-weight: 700; min-width: 46px; text-align: center; color: var(--muted); }
.board-hint { font-size: .78rem; margin-left: auto; }
.board-viewport { position: relative; overflow: hidden; height: min(72vh, 640px); border: 1px solid var(--border); border-radius: 14px;
  background-color: var(--background);
  background-image: radial-gradient(circle, rgba(120,120,130,.18) 1px, transparent 1px); background-size: 22px 22px;
  cursor: grab; }
.board-viewport.grabbing { cursor: grabbing; }
.board-canvas { transform-origin: 0 0; padding: 1.4rem; width: 900px; }

/* ===== Quadranten (SWOT / Eisenhower) ===== */
.tb-quad { display: grid; grid-template-columns: 96px 1fr 1fr; grid-template-rows: auto 1fr 1fr; gap: 8px; }
.quad-htop { text-align: center; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); align-self: end; }
.quad-hside { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-weight: 800; font-size: .76rem; color: var(--muted); align-self: center; justify-self: center; }
.quad-cell { border-radius: 12px; padding: .8rem 1rem; border: 1px solid var(--border); min-height: 140px; }
.quad-cell h4 { margin: 0 0 .4rem; font-size: .95rem; }
.quad-cell ul { margin: 0; padding-left: 1.1rem; } .quad-cell li { font-size: .86rem; margin-bottom: .25rem; line-height: 1.4; }
.q-green { background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.35); }
.q-red   { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.35); }
.q-blue  { background: rgba(59,130,246,.10); border-color: rgba(59,130,246,.35); }
.q-amber { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.40); }
.q-grey  { background: rgba(120,120,130,.10); border-color: var(--border); }

/* ===== Zyklus (PDCA) ===== */
.tb-cycle { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 620px; }
.cycle-seg { position: relative; border: 1px solid var(--border); border-radius: 14px; padding: .8rem 1rem; min-height: 120px; background: var(--card); }
.cycle-seg h4 { margin: .2rem 0 .4rem; }
.cycle-seg ul { margin: 0; padding-left: 1.1rem; } .cycle-seg li { font-size: .84rem; }
.cycle-no { width: 26px; height: 26px; border-radius: 50%; background: var(--pink); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.cycle-1 { border-top: 3px solid #3b82f6; } .cycle-2 { border-top: 3px solid #22c55e; }
.cycle-3 { border-top: 3px solid #f59e0b; } .cycle-4 { border-top: 3px solid var(--pink); }
.cycle-hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 50px; height: 50px; border-radius: 50%; background: var(--card); border: 2px solid var(--pink); color: var(--pink); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }

/* ===== Fishbone (Ishikawa) ===== */
.tb-fishbone { padding: .5rem 0; }
.fb-row { display: flex; gap: 14px; justify-content: center; align-items: flex-start; }
.fb-cat { flex: 1; max-width: 210px; border: 1px solid var(--border); border-radius: 12px; padding: .6rem .8rem; background: var(--card); }
.fb-cat h4 { margin: 0 0 .3rem; font-size: .86rem; color: var(--pink-dark); }
.fb-cat ul { margin: 0; padding-left: 1rem; } .fb-cat li { font-size: .8rem; margin-bottom: .2rem; }
.fb-spine { display: flex; align-items: center; margin: 14px 0; }
.fb-line { flex: 1; height: 4px; background: linear-gradient(90deg, var(--border), var(--pink)); border-radius: 2px; }
.fb-head { flex: none; background: var(--pink); color: #fff; font-weight: 800; padding: .7rem 1.1rem; border-radius: 12px; max-width: 280px; }

/* ===== Matrix (Risiko / Impact-Effort) ===== */
.tb-matrix { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: 1fr 24px; gap: 6px; max-width: 660px; }
.mx-ylabel { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-weight: 800; font-size: .76rem; color: var(--muted); }
.mx-grid { display: grid; grid-template-columns: 82px 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr 26px; gap: 6px; }
.mx-cell { border-radius: 8px; padding: .45rem; min-height: 76px; display: flex; flex-wrap: wrap; gap: .3rem; align-content: flex-start; border: 1px solid rgba(0,0,0,.05); }
.mx-tick { display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 700; color: var(--muted); text-align: center; }
.mx-xlabel { grid-column: 2; text-align: center; font-weight: 800; font-size: .76rem; color: var(--muted); }
.mx-chip { background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: .15rem .55rem; font-size: .76rem; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.10); height: fit-content; }
.mx-chip.chip-green { border-color: rgba(34,197,94,.6); } .mx-chip.chip-red { border-color: rgba(239,68,68,.6); }
.mx-green  { background: rgba(34,197,94,.18); } .mx-yellow { background: rgba(245,208,66,.30); }
.mx-orange { background: rgba(245,158,11,.28); } .mx-red    { background: rgba(239,68,68,.22); }
.mx-grey   { background: rgba(120,120,130,.12); }

/* ===== Spalten / Kanban ===== */
.tb-cols { display: grid; gap: 12px; }
.tb-col { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); }
.tb-col-h { padding: .55rem .85rem; font-weight: 800; font-size: .84rem; color: #fff; }
.tb-col-b { padding: .6rem .85rem; }
.tb-col-b ul { margin: 0; padding-left: 1.05rem; } .tb-col-b li { font-size: .84rem; margin-bottom: .25rem; line-height: 1.4; }
.col-green .tb-col-h { background: #22c55e; } .col-blue .tb-col-h { background: #3b82f6; }
.col-amber .tb-col-h { background: #f59e0b; } .col-red .tb-col-h { background: #ef4444; }
.col-grey .tb-col-h { background: #6b7280; } .col-pink .tb-col-h { background: var(--pink); }
.col-teal .tb-col-h { background: #14b8a6; } .col-violet .tb-col-h { background: #8b5cf6; }

/* ===== Phasen / Zyklus (horizontal) ===== */
.tb-stages { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.tb-stage { flex: 1 1 150px; border: 1px solid var(--border); border-top: 3px solid var(--pink); border-radius: 12px; padding: .7rem .85rem; background: var(--card); }
.tb-stage h4 { margin: .3rem 0 .35rem; font-size: .9rem; }
.tb-stage ul { margin: 0; padding-left: 1rem; } .tb-stage li { font-size: .82rem; }
.tb-stage-txt { font-size: .84rem; line-height: 1.45; }
.tb-stage-no { width: 26px; height: 26px; border-radius: 50%; background: var(--pink); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.tb-arrow { align-self: center; color: var(--pink); font-size: 1.4rem; font-weight: 800; }

/* ===== Schritte-Kette (vertikal) ===== */
.tb-vsteps { display: flex; flex-direction: column; gap: .5rem; max-width: 640px; }
.tb-vstep { display: flex; gap: .7rem; align-items: flex-start; }
.tb-vno { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--pink); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tb-vbody { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: .5rem .8rem; background: var(--card); }
.tb-vbody h4 { margin: 0 0 .2rem; font-size: .86rem; }
.tb-vhead, .tb-vfoot { border-radius: 10px; padding: .6rem .9rem; }
.tb-vhead { background: var(--background); border: 1px solid var(--border); }
.tb-vfoot { background: var(--pink-soft); border: 1px solid var(--pink); }
.tb-vhead span, .tb-vfoot span { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; color: var(--muted); display: block; margin-bottom: .2rem; }
.tb-vfoot span { color: var(--pink-dark); }

/* ===== Balkendiagramm ===== */
.tb-bars { display: flex; flex-direction: column; gap: .5rem; max-width: 720px; }
.tb-bar-row { display: grid; grid-template-columns: 160px 1fr; gap: .6rem; align-items: center; }
.tb-bar-label { font-size: .84rem; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-bar-track { background: var(--background); border-radius: 6px; min-height: 22px; display: flex; gap: 2px; align-items: center; position: relative; }
.tb-bar { height: 22px; border-radius: 6px; min-width: 3px; display: flex; align-items: center; padding: 0 .4rem; color: #fff; font-size: .72rem; font-weight: 700; }
.tb-bar-cum { position: absolute; right: 6px; font-size: .72rem; font-weight: 700; color: var(--muted); }
.tb-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; font-size: .78rem; color: var(--muted); }
.tb-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.sheet-table tr.tb-total td { border-top: 2px solid var(--border); background: var(--background); }
.sheet-table td.tb-win { color: var(--success); }

/* ===== Five Forces (Kreuz) ===== */
.tb-fiveforces { display: grid; grid-template-columns: 1fr 1.2fr 1fr; grid-template-rows: auto auto auto; gap: 12px; max-width: 720px;
  grid-template-areas: ". top ." "left center right" ". bottom ."; align-items: stretch; }
.ff-box { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .85rem; background: var(--card); }
.ff-box h4 { margin: 0 0 .3rem; font-size: .84rem; }
.ff-box ul { margin: 0; padding-left: 1rem; } .ff-box li { font-size: .8rem; }
.ff-top { grid-area: top; } .ff-left { grid-area: left; } .ff-center { grid-area: center; background: var(--pink-soft); border-color: var(--pink); }
.ff-right { grid-area: right; } .ff-bottom { grid-area: bottom; }

/* ===== Golden Circle (konzentrisch) ===== */
.tb-golden { display: flex; justify-content: center; padding: .5rem; }
.gc-ring { border-radius: 50%; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.gc-what { width: 420px; height: 420px; background: rgba(59,130,246,.10); border: 2px solid rgba(59,130,246,.4); justify-content: flex-start; padding-top: 12px; }
.gc-how { width: 300px; height: 300px; background: rgba(34,197,94,.12); border: 2px solid rgba(34,197,94,.45); margin-top: 18px; justify-content: flex-start; padding-top: 12px; }
.gc-why { width: 185px; height: 185px; background: var(--pink-soft); border: 2px solid var(--pink); margin-top: 16px; justify-content: center; padding: 10px; }
.gc-lab { font-weight: 800; font-size: .8rem; color: var(--muted); text-transform: uppercase; }
.gc-why-txt, .gc-txt { font-size: .78rem; line-height: 1.3; }
.gc-why-txt { margin-top: .2rem; }
.gc-txt { max-width: 150px; margin-top: .2rem; }

/* ===== Mindmap ===== */
.tb-mindmap { text-align: center; }
.mm-center { display: inline-block; background: var(--pink); color: #fff; font-weight: 800; padding: .7rem 1.4rem; border-radius: 999px; margin-bottom: .8rem; }
.mm-branches { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.mm-branch { background: var(--card); border: 2px solid var(--pink); border-radius: 999px; padding: .35rem .9rem; font-weight: 700; font-size: .84rem; }
.mm-sub { text-align: left; max-width: 460px; margin: 0 auto; } .mm-sub h4 { margin: 0 0 .3rem; font-size: .86rem; }

/* ===== Gantt ===== */
.tb-gantt { display: flex; flex-direction: column; gap: .4rem; }
.tb-gantt-row { display: grid; grid-template-columns: 160px 1fr; gap: .6rem; align-items: center; }
.tb-gantt-label { font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-gantt-track { position: relative; height: 24px; background: var(--background); border-radius: 6px; }
.tb-gantt-bar { position: absolute; top: 3px; height: 18px; background: var(--pink); border-radius: 5px; min-width: 4px; }
.tb-gantt-axis { display: flex; justify-content: space-between; margin: .3rem 0 0 166px; font-size: .74rem; color: var(--muted); }

/* ===== Meilenstein-Timeline ===== */
.tb-mstl { position: relative; display: flex; gap: 1.5rem; padding: 1.5rem .5rem .5rem; overflow-x: auto; }
.tb-mstl-line { position: absolute; left: 0; right: 0; top: 30px; height: 3px; background: var(--border); }
.tb-mstl-item { position: relative; min-width: 120px; text-align: center; }
.tb-mstl-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--pink); border: 3px solid var(--card); margin: 0 auto .5rem; position: relative; z-index: 1; }
.tb-mstl-date { font-size: .74rem; color: var(--muted); font-weight: 700; }
.tb-mstl-title { font-size: .86rem; font-weight: 700; }
.tb-mstl-status { font-size: .76rem; color: var(--muted); }

/* ===== Roadmap ===== */
.tb-roadmap { display: flex; gap: 12px; overflow-x: auto; }
.tb-rm { min-width: 180px; flex: 1; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); }
.tb-rm-period { background: var(--pink); color: #fff; font-weight: 800; padding: .45rem .8rem; font-size: .84rem; }
.tb-rm-theme { padding: .6rem .8rem .2rem; font-weight: 700; font-size: .9rem; }
.tb-rm-goal { padding: 0 .8rem .7rem; font-size: .82rem; }

/* ===== Customer Journey ===== */
.tb-journey { display: grid; gap: 4px; }
.tb-jh { padding: .5rem; font-weight: 800; font-size: .8rem; }
.tb-jphase { background: var(--pink); color: #fff; border-radius: 8px; text-align: center; }
.tb-jrl { font-weight: 700; font-size: .8rem; color: var(--muted); display: flex; align-items: center; }
.tb-jc { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: .5rem; font-size: .82rem; }

/* ===== Swimlane ===== */
.tb-swim { display: flex; flex-direction: column; gap: .5rem; }
.tb-lane { display: grid; grid-template-columns: 130px 1fr; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.tb-lane-h { background: var(--background); font-weight: 800; font-size: .82rem; padding: .6rem .8rem; display: flex; align-items: center; }
.tb-lane-steps { padding: .5rem .7rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.tb-lane-step { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: .3rem .6rem; font-size: .82rem; }
.tb-lane-arrow { color: var(--pink); font-weight: 800; }

/* ===== Value Stream ===== */
.tb-vsm { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.tb-vsm-box { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem; background: var(--card); min-width: 120px; text-align: center; }
.tb-vsm-step { font-weight: 700; font-size: .86rem; } .tb-vsm-pt { font-size: .76rem; }
.tb-vsm-wait { display: flex; flex-direction: column; align-items: center; }
.tb-vsm-wt { font-size: .72rem; color: var(--muted); }

/* ===== Flow ===== */
.tb-flow { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.tb-flow-box { border: 1px solid var(--border); border-radius: 10px; padding: .55rem 1rem; background: var(--card); font-size: .86rem; text-align: center; max-width: 420px; }
.tb-flow-arrow { color: var(--pink); font-weight: 800; }
.tb-flow-extra { margin-top: 1rem; } .tb-flow-extra h4 { margin: 0 0 .4rem; font-size: .84rem; }
.tb-chips { display: flex; flex-wrap: wrap; gap: .4rem; } .tb-chip2 { background: var(--background); border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; }

/* ===== Feld-Canvas / Empathy Map ===== */
.tb-fcanvas { display: grid; gap: 10px; }
.fc-box { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; background: var(--card); }
.fc-box h4 { margin: 0 0 .3rem; font-size: .84rem; }
.tb-empathy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 620px; }
.em-box { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; background: var(--card); }
.em-box h4 { margin: 0 0 .3rem; font-size: .86rem; color: var(--pink-dark); }
.em-box ul { margin: 0; padding-left: 1rem; } .em-box li { font-size: .82rem; }
.em-center { grid-column: 1 / -1; order: -1; display: none; }

/* Ampel-Status */
.amp { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .8rem; }
.amp::before { content: ""; width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.amp-g::before { background: #22c55e; } .amp-y::before { background: #f59e0b; } .amp-r::before { background: #ef4444; }

/* Magisches Dreieck */
.tb-triangle { max-width: 560px; margin: 0 auto; text-align: center; }
.tri-box { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; background: var(--card); }
.tri-box h4 { margin: 0 0 .3rem; font-size: .88rem; color: var(--pink-dark); }
.tri-apex { width: 60%; margin: 0 auto .9rem; }
.tri-base { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tri-prio { margin-top: .8rem; font-size: .84rem; }

/* Six Thinking Hats */
.tb-hats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hat { border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; background: var(--card); border-top-width: 4px; }
.hat h4 { margin: 0 0 .3rem; font-size: .84rem; }
.hat-white { border-top-color: #cbd5e1; } .hat-red { border-top-color: #ef4444; } .hat-black { border-top-color: #334155; }
.hat-yellow { border-top-color: #f59e0b; } .hat-green { border-top-color: #22c55e; } .hat-blue { border-top-color: #3b82f6; }
@media (max-width: 640px) { .tb-hats { grid-template-columns: 1fr; } }

/* Druck: nur den Inhalt zeigen, Board voll ausklappen */
@media print {
  .sidebar, .topbar, .no-print, .octo-filter-tab, .octo-filter-topbar, .octo-filter-panel,
  .octo-filter-overlay, .octo-filter-mascot, .page-octo, .board-controls { display: none !important; }
  .shell-main, .main, .content { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border: none !important; }
  .sheet-box, .quad-cell, .fb-cat, .cycle-seg { break-inside: avoid; }
  .board-viewport { overflow: visible !important; height: auto !important; border: none !important; background: none !important; }
  .board-canvas { transform: none !important; width: auto !important; padding: 0 !important; }
  body { background: #fff !important; }
}

/* ===== Projekt-Ansichten (Übersicht / Zeitstrahl) ===== */
/* Karten in den Wrappern brauchen denselben vertikalen Abstand wie .content-Kinder */
.pd-overview, .pd-timeline { display: flex; flex-direction: column; gap: 1.5rem; }
#project-views[data-view="overview"] .pd-timeline { display: none; }
#project-views[data-view="timeline"] .pd-overview { display: none; }

/* Horizontale Zeitachse */
.timeline-axis-wrap { padding: 2.5rem .5rem 1rem; }
.timeline-axis { position: relative; height: 6px; background: var(--border); border-radius: 999px; margin: 2rem 0; }
.timeline-progress { position: absolute; left: 0; top: 0; height: 100%; background: var(--pink); border-radius: 999px; }
.timeline-today { position: absolute; top: -8px; height: 22px; width: 2px; background: var(--dark); transform: translateX(-50%); }
.timeline-today span {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: .65rem; font-weight: 800; color: var(--dark); white-space: nowrap;
}
.tl-cap { position: absolute; top: 50%; transform: translate(-50%,-50%); }
.tl-cap-dot { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--dark); border: 3px solid var(--card); }
.tl-marker { position: absolute; top: 50%; transform: translate(-50%,-50%); cursor: default; }
.tl-marker-dot {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; font-size: .8rem;
  border: 3px solid var(--card); box-shadow: var(--shadow-soft);
}
.tl-marker.done .tl-marker-dot { background: var(--success) !important; color: #fff; }
.timeline-axis-labels { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 600; }

/* Chronologische Liste (vertikale Timeline) */
.timeline-list { margin-top: 2rem; position: relative; padding-left: .5rem; }
.timeline-list::before { content: ""; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.tlx-item { display: flex; align-items: flex-start; gap: .9rem; padding: .5rem 0; position: relative; }
.tlx-dot {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
  border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--border);
}
.tlx-dot-cap { background: var(--dark); }
.tlx-item.is-done .tlx-dot { background: var(--success); color: #fff; }
.tlx-body { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .3rem; }
.tlx-body strong { font-size: .92rem; }
.tlx-item.is-done .tlx-body strong { text-decoration: line-through; opacity: .7; }

/* Meilenstein-Typ-Tag (nur Markenfarben: pink / gelb / schwarz) */
.mt-tag {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .68rem; font-weight: 700; padding: .12rem .55rem;
  border-radius: 999px; vertical-align: middle; margin-right: .3rem; white-space: nowrap;
}
.mt-tag .ic { width: 12px; height: 12px; }
.mt-pink   { background: var(--pink-soft); color: var(--pink-dark); }
.mt-yellow { background: var(--yellow-soft); color: #8a6f00; }
.mt-black  { background: rgba(51,54,63,.10); color: var(--dark); }

/* ===== Kalender ===== */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  text-align: center; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); margin-bottom: 4px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  min-height: 92px; padding: 6px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: .8rem; overflow: hidden;
}
.cal-day.cal-out { opacity: .4; }
.cal-day.cal-today { border-color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); }
.cal-daynum { font-weight: 700; display: block; margin-bottom: 2px; }
.cal-event {
  display: block; font-size: .7rem; line-height: 1.35;
  border-radius: 6px; padding: 1px 6px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--dark); text-decoration: none;
  border-left: 3px solid transparent;
}
a.cal-event:hover { text-decoration: none; filter: brightness(.95); }
.cal-type-task      { background: var(--pink-soft);        border-left-color: var(--pink); }
.cal-type-milestone { background: var(--yellow-soft);      border-left-color: var(--yellow); }
.cal-type-meeting   { background: rgba(61,139,255,.15);    border-left-color: var(--info); }
.cal-type-absence   { background: var(--border);           border-left-color: var(--muted); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; font-size: .8rem; color: var(--muted); }
.legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 4px; border-left: none; }

.agenda-list { display: flex; flex-direction: column; gap: .5rem; }
.agenda-item {
  display: flex; align-items: center; gap: 1rem;
  border: 1px solid var(--border); border-radius: 12px;
  padding: .7rem 1rem; border-left-width: 4px;
}
.agenda-item.cal-type-task { background: #fff; border-left-color: var(--pink); }
.agenda-item.cal-type-milestone { background: #fff; border-left-color: var(--yellow); }
.agenda-item.cal-type-meeting { background: #fff; border-left-color: var(--info); }
.agenda-item.cal-type-absence { background: #fff; border-left-color: var(--muted); }
.agenda-date { min-width: 130px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.agenda-main { flex: 1; display: flex; flex-direction: column; }
@media (max-width: 700px) {
  .cal-day { min-height: 64px; }
  .cal-event { font-size: .6rem; }
  .agenda-item { flex-wrap: wrap; }
}

/* ===== Budgets ===== */
.budget-list { display: flex; flex-direction: column; gap: 1rem; }
.budget-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.progress.bar-warn > span { background: var(--warning); }
.progress.bar-over > span { background: var(--error); }
.over-label { color: var(--error); font-weight: 700; }
.budget-total-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.budget-total-name { flex: 1; font-weight: 600; font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget-total-row input { width: 130px; }

/* ===== Risiken ===== */
.risk-list { display: flex; flex-direction: column; gap: .75rem; }
/* Linke Kante einheitlich pink (Risikostufe zeigt weiterhin das farbige Badge) */
.risk-card { border-left: 4px solid var(--pink); }
.risk-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.risk-mitigation {
  margin-top: .6rem; padding: .7rem .9rem;
  background: rgba(40,199,111,.1); border-radius: 10px;
  font-size: .9rem;
}

/* ===== Einstellungen ===== */
.tab-nav {
  display: flex; flex-wrap: wrap; gap: .4rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-button); padding: .35rem;
}
.tab-link {
  padding: .45rem .9rem; border-radius: 10px;
  font-size: .85rem; font-weight: 700; color: var(--muted);
}
.tab-link:hover { background: var(--pink-soft); text-decoration: none; }
.tab-link.active { background: var(--pink); color: #fff; }
.notification-row {
  display: flex; align-items: center; gap: .8rem;
  border: 1px solid var(--border); border-left: 3px solid var(--pink);
  border-radius: 10px; padding: .7rem .9rem;
}
.notification-row.is-read { border-left-color: var(--border); opacity: .65; }

/* ===== KI-Assistent (Tako) ===== */
.chat-bubble.tako { background: var(--yellow-soft); }
.chat-bubble.tako .chat-author { color: var(--dark); font-weight: 800; }
.chat-bubble.tako-error { background: rgba(234,84,85,.1); }

/* Tako-Aktionskarte „Aufgabe anlegen" (Bestätigung) */
.tako-action { align-self: flex-start; max-width: 560px; width: 100%; margin: -.2rem 0 .4rem; border: 1.5px solid var(--pink); border-radius: 14px; background: var(--card); padding: .9rem 1rem; box-shadow: var(--shadow-soft); }
.tako-action-h { display: flex; align-items: center; gap: .4rem; font-weight: 800; font-size: .88rem; color: var(--pink-dark); margin-bottom: .7rem; }
.tako-action .form-row { margin-bottom: .5rem; }
.tako-action .form-group { margin-bottom: .5rem; }
.tako-action label { font-size: .74rem; }
.tako-suggestions {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding: .7rem 1.25rem 0;
  border-top: 1px solid var(--border);
}
.suggestion-chip {
  background: var(--pink-soft); color: var(--pink-dark);
  border: 1px solid rgba(255,93,142,.3); border-radius: 999px;
  padding: .35rem .9rem; font-family: inherit; font-size: .8rem; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.suggestion-chip:hover { background: var(--pink); color: #fff; }
.tako-suggestions + .chat-form { border-top: none; }

/* ===== Automationen ===== */
.builder-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.builder-arrow { color: var(--muted); font-weight: 700; padding-bottom: .6rem; }
@media (max-width: 700px) { .builder-arrow { display: none; } .builder-row .form-group { flex-basis: 100%; } }
.automation-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; padding: 1rem 1.25rem; }
.automation-main { display: flex; align-items: center; gap: .8rem; min-width: 0; flex: 1; }
.automation-zap {
  font-size: 1.1rem; width: 38px; height: 38px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--background); filter: grayscale(1); opacity: .6;
}
.automation-zap.on { background: rgba(40,199,111,.15); filter: none; opacity: 1; }

/* ===== Kommunikation (Chat) ===== */
.chat-card { display: flex; flex-direction: column; height: 540px; padding: 0; overflow: hidden; }
.chat-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1.25rem; border-bottom: 1px solid var(--border);
}
.chat-scroll { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.chat-bubble {
  max-width: 80%; padding: .6rem .9rem;
  background: var(--background); border-radius: 14px;
  align-self: flex-start;
}
.chat-bubble.own { background: var(--pink); color: #fff; align-self: flex-end; }
.chat-meta { font-size: .72rem; font-weight: 600; opacity: .85; display: flex; align-items: center; gap: .3rem; }
.chat-bubble:not(.own) .chat-author { color: var(--pink); font-weight: 700; }
.chat-content { font-size: .9rem; margin-top: .15rem; word-break: break-word; }
.chat-bubble .mention { font-weight: 800; text-decoration: underline; }
.chat-bubble:not(.own) .mention { color: var(--pink); text-decoration: none; }
.chat-delete { display: inline; margin-left: .3rem; }
.chat-delete button {
  background: none; border: none; cursor: pointer; font-size: .7rem;
  color: inherit; opacity: .5; padding: 0 .15rem;
}
.chat-delete button:hover { opacity: 1; }
.chat-form {
  display: flex; gap: .6rem; padding: .9rem 1.25rem;
  border-top: 1px solid var(--border);
}
.chat-form input[type="text"] { flex: 1; }
.mic-btn { flex: none; width: 42px; height: 42px; border: 1px solid var(--border); background: var(--card); border-radius: 10px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color .12s, border-color .12s, background .12s; }
.mic-btn:hover { color: var(--pink); border-color: var(--pink); }
.mic-btn.listening { color: #fff; background: var(--pink); border-color: var(--pink); animation: mic-pulse 1.1s ease-in-out infinite; }
@keyframes mic-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,93,142,.5); } 50% { box-shadow: 0 0 0 8px rgba(255,93,142,0); } }
.mic-status { margin: 0 1.25rem; padding: .45rem .8rem; border-radius: 10px; font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.mic-status.listening { background: var(--pink-soft); color: var(--pink-dark); }
.mic-status.listening::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); animation: mic-pulse 1.1s ease-in-out infinite; flex: none; }
.mic-status.error { background: rgba(234,84,85,.12); color: var(--error); }

/* ===== Berichte: CSS-Balkendiagramm ===== */
.chart-bars { display: flex; gap: .8rem; align-items: flex-end; height: 180px; padding-top: 1.2rem; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.chart-value { font-size: .72rem; font-weight: 700; color: var(--muted); height: 1rem; }
.chart-bar-track { flex: 1; width: 100%; max-width: 48px; display: flex; align-items: flex-end; }
.chart-bar { width: 100%; background: var(--pink); border-radius: 8px 8px 4px 4px; transition: height .3s ease-out; min-height: 2px; }
.chart-label { font-size: .75rem; font-weight: 700; color: var(--muted); margin-top: .4rem; }

/* ===== Ziele ===== */
.goal-card.is-done { opacity: .7; }
.goal-progress-form { display: inline-flex; align-items: center; gap: .3rem; }

/* ===== Dateien ===== */
.file-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .file-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .file-grid { grid-template-columns: 1fr 1fr 1fr; } }
.file-card { display: flex; align-items: center; gap: .8rem; padding: 1rem; }
.file-icon { font-size: 1.8rem; flex-shrink: 0; }
.file-meta { min-width: 0; flex: 1; }
.file-name {
  display: block; font-weight: 600; font-size: .9rem; color: var(--foreground);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-name:hover { color: var(--pink); text-decoration: none; }
.file-actions { display: flex; flex-direction: column; gap: .35rem; flex-shrink: 0; }
input[type="file"] {
  font-family: inherit; font-size: .85rem;
  padding: .45rem;
  border: 1.5px dashed var(--border); border-radius: 12px;
  background: var(--background);
}

/* ===== Team ===== */
.workload-pill {
  color: #fff; font-size: .78rem; font-weight: 800;
  padding: .2rem .6rem; border-radius: 999px; white-space: nowrap;
}
.workload-stats { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; }
.workload-stats a { color: inherit; font-weight: 600; }
.workload-stats a:hover { color: var(--pink); }

/* Badge als Umschalt-Button (z. B. Freigabe in der Zeiterfassung) */
.badge-button { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.badge-button:hover .badge { filter: brightness(.95); box-shadow: 0 0 0 2px var(--border); }

/* Kleinkram */
.muted { color: var(--muted); }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state img { width: 110px; margin-bottom: .75rem; }
.actions-inline { display: flex; gap: .4rem; align-items: center; }
details.create-panel > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .3rem;
  font-weight: 700; font-size: .9rem; color: #fff; background: var(--pink);
  padding: .55rem 1rem; border-radius: var(--radius-button); transition: background .12s ease;
}
details.create-panel > summary:hover { background: var(--pink-dark); }
details.create-panel > summary::-webkit-details-marker { display: none; }
details.create-panel[open] > summary { margin-bottom: 1rem; background: var(--pink-dark); }
