/* ==========================================================================
   RH-Aufgabenboard – Design (hell, modern, Stil Linear/Vercel). Werte verbindlich.
   ========================================================================== */

:root {
    --bg:          #F8F9FB;   /* App-Hintergrund */
    --surface:     #F1F2F6;   /* Flächen/Spalten */
    --card:        #FFFFFF;   /* Karten und Panels */
    --border:      #E4E6EC;
    --border-hi:   #C9CDD8;   /* Hover-Border dunkelt leicht ab */
    --text:        #16181D;   /* primär */
    --text-2:      #5A6070;   /* sekundär */
    --text-dim:    #8A90A0;   /* gedimmt */
    --accent:      #16A34A;   /* sattes Grün */
    --accent-ink:  #FFFFFF;   /* Text auf Akzent */
    --accent-bg:   #EAF7EF;   /* dezenter Akzent-Hintergrund */
    --accent-border:#BFE6CC;  /* dezenter Akzent-Rahmen */
    --warn:        #DC2626;
    --warn-bg:     #FEECEC;
    --warn-border: #F3C9C9;
    --amber:       #B7791F;   /* Priorität mittel */
    --amber-bg:    #FEF6E7;
    --amber-border:#F0E0B8;
    --success:     #16A34A;
    --shadow:      0 1px 2px rgba(16,24,40,0.05);
    --shadow-pop:  0 8px 30px rgba(16,24,40,0.15);

    --radius-card: 11px;
    --radius-sm:   8px;
    --pill:        999px;
    --speed:       150ms;
    --sidebar-w:   62px;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --hand: "Caveat", "Kalam", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { letter-spacing: -0.02em; font-weight: 650; margin: 0; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.mono, time, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.dim { color: var(--text-dim); }

/* ---------- Icons (Lucide, einheitliche Größen) ---------- */
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 22px; height: 22px; }
/* Kleine Inline-Icons in Badges/Listen-Metas/Breadcrumb einheitlich 14px */
.badge .icon, .kc-meta .icon, .breadcrumb .icon, .label-tag .icon { width: 14px; height: 14px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--border-hi);
    background: var(--card);
    color: var(--text);
    padding: 8px 14px;
    border-radius: var(--pill);
    font-size: 13px; font-weight: 550;
    cursor: pointer;
    transition: background var(--speed), border-color var(--speed), transform var(--speed);
    white-space: nowrap;
}
.btn:hover { border-color: var(--border-hi); background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 650; }
.btn.primary:hover { filter: brightness(0.94); background: var(--accent); }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { color: var(--warn); border-color: var(--warn-border); }
.btn.danger:hover { background: var(--warn-bg); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.icon-only { padding: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Auth-Seiten ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-card {
    width: 100%; max-width: 380px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-card); padding: 30px;
    box-shadow: 0 4px 16px rgba(16,24,40,0.06);
}
.auth-logo { font-weight: 700; letter-spacing: -0.03em; color: var(--accent); margin-bottom: 20px; font-size: 15px; }
.auth-card h1 { font-size: 20px; margin-bottom: 16px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea, .inp {
    width: 100%;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 9px 11px; font-size: 14px; font-family: inherit;
    transition: border-color var(--speed);
}
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus {
    outline: none; border-color: var(--accent);
}
.auth-card .btn { width: 100%; justify-content: center; margin-top: 4px; }
.auth-card .btn.ghost { margin-top: 8px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 2px 0 6px; cursor: pointer; }
.remember input { width: auto; }
.forgot { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.forgot:hover { color: var(--accent); }
.msg { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.msg.error { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-border); }
.msg.ok { background: var(--accent-bg); color: var(--success); border: 1px solid var(--accent-border); }

/* ---------- App-Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--card); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center;
    padding: 14px 0; gap: 6px; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
    width: 34px; height: 34px; border-radius: 9px; background: var(--accent);
    color: var(--accent-ink); display: grid; place-items: center; font-weight: 800;
    margin-bottom: 8px; font-size: 15px;
}

/* Abteilungs-Umschalter (Workspace) */
.ws-slot { margin-bottom: 8px; }
.ws-switch {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    background: none; border: none; padding: 2px; cursor: default; border-radius: 10px;
}
.ws-switch.has-menu { cursor: pointer; }
.ws-badge {
    width: 34px; height: 34px; border-radius: 9px; background: var(--accent-bg);
    color: var(--accent); border: 1px solid var(--accent-border);
    display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: -.02em;
    transition: border-color var(--speed), background var(--speed);
}
.ws-badge.sm { width: 26px; height: 26px; font-size: 10px; border-radius: 7px; }
.ws-switch.has-menu:hover .ws-badge { border-color: var(--accent); }
.ws-caret { color: var(--text-dim); line-height: 0; }
.ws-caret .icon { width: 12px; height: 12px; }
/* Abteilungsname in der Topbar */
.ws-name {
    font-weight: 650; font-size: 14px; color: var(--text); letter-spacing: -.01em;
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding-right: 4px; border-right: 1px solid var(--border); margin-right: 6px;
}
.ws-tag { font-size: 10px; }
.nav-item {
    width: 42px; height: 42px; border-radius: 10px;
    display: grid; place-items: center; color: var(--text-2);
    cursor: pointer; transition: background var(--speed), color var(--speed); position: relative;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-bg); color: var(--accent); }
.nav-item .icon { width: 22px; height: 22px; }
.nav-spacer { flex: 1; }
.nav-badge {
    position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px;
    background: var(--accent); color: var(--accent-ink); border-radius: var(--pill);
    font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px;
}

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

/* ---------- Topbar ---------- */
.topbar {
    height: 56px; flex-shrink: 0; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px; padding: 0 20px;
    background: var(--bg); position: sticky; top: 0; z-index: 20;
}
.topbar .search { flex: 1; max-width: 460px; position: relative; }
.topbar .search input { width: 100%; padding-left: 34px; }
.topbar .search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-dim); }
.topbar .spacer { flex: 1; }
.icon-btn {
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent;
    background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center; position: relative;
    transition: background var(--speed), color var(--speed);
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn .icon { width: 20px; height: 20px; }
.icon-btn .nav-badge { top: 3px; right: 3px; }

.avatar {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    color: #fff; font-size: 11px; font-weight: 650; flex-shrink: 0; letter-spacing: 0;
}
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }

/* ---------- Content ---------- */
.content { padding: 24px; flex: 1; overflow-y: auto; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .spacer { flex: 1; }
.subtle { color: var(--text-2); font-size: 13px; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-card); padding: 16px; box-shadow: var(--shadow);
    transition: border-color var(--speed), transform var(--speed), box-shadow var(--speed);
}
.card.link { cursor: pointer; }
.card.link:hover { border-color: var(--border-hi); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16,24,40,0.08); }

.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px; box-shadow: var(--shadow); }
.kpi .val { font-size: 30px; font-weight: 700; font-family: var(--mono); letter-spacing: -0.03em; }
.kpi .lbl { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.kpi.warn .val { color: var(--warn); }

/* Fortschrittsbalken */
.progress { height: 6px; background: var(--surface); border-radius: var(--pill); overflow: hidden; margin: 10px 0 4px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: var(--pill); transition: width var(--speed); }
.progress > span.over { background: var(--warn); }
.over-txt { color: var(--warn); }
.plan-wrap { margin-top: 8px; }

/* Zeiterfassung / Check-in */
.avatar-wrap { position: relative; display: inline-flex; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--success); border: 2px solid var(--card); box-sizing: content-box; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; }
.badge.live-badge { background: var(--accent-bg); color: var(--success); border-color: var(--accent-border); }
.live-card { display: flex; align-items: center; gap: 10px; }
.checkin-time { font-variant-numeric: tabular-nums; }
.per-user { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.per-user-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }

/* ---------- Badges / Pills ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: var(--pill);
    font-size: 11px; font-weight: 600; background: var(--surface); color: var(--text-2);
    border: 1px solid var(--border);
}
.badge.dept { color: var(--text-2); }
.badge.overdue { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.badge.prio-hoch { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.badge.prio-mittel { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.badge.prio-normal { background: var(--surface); color: var(--text-2); }
.badge.status-in_arbeit { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }
.badge.status-erledigt { background: var(--accent-bg); color: var(--success); border-color: var(--accent-border); }
.badge.status-offen { background: var(--surface); color: var(--text-2); }
.label-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--pill); font-size: 11px; font-weight: 600; }
.label-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Meine Aufgaben (Liste) ---------- */
.task-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); transition: background var(--speed); }
.task-row:hover { background: var(--surface); }
.task-row .check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-hi); cursor: pointer; flex-shrink: 0; display: grid; place-items: center; transition: all var(--speed); }
.task-row .check:hover { border-color: var(--accent); }
.task-row .check.done { background: var(--accent); border-color: var(--accent); }
.task-row .t-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row .t-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.due { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.due.overdue { color: var(--warn); }

/* ---------- Kanban ---------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.column { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 10px; min-height: 120px; transition: border-color var(--speed), background var(--speed); }
.column.drag-over { border-color: var(--accent); background: var(--accent-bg); }
.column-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-size: 13px; font-weight: 600; }
.column-head .count { color: var(--text-dim); font-family: var(--mono); }
.column-head .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-offen { background: var(--text-dim); }
.dot-in_arbeit { background: var(--accent); }
.dot-erledigt { background: var(--success); }
.kanban-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 9px;
    padding: 11px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow);
    transition: border-color var(--speed), transform var(--speed), box-shadow var(--speed);
}
.kanban-card:hover { border-color: var(--border-hi); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(16,24,40,0.07); }
.kanban-card.dragging { opacity: .4; }
.kanban-card .kc-title { font-weight: 550; margin-bottom: 8px; line-height: 1.35; }
.kanban-card .kc-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.kanban-card .kc-foot { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 12px; }
.kanban-card .kc-foot .spacer { flex: 1; }
.kc-meta { display: inline-flex; align-items: center; gap: 4px; }
.add-card { width: 100%; text-align: left; color: var(--text-dim); background: transparent; border: 1px dashed var(--border); border-radius: 9px; padding: 8px 11px; cursor: pointer; font-size: 12px; transition: all var(--speed); }
.add-card:hover { color: var(--text); border-color: var(--border-hi); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab { padding: 9px 14px; cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--speed), border-color var(--speed); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Modal / Panel ---------- */
.overlay { position: fixed; inset: 0; background: rgba(16,24,40,0.35); backdrop-filter: blur(2px); z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 40px 16px; overflow-y: auto; animation: fade var(--speed) ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); width: 100%; max-width: 480px; padding: 22px; box-shadow: 0 20px 60px rgba(16,24,40,0.20); }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.modal-head h2 { flex: 1; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.close-x { cursor: pointer; color: var(--text-dim); background: none; border: none; padding: 4px; border-radius: 6px; }
.close-x:hover { color: var(--text); background: var(--card); }

/* Aufgaben-Detail-Panel (rechts) */
.panel { position: fixed; top: 0; right: 0; height: 100vh; width: 560px; max-width: 100vw; background: var(--card); border-left: 1px solid var(--border); z-index: 100; display: flex; flex-direction: column; animation: slidein var(--speed) ease; box-shadow: -16px 0 48px rgba(16,24,40,0.14); }
@keyframes slidein { from { transform: translateX(30px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.panel-body { flex: 1; overflow-y: auto; padding: 20px; }
.panel-section { margin-bottom: 22px; }
.panel-section > .sec-title { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); margin-bottom: 10px; }
/* Nur-Lese-Darstellung mehrzeiliger Beschreibungen: Zeilenumbrüche erhalten, kein HTML */
.desc-text { white-space: pre-line; word-break: break-word; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.prop-grid { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; align-items: center; }
.prop-grid > .k { color: var(--text-2); font-size: 13px; }

/* Formzeilen im Grid */
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Kommentare ---------- */
.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment .c-body { flex: 1; }
.comment .c-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.comment .c-author { font-weight: 600; font-size: 13px; }
.comment .c-time { font-size: 11px; color: var(--text-dim); font-family: var(--mono); }
.comment .c-text { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.comment .c-text .mention { color: var(--accent); font-weight: 600; }
.activity-item { display: flex; gap: 8px; font-size: 12px; color: var(--text-2); padding: 5px 0; }
.activity-item .a-time { color: var(--text-dim); font-family: var(--mono); margin-left: auto; }

/* Mention-Popup */
.mention-pop { position: absolute; background: var(--card); border: 1px solid var(--border-hi); border-radius: var(--radius-sm); padding: 4px; z-index: 200; min-width: 180px; max-height: 200px; overflow-y: auto; box-shadow: var(--shadow-pop); }
.mention-opt { padding: 6px 8px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mention-opt:hover, .mention-opt.active { background: var(--surface); }

/* ---------- Unteraufgaben ---------- */
.subtask { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.subtask .check { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-hi); cursor: pointer; flex-shrink: 0; display: grid; place-items: center; }
.subtask .check.done { background: var(--accent); border-color: var(--accent); }
.subtask .st-title { flex: 1; }
.subtask .st-title.done { color: var(--text-dim); text-decoration: line-through; }

/* ---------- Datei-/Drive-Liste ---------- */
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; transition: border-color var(--speed); }
.file-row:hover { border-color: var(--border-hi); }
.file-row .f-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.file-row .f-icon.folder { color: var(--accent); cursor: pointer; }
.file-row .f-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .f-name.folder { cursor: pointer; font-weight: 550; }
.file-row .f-meta { color: var(--text-dim); font-size: 12px; font-family: var(--mono); flex-shrink: 0; }
.dropzone { border: 1.5px dashed var(--border); border-radius: var(--radius-card); padding: 26px; text-align: center; color: var(--text-2); transition: all var(--speed); cursor: pointer; margin-bottom: 16px; }
.dropzone.over { border-color: var(--accent); background: var(--accent-bg); color: var(--text); }
.breadcrumb { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 13px; flex-wrap: wrap; }
.breadcrumb .crumb { cursor: pointer; color: var(--text-2); }
.breadcrumb .crumb:hover { color: var(--text); }
.breadcrumb .sep { color: var(--text-dim); }

/* ---------- Notifications / Suche Dropdown ---------- */
.dropdown { position: absolute; top: 52px; right: 16px; width: 360px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); z-index: 90; box-shadow: 0 16px 50px rgba(16,24,40,0.16); max-height: 70vh; overflow: hidden; display: flex; flex-direction: column; }
.dropdown-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.dropdown-body { overflow-y: auto; }
.notif { padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; gap: 10px; transition: background var(--speed); }
.notif:hover { background: var(--surface); }
.notif.unread { background: var(--accent-bg); }
.notif .n-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.notif .n-text { font-size: 13px; }
.notif .n-time { font-size: 11px; color: var(--text-dim); font-family: var(--mono); margin-top: 3px; }
.search-group-title { padding: 8px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); }

/* ---------- Ideen-Pinnwand (Post-its) ---------- */
.idea-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.idea-column { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px; min-height: 140px; transition: border-color var(--speed), background var(--speed); }
.idea-column.drag-over { border-color: var(--accent); background: var(--accent-bg); }
.idea-col-body { display: flex; flex-direction: column; gap: 14px; padding: 4px 4px 10px; }

.postit {
    position: relative; background: #FEF3C7; border: 1px solid #FDE68A;
    border-radius: 4px; padding: 14px 14px 10px; cursor: pointer; color: #16181D;
    box-shadow: 0 3px 8px rgba(16,24,40,0.12);
    transform: rotate(var(--rot, 0deg));
    transition: transform var(--speed) ease, box-shadow var(--speed) ease;
}
.postit:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 8px 20px rgba(16,24,40,0.18); z-index: 2; }
.postit.dragging { opacity: .5; }
.postit-title { font-family: var(--hand); font-size: 22px; line-height: 1.15; font-weight: 600; word-break: break-word; }
.postit-desc {
    margin-top: 6px; font-size: 12.5px; line-height: 1.4; color: #3f3f46; white-space: pre-line;
    display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden; word-break: break-word;
}
.postit-proj { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; font-weight: 600; color: #3f3f46; background: rgba(255,255,255,.55); padding: 2px 8px; border-radius: var(--pill); }
.postit-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; color: #52525b; }
.postit-meta { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.postit-meta.voted { color: #15803d; font-weight: 700; }

/* Post-it-Farben */
.postit-yellow { background: #FEF3C7; border-color: #FDE68A; }
.postit-pink   { background: #FCE7F3; border-color: #FBCFE8; }
.postit-blue   { background: #DBEAFE; border-color: #BFDBFE; }
.postit-green  { background: #D1FAE5; border-color: #A7F3D0; }

/* Farbauswahl */
.color-row { display: flex; gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; padding: 0; transition: transform var(--speed); }
.swatch:hover { transform: scale(1.08); }
.swatch.on { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Detail-Panel: Post-it-Kopf */
.postit-hero { border-radius: 8px; padding: 14px 16px; box-shadow: 0 2px 6px rgba(16,24,40,0.1); }
.postit-title-input { font-family: var(--hand); font-size: 26px; font-weight: 600; border: none; background: transparent; padding: 0; color: #16181D; }
.postit-title-input:focus { outline: none; }
.idea-linked { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--accent-bg); color: var(--success); border: 1px solid var(--accent-border); padding: 5px 11px; border-radius: var(--pill); }
.idea-linked a { color: var(--success); font-weight: 600; text-decoration: underline; }

/* ---------- Segmented Control (Umschalter) ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--pill); padding: 2px; gap: 2px; }
.seg button { border: none; background: transparent; color: var(--text-2); padding: 5px 12px; border-radius: var(--pill); font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; transition: background var(--speed), color var(--speed); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Projekte-Board (Eisenhower 2×2-Matrix, kompakte Zeilen) ---------- */
/* Fokus-Leiste „Fällig in 7 Tagen" */
.focus-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 8px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.focus-label { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; flex: none; }
.focus-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.focus-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--pill); padding: 4px 11px; cursor: pointer; transition: border-color var(--speed), background var(--speed); }
.focus-chip:hover { border-color: var(--border-hi); }
.focus-chip .icon { width: 13px; height: 13px; color: var(--text-dim); }
.focus-chip .fc-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-chip .fc-date { font-family: var(--mono); color: var(--text-dim); }
.focus-chip.overdue { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.focus-chip.overdue .icon, .focus-chip.overdue .fc-date { color: var(--warn); }

/* Unsortiert-Ablage (schmale horizontale Leiste) */
.eh-unsorted { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 10px 12px; margin-bottom: 14px; transition: border-color var(--speed), background var(--speed); }
.eh-unsorted.drag-over { border-color: var(--accent); background: var(--accent-bg); }
.eh-unsorted-head { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.eh-unsorted-head .count { color: var(--text-dim); font-family: var(--mono); margin-left: 4px; }
.eh-unsorted-body { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.eh-unsorted-body .board-row { min-width: 220px; max-width: 280px; flex: 0 0 auto; }

/* 2×2-Matrix */
.eh-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-items: start; }
.eh-col { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--border-hi); border-radius: var(--radius-card); padding: 10px 12px 12px; min-height: 110px; transition: border-color var(--speed), background var(--speed); }
.eh-col.drag-over { border-color: var(--accent); background: var(--accent-bg); }
.eh-col .column-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; padding: 2px 2px 8px; }
.eh-col .column-head .count { margin-left: auto; color: var(--text-dim); font-family: var(--mono); }
.eh-col-body { display: flex; flex-direction: column; gap: 5px; }
.eh-col.q-q1 { border-top-color: var(--warn); }     .eh-col.q-q1 .column-head { color: var(--warn); }
.eh-col.q-q2 { border-top-color: var(--success); }  .eh-col.q-q2 .column-head { color: var(--success); }
.eh-col.q-q3 { border-top-color: var(--amber); }    .eh-col.q-q3 .column-head { color: var(--amber); }
.eh-col.q-q4 { border-top-color: var(--text-dim); } .eh-col.q-q4 .column-head { color: var(--text-dim); }

/* Kompakte Projektzeile */
.board-row { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; min-height: 34px; cursor: pointer; transition: border-color var(--speed), background var(--speed), box-shadow var(--speed); }
.board-row:hover { border-color: var(--border-hi); box-shadow: var(--shadow); }
.board-row.dragging { opacity: .5; }
.board-row[draggable="true"] { cursor: grab; }
.board-row.overdue { background: var(--warn-bg); border-color: var(--warn-border); }
.board-row .br-live { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.board-row .br-live.on { background: var(--success); box-shadow: 0 0 0 3px var(--accent-bg); }
.br-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; }
.br-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 550; }
.br-tag { flex: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--warn); background: var(--card); border: 1px solid var(--warn-border); border-radius: var(--pill); padding: 1px 7px; }
.br-over { flex: none; width: 16px; height: 5px; border-radius: 3px; background: var(--warn); }
.br-prog { flex: none; width: 54px; height: 6px; background: var(--surface); border-radius: var(--pill); overflow: hidden; }
.br-prog > i { display: block; height: 100%; background: var(--accent); border-radius: var(--pill); }
.br-due { flex: none; font-family: var(--mono); font-size: 12px; color: var(--text-dim); min-width: 42px; text-align: right; }
.br-due.overdue { color: var(--warn); font-weight: 600; }

/* Aufklappbare Detail-Vorschau (weiche Höhen-Transition via grid-template-rows) */
.board-panel-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 150ms ease; margin-top: -5px; }
.board-panel-wrap.open { grid-template-rows: 1fr; }
.board-panel-wrap > .board-panel { overflow: hidden; min-height: 0; }
.board-row.open { background: var(--accent-bg); border-color: var(--accent-border); border-bottom-color: transparent; border-radius: 8px 8px 0 0; box-shadow: none; }
.board-row.overdue.open { background: var(--warn-bg); border-color: var(--warn-border); border-bottom-color: transparent; }
.board-panel { background: var(--card); border: 1px solid var(--border); border-top: none; border-radius: 0 0 8px 8px; box-shadow: var(--shadow); padding: 12px; }
.bp-desc { font-size: 13px; color: var(--text-2); margin: 2px 0 12px; line-height: 1.5; white-space: pre-line; }
.bp-stats { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.bp-stat { display: flex; flex-direction: column; gap: 1px; }
.bp-k { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .03em; }
.bp-v { font-size: 14px; font-weight: 650; font-family: var(--mono); }
.bp-v.over { color: var(--warn); }
.bp-members { margin-left: auto; }
.bp-more { background: var(--surface); color: var(--text-2); }
.bp-nomem { color: var(--text-dim); font-size: 13px; }
.bp-skel { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); display: inline-block; border: 2px solid var(--bg); margin-left: -8px; }
.bp-skel:first-child { margin-left: 0; }
.bp-actions { display: flex; gap: 8px; margin-top: 14px; }
.bp-actions .bp-open { flex: 1; }

/* Kalender: Abteilungs-Label (Alle-Modus) */
.cal-dept-tag { display: inline-block; font-size: 9px; font-weight: 700; padding: 0 5px; border-radius: var(--pill); border: 1px solid; margin-right: 4px; vertical-align: middle; line-height: 1.5; }

/* Dashboard-Gesamtübersicht: Abteilungs-Kacheln */
.dept-tile { padding: 0; overflow: hidden; }
.dept-tile .tile-head { padding: 12px 16px; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; border-bottom: 1px solid var(--border); }
.tile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 14px 16px 6px; text-align: center; }
.tile-stats .num { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.tile-stats .lbl { font-size: 11px; color: var(--text-2); margin-top: 2px; line-height: 1.2; }
.tile-stats .over .num { color: var(--warn); }
.tile-checkins { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 16px 16px; min-height: 20px; }

/* ---------- Bibliothek: Wiki-Layout (Baum + Inhalt) ---------- */
.wiki { display: flex; gap: 20px; align-items: flex-start; }
.wiki-tree {
    width: 240px; flex: 0 0 240px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
    padding: 8px; box-shadow: var(--shadow); position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto;
}
.wiki-content { flex: 1; min-width: 0; }

.tree-row { display: flex; align-items: center; gap: 4px; padding: 5px 6px; border-radius: 7px; cursor: default; transition: background var(--speed); font-size: 13px; min-height: 28px; }
.tree-row:hover { background: var(--surface); }
.tree-row.active { background: var(--accent-bg); }
.tree-row.active .tree-label { color: var(--success); font-weight: 600; }
.tree-row.cat .tree-label { font-weight: 550; }
.tree-arrow { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--text-dim); cursor: pointer; border-radius: 5px; }
.tree-arrow:hover { background: var(--border); color: var(--text); }
.tree-arrow.leaf { cursor: default; }
.tree-arrow.leaf:hover { background: none; }
.tree-icon { flex: none; color: var(--text-dim); display: inline-flex; }
.tree-row.cat > .tree-icon { color: var(--accent); }
.tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.tree-count { flex: none; font-family: var(--mono); font-size: 11px; color: var(--text-dim); padding: 0 4px; }
.tree-menu-btn { flex: none; border: none; background: none; color: var(--text-dim); cursor: pointer; padding: 2px; border-radius: 5px; opacity: 0; transition: opacity var(--speed), background var(--speed); }
.tree-row:hover .tree-menu-btn { opacity: 1; }
.tree-menu-btn:hover { background: var(--border); color: var(--text); }
.tree-row.depth-1 { padding-left: 22px; }
.tree-row.depth-2 { padding-left: 42px; }

/* Breadcrumb im Inhaltsbereich */
.wiki-breadcrumb { font-size: 12px; color: var(--text-2); margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.wiki-breadcrumb .crumb { cursor: default; }
.wiki-breadcrumb .crumb[data-cat] { cursor: pointer; }
.wiki-breadcrumb .crumb[data-cat]:hover { color: var(--accent); }
.wiki-breadcrumb .crumb.current { color: var(--text); font-weight: 600; }
.wiki-breadcrumb .crumb-sep, .crumb-sep { color: var(--text-dim); }

@media (max-width: 768px) {
    .wiki { flex-direction: column; }
    .wiki-tree { position: static; width: 100%; flex: none; max-height: 60vh; display: none; margin-bottom: 12px; }
    .wiki.tree-open .wiki-tree { display: block; }
    .wiki-content { width: 100%; }
}

/* ---------- Bibliothek: Artikel & Editor ---------- */
.article-body {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
    padding: 22px 26px; box-shadow: var(--shadow); max-width: 900px; line-height: 1.65;
}
.article-body h2 { font-size: 19px; margin: 22px 0 8px; }
.article-body h3 { font-size: 16px; margin: 18px 0 6px; }
.article-body h2:first-child, .article-body h3:first-child { margin-top: 0; }
.article-body p { margin: 0 0 12px; }
.article-body ul, .article-body ol { margin: 0 0 12px; padding-left: 22px; }
.article-body li { margin-bottom: 4px; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body blockquote { margin: 0 0 12px; padding: 6px 14px; border-left: 3px solid var(--border-hi); color: var(--text-2); }
.article-body strong { font-weight: 650; }
/* Floats einschließen, damit Folgeinhalte nicht überlappen */
.article-body::after, .editor::after { content: ''; display: block; clear: both; }

/* ---------- Eingebettete Bilder (Lese- und Editoransicht) ---------- */
.article-body img, .editor img {
    max-width: 100%; height: auto; display: block;
    border-radius: var(--radius-sm); border: 1px solid var(--border);
    margin: 10px 0; background: var(--surface);
}
.article-body img { cursor: zoom-in; }
/* Standard: volle Breite im Textfluss */
.article-body img.lib-img-full, .editor img.lib-img-full { width: 100%; float: none; }
/* Rechts neben dem Text (~40%), Text fließt links daneben */
.article-body img.lib-img-right, .editor img.lib-img-right {
    float: right; width: 40%; margin: 4px 0 12px 18px;
}
.editor img { cursor: pointer; }
.editor img.sel { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Platzhalter während des Uploads */
.img-upl {
    display: inline-block; padding: 2px 10px; border-radius: var(--pill);
    background: var(--accent-bg); color: var(--success); border: 1px solid var(--accent-border);
    font-size: 12px; font-weight: 600;
}
.editor.drop-hint { outline: 2px dashed var(--accent); outline-offset: -6px; background: var(--accent-bg); }

/* Schwebende Leiste zum Umschalten der Bild-Anordnung */
.img-popover {
    position: absolute; z-index: 150; display: flex; align-items: center; gap: 2px;
    background: var(--card); border: 1px solid var(--border-hi); border-radius: var(--pill);
    padding: 4px 6px; box-shadow: var(--shadow-pop);
}
.img-popover .tb-btn { white-space: nowrap; font-size: 12px; gap: 5px; }
.img-popover .tb-btn.on { background: var(--accent-bg); color: var(--success); border-color: var(--accent-border); }

/* Großansicht (Lightbox) */
.lightbox {
    position: fixed; inset: 0; z-index: 300; background: rgba(16,24,40,0.75);
    display: flex; align-items: center; justify-content: center; padding: 30px;
    cursor: zoom-out; animation: fade var(--speed) ease;
}
.lightbox img {
    max-width: 92vw; max-height: 92vh; width: auto; height: auto;
    border-radius: var(--radius-card); box-shadow: 0 24px 70px rgba(0,0,0,.4); background: var(--card);
}

.editor-wrap { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); overflow: hidden; }
.editor-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.tb-btn {
    min-width: 30px; height: 30px; padding: 0 7px; border-radius: 7px; border: 1px solid transparent;
    background: transparent; color: var(--text-2); cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; font-size: 12px; transition: background var(--speed), color var(--speed);
}
.tb-btn:hover { background: var(--card); color: var(--text); border-color: var(--border); }
.tb-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.editor { min-height: 320px; padding: 18px 20px; outline: none; line-height: 1.65; }
.editor:focus { outline: none; }
.editor h2 { font-size: 19px; margin: 18px 0 8px; }
.editor h3 { font-size: 16px; margin: 16px 0 6px; }
.editor p { margin: 0 0 12px; }
.editor ul, .editor ol { margin: 0 0 12px; padding-left: 22px; }
.editor a { color: var(--accent); text-decoration: underline; }
.editor img { max-width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ---------- Kalender ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.cal-dow { background: var(--surface); padding: 8px; text-align: center; font-size: 12px; color: var(--text-2); font-weight: 600; }
.cal-cell { background: var(--card); min-height: 96px; padding: 7px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.other { background: var(--surface); }
.cal-cell.today .cal-num { background: var(--accent); color: var(--accent-ink); }
.cal-num { font-size: 12px; font-family: var(--mono); color: var(--text-2); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.cal-task { display: flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 6px; border-radius: 5px; background: var(--surface); border-left: 2px solid var(--accent); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background var(--speed); }
.cal-task:hover { background: var(--border); }
.cal-task.task { border-left-color: var(--text-dim); color: var(--text); }
.cal-task.task.overdue { border-left-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.cal-task.task.done { color: var(--text-dim); text-decoration: line-through; border-left-color: var(--border-hi); }
.cal-task.deadline { background: var(--accent-bg); border-left-color: var(--accent); color: var(--success); font-weight: 600; }
.cal-more { font-size: 11px; color: var(--text-2); cursor: pointer; padding: 1px 6px; border-radius: 5px; font-weight: 600; }
.cal-more:hover { color: var(--accent); background: var(--accent-bg); }
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cal-nav .cal-title { font-weight: 600; min-width: 150px; text-align: center; }
/* Legenden-/Eintragspunkte */
.cal-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: var(--text-dim); }
.cal-legend-dot.deadline { background: var(--accent); }
.cal-legend-dot.task { background: var(--text-dim); }
.cal-legend-dot.task.overdue { background: var(--warn); }
/* Agenda (mobil) */
.cal-agenda { display: flex; flex-direction: column; gap: 10px; }
.cal-agenda-day { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px; box-shadow: var(--shadow); }
.cal-agenda-day.today { border-color: var(--accent); }
.cal-agenda-head { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.cal-agenda-day.today .cal-agenda-head { color: var(--accent); }
.cal-agenda-items { display: flex; flex-direction: column; gap: 5px; }
.cal-agenda-items .cal-task { white-space: normal; }

/* ---------- Avatare-Stack ---------- */
.avatar-stack { display: flex; align-items: center; }
.avatar-stack > .avatar, .avatar-stack > .avatar-wrap { margin-left: -8px; }
.avatar-stack > .avatar:first-child, .avatar-stack > .avatar-wrap:first-child { margin-left: 0; }
.avatar-stack .avatar { border: 2px solid var(--bg); }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--card); border: 1px solid var(--border-hi); border-radius: var(--pill); padding: 10px 18px; font-size: 13px; box-shadow: var(--shadow-pop); animation: toastin var(--speed) ease; display: flex; align-items: center; gap: 8px; color: var(--text); }
.toast.error { border-color: var(--warn-border); color: var(--warn); }
.toast.success { border-color: var(--accent-border); color: var(--success); }
.toast .icon { width: 16px; height: 16px; }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- Empty / Loading ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--text-dim); }
.empty .icon { width: 40px; height: 40px; margin-bottom: 12px; opacity: .5; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.chip-select { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--card); cursor: pointer; font-size: 12px; user-select: none; transition: all var(--speed); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

hr.sep { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---------- Mobile ---------- */
.mobile-only { display: none; }
@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .sidebar {
        width: 100%; height: auto; flex-direction: row; position: fixed; bottom: 0; top: auto;
        border-right: none; border-top: 1px solid var(--border); justify-content: space-around;
        padding: 6px 4px; z-index: 50; box-shadow: 0 -1px 4px rgba(16,24,40,0.06);
    }
    .sidebar .brand { display: none; }
    .nav-spacer { display: none; }
    .main { padding-bottom: 64px; }
    .content { padding: 16px; }
    .board { grid-template-columns: 1fr; }
    .idea-board { grid-template-columns: 1fr; }
    .eh-board { grid-template-columns: 1fr; }
    .bp-actions { flex-direction: column; }
    .bp-actions .btn { width: 100%; }
    .kpi-row { grid-template-columns: 1fr; }
    .kpi-row { gap: 10px; }
    .panel { width: 100vw; }
    .prop-grid { grid-template-columns: 100px 1fr; }
    .topbar .search { max-width: none; }
    .desktop-only { display: none; }
    .mobile-only { display: inline-flex; }
    .cal-cell { min-height: 60px; }
    .dropdown { right: 8px; left: 8px; width: auto; }
    /* Bilder: „rechts daneben" gibt es mobil nicht – immer volle Breite untereinander */
    .article-body img.lib-img-right, .editor img.lib-img-right {
        float: none; width: 100%; margin: 10px 0;
    }
    .article-body { padding: 16px; }
    .img-popover { flex-wrap: wrap; max-width: calc(100vw - 24px); }
    /* Workspace-Switcher sitzt in der unteren Navileiste */
    .ws-slot { margin-bottom: 0; }
    .ws-caret { display: none; }
    .ws-name { max-width: 120px; font-size: 13px; border-right: none; }
    .ws-menu { left: 8px !important; right: 8px !important; top: auto !important; bottom: 72px; width: auto !important; }
}
