/* ============================================================
   ACARO Planner – Stylesheet
   Ruhiges, professionelles Workspace-Design
   Basis: Slate/Ink · Akzent: Indigo · funktionale Statusfarben
   ============================================================ */

:root {
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-2: #7c3aed;
    --accent-soft: #eef2ff;
    --accent-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --ring: 0 0 0 3px rgba(99,102,241,.35);

    --bg: #eef1f6;
    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --border: #e6eaf1;
    --border-strong: #cdd5e1;

    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #94a3b8;

    --sidebar-bg: #0f172a;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #4f46e5;

    --success: #16a34a;
    --success-soft: #dcfce7;
    --warning: #d97706;
    --warning-soft: #fef3c7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;

    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(15,23,42,.06), 0 2px 8px rgba(15,23,42,.05);
    --shadow-lg: 0 12px 32px -8px rgba(15,23,42,.22), 0 4px 12px rgba(15,23,42,.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
    --bg: #0a0f1d;
    --surface: #131c30;
    --surface-2: #0f1729;
    --border: #233048;
    --border-strong: #334155;
    --text: #e2e8f0;
    --text-soft: #94a3b8;
    --text-muted: #64748b;
    --accent-soft: #1e1b4b;
    --accent-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --ring: 0 0 0 3px rgba(129,140,248,.4);
    --sidebar-bg: #060a14;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 10px rgba(0,0,0,.35);
    --shadow-lg: 0 14px 38px -8px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    background-image:
        radial-gradient(1100px 520px at 100% -8%, color-mix(in srgb, var(--accent) 9%, transparent), transparent),
        radial-gradient(900px 480px at -8% 4%, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent);
    background-attachment: fixed;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
.muted { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; }
.hint { color: var(--text-muted); font-size: 12px; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- App-Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 248px; flex: none; background: var(--sidebar-bg);
    color: var(--sidebar-text); display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 11px;
    padding: 20px 22px; font-weight: 700; color: #fff; font-size: 16px;
}
.brand-mark {
    width: 32px; height: 32px; border-radius: 9px; background: var(--accent-grad);
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px;
    box-shadow: 0 4px 12px -2px rgba(79,70,229,.6);
}
.sidebar-nav { display: flex; flex-direction: column; padding: 8px 12px; gap: 2px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; position: relative;
    border-radius: var(--radius-sm); color: var(--sidebar-text);
    font-weight: 500; font-size: 13.5px; transition: background .12s, color .12s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar-nav a.active { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 14px -4px rgba(79,70,229,.7); }
.sidebar-nav a.active::before {
    content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0; background: #fff;
}
.sidebar-nav a.active .icon { color: #fff; }
.nav-section {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: #64748b; padding: 16px 12px 6px; font-weight: 600;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px; padding: 0 22px;
    position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-weight: 600; font-size: 15px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.menu-toggle { display: none; }

.content { padding: 26px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    padding: 9px 15px; font-size: 13.5px; font-weight: 600; font-family: inherit;
    transition: background .15s, box-shadow .15s, transform .08s, border-color .15s; white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 2px 8px -1px rgba(79,70,229,.45); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 4px 14px -2px rgba(79,70,229,.55); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-text { background: transparent; color: var(--text-soft); }
.btn-text:hover { background: var(--surface-2); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.05); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.05); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }
.icon-btn {
    width: 38px; height: 38px; border-radius: var(--radius-sm); border: 0; cursor: pointer;
    background: transparent; color: var(--text-soft); display: grid; place-items: center;
    position: relative; transition: background .12s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .icon { width: 20px; height: 20px; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 600; padding: 0; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }
.link-del { background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: 17px; line-height: 1; padding: 2px 5px; border-radius: 5px; }
.link-del:hover { color: var(--danger); background: var(--danger-soft); }
.link-del .icon { width: 15px; height: 15px; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--text-muted); font-size: 13px; }
.breadcrumb a { color: var(--text-soft); }

/* ---------- Flash ---------- */
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.flash {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500;
    border: 1px solid transparent;
}
.flash-success { background: var(--success-soft); color: #14532d; border-color: #bbf7d0; }
.flash-error { background: var(--danger-soft); color: #7f1d1d; border-color: #fecaca; }
.flash-info { background: var(--accent-soft); color: var(--accent-hover); border-color: #c7d2fe; }
.flash-close { background: none; border: 0; cursor: pointer; font-size: 18px; color: inherit; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* ---------- Avatare ---------- */
.avatar {
    width: 32px; height: 32px; border-radius: 50%; color: #fff; font-weight: 600;
    font-size: 12px; display: inline-grid; place-items: center; flex: none;
    box-shadow: 0 0 0 2px var(--surface);
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-more { background: var(--border-strong) !important; color: var(--text-soft); }
.assignee-stack { display: inline-flex; }
.assignee-stack .avatar { margin-left: -7px; }
.assignee-stack .avatar:first-child { margin-left: 0; }

/* ---------- Topbar: Benachrichtigungen + User ---------- */
.notif { position: relative; }
.notif-badge {
    position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--danger); color: #fff; border-radius: 8px; font-size: 10px; font-weight: 700;
    display: grid; place-items: center;
}
.notif-badge.hidden { display: none; }
.notif-panel {
    position: absolute; right: 0; top: 46px; width: 330px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    overflow: hidden; z-index: 50;
}
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: block; padding: 11px 15px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 13px; }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.unread { background: var(--accent-soft); }
.notif-item .nt-time { display: block; color: var(--text-muted); font-size: 11px; margin-top: 3px; }
.notif-empty { padding: 24px 15px; text-align: center; color: var(--text-muted); font-size: 13px; }

.user-menu { position: relative; }
.user-menu > .avatar { cursor: pointer; }
.user-dropdown {
    position: absolute; right: 0; top: 46px; width: 230px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 6px; display: none; z-index: 50;
}
.user-menu:hover .user-dropdown, .user-dropdown:hover { display: block; }
.user-info { padding: 10px 11px; display: flex; flex-direction: column; gap: 3px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-info span { color: var(--text-muted); font-size: 12px; }
.dropdown-item { width: 100%; text-align: left; background: none; border: 0; padding: 9px 11px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--text); font-family: inherit; }
.dropdown-item:hover { background: var(--surface-2); }
.role-pill, .self-pill, .ok-pill, .off-pill, .arch-pill {
    display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; width: fit-content;
}
.role-pill { background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border); }
.self-pill { background: var(--accent-soft); color: var(--accent); }
.ok-pill { background: var(--success-soft); color: #14532d; }
.off-pill { background: var(--surface-2); color: var(--text-muted); }
.arch-pill { background: var(--warning-soft); color: var(--warning); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-empty { color: var(--text-muted); font-size: 13px; padding: 16px 2px; text-align: center; }
.count { display: inline-block; background: var(--surface-2); color: var(--text-soft); border-radius: 20px; padding: 1px 8px; font-size: 12px; font-weight: 600; margin-left: 4px; }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 5px; }
.stat-num { font-size: 27px; font-weight: 750; letter-spacing: -.02em; }
.stat-label { color: var(--text-muted); font-size: 12.5px; font-weight: 500; }
.stat-warn .stat-num { color: var(--danger); }

.running-bar { display: flex; align-items: center; gap: 16px; background: linear-gradient(100deg, var(--accent), var(--accent-hover)); color: #fff; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; }
.running-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.running-info a { color: #fff; font-weight: 600; }
.running-time { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pulse { width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(255,255,255,.5)} 70%{box-shadow:0 0 0 9px rgba(255,255,255,0)} 100%{box-shadow:0 0 0 0 rgba(255,255,255,0)} }

.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel-wide { grid-column: 1 / -1; }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li a { flex: 1; color: var(--text); }
.mini-time { color: var(--text-muted); font-size: 12px; }
.mini-time.overdue { color: var(--danger); font-weight: 600; }

.prio-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.prio-dot.lg { width: 13px; height: 13px; }

/* ---------- Filter-Leiste ---------- */
.filter-bar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filter-bar input[type=search], .filter-bar input[type=date], .filter-bar select { min-width: 0; }
.inline-filter select { min-width: 160px; }

input, select, textarea {
    font-family: inherit; font-size: 13.5px; color: var(--text); background: var(--surface);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 11px;
    transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
input[type=color] { padding: 3px; height: 38px; width: 54px; cursor: pointer; }
input[type=range] { padding: 0; border: 0; }

/* ---------- Aufgaben-Liste ---------- */
.task-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.task-list-head { display: flex; justify-content: space-between; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); transition: background .1s; }
.task-row:hover { background: var(--surface-2); }
.task-row.is-overdue { box-shadow: inset 3px 0 0 var(--danger); }
.task-row.is-done .task-title { color: var(--text-muted); text-decoration: line-through; }
.task-row.dragging { opacity: .5; }
.task-row.drop-target { box-shadow: inset 0 2px 0 var(--accent); }
.task-main { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.task-title { font-weight: 550; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drag-handle { cursor: grab; color: var(--text-muted); font-size: 14px; user-select: none; }
.tree-toggle { background: none; border: 0; cursor: pointer; color: var(--text-muted); padding: 0; display: grid; place-items: center; transition: transform .12s; }
.tree-toggle .icon { width: 15px; height: 15px; }
.tree-toggle.collapsed { transform: rotate(0deg); }
.tree-toggle:not(.collapsed) { transform: rotate(90deg); }
.tree-spacer { width: 15px; display: inline-block; }
.task-children.collapsed { display: none; }
.task-meta { display: flex; align-items: center; gap: 12px; }
.thead-meta { font-weight: 600; }
.task-tags { display: inline-flex; gap: 4px; }
.tag-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.tag-chip.sm { font-size: 10px; padding: 1px 6px; }
.status-badge { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); white-space: nowrap; }
.status-badge.sm { font-size: 10.5px; padding: 2px 7px; }
.progress-mini { width: 70px; height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-mini span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.progress-val { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 32px; }
.task-due { font-size: 12.5px; color: var(--text-soft); min-width: 78px; text-align: right; }
.task-due.overdue { color: var(--danger); font-weight: 600; }
.tracked { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.tracked .icon { width: 13px; height: 13px; }
.row-action { color: var(--text-muted); display: grid; place-items: center; }
.row-action:hover { color: var(--accent); }
.row-action .icon { width: 16px; height: 16px; }

/* ---------- Aufgaben-Detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.detail-title-row { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.prio-badge, .proj-badge { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.rich-content { font-size: 14px; line-height: 1.65; color: var(--text-soft); }
.rich-content h3 { margin: 14px 0 6px; color: var(--text); }
.rich-content ul, .rich-content ol { padding-left: 20px; }
.rich-content a { color: var(--accent); }

.progress-edit { display: flex; align-items: center; gap: 12px; }
.progress-bar { flex: 1; height: 9px; background: var(--border); border-radius: 5px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.progress-range { flex: 1; }
.progress-num { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 42px; }

.subtask-list { display: flex; flex-direction: column; }
.subtask { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border); }
.subtask:last-child { border-bottom: 0; }
.subtask a { flex: 1; color: var(--text); font-weight: 500; }

.comment-form { display: flex; gap: 9px; margin-bottom: 16px; align-items: flex-start; }
.comment-form textarea { flex: 1; }
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 11px; }
.comment-body { flex: 1; }
.comment-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.comment-meta strong { color: var(--text); font-size: 13px; }
.comment-body p { margin: 0; font-size: 13.5px; color: var(--text-soft); }
.inline-del { display: inline; }

.detail-side .panel { padding: 16px; }
.time-summary { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.time-total { font-size: 24px; font-weight: 750; }
.time-est { color: var(--text-muted); font-size: 12px; }
.timer-live { display: flex; flex-direction: column; gap: 10px; }
.timer-clock { font-size: 26px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; color: var(--accent); }
.manual-time { margin-top: 12px; }
.manual-time summary { cursor: pointer; font-size: 13px; color: var(--text-soft); font-weight: 600; padding: 6px 0; }
.manual-time form { display: flex; flex-direction: column; gap: 9px; margin-top: 8px; }
.time-entries { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.time-entry { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: 13px; }
.te-meta { display: block; color: var(--text-muted); font-size: 11.5px; }
.te-note { display: block; color: var(--text-soft); font-size: 12px; font-style: italic; }
.te-running { color: var(--success); font-weight: 600; font-size: 12px; }

.meta-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.meta-dl dt { color: var(--text-muted); font-weight: 500; }
.meta-dl dd { margin: 0; color: var(--text); }
.meta-dl dd.overdue { color: var(--danger); font-weight: 600; }
.assignee-list { display: flex; flex-direction: column; gap: 6px; }
.assignee-pill { display: inline-flex; align-items: center; gap: 7px; }

.attach-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.attach-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.attach-item a { flex: 1; display: inline-flex; align-items: center; gap: 6px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-item a .icon { width: 14px; height: 14px; color: var(--text-muted); }
.attach-size { color: var(--text-muted); font-size: 11.5px; }
.upload-form { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.upload-form input[type=file] { flex: 1; min-width: 0; font-size: 12.5px; }

.reminder-list, .activity-list { list-style: none; margin: 0; padding: 0; }
.reminder-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 0; color: var(--text-soft); }
.reminder-list .icon { width: 14px; height: 14px; color: var(--text-muted); }
.reminder-list .sent { color: var(--success); font-weight: 600; margin-left: auto; }
.reminder-list .pending { color: var(--warning); font-weight: 600; margin-left: auto; }
.activity-list li { display: flex; gap: 10px; padding: 7px 0; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); margin-top: 5px; flex: none; }
.act-detail { display: block; font-size: 13px; }
.act-meta { display: block; color: var(--text-muted); font-size: 11.5px; }

/* ---------- Board ---------- */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.board-col { flex: 0 0 290px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 160px); }
.board-col-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 2px solid var(--c); font-weight: 650; font-size: 13.5px; }
.col-count { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1px 8px; font-size: 12px; color: var(--text-soft); }
.board-col-body { padding: 11px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 60px; }
.board-col-body.drop-target { background: var(--accent-soft); }
.board-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; cursor: grab; box-shadow: var(--shadow); transition: box-shadow .12s, transform .04s; }
.board-card:hover { box-shadow: var(--shadow-lg); }
.board-card.dragging { opacity: .5; }
.board-card.is-overdue { box-shadow: inset 3px 0 0 var(--danger); }
.card-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.card-title { font-weight: 600; color: var(--text); font-size: 13.5px; line-height: 1.35; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 9px; }
.card-foot { display: flex; align-items: center; gap: 9px; }
.card-foot .progress-mini { flex: 1; width: auto; }
.card-due { font-size: 11.5px; color: var(--text-muted); }
.card-due.overdue { color: var(--danger); font-weight: 600; }

/* ---------- Kalender ---------- */
.calendar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-weekdays div { padding: 10px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 110px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 7px; display: flex; flex-direction: column; gap: 5px; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.empty { background: var(--surface-2); }
.cal-cell.today { background: var(--accent-soft); }
.cal-date { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.cal-cell.today .cal-date { color: var(--accent); }
.cal-events { display: flex; flex-direction: column; gap: 3px; }
.cal-event { font-size: 11.5px; padding: 3px 7px; border-radius: 5px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.cal-event.overdue { background: var(--danger-soft); color: var(--danger); border-left-color: var(--danger); }
.month-nav { display: flex; gap: 5px; }

/* ---------- Gantt ---------- */
.gantt { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gantt-head { display: flex; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.gantt-label-col { flex: 0 0 220px; padding: 11px 15px; font-size: 12px; font-weight: 600; color: var(--text-muted); border-right: 1px solid var(--border); }
.gantt-timeline { position: relative; flex: 1; min-height: 38px; }
.gantt-head .gantt-timeline { height: 38px; }
.gantt-month { position: absolute; top: 11px; font-size: 11.5px; color: var(--text-muted); font-weight: 600; padding-left: 6px; border-left: 1px solid var(--border); }
.gantt-row { display: flex; border-bottom: 1px solid var(--border); }
.gantt-row:last-child { border-bottom: 0; }
.gantt-row .gantt-label-col { display: flex; align-items: center; font-weight: 500; color: var(--text); }
.gantt-row .gantt-label-col a { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-row .gantt-timeline { padding: 9px 0; }
.gantt-bar { position: absolute; top: 9px; height: 20px; background: color-mix(in srgb, var(--c) 28%, transparent); border: 1px solid var(--c); border-radius: 5px; overflow: hidden; min-width: 6px; }
.gantt-bar.overdue { border-color: var(--danger); }
.gantt-fill { display: block; height: 100%; background: var(--c); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 2; }

/* ---------- Projekte ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; }
.project-card.archived { opacity: .65; }
.project-color { width: 6px; flex: none; }
.project-body { padding: 16px; flex: 1; min-width: 0; }
.project-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-desc { color: var(--text-soft); font-size: 13px; margin: 7px 0; }
.project-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.span-all { grid-column: 1 / -1; }

/* ---------- Formulare ---------- */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.field > span em { color: var(--danger); font-style: normal; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; margin-bottom: 0; }
.field.grow { flex: 1; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; margin-bottom: 15px; cursor: pointer; }
.check input { width: 16px; height: 16px; }
.multi { min-height: 96px; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.settings-section { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.settings-section:last-of-type { border-bottom: 0; }
.settings-section h2 { margin-bottom: 14px; }
.section-hint { color: var(--text-muted); font-size: 12.5px; margin: -6px 0 14px; }
.test-mail-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-top: 16px; font-size: 13.5px; color: var(--text-soft); }

/* Rich-Text-Editor */
.rte-toolbar { display: flex; gap: 4px; padding: 6px; border: 1px solid var(--border-strong); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--surface-2); }
.rte-toolbar button { background: var(--surface); border: 1px solid var(--border); border-radius: 5px; cursor: pointer; padding: 4px 9px; font-size: 13px; color: var(--text); min-width: 30px; }
.rte-toolbar button:hover { background: var(--accent-soft); }
.rte { min-height: 130px; border: 1px solid var(--border-strong); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 11px 13px; background: var(--surface); font-size: 14px; line-height: 1.6; }
.rte:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.td-empty { text-align: center; color: var(--text-muted); padding: 26px; }
.cell-user { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.cell-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }

/* Zeitbericht-Zusammenfassung */
.report-summary { display: grid; grid-template-columns: 200px 1fr 1fr; gap: 16px; margin-bottom: 18px; align-items: start; }
.summary-panel { margin-bottom: 0; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.summary-row:last-child { border-bottom: 0; }

/* ---------- Status-Verwaltung ---------- */
.status-list { display: flex; flex-direction: column; gap: 8px; }
.status-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.status-item.dragging { opacity: .5; }
.status-swatch { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.status-name { font-weight: 600; flex: 1; }
.done-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--success); background: var(--success-soft); padding: 3px 9px; border-radius: 20px; }
.done-pill .icon { width: 13px; height: 13px; }
.status-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Backup ---------- */
.warn-box { background: var(--warning-soft); border: 1px solid #fde68a; color: #92400e; border-radius: var(--radius); padding: 14px 16px; font-size: 13px; margin-bottom: 18px; }
[data-theme="dark"] .warn-box { color: #fcd34d; border-color: #78350f; }

/* ---------- Modale ---------- */
.modal { border: 0; border-radius: var(--radius); padding: 0; box-shadow: var(--shadow-lg); width: 440px; max-width: calc(100vw - 32px); background: var(--surface); color: var(--text); }
.modal::backdrop { background: rgba(15,23,42,.5); backdrop-filter: blur(2px); }
.modal form { padding: 22px; }
.modal h2 { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 18px; }
.modal-actions .btn-danger-ghost { margin-right: auto; }

/* ---------- Leerzustand ---------- */
.empty-state { text-align: center; padding: 54px 24px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty-state h2 { margin-bottom: 7px; }
.empty-state p { color: var(--text-muted); margin: 0 0 18px; }

/* ---------- Export-Menü ---------- */
.export-menu { position: relative; }
.export-dropdown { position: absolute; right: 0; top: 42px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); display: none; flex-direction: column; min-width: 150px; padding: 5px; z-index: 40; }
.export-menu:hover .export-dropdown { display: flex; }
.export-dropdown a { padding: 8px 11px; border-radius: 6px; color: var(--text); font-size: 13px; }
.export-dropdown a:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- Auth-Seiten ---------- */
.auth-body { background: linear-gradient(135deg, #1e1b4b, #0f172a); min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 400px; padding: 34px 30px; }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .brand-mark { width: 50px; height: 50px; font-size: 26px; border-radius: 13px; margin: 0 auto 14px; }
.auth-brand h1 { font-size: 21px; }
.auth-brand p { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; }
.auth-form label span { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; }
.auth-card .flash { margin-bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .detail-grid, .form-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .report-summary { grid-template-columns: 1fr; }
    .dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: grid; }
    .content { padding: 16px; }
    .task-meta { gap: 8px; }
    .task-due, .tracked, .progress-mini { display: none; }
    .cal-cell { min-height: 76px; }
    .cal-event { font-size: 0; padding: 3px; }
    .scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 55; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar > * { width: 100%; }
}

/* ============================================================
   Inline-Anlage in der Aufgabenliste
   ============================================================ */
.list-empty-hint { padding: 16px; color: var(--text-muted); font-size: 13px; }
.task-add-row {
    display: flex; align-items: center; gap: 10px; padding: 11px 16px;
    border-top: 2px dashed var(--border); background: var(--surface-2);
}
.task-add-row .add-plus { color: var(--accent); display: grid; place-items: center; }
.task-add-row .add-plus .icon { width: 18px; height: 18px; }
.qa-title {
    flex: 1; min-width: 160px; border: 1px solid transparent; background: var(--surface);
    font-size: 14px; font-weight: 500;
}
.qa-title:focus { border-color: var(--accent); }
.qa-extra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qa-assignees { min-width: 130px; max-width: 180px; height: 38px; }
.qa-start, .qa-due { width: 150px; }
@media (max-width: 760px) {
    .task-add-row { flex-wrap: wrap; }
    .qa-extra { width: 100%; }
    .qa-start, .qa-due { flex: 1; width: auto; }
}

/* ============================================================
   Mindmap – frei anordnbare Aufgabenlandkarte
   ============================================================ */
.mm-zoom { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 2px; }
.mm-zoom .btn { min-width: 38px; justify-content: center; border: 0; }
.mm-zoom .btn:hover { background: var(--surface-2); }

.mind-viewport {
    position: relative; overflow: auto; height: calc(100vh - 196px); min-height: 480px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background:
        radial-gradient(1200px 700px at 50% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent),
        var(--surface-2);
    background-image:
        radial-gradient(circle, color-mix(in srgb, var(--border-strong) 55%, transparent) 1px, transparent 1.4px);
    background-size: 28px 28px; box-shadow: var(--shadow); cursor: grab; touch-action: none;
}
.mind-viewport.panning { cursor: grabbing; }
.mind-canvas { position: relative; }
.mind-edges { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.mind-edge { fill: none; stroke: var(--border-strong); stroke-width: 2; }
.mind-edge-cat { stroke: color-mix(in srgb, var(--accent) 45%, var(--border-strong)); stroke-width: 3; opacity: .85; }
.mind-edge-task { opacity: .5; }

.mind-node { position: absolute; transform: translate(-50%, -50%); cursor: grab; user-select: none; z-index: 2; transition: filter .12s; }
.mind-node:hover { filter: drop-shadow(0 8px 18px rgba(15,23,42,.18)); z-index: 5; }
.mind-node.dragging { cursor: grabbing; z-index: 20; filter: drop-shadow(0 14px 26px rgba(15,23,42,.28)); }
.mind-add, .mind-edit {
    width: 23px; height: 23px; border-radius: 50%; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text-soft); cursor: pointer; font-size: 14px; line-height: 1;
    display: inline-grid; place-items: center; padding: 0; transition: all .12s;
}
.mind-add:hover, .mind-edit:hover { background: var(--accent-grad); color: #fff; border-color: transparent; transform: scale(1.08); }
.mind-add-corner { position: absolute; right: -11px; bottom: -11px; box-shadow: var(--shadow); opacity: 0; }
.mind-node:hover .mind-add-corner { opacity: 1; }

/* Zentrum / Organisation */
.mind-org {
    display: grid; place-items: center; text-align: center; width: 168px; height: 168px;
    border-radius: 50%; color: #fff; padding: 18px;
    background: radial-gradient(circle at 32% 28%, #6366f1, #4338ca 70%, #3730a3);
    box-shadow: 0 18px 44px -10px rgba(67,56,202,.7), inset 0 2px 8px rgba(255,255,255,.25);
}
.mind-org-ring { position: absolute; inset: -10px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.mind-org-init { font-size: 30px; font-weight: 800; letter-spacing: .02em; line-height: 1; text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.mind-org-label { font-size: 13px; font-weight: 600; margin-top: 7px; opacity: .95; line-height: 1.25; max-width: 130px; }
.mind-org .mind-add-corner { right: 12px; bottom: 12px; }

/* Kategorie */
.mind-cat {
    display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 26px;
    background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--c) 55%, var(--border));
    color: var(--text); font-weight: 650; box-shadow: var(--shadow); white-space: nowrap;
}
.mind-cat-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.mind-cat-label { color: var(--c); font-size: 14px; }
.mind-cat-count { font-size: 11px; font-weight: 700; color: #fff; background: var(--c); border-radius: 20px; padding: 1px 8px; }
.mind-tools { display: inline-flex; gap: 4px; margin-left: 4px; }

/* Aufgabenkarte */
.mind-task {
    width: 216px; background: var(--surface); border: 1px solid var(--border);
    border-top: 3px solid var(--c); border-radius: var(--radius-sm); padding: 11px 13px 12px;
    box-shadow: var(--shadow);
}
.mind-task.is-overdue { border-top-color: var(--danger); }
.mind-task-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 9px; }
.mind-task-head .prio-dot { margin-top: 4px; }
.mind-task-title { font-weight: 650; font-size: 13.5px; color: var(--text); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mind-task-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 9px; }
.mind-badge { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.mind-due { font-size: 11px; color: var(--text-soft); display: inline-flex; align-items: center; gap: 4px; }
.mind-due.overdue { color: var(--danger); font-weight: 600; }
.mind-task-foot { display: flex; align-items: center; gap: 8px; }
.mind-task-foot .progress-mini { flex: 1; width: auto; height: 7px; }
.mind-prog { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mind-assignees { display: flex; margin-top: 10px; }
.mind-assignees .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.mind-assignees .avatar:first-child { margin-left: 0; }

.mind-input {
    position: absolute; transform: translate(-50%, 0); z-index: 40; background: var(--surface);
    border: 1.5px solid var(--accent); border-radius: var(--radius-sm); padding: 7px; box-shadow: var(--shadow-lg);
}
.mind-input input { width: 210px; border: 0; font: inherit; padding: 3px 5px; background: transparent; color: var(--text); }
.mind-input input:focus { outline: 0; }

/* ============================================================
   Liste – Direkt-Bearbeitung & Verfeinerung
   ============================================================ */
.task-list { box-shadow: var(--shadow); }
.task-row { transition: background .12s, box-shadow .12s; }
.task-row:hover { background: var(--surface-2); }
.progress-mini span { background: var(--accent-grad); }

/* Einrückungs-Hilfslinie für Unteraufgaben */
.task-main { position: relative; }
.depth-guide {
    position: absolute; left: 0; top: -10px; bottom: -10px; width: 0;
    border-left: 2px solid var(--border); margin-left: 2px;
}
.task-children { position: relative; }

.child-count {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 20px; padding: 1px 8px; margin-left: 2px;
}

/* Priorität als klickbarer Punkt */
button.prio-dot { border: 0; padding: 0; cursor: pointer; box-shadow: 0 0 0 0 transparent; transition: box-shadow .15s, transform .1s; }
button.prio-dot:hover { transform: scale(1.25); box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 0%, var(--border) 60%); }

/* Titel direkt bearbeiten */
.task-title.editable { cursor: text; border-radius: 6px; padding: 2px 6px; margin: -2px -6px; transition: background .12s; }
.task-title.editable:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.task-open { color: var(--text-muted); display: inline-grid; place-items: center; opacity: 0; transition: opacity .12s, color .12s; }
.task-open .icon { width: 15px; height: 15px; transform: rotate(0deg); }
.task-row:hover .task-open { opacity: 1; }
.task-open:hover { color: var(--accent); }

.inline-input {
    font: inherit; padding: 4px 8px; border: 1px solid var(--accent); border-radius: 6px;
    background: var(--surface); color: var(--text); box-shadow: var(--ring); min-width: 90px;
}
.task-title + .inline-input, .inline-input { max-width: 280px; }

/* Status als Inline-Auswahl (sieht aus wie Badge) */
.status-select {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    font-size: 11.5px; font-weight: 600; padding: 4px 22px 4px 10px; border-radius: 20px;
    color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%; background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat; max-width: 150px;
}
.status-select:focus-visible { outline: none; box-shadow: var(--ring); }

.progress-cell { display: flex; align-items: center; gap: 8px; }
.progress-val.editable { cursor: pointer; border-radius: 5px; padding: 1px 5px; }
.progress-val.editable:hover { background: var(--surface-2); color: var(--text); }
.task-due.editable { cursor: pointer; border-radius: 5px; padding: 2px 5px; }
.task-due.editable:hover { background: var(--surface-2); }

.assign-edit {
    width: 24px; height: 24px; border-radius: 50%; border: 1px dashed var(--border-strong);
    background: var(--surface); color: var(--text-muted); cursor: pointer; font-size: 15px; line-height: 1;
    display: inline-grid; place-items: center; margin-left: 4px; transition: all .12s;
}
.assign-edit:hover { border-style: solid; border-color: var(--accent); color: var(--accent); }

.assign-pop {
    position: absolute; z-index: 80; width: 250px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.assign-pop-head { padding: 10px 14px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--border); }
.assign-pop-list { max-height: 240px; overflow-y: auto; padding: 6px; }
.assign-pop-list label { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.assign-pop-list label:hover { background: var(--surface-2); }
.assign-pop-foot { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* Globaler Fokus-Ring für Formularfelder */
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }

/* ============================================================
   Design-Feinschliff v2 – modernere Anmutung
   ============================================================ */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1 { letter-spacing: -.02em; }

/* Sidebar: etwas mehr Tiefe und ein ruhiger Verlauf */
.sidebar { background: linear-gradient(180deg, #131d33 0%, var(--sidebar-bg) 60%); }
.sidebar-nav a { border-radius: 10px; font-weight: 500; letter-spacing: -.005em; }
.sidebar-nav a.active { box-shadow: 0 6px 18px -6px rgba(79,70,229,.75); }

/* Buttons: weicher, mit dezentem Lift */
.btn { border-radius: 10px; transition: transform .08s, box-shadow .15s, background .15s, filter .15s; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { box-shadow: 0 1px 1px rgba(15,23,42,.03); }

/* Karten/Listen: ruhigere Kanten, klarere Trennung */
.task-list { border-radius: var(--radius); }
.task-row { transition: background .12s, box-shadow .12s; }
.status-select { font-weight: 600; }

/* Mindmap: weniger „schlicht" – mehr Tiefe, Farbe, Klarheit */
.mind-cat {
    background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--c) 8%, var(--surface)));
    box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--c) 55%, transparent), var(--shadow);
}
.mind-cat-count {
    background: var(--c); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px;
    border-radius: 11px; display: inline-grid; place-items: center; padding: 0 6px; margin-left: 2px;
}
.mind-task {
    width: 218px; border-radius: 14px; padding: 12px 13px 11px;
    border: 1px solid var(--border); border-top: 3px solid var(--c);
    box-shadow: 0 6px 20px -10px rgba(15,23,42,.28), 0 1px 2px rgba(15,23,42,.06);
    transition: box-shadow .14s, border-color .14s;
}
.mind-task:hover { box-shadow: 0 14px 30px -10px rgba(15,23,42,.4); border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }
.mind-task.is-overdue { border-top-color: var(--danger); }
.mind-task-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.mind-task-head .prio-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.mind-task-title { font-weight: 650; font-size: 13.5px; color: var(--text); line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mind-task-title:hover { color: var(--accent); }
.mind-task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.mind-badge { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
    background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.mind-due { font-size: 11px; font-weight: 500; color: var(--text-muted); display: inline-flex; align-items: center; }
.mind-due.overdue { color: var(--danger); font-weight: 600; }
.mind-task-foot { display: flex; align-items: center; gap: 8px; }
.mind-task-foot .progress-mini { flex: 1; width: auto; height: 6px; }
.mind-prog { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.mind-assignees { display: flex; gap: 3px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border); }
.mind-assignees .avatar { box-shadow: 0 0 0 2px var(--surface); }

/* Eingang-Animation für ein lebendigeres Board */
@keyframes mmpop { from { opacity: 0; transform: translate(-50%, -50%) scale(.92); } to { opacity: 1; } }
.mind-node { animation: mmpop .18s ease-out; }
@media (prefers-reduced-motion: reduce) { .mind-node { animation: none; } .btn-primary:hover { transform: none; } }
