/* organi – stylesheet (leidang look).
   Dark only, no light theme, no prefers-color-scheme switch. Visual language
   (palette, type, radii, density) taken from the leidang design; structure and
   class names are organi's own. Restyle via the tokens in :root first. */

:root {
    color-scheme: dark;

    /* Accent (design default "periwinkle") + the design's pastel accents */
    --accent: #8b9cff;
    --accent-hover: #a3b1ff;
    --accent-soft: rgba(139, 156, 255, .12);
    --accent-ring: rgba(139, 156, 255, .22);
    --accent-line: #343a5c;
    --accent-text: #aeb8ff;
    --on-accent: #0b0c10;
    --link: #aeb8ff;
    --link-hover: #d3d9ff;
    --mint: #6ee7b7;
    --orange: #fdba74;
    --orange-strong: #fb923c;
    --yellow: #fcd34d;
    --pink: #f0abfc;
    --red: #f87171;
    --red-soft: #fca5a5;

    /* Sidebar */
    --sidebar-bg: #0e0f14;
    --sidebar-text: #a3a8b8;
    --sidebar-section: #8b90a0;
    --sidebar-item-hover: #171922;
    --sidebar-border: #1c1e27;
    --sidebar-active: #171922;
    --sidebar-nav-text: #a3a8b8;
    --sidebar-muted: #8b90a0;

    /* Surfaces, darkest to lightest */
    --bg: #0b0c10;          /* page */
    --surface: #101117;     /* columns, side boxes, grouped lists */
    --surface-2: #12141a;   /* inputs, secondary buttons */
    --bg-subtle: #14161c;   /* comment bubbles, menus, tiles */
    --card: #16181f;        /* raised cards */
    --row-hover: #171922;   /* row hover on dark surfaces */
    --bg-hover: #1c1f29;    /* hover on cards / controls */
    --bg-selected: #1f2230; /* selected segment */

    /* Lines */
    --border: #242733;
    --border-light: #22252f;
    --border-alt: #1c1e27;
    --border-faint: #1a1c24;
    --border-control: #2a2d38;
    --border-empty: #343846;
    --border-strong: #353948;
    --border-dashed: #343846;
    --border-dashed-2: #2e3240;
    --focus-ring: #8b9cff;

    /* Text */
    --text: #e8eaf2;
    --text-secondary: #c4c8d6;
    --text-tertiary: #a3a8b8;
    --text-icon: #a3a8b8;
    --muted: #8b90a0;
    --muted-light: #8b90a0;
    --muted-2: #8b90a0;
    --placeholder: #7e8394;

    /* Status */
    --error: #f87171;
    --danger-text: #fca5a5;
    --u-prod-bg: rgba(248, 113, 113, .12);
    --u-prod-fg: #fca5a5;
    --u-prod-dot: #f87171;
    --danger-border: rgba(248, 113, 113, .32);
    --danger-soft-hover: rgba(248, 113, 113, .2);
    --overdue-bg: rgba(248, 113, 113, .12);
    --overdue-border: rgba(248, 113, 113, .3);
    --success-bg: rgba(110, 231, 183, .1);
    --success-fg: #6ee7b7;
    --success-border: rgba(110, 231, 183, .28);

    /* Buckets: To Do accent, In Progress orange, Done mint, Backlog grey */
    --c-todo: var(--accent);
    --c-progress: var(--orange);
    --c-done: var(--mint);
    --c-neutral: #8b90a0;

    /* Urgency */
    --u-niedrig-bg: rgba(163, 168, 184, .12); --u-niedrig-fg: #c4c8d6; --u-niedrig-dot: #a3a8b8;
    --u-mittel-bg: rgba(252, 211, 77, .12);   --u-mittel-fg: #fcd34d; --u-mittel-dot: #fcd34d;
    --u-hoch-bg: rgba(251, 146, 60, .14);     --u-hoch-fg: #fdba74;   --u-hoch-dot: #fb923c;
    --badge-prod-bg: #f87171;
    --badge-prod-fg: #0b0c10;

    /* Fills */
    --fill-2: #1c1f29;
    --fill-4: #1c1f29;
    --fill-5: #1f222c;
    --fill-8: #22252f;
    --fill-9: #2a2d38;
    --avatar-bg: #a5b4fc;
    --avatar-fg: #0b0c10;
    --bg-inverse: #2a2d38;
    --pick-checked-bg: rgba(139, 156, 255, .1);
    --group-accent: var(--accent);

    /* Overlays and shadows */
    --backdrop: rgba(5, 6, 8, .7);
    --modal-backdrop: rgba(5, 6, 8, .7);
    --lightbox-bg: rgba(5, 6, 8, .9);
    --sh-pop: rgba(0, 0, 0, .55);
    --sh-menu: rgba(0, 0, 0, .55);
    --sh-float: rgba(0, 0, 0, .5);
    --sh-modal: rgba(0, 0, 0, .6);
    --sh-drawer: rgba(0, 0, 0, .55);
    --sh-lightbox: rgba(0, 0, 0, .6);
    --shadow-card: inset 0 1px 0 rgba(255, 255, 255, .03);
    --shadow-pop: 0 24px 48px rgba(0, 0, 0, .55);

    /* Radii */
    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 9px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-pill: 99px;

    /* Type */
    --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

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

a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1 { margin-top: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
::selection { background: rgba(139, 156, 255, .3); }

/* Icons: thin stroke as in the design (inline SVGs set their own width). */
.nav-item__icon svg, .nav-page-icon svg, .pstart-tile__icon svg, .pstart-action__icon svg,
.page-head__icon svg, .nb-side__icon svg, .nb-side__cog svg, .nb-side__trash svg,
.action-btn svg, .people-pop__trigger svg, .icon-btn svg, .topbar__logout svg, .topbar__menu svg,
.text-files__link svg, .dropzone__prompt > svg { stroke-width: 1.75; }

/* ---------- Narrow centered pages (login, errors) ---------- */

.container { max-width: 640px; margin: 12vh auto; padding: 0 1.25rem; }
.auth-card {
    background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--r-xl);
    box-shadow: var(--shadow-card); padding: 28px 32px 32px; max-width: 380px; margin: 0 auto;
}
.auth-card h1 { font-size: 22px; margin-bottom: 20px; }
.auth-card p { color: var(--text-secondary); }
.auth-brand {
    display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto 24px;
    font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -.01em;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.brand-logo { display: block; flex: none; width: 30px; height: 30px; }

/* ---------- Form basics ---------- */

label { font-weight: 500; }
input, textarea, select {
    font-family: var(--font); font-size: 14px; color: var(--text);
    padding: .6rem .75rem; border: 1px solid var(--border-light); border-radius: var(--r-md); background: var(--surface-2);
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
input[type="color"] { padding: 3px; cursor: pointer; }

.form-field { display: flex; flex-direction: column; }
.form-field > label, .form-field__label { font-size: 12px; font-weight: 500; color: var(--text-tertiary); margin-bottom: 6px; }
.form-field input[type="text"], .form-field input[type="email"], .form-field input[type="password"], .form-field textarea {
    width: 100%; padding: 10px 12px;
}
.form-field textarea { line-height: 1.6; min-height: 160px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-md);
    background: var(--accent); color: var(--on-accent);
    font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn--ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-control); font-weight: 500; }
.btn--ghost:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn--danger { background: var(--u-prod-bg); color: var(--u-prod-fg); border-color: var(--danger-border); }
.btn--danger:hover { background: var(--danger-soft-hover); }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn--block { display: flex; width: 100%; }

.icon-btn {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--muted); cursor: pointer; border: 1px solid transparent; border-radius: 7px;
}
.icon-btn:hover { color: var(--text); background: var(--bg-hover); }
.icon-btn svg { width: 16px; height: 16px; }

.error {
    color: var(--u-prod-fg); background: var(--u-prod-bg); border: 1px solid var(--danger-border); border-radius: var(--r-md);
    padding: .6rem .85rem; margin: 0 0 14px; font-size: 13px;
}

/* Flash messages below the topbar. */
.flashes { padding: 16px 32px 0; }
.flash {
    background: var(--success-bg); color: var(--success-fg); border: 1px solid var(--success-border); border-radius: var(--r-md);
    padding: .6rem .9rem; font-size: 13px; font-weight: 500; margin: 0 0 8px;
}
.flash--error { background: var(--u-prod-bg); color: var(--u-prod-fg); border-color: var(--danger-border); }

/* Small dropdown menus (<details>). */
.fdrop { position: relative; }
.fdrop > summary { list-style: none; }
.fdrop > summary::-webkit-details-marker { display: none; }
.fdrop__menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
    width: 260px; padding: 14px; display: flex; flex-direction: column; gap: 12px;
    background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.inline-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.inline-form input { width: 100%; }
.inline-form .btn { align-self: flex-start; }

/* ---------- App shell (sidebar + topbar + content) ---------- */

.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.app-main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); position: relative; z-index: 1; }

.sidebar {
    background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border);
    display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 20px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar__brand {
    display: flex; align-items: center; gap: 10px; flex: none;
    height: 44px; margin: 0 0 18px; padding: 0 8px;
    font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: var(--text);
}
.sidebar__section {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-top: 22px; padding: 0 4px 6px 10px;
    font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--sidebar-section);
}
.sidebar__add {
    width: 24px; height: 24px; padding: 0; margin: 0; border: 0; border-radius: var(--r-xs); flex: none;
    display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--sidebar-muted); cursor: pointer;
}
.sidebar__add:hover { background: var(--sidebar-item-hover); color: var(--text); }
.sidebar__add svg { width: 16px; height: 16px; stroke-width: 1.75; }
.sidebar__user {
    margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0 10px;
    border-top: 1px solid var(--sidebar-border);
}
.sidebar__boards + .sidebar__user, .nav-item--muted + .sidebar__user { margin-top: auto; }
.sidebar__user-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.sidebar__user-name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user-mail { font-size: 12px; color: var(--sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__logout-form { margin: 0; display: flex; }
.sidebar__logout {
    width: 30px; height: 30px; padding: 0; margin: 0; border: 0; border-radius: var(--r-sm); flex: none;
    display: flex; align-items: center; justify-content: center; background: transparent; color: var(--sidebar-muted); cursor: pointer;
}
.sidebar__logout:hover { background: var(--sidebar-item-hover); color: var(--danger-text); }
.sidebar__logout svg { stroke-width: 1.75; }
.sidebar .modal { text-transform: none; letter-spacing: 0; }
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm);
    font-size: 14px; font-weight: 400; color: var(--sidebar-nav-text);
    transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--sidebar-item-hover); color: var(--text); }
.nav-item.is-active { background: var(--sidebar-active); color: var(--text); font-weight: 500; }
.nav-item__icon { display: flex; flex: none; }
.nav-item__icon svg { width: 16px; height: 16px; display: block; }
.nav-item__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item--muted { color: var(--sidebar-muted); cursor: default; }
.nav-item--muted:hover { background: none; color: var(--sidebar-muted); }
.sidebar__boards { display: flex; flex-direction: column; gap: 2px; }
.nav-item--board { padding-left: 26px; font-size: 13px; color: var(--sidebar-text); }
.nav-item--board .nav-item__icon svg { width: 15px; height: 15px; }

.topbar {
    display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 32px;
    border-bottom: 1px solid var(--border-alt); background: var(--bg);
}
.topbar__crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.topbar__crumb a { color: var(--muted); }
.topbar__crumb a:hover { color: var(--text); }
.topbar__crumb-sep { color: var(--muted); }
.topbar__crumb-title { color: var(--text); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.topbar__spacer { flex: 1 1 0; min-width: 0; }
.topbar__user { display: flex; align-items: center; gap: 10px; }
.topbar__user-name { font-size: 13px; font-weight: 500; }
.topbar__divider { width: 1px; height: 22px; background: var(--border-light); flex: none; }
.topbar__logout-form { margin: 0; display: flex; }
.topbar__logout {
    width: 36px; height: 36px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-light); border-radius: var(--r-md); background: var(--surface-2); color: var(--text-icon); cursor: pointer;
    transition: border-color .15s, color .15s;
}
.topbar__logout:hover { border-color: var(--danger-border); color: var(--danger-text); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--avatar-bg); color: var(--avatar-fg); font-size: 12px; font-weight: 600; line-height: 1;
}
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack__item { box-shadow: 0 0 0 2px var(--stack-ring, var(--bg)); }
.avatar-stack__item + .avatar-stack__item { margin-left: -6px; }
.avatar-stack .avatar:not(.avatar--xs):not(.avatar--sm) + .avatar { margin-left: -8px; }
.avatar-stack__more { background: var(--fill-2); color: var(--text-secondary); }

/* Collapsible navigation on small screens (pure CSS checkbox toggle). */
.nav-toggle { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; display: none; }
.topbar__menu, .sidebar-backdrop { display: none; }
@media (max-width: 760px) {
    .app-shell { display: block; }
    .nav-toggle { display: block; }
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 300; width: min(300px, 85vw); height: 100%;
        transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s;
        box-shadow: 0 0 40px var(--sh-drawer);
    }
    .nav-toggle:checked ~ .app-shell .sidebar { transform: none; visibility: visible; transition: transform .2s ease; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 290; background: var(--backdrop); }
    .nav-toggle:checked ~ .app-shell .sidebar-backdrop { display: block; }
    .topbar { padding: 0 16px; gap: 10px; min-height: 56px; }
    .topbar__menu {
        display: flex; align-items: center; justify-content: center; flex: none;
        width: 36px; height: 36px; border: 1px solid var(--border-light); border-radius: var(--r-md);
        background: var(--surface-2); color: var(--text); cursor: pointer;
    }
    .topbar__user-name, .topbar__divider { display: none; }
    .flashes { padding: 12px 16px 0; }
    .content { padding: 20px 16px; }
}

/* ---------- Content & unified page head ---------- */

.content { padding: 28px 32px; }
.page-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.page-head--board { flex-wrap: wrap; row-gap: 12px; }
.page-head--board > :first-child { min-width: 0; }
.page-head__title {
    margin: 0; font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15;
    display: flex; align-items: center; gap: 12px; overflow-wrap: anywhere;
}
.page-head__sub { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.page-head__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.page-head__actions form { margin: 0; }

.board-section { border-top: 1px solid var(--border-alt); padding-top: 22px; }
.board-section + .board-section, .pstart-grid + .board-section, .board-empty + .board-section { margin-top: 32px; }
.board-section__title {
    font-size: 13px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .04em;
    margin: 0 0 14px; display: flex; align-items: center; gap: 8px;
}
.board-section__count {
    font-size: 12px; font-weight: 500; color: var(--text-tertiary); background: var(--fill-2);
    padding: 1px 8px; border-radius: var(--r-pill); text-transform: none; letter-spacing: 0;
}
.board-empty { color: var(--muted); font-size: 14px; }
.board-empty a, .auth-card p a { color: var(--link); }
.board-empty a:hover, .auth-card p a:hover { color: var(--link-hover); }

.inline-add { display: flex; gap: 8px; max-width: 560px; margin: 0; }
.inline-add input { flex: 1; min-width: 0; }

/* Tiles (start page, project page). */
.pstart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pstart-tile {
    display: flex; flex-direction: column; gap: 12px; padding: 14px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
    transition: border-color .15s, background .15s;
}
.pstart-tile:hover { border-color: var(--border-strong); }
.pstart-tile__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pstart-tile__icon { display: flex; color: var(--accent-text); flex: none; }
.pstart-tile__icon svg { width: 18px; height: 18px; }
.pstart-tile__name { font-weight: 500; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pstart-tile__meta { font-size: 12px; color: var(--muted); }
.pstart-tile__meta strong { color: var(--text-secondary); font-weight: 500; }

/* ---------- Board: Kanban ---------- */

.content--board { padding-bottom: 32px; }
.kanban {
    --bucket-pad: 10px;
    display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 16px;
    align-items: stretch; overflow-x: auto; padding-bottom: 8px;
}
.bucket {
    --bucket-color: var(--c-todo);
    display: flex; flex-direction: column; gap: 10px; min-height: 420px;
    background: var(--surface); border: 1px solid #191b23; border-radius: var(--r-xl);
    padding: var(--bucket-pad);
}
.bucket--in_progress { --bucket-color: var(--c-progress); }
.bucket--done { --bucket-color: var(--c-done); }
.bucket--backlog { --bucket-color: var(--c-neutral); }
.bucket__head { display: flex; align-items: center; gap: 9px; padding: 4px 4px 6px; }
.bucket__head::before {
    content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%;
    background: var(--bucket-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bucket-color) 14%, transparent);
}
.bucket__title { margin: 0; font-family: var(--font); font-size: 14px; font-weight: 600; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bucket__count { font-size: 12px; font-weight: 500; color: var(--text-tertiary); background: var(--fill-2); padding: 1px 8px; border-radius: var(--r-pill); font-variant-numeric: tabular-nums; }
.bucket__cards { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 60px; border-radius: var(--r-lg); }
.bucket__cards.drag-over { outline: 1.5px dashed var(--accent); outline-offset: 3px; background: rgba(139, 156, 255, .06); }
.bucket__add { margin: 0; }
.bucket__add input {
    width: 100%; height: 38px; background: transparent; border-color: transparent; font-size: 13px; text-align: center;
}
.bucket__add input::placeholder { color: var(--muted); }
.bucket__add input:hover { background: var(--row-hover); }
.bucket__add input:focus { background: var(--surface-2); border-color: var(--accent); text-align: left; }

.kcard {
    display: flex; flex-direction: column; gap: 10px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
    padding: 14px; cursor: grab; transition: border-color .15s, box-shadow .15s;
}
.kcard:hover { border-color: var(--border-strong); }
/* Done cards: the design dims them with opacity .6, which drops small muted text below 4.5:1 –
   dim via colors instead. */
.bucket--done .kcard { background: var(--bg-subtle); box-shadow: none; }
.bucket--done .kcard__title { color: var(--text-tertiary); text-decoration: line-through; text-decoration-color: #4a4f60; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
.kcard__id { font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.page-head__title .kcard__id { font-size: 16px; }
.kcard__title { font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.kcard__meta { display: flex; gap: 8px; }
.kcard__hint { font-size: 12px; color: var(--muted); }

/* ---------- Task detail ---------- */
.content--task { padding-top: 32px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.detail-main { min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.detail-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 18px; }
@media (max-width: 1000px) {
    .detail-grid { grid-template-columns: 1fr; }
    .detail-side { position: static; }
}
.detail__head { display: flex; flex-direction: column; gap: 12px; }
.detail__titleline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.detail__title {
    margin: 0; font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15;
    min-width: 0; overflow-wrap: anywhere;
}
.detail__id { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.detail__boards { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.board-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.board-link:hover, .board-link.is-primary { color: var(--link); }
.board-link:hover { color: var(--link-hover); }
.board-link__dot { width: 8px; height: 8px; flex: none; display: inline-block; border-radius: 3px; }
.detail__body { font-size: 15px; line-height: 1.7; color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 760px; }
.detail__body a, .entry__body a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(174, 184, 255, .4); text-underline-offset: 2px; }
.detail__body a:hover, .entry__body a:hover { color: var(--link-hover); }
.detail-desc { display: flex; flex-direction: column; gap: 12px; }
.detail-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-row__label {
    font-size: 13px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .04em;
    width: 120px; flex: none;
}
.detail-row__value { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; min-width: 0; flex: 1; }
.detail-row__empty { font-size: 13px; color: var(--muted); margin: 0; }
.mono-count {
    font-size: 12px; font-weight: 500; color: var(--text-tertiary); background: var(--fill-2);
    padding: 1px 8px; border-radius: var(--r-pill); font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0;
}
.person-inline { display: inline-flex; align-items: center; gap: 8px; }
.field-error { color: var(--danger-text); font-size: 12.5px; font-weight: 500; margin: 4px 0 0; }

/* Avatars */
.avatar--sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar--xs { width: 22px; height: 22px; font-size: 10px; }

/* Urgency: signal-bar meter (Urgency::icon) – niedrig 1, mittel 2, hoch 3 orange, produktionsgefährdend 3 red + "!" */
.urgency { display: inline-flex; align-items: center; flex: none; }
.umeter { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; flex: none; }
.umeter__bar { width: 3px; border-radius: 1px; background: #2e3240; }
.umeter__bar--1 { height: 5px; }
.umeter__bar--2 { height: 8px; }
.umeter__bar--3 { height: 12px; }
.umeter__bar.is-on { background: var(--text-secondary); }
.umeter--hoch .umeter__bar.is-on { background: var(--orange-strong); }
.umeter--prod .umeter__bar.is-on { background: var(--red); }
.umeter__alert { margin-left: 3px; align-self: center; font-size: 12px; font-weight: 700; line-height: 1; color: var(--red-soft); }
.urgency-btn {
    display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 32px; padding: 0 9px; margin: 0;
    border: 1px solid var(--border-control); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; font: inherit;
}
.urgency-btn:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.u-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; vertical-align: -1px; color: var(--text); }
.u-inline--hoch .u-inline__label { color: var(--orange); }
.u-inline--prod .u-inline__label { color: var(--red-soft); }

/* Small buttons */
.btn-add {
    width: 24px; height: 24px; border-radius: var(--r-xs); flex: none; padding: 0; margin: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 16px; line-height: 1;
}
.btn-add:hover { background: var(--bg-hover); color: var(--text); }
.btn-add--mention { font-size: 13px; font-weight: 600; width: 32px; height: 32px; border-radius: 7px; }
.btn-dashed {
    height: 28px; padding: 0 12px; margin: 0; cursor: pointer; background: transparent; border-radius: var(--r-pill);
    border: 1px dashed var(--border-dashed); font: inherit; font-size: 12.5px; font-weight: 500; color: var(--muted);
    display: inline-flex; align-items: center; list-style: none; transition: border-color .15s, color .15s;
}
.btn-dashed:hover { border-color: var(--accent); color: var(--link); }
summary.btn-dashed::-webkit-details-marker { display: none; }
.chip-x {
    width: 18px; height: 18px; border-radius: 50%; flex: none; padding: 0; margin: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: none; color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer;
}
.chip-x:hover { color: var(--danger-text); background: var(--u-prod-bg); }
.chip-x--danger { background: var(--u-prod-bg); color: var(--u-prod-fg); }
.chip-x--danger:hover { background: var(--danger-soft-hover); }
.icon-btn { background: transparent; padding: 0; margin: 0; flex: none; }
.icon-btn.is-desc { color: var(--link); background: var(--accent-soft); }
summary.icon-btn { list-style: none; }
summary.icon-btn::-webkit-details-marker { display: none; }
.fact-link { margin: 0; padding: 0; border: none; background: none; font: inherit; font-weight: 500; color: var(--text); cursor: pointer; text-align: left; }
.fact-link:hover { color: var(--link-hover); }

/* Inline edit */
.inline-edit { display: inline-flex; align-items: center; min-width: 0; margin: 0; }
.inline-edit__display { border: 0; margin: 0; padding: 0; background: none; font: inherit; cursor: pointer; text-align: left; color: inherit; letter-spacing: inherit; }
.inline-edit__display:hover { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
.inline-edit__input { font: inherit; padding: 2px 8px; max-width: 100%; border-radius: var(--r-sm); }
.inline-edit__input--title { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -.02em; width: min(60vw, 560px); }
.inline-edit--date .inline-edit__input, .inline-edit--text .inline-edit__input { font-size: 13px; width: 150px; }
.detail-group__name .inline-edit__input { width: 220px; }

/* Overdue chip */
.kcard__late { font-size: 11.5px; font-weight: 500; color: var(--danger-text); background: var(--overdue-bg); border: 1px solid var(--overdue-border); padding: 1px 8px; border-radius: var(--r-pill); }

/* Popovers (creator, watchers, further boards) */
.people-pop { position: relative; display: inline-flex; }
.people-pop__trigger {
    display: inline-flex; align-items: center; gap: 5px; height: 30px; min-width: 30px; padding: 0 7px; margin: 0;
    border: 1px solid var(--border-light); border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); cursor: pointer; font: inherit;
    transition: border-color .15s, color .15s, background .15s;
}
.people-pop__trigger svg { width: 15px; height: 15px; }
.people-pop__trigger:hover, .people-pop.is-open > .people-pop__trigger { color: var(--text); border-color: var(--border-strong); background: var(--bg-hover); }
.people-pop__trigger.is-self { color: var(--link); border-color: var(--accent-line); background: #171a26; }
.people-pop__count { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.people-pop__menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 280px;
    padding: 14px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
    flex-direction: column; gap: 10px;
}
.board-pop .people-pop__menu { left: 0; right: auto; }
.people-pop.is-open > .people-pop__menu { display: flex; }
.people-pop__title { font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.people-pop__empty { margin: 0; font-size: 13px; color: var(--muted); }
.people-pop__self { margin: 0; }
.people-pop__add { width: 100%; justify-content: center; }
.people-self { margin: 0; display: inline-flex; }
.board-pop__list { display: flex; flex-direction: column; gap: 6px; }
.board-pop__row { display: flex; align-items: center; gap: 8px; }
.board-pop__row .board-link { flex: 1; min-width: 0; }
.board-pop__remove { margin: 0; }
.member-list { display: flex; flex-direction: column; gap: 2px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-faint); }
.member-row:last-child { border-bottom: 0; }
.member-row__id { min-width: 0; flex: 1; }
.member-row__name { font-size: 13px; font-weight: 500; line-height: 1.3; }
.member-row__mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.member-row__form { margin: 0 0 0 auto; display: flex; }

/* Sidebar cards */
.side-card {
    background: var(--surface); border: 1px solid var(--fill-5); border-radius: var(--r-xl);
    padding: 16px 18px; display: flex; flex-direction: column; gap: 12px;
}
.side-card__title { font-size: 13px; font-weight: 600; color: var(--text-tertiary); margin: 0; display: flex; align-items: center; gap: 8px; }
.side-card__hint { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.45; }
.people-head { display: flex; align-items: center; gap: 8px; }
.people-icons { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* Assignee dropdown */
.pick-dd { position: relative; }
.pick-field {
    position: relative; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 12px 6px 8px;
    border: 1px solid var(--border-light); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer;
    transition: border-color .15s;
}
.pick-field:hover, .pick-dd.is-open .pick-field { border-color: var(--border-strong); }
.pick-field__chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pick-field__placeholder { font-size: 13.5px; color: var(--placeholder); padding-left: 4px; }
.pick-field__chev { color: var(--muted); flex: none; }
.pick-chip {
    display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 4px 0 3px; border-radius: var(--r-pill);
    background: var(--fill-8); font-size: 13px; font-weight: 500; max-width: 100%;
}
.pick-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-chip__form { margin: 0; display: flex; }
.pick-menu { margin: 6px 0 0; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.pick-dd .pick-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30; box-shadow: var(--shadow-pop); }
.pick-dd.is-open .pick-menu { display: block; }
.pick-menu--modal { margin: 0; border: 0; border-radius: 0; background: transparent; }
.pick-menu__search { padding: 8px; border-bottom: 1px solid var(--border-faint); }
.pick-menu__search input { width: 100%; height: 36px; padding: 0 12px; font-size: 13px; }
.pick-menu__list { max-height: 260px; overflow-y: auto; padding: 4px; }
.pick-menu__row { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; margin: 0; font-weight: 400; }
.pick-menu__row:hover { background: var(--row-hover); }
.pick-menu__row:has(.pick-menu__input:checked) { background: var(--pick-checked-bg); }
.pick-menu__row:has(.pick-menu__input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.pick-menu__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.pick-menu__id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pick-menu__name { font-size: 13.5px; font-weight: 500; }
.pick-menu__mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-menu__check { color: var(--accent); font-weight: 600; visibility: hidden; }
.pick-menu__input:checked ~ .pick-menu__check { visibility: visible; }
.pick-menu__none { margin: 0; padding: 14px 12px; font-size: 13px; color: var(--muted); }
.pick-menu__foot { display: flex; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border-faint); font-size: 12px; color: var(--muted); }
.pick-menu__foot > span { flex: 1; }
.pick-menu__done { margin: 0; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--link); cursor: pointer; }
.pick-menu__done:hover { color: var(--link-hover); }

/* Facts grid */
.detail__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border-faint); }
.detail__fact-label { font-size: 12px; font-weight: 400; color: var(--muted); margin: 0 0 4px; }
.detail__fact-value { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; min-height: 22px; }
.detail__fact-value--mono, .detail__fact-value--mono .fact-link { font-family: var(--font-mono); font-size: 12.5px; }
.detail__fact-value.is-overdue, .detail__fact-value.is-overdue .fact-link { color: var(--danger-text); }
.fact-select {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; height: 30px; padding: 0 8px; min-width: 0;
    border: 1px solid var(--border-control); border-radius: var(--r-sm); background: var(--surface-2); margin: 0;
    font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; color: var(--accent-text);
    white-space: nowrap; max-width: 100%;
}
.fact-select::after { content: '▾'; font-size: 11px; color: var(--muted); }
.fact-select:hover { border-color: var(--border-strong); }
.fact-select--in_progress { color: var(--c-progress); }
.fact-select--done { color: var(--c-done); }
.fact-select--backlog { color: var(--text-tertiary); }
.side-card--facts .detail-row__label { width: 64px; font-size: 12px; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }

/* Labels */
.tags-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tag-field__value { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* Tinted chips: --tag is the label color (TagChip). Text = 45 % color + 55 % white, background = 14 % tint;
   computed worst cases (pure blue, black) stay ≥ 4.5:1 on card and menu surfaces. */
.tag-chip {
    --tag: #888888;
    display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: var(--r-xs);
    padding: 2px 8px; font-size: 11.5px; font-weight: 500; max-width: 100%;
    color: var(--text-secondary); background: var(--fill-2);
    color: color-mix(in srgb, var(--tag) 45%, #fff); background: color-mix(in srgb, var(--tag) 14%, transparent);
}
.tag-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-chip--mini { padding: 2px 7px; font-size: 11px; }
.tag-field__search { width: 100%; }
.picklist--tags { max-height: 40vh; }
.tag-option-form { margin: 0; }
.tag-option { flex-direction: row !important; align-items: center; gap: 10px !important; }
.tag-option__box {
    width: 18px; height: 18px; border: 1.5px solid #3a3f4f; border-radius: var(--r-xs); flex: none;
    display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.tag-option.is-current .tag-option__box { background: var(--accent); border-color: var(--accent); }
.tag-option.is-current .tag-option__box::after { content: '✓'; color: var(--on-accent); font-weight: 600; }
.tag-field__create { border-top: 1px solid var(--border-faint); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.tag-field__create-title { font-size: 12px; color: var(--text-tertiary); }
.tag-field__create-row { display: flex; gap: 8px; align-items: center; margin: 0; }
.tag-field__create-row input[type="text"] { flex: 1; min-width: 0; padding: .45rem .7rem; }
.tag-field__create-row input[type="color"] { width: 38px; height: 34px; }

/* Effort */
.hours-icon { display: inline-flex; vertical-align: -2px; margin-right: 5px; }
.hours-icon svg { width: 12px; height: 12px; }
.effort-entries { min-width: 0; }
.effort-entry { position: relative; min-width: 0; padding: 11px 0; border-bottom: 1px solid var(--border-faint); }
.effort-entry__value { padding-right: 72px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 28px; }
.effort-entry__remark { margin: 2px 0 0; color: var(--text-secondary); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.effort-entry__remark:empty { display: none; }
.effort-entry__creator { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--text-tertiary); font-size: 12px; }
.effort-entry form { margin: 0; }
.effort-entry__remove { position: absolute; top: 11px; right: 0; color: var(--u-prod-fg); }
.effort-entry__edit { position: absolute; top: 11px; right: 32px; }
.effort-entry__editor[open] > summary { background: var(--accent-soft); color: var(--link); }
.effort-entry__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-faint); }
.effort-entry__field { display: flex; flex-direction: column; gap: 6px; color: var(--text-tertiary); font-size: 12px; font-weight: 500; }
.effort-entry__optional { color: var(--muted); font-weight: 400; }
.effort-entry__field input, .effort-entry__field textarea { width: 100%; padding: 8px 10px; font-size: 12.5px; }
.effort-entry__field--hours { max-width: 150px; }
.effort-entries__empty { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.effort-new { margin-top: 12px; }
.effort-new__toggle { justify-content: center; width: 100%; height: 34px; font-size: 13px; border-radius: var(--r-md); }
.effort-new[open] > .effort-new__toggle { display: none; }
.effort-new__fields { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.effort-new__field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-tertiary); }
.effort-new__hours {
    display: flex; align-items: center; width: 150px; height: 38px; border: 1px solid var(--border-light); border-radius: var(--r-md);
    background: var(--surface-2); transition: border-color .15s, box-shadow .15s;
}
.effort-new__hours:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.effort-new__hours input { flex: 1; min-width: 0; height: 36px; border: none; padding: 0 10px; font-size: 13px; background: transparent; box-shadow: none; }
.effort-new__hours input:focus { box-shadow: none; }
.effort-new__hours > span { padding: 0 10px; font-weight: 500; color: var(--muted); }
.effort-new__field textarea { padding: 8px 10px; font-size: 13px; resize: vertical; }
.effort-new__actions { display: flex; gap: 8px; }

/* Dependencies */
.dep-group + .dep-group { margin-top: 6px; }
.dep-row { display: flex; flex-direction: column; gap: 8px; }
.dep-row__head { display: flex; align-items: center; gap: 8px; }
.dep-row__label { font-size: 12px; font-weight: 500; color: var(--text-tertiary); }
.dep-row__add {
    height: 24px; min-width: 24px; padding: 0 8px; margin: 0; cursor: pointer; border-radius: var(--r-xs);
    background: transparent; border: 1px solid var(--border-control); font: inherit; font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
.dep-row__add:hover { border-color: var(--border-strong); background: var(--bg-hover); color: var(--text); }
.dep-row__items { display: flex; flex-direction: column; gap: 6px; }
.subtask-list { display: flex; flex-direction: column; gap: 6px; }
.dep-item { display: flex; align-items: center; gap: 6px; }
.dep-item form { margin: 0; }
.dep-item .linkrow { flex: 1; min-width: 0; }
.linkrow {
    --link-color: var(--c-todo);
    display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 8px 12px;
    background: var(--bg-subtle); border: 1px solid var(--border-faint); border-radius: var(--r-md);
    box-shadow: inset 3px 0 0 var(--link-color); transition: background .12s;
}
.linkrow:hover { background: var(--row-hover); }
.linkrow--in_progress { --link-color: var(--c-progress); }
.linkrow--done { --link-color: var(--c-done); }
.linkrow--backlog { --link-color: var(--c-neutral); }
.linkrow__id { font-family: var(--font-mono); font-size: 11px; color: var(--muted); line-height: 1.2; }
.linkrow__title { font-size: 13px; font-weight: 400; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Actions box with tooltips */
.action-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.action-form { margin: 0; display: inline-flex; }
.action-btn {
    position: relative; width: 36px; height: 36px; border-radius: var(--r-md);
    border-color: var(--border-control); background: var(--surface-2); color: var(--text-icon);
}
.action-btn:hover { border-color: var(--border-strong); }
.action-btn svg { width: 16px; height: 16px; }
.action-btn--danger { color: var(--u-prod-fg); }
.action-btn--danger:hover { border-color: var(--danger-border); color: var(--danger-text); background: var(--u-prod-bg); }
.action-btn[data-tip]:hover::after, .action-btn[data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 50;
    white-space: nowrap; padding: 5px 9px; border-radius: var(--r-xs); font-size: 12px; font-weight: 500; color: var(--text);
    background: var(--bg-inverse); box-shadow: 0 6px 16px var(--sh-float); pointer-events: none;
}

/* Attachments and group */
.detail-attach, .detail-group { display: flex; flex-direction: column; gap: 12px; }
.attach-list { display: flex; flex-direction: column; gap: 2px; }
.attach-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border-faint); }
.attach-row__name { font-size: 13px; font-weight: 500; color: var(--link); overflow-wrap: anywhere; }
.attach-row__name:hover { color: var(--link-hover); }
.attach-row__meta { font-size: 12px; color: var(--muted); margin-left: auto; flex: none; }
.attach-thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.attach-thumb {
    display: block; width: 120px; height: 120px; border: 1px solid var(--border); border-radius: var(--r-lg);
    overflow: hidden; cursor: zoom-in; background: var(--bg-subtle); transition: border-color .15s;
}
.attach-thumb:hover { border-color: var(--border-strong); }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.text-files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.text-files__item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.text-files__link { display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-weight: 500; min-width: 0; }
.text-files__link svg { width: 14px; height: 14px; flex: none; }
.text-files__link:hover { color: var(--link-hover); }
.text-files__size { color: var(--muted); font-size: 12px; }
.inline-img-link { display: inline-block; vertical-align: bottom; margin: 4px 0; cursor: zoom-in; }
.inline-img { display: block; max-width: min(100%, 480px); max-height: 280px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-subtle); }
.group-head { display: flex; align-items: center; gap: 12px; }
.group-head__name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.group-head__label { font-size: 13px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .04em; }
.group-head__side { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.group-member-list {
    display: flex; flex-direction: column; gap: 2px; padding: 6px;
    background: var(--surface); border: 1px solid var(--fill-5); border-radius: 14px;
}
.group-member-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r-md); }
a.group-member-row:hover { background: var(--row-hover); }
.group-member-row.is-here { background: var(--accent-soft); }
.group-member-row__check {
    width: 18px; height: 18px; flex: none; border: 1.5px solid #3a3f4f; border-radius: var(--r-xs);
    color: var(--on-accent); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.group-member-row.is-done .group-member-row__check { border-color: var(--c-done); background: var(--c-done); }
.group-member-row__id { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); width: 58px; flex: none; }
.group-member-row__title { flex: 1; min-width: 0; font-size: 14px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-member-row.is-done .group-member-row__title { color: var(--muted); text-decoration: line-through; text-decoration-color: #4a4f60; }
.group-member-row__here { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--link); flex: none; }
.group-member-row__bucket { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; color: var(--text-tertiary); width: 96px; flex: none; }
.group-member-row__bdot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--c-todo); }
.group-member-row__bdot--in_progress { background: var(--c-progress); }
.group-member-row__bdot--done { background: var(--c-done); }
.group-member-row__bdot--backlog { background: var(--c-neutral); }

/* Verlauf */
.detail-log { display: flex; flex-direction: column; gap: 18px; border-top: 1px solid var(--fill-5); padding-top: 24px; }
.detail-log__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-log__title { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .04em; flex: 1; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--fill-5); border-radius: 10px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { cursor: pointer; font-size: 13px; font-weight: 400; color: var(--muted); padding: 5px 12px; border-radius: 7px; transition: color .12s, background .12s; }
.seg label:hover { color: var(--text); }
.seg input:checked + label { background: var(--bg-selected); color: var(--text); font-weight: 500; }
.seg input:focus-visible + label { outline: 2px solid var(--focus-ring); }
.comment-form { margin: 0; display: flex; flex-direction: column; }
.comment-box { border: 1px solid var(--border-control); border-radius: 14px; background: var(--bg-subtle); transition: border-color .15s; }
.comment-box:focus-within { border-color: var(--border-strong); }
.comment-box > textarea { border: none; padding: 14px 16px; min-height: 90px; resize: vertical; background: transparent; }
.comment-box .field-error { margin: 0 16px 10px; }
.comment-box__foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 10px 10px 12px; }
.mention-input {
    min-height: 90px; max-height: 50vh; overflow-y: auto; padding: 14px 16px; font-size: 14px; line-height: 1.65;
    white-space: pre-wrap; overflow-wrap: anywhere; outline: none; cursor: text;
}
.modal .mention-input { border: 1px solid var(--border-light); border-radius: var(--r-md); background: var(--surface-2); min-height: 160px; }
.modal .mention-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.mention-input.is-empty::before { content: attr(data-placeholder); color: var(--placeholder); pointer-events: none; }
.mention-chip, .mention { background: var(--accent-soft); color: var(--link); font-weight: 500; padding: 0 4px; border-radius: 4px; }
.inline-img-edit { display: inline-block; vertical-align: bottom; max-width: 200px; max-height: 140px; margin: 2px 4px; border: 1px solid var(--border); border-radius: var(--r-sm); }
.dropzone {
    border: 1.5px dashed var(--border-dashed-2); border-radius: var(--r-lg); background: transparent;
    padding: 10px 12px; transition: border-color .12s, background .12s;
}
.comment-box .dropzone { margin: 0 12px 4px; }
.modal .dropzone { margin-top: 8px; }
.dropzone.is-over { border-color: var(--accent); background: rgba(139, 156, 255, .06); }
.dropzone__prompt { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.dropzone__prompt > svg { width: 16px; height: 16px; flex: none; }
.dropzone__text { flex: 1; min-width: 0; }
.dropzone__pick { flex: none; }
.rich-files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rich-files__item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.rich-files__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-list { display: flex; flex-direction: column; gap: 14px; }
.entry-list.is-log-hidden .tl-item--log { display: none; }
.tl-item { display: flex; flex-direction: column; gap: 10px; }
.entry { display: flex; gap: 14px; }
.entry__avatar { width: 34px; height: 34px; font-size: 12px; }
.entry__main {
    flex: 1; min-width: 0; padding: 14px 16px;
    background: var(--bg-subtle); border: 1px solid var(--fill-5); border-radius: 4px 14px 14px 14px;
}
.entry__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.entry__author { font-weight: 600; color: var(--text); }
.entry__via { font-family: var(--font-mono, monospace); font-size: 11px; color: var(--muted); border: 1px solid var(--border, currentColor); border-radius: 4px; padding: 0 4px; }
.entry__time { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.entry__body { font-size: 14px; line-height: 1.65; color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline-event { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); padding: 2px 2px 2px 11px; }
.timeline-event__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-dashed-2); background: transparent; flex: none; }
.timeline-event strong { color: var(--text-secondary); font-weight: 500; }

/* Dialogs */
.modal {
    border: 1px solid var(--border); border-radius: var(--r-xl); padding: 0; width: calc(100% - 32px); max-width: 440px;
    background: var(--bg-subtle); color: var(--text); box-shadow: 0 24px 64px var(--sh-modal);
}
.modal--wide { max-width: 720px; }
.modal::backdrop { background: var(--modal-backdrop); }
.modal form { margin: 0; }
.modal__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border-faint); }
.modal__title { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.modal__head .btn-add { margin-left: auto; font-size: 16px; }
.modal__body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.modal__body > textarea { width: 100%; min-height: 160px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border-faint); }
.picklist { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin: 0; }
.picklist__item {
    display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; margin: 0;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 12px; cursor: pointer; color: var(--text); font: inherit;
    transition: border-color .12s, background .12s;
}
.picklist__item:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.picklist__item.is-current { border-color: var(--accent); background: var(--accent-soft); }
.picklist__id { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.picklist__title { font-size: 13px; font-weight: 500; }
.member-picker__dialog { max-width: 520px; }
.member-picker__body { padding: 14px 20px 8px; display: flex; flex-direction: column; gap: 10px; }
.member-picker__search { width: 100%; }
.member-picker__list { max-height: min(52vh, 430px); overflow-y: auto; border-top: 1px solid var(--border-faint); padding-top: 4px; }
.member-picker__option {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 8px; margin: 0;
    border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit;
}
.member-picker__option:hover { background: var(--row-hover); }
.member-picker__option:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.member-picker__identity { min-width: 0; display: flex; flex-direction: column; }
.member-picker__identity strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 500; line-height: 1.3; }
.member-picker__identity small { overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 12px; }
.member-picker__empty { padding: 22px 6px; color: var(--muted); text-align: center; font-size: 13px; margin: 0; }
.task-picker__number { font-family: var(--font-mono); font-size: 11px; color: var(--muted); width: 56px; flex: none; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: var(--lightbox-bg); cursor: zoom-out; padding: 28px; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: var(--r-lg); box-shadow: 0 24px 64px var(--sh-lightbox); }

/* Board cards: urgency, number, labels, dates, effort, avatars */
.kcard__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kcard__top .kcard__id { margin-left: auto; }
.kcard__tags { margin-top: 0; }
.kcard__meta { flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 0; }
.kcard__date { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kcard__date svg { width: 13px; height: 13px; stroke-width: 1.75; }
.kcard__date.is-overdue { color: var(--danger-text); font-weight: 500; }
.kavatars { margin-left: auto; --stack-ring: var(--card); }
.bucket--done .kavatars { --stack-ring: var(--bg-subtle); }
.kcard__count { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.kcard__count svg, .kcard__date svg { width: 14px; height: 14px; stroke-width: 1.75; flex: none; }
.kcard__hint--mono, .kcard__date { font-family: var(--font-mono); }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Board header: progress, people, "Neue Aufgabe" */
.board-head__title { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.board-head__sub { margin: 0; }
.board-head__actions { gap: 16px; }
.board-head__actions .btn svg { width: 16px; height: 16px; stroke-width: 1.75; }
.board-progress { display: flex; flex-direction: column; gap: 6px; width: 180px; }
.board-progress__label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.board-progress__value { color: var(--text); font-weight: 500; font-family: var(--font-mono); font-size: 11.5px; }
.progress { display: block; height: 6px; border-radius: var(--r-pill); background: var(--fill-2); overflow: hidden; }
.progress__bar { display: block; height: 100%; max-width: 100%; border-radius: var(--r-pill); background: var(--accent); }
.progress--over .progress__bar { background: var(--red); }
.board-people { display: inline-flex; --stack-ring: var(--bg); }
.bucket__plus {
    margin-left: auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; flex: none;
    display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); cursor: pointer;
}
.bucket__plus:hover { background: var(--bg-hover); color: var(--text); }
.bucket__plus svg { width: 16px; height: 16px; stroke-width: 1.75; }
.bucket__more {
    height: 36px; margin: 0; border: 0; border-radius: var(--r-md); background: #15171e; color: var(--text-tertiary);
    font: inherit; font-size: 13px; cursor: pointer;
}
.bucket__more:hover { background: var(--bg-hover); color: var(--text); }
.bucket:not(.is-expanded) .is-overflow { display: none; }

/* Task groups on the board (per bucket, Tiedo .kgroup) */
.kgroup {
    display: flex; flex-direction: column; gap: 8px; padding: 6px 6px 8px;
    background: rgba(139, 156, 255, .04); border: 1px solid var(--accent-line); border-radius: 14px; cursor: grab;
}
.kgroup__head { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 2px 0 4px; font-size: 13px; }
.kgroup__grip { display: flex; color: var(--muted); flex: none; }
.kgroup__grip svg { width: 16px; height: 16px; stroke-width: 3; }
.kgroup__name { flex: 1; min-width: 0; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kgroup__name--none { font-weight: 500; color: var(--muted); }
.kgroup__count { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-tertiary); background: var(--fill-2); padding: 1px 8px; border-radius: var(--r-pill); flex: none; }
.kgroup__toggle {
    width: 26px; height: 26px; padding: 0; margin: 0; border: 0; border-radius: 7px; flex: none;
    display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); cursor: pointer;
}
.kgroup__toggle:hover { background: var(--bg-hover); color: var(--text); }
.kgroup__toggle svg { width: 16px; height: 16px; transition: transform .15s; }
.kgroup.is-collapsed .kgroup__toggle svg { transform: rotate(-90deg); }
.kgroup__members { display: flex; flex-direction: column; gap: 8px; min-height: 24px; }
.kcard--groupdrop { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }

/* Drag & drop: hidden source, "Hier ablegen" placeholder, tilted drag image */
.is-drag-source { display: none !important; }
.kdrop {
    display: flex; align-items: center; justify-content: center; gap: 8px; flex: none;
    border: 1.5px dashed var(--accent); border-radius: var(--r-lg); background: rgba(139, 156, 255, .06);
    color: var(--accent-text); font-size: 13px; font-weight: 500;
}
.kdrop svg { width: 16px; height: 16px; }
.drag-preview { position: fixed; top: -3000px; left: -3000px; padding: 24px; pointer-events: none; z-index: -1; }
.drag-preview__item {
    border-color: var(--accent) !important; transform: rotate(-1.4deg) translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .55), 0 0 0 4px var(--accent-ring) !important;
}
.drag-preview .is-overflow { display: flex; }
@media (prefers-reduced-motion: reduce) {
    .drag-preview__item { transform: none; }
    .kgroup__toggle svg { transition: none; }
}

/* Toast for failed drag & drop saves. */
.toast {
    position: fixed; right: 24px; bottom: 24px; z-index: 1000; max-width: min(380px, calc(100vw - 48px));
    padding: .75rem 1rem; font-size: 13px; font-weight: 500; border-radius: var(--r-lg);
    background: linear-gradient(var(--u-prod-bg), var(--u-prod-bg)), var(--bg-subtle); color: var(--u-prod-fg);
    border: 1px solid var(--danger-border); box-shadow: var(--shadow-pop);
}

/* ---------- Live updates (Mercure) ---------- */

.live-status { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-icon); opacity: .5; }
.live-status.is-live { background: var(--mint); opacity: 1; box-shadow: 0 0 0 3px rgba(110, 231, 183, .14); }
.live-status.is-offline { background: var(--red); opacity: 1; box-shadow: 0 0 0 3px rgba(248, 113, 113, .14); }

/* =====================================================================
   Bereiche: sidebar tree, Bereich header, settings, Papierkorb, notebooks
   ===================================================================== */
.nav-project > summary { list-style: none; }
.nav-project > summary::-webkit-details-marker { display: none; }
.nav-project__summary { cursor: grab; }
.nav-project__toggle { width: 14px; flex: none; display: inline-flex; justify-content: center; color: var(--sidebar-muted); cursor: pointer; }
.nav-project__toggle::before { content: ""; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 5px solid currentColor; transition: transform .15s; }
.nav-project[open] > summary .nav-project__toggle::before { transform: rotate(90deg); }
.nav-project__name { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.nav-project__name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-project.is-dragging { opacity: .5; }
.nav-project__pages { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 6px; }
.nav-page-icon { display: flex; flex: none; color: var(--sidebar-muted); }
.nav-page-icon svg { width: 15px; height: 15px; display: block; }
.nav-item__lock { display: inline-flex; flex: none; color: var(--sidebar-muted); }
.nav-item__lock svg { width: 12px; height: 12px; display: block; }

.vis-tag {
    display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: 0;
    padding: 3px 9px; border-radius: var(--r-pill); line-height: 1.3; white-space: nowrap; flex: none;
}
.vis-tag--private { background: rgba(252, 211, 77, .1); color: var(--yellow); }
.vis-tag--private::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.page-head__title .vis-tag { font-size: 12.5px; }
.closed-tag { display: inline-flex; font-size: 11.5px; font-weight: 500; padding: 1px 8px; border-radius: var(--r-pill); background: var(--fill-8); color: var(--text-secondary); }
.page-head__icon { display: inline-flex; color: var(--muted); }
.page-head__icon svg { width: 24px; height: 24px; }

/* Bereich header: "Zum Bereich hinzufügen". */
.page-head--project { flex-wrap: wrap; row-gap: 14px; }
.page-head--project > :first-child { min-width: 0; flex: 1; }
.pstart-actions { display: flex; align-items: stretch; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.pstart-add { position: relative; display: flex; align-items: stretch; border: 1px dashed var(--border-dashed); border-radius: 14px; padding: 16px 10px 8px; }
.pstart-add__title { position: absolute; top: -9px; left: 12px; padding: 0 6px; background: var(--bg); font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pstart-add__items { display: flex; gap: 6px; }
.pstart-action {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 80px; padding: 8px 10px;
    border-radius: 10px; color: var(--text-secondary); text-decoration: none; font-size: 12.5px; font-weight: 500; border: 1px solid transparent;
    transition: background .12s, color .12s;
}
.pstart-action:hover { background: var(--row-hover); color: var(--text); }
.pstart-action--manage { border-color: var(--border-control); background: var(--surface-2); }
.pstart-action--manage:hover { background: var(--bg-hover); }
.pstart-action__icon { position: relative; display: flex; color: var(--accent-text); }
.pstart-action--manage .pstart-action__icon { color: var(--text-icon); }
.pstart-action__icon svg { width: 22px; height: 22px; display: block; }
.pstart-action__icon--add::after {
    content: "+"; position: absolute; right: -7px; bottom: -5px; width: 15px; height: 15px; border-radius: 50%;
    background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; line-height: 15px; text-align: center; box-shadow: 0 0 0 2px var(--bg);
}
.pstart-progress { display: block; height: 4px; background: var(--fill-8); border-radius: var(--r-pill); overflow: hidden; }
.pstart-progress__bar { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); }
.pstart-members { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.pstart-member { font-size: 13px; }

.row-list { display: flex; flex-direction: column; padding: 6px; gap: 2px; background: var(--surface); border: 1px solid var(--fill-5); border-radius: 14px; }
.row-list__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); color: var(--text); text-decoration: none; }
.row-list__item:hover { background: var(--row-hover); }
.row-list__title { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; font-size: 14px; }
.row-list__meta, .form-hint-inline { font-size: 12.5px; color: var(--muted); font-weight: 400; }

/* Forms on settings / new pages */
.content--narrow { max-width: 860px; }
.form-card {
    background: var(--surface); border: 1px solid var(--fill-5); border-radius: var(--r-xl);
    padding: 18px 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px;
}
.form-card .board-section__title { margin: 0; }
.form-card .form-hint { margin: 0; }
.form-card--danger { border-color: var(--danger-border); }
.form-card select, .inline-add select {
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border-light); border-radius: var(--r-md);
    padding: 8px 10px; font: inherit; font-size: 13px;
}
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.seg-field { border: 0; padding: 0; margin: 0; gap: 8px; }
.seg-option {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px 14px; border: 1px solid var(--border-control);
    border-radius: var(--r-lg); background: var(--surface-2); cursor: pointer; font-size: 14px; font-weight: 500; transition: border-color .12s, background .12s;
}
.seg-option:hover { border-color: var(--border-strong); }
.seg-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.seg-option input { accent-color: var(--accent); }
.seg-option small { flex-basis: 100%; padding-left: 24px; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.member-list__item { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.member-list__item + .member-list__item { border-top: 1px solid var(--border-faint); }
.member-list__item > .person-inline { flex: 1; min-width: 0; }
.member-list__identity { display: flex; flex-direction: column; min-width: 0; }
.member-list__identity small { color: var(--muted); font-size: 12px; }
.member-list__item form { margin: 0; }
.member-add { max-width: none; flex-wrap: wrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Papierkorb */
.trash-list { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--fill-5); border-radius: 14px; }
.trash-list__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); }
.trash-list__item:hover { background: var(--row-hover); }
.trash-list__kind {
    flex: none; min-width: 78px; text-align: center; font-size: 11.5px; font-weight: 500; padding: 2px 8px;
    border-radius: var(--r-xs); background: var(--fill-8); color: var(--text-secondary);
}
.trash-list__kind--board { background: var(--accent-soft); color: var(--accent-text); }
.trash-list__kind--notebook, .trash-list__kind--note { background: var(--success-bg); color: var(--success-fg); }
.trash-list__main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.trash-list__main small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.trash-list__actions { display: flex; gap: 6px; flex: none; }
.trash-list__actions form { margin: 0; }

/* Notebooks */
.content--nb { padding-top: 24px; }
.nb-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.nb-side {
    position: sticky; top: 12px; background: var(--surface); border: 1px solid var(--fill-5); border-radius: var(--r-xl);
    padding: 12px; display: flex; flex-direction: column; gap: 10px;
}
.nb-side__head { display: flex; align-items: center; gap: 6px; padding: 2px 2px 0; }
.nb-side__title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.nb-side__title > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-side__icon, .nb-side__cog { display: flex; color: var(--accent-text); flex: none; }
.nb-side__cog { color: var(--muted); padding: 5px; border-radius: 7px; }
.nb-side__cog:hover { background: var(--bg-hover); color: var(--text); }
.nb-side__icon svg, .nb-side__cog svg { width: 16px; height: 16px; }
.nb-side__empty { font-size: 13px; color: var(--muted); margin: 4px 0; }
.nb-side__foot { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border-faint); padding-top: 10px; }
.nb-side__trash { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); text-decoration: none; padding: 2px 4px; }
.nb-side__trash:hover { color: var(--text); }
.nb-side__trash svg { width: 14px; height: 14px; }
.nb-tree__list { list-style: none; margin: 0; padding: 0; }
.nb-tree__list .nb-tree__list { padding-left: 12px; border-left: 1px solid var(--border-light); margin-left: 10px; }
.nb-tree__row { display: flex; align-items: center; border-radius: var(--r-sm); }
.nb-tree__row:hover { background: var(--row-hover); }
.nb-tree__row.is-active { background: var(--bg-selected); }
.nb-tree__link { flex: 1; min-width: 0; padding: 6px 10px; font-size: 13.5px; color: var(--text-tertiary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-tree__row:hover .nb-tree__link { color: var(--text); }
.nb-tree__row.is-active .nb-tree__link { color: var(--text); font-weight: 500; }
.nb-tree__add { visibility: hidden; padding: 0 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nb-tree__row:hover .nb-tree__add, .nb-tree__add:focus { visibility: visible; }
.nb-tree__add:hover { color: var(--text); }
.note__parent { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 6px; }
.note__parent:hover { color: var(--text); }
.note-body { font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-secondary); max-width: 760px; }
.note-body--boxed { background: var(--bg-subtle); border: 1px solid var(--fill-5); border-radius: 14px; padding: 16px 18px; }
.note-body--boxed h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text); white-space: normal; }
.note-form .mention-input, .note-form textarea { min-height: 320px; }
.btn--danger-text { color: var(--u-prod-fg); }
.note-conflict { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.note-history { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.note-history__list { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--fill-5); border-radius: 14px; }
.note-history__item a { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: var(--r-md); color: var(--text-secondary); text-decoration: none; font-size: 13px; }
.note-history__item a:hover { background: var(--row-hover); }
.note-history__item.is-active a { background: var(--bg-selected); color: var(--text); }
.note-history__item small { color: var(--muted); font-size: 12px; }
.note-history__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.note-history__bar form { margin: 0; }
@media (max-width: 900px) {
    .nb-wrap, .note-conflict, .note-history { grid-template-columns: minmax(0, 1fr); }
    .nb-side { position: static; }
    .pstart-actions { margin-left: 0; }
}
.nav-item--page { padding-left: 26px; font-size: 13.5px; color: var(--sidebar-text); }
.nav-item--page .nav-item__label { flex: 1; min-width: 0; }

/* =====================================================================
   Task detail (Leidang layout): top bar, meta line, tiles, threads, sidebar
   ===================================================================== */
.content--task { padding-top: 0; }
.task-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 -32px 32px; padding: 12px 32px;
    border-bottom: 1px solid var(--border-alt); background: var(--sidebar-bg);
}
.task-bar__back {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; max-width: 280px;
    border: 1px solid var(--border-light); border-radius: var(--r-md); background: var(--surface-2);
    color: var(--text); font-size: 13px; font-weight: 500;
}
.task-bar__back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-bar__back:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.task-bar__back svg, .task-bar__btn svg { width: 16px; height: 16px; stroke-width: 1.75; flex: none; }
.task-bar__crumb { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; font-size: 13px; color: var(--muted); }
.task-bar__number { color: var(--text); font-family: var(--font-mono); font-size: 12.5px; }
.task-bar__spacer { flex: 1; }
.task-bar__pos { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.task-bar__btn {
    width: 32px; height: 32px; padding: 0; margin: 0; border: 0; border-radius: var(--r-sm);
    display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); cursor: pointer;
}
.task-bar__btn:hover { background: var(--bg-hover); color: var(--text); }
.task-bar__btn.is-disabled { opacity: .4; cursor: default; }
.task-bar__btn.is-disabled:hover { background: transparent; color: var(--muted); }
.task-bar__divider { width: 1px; height: 18px; background: var(--border-light); margin: 0 4px; }
@media (max-width: 760px) { .task-bar { margin: 0 -16px 20px; padding: 10px 16px; } .task-bar__crumb { display: none; } }

.detail__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 13px; color: var(--muted); }
.detail__meta .detail__id { font-size: 12.5px; }
.detail__head { gap: 14px; }
.detail__title { font-size: 36px; }
.inline-edit__input--title { font-size: 30px; }
.detail-section { display: flex; flex-direction: column; gap: 12px; }
.detail-section__title {
    margin: 0; font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--text-tertiary);
    text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 8px;
}
.detail-desc__empty { align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; cursor: pointer; }
.detail-desc__empty:hover { color: var(--link-hover); }

/* Attachment tiles */
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.attach-tile {
    display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 12px; min-width: 0;
    border-radius: var(--r-lg); background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text);
    transition: border-color .15s;
}
a.attach-tile:hover { border-color: var(--border-strong); }
.attach-tile__icon, .attach-tile__thumb {
    width: 40px; height: 40px; flex: none; border-radius: var(--r-md); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: rgba(163, 168, 184, .12); color: var(--text-secondary);
}
.attach-tile__icon svg { width: 18px; height: 18px; stroke-width: 1.75; }
.attach-tile__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-tile--pdf .attach-tile__icon { background: rgba(251, 146, 60, .14); color: var(--orange); }
.attach-tile--text .attach-tile__icon { background: rgba(56, 189, 248, .14); color: #7dd3fc; }
.attach-tile--archive .attach-tile__icon { background: rgba(167, 139, 250, .14); color: #c4b5fd; }
.attach-tile--image { cursor: zoom-in; }
.attach-tile__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.attach-tile__name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-tile__meta { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.attach-tile--add {
    justify-content: center; gap: 8px; background: transparent; border: 1px dashed var(--border-dashed-2);
    color: var(--muted); font: inherit; font-size: 13px; cursor: pointer;
}
.attach-tile--add:hover { border-color: var(--accent); color: var(--link); }
.attach-tile--add svg { width: 16px; height: 16px; stroke-width: 1.75; }
.file-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    min-height: 120px; padding: 18px; text-align: center; cursor: pointer;
    border: 1.5px dashed var(--border-dashed-2); border-radius: var(--r-lg); color: var(--muted); font-weight: 400; font-size: 13px;
    transition: border-color .12s, background .12s;
}
.file-drop:hover, .file-drop.is-over, .file-drop:focus-within { border-color: var(--accent); background: rgba(139, 156, 255, .06); }
.file-drop svg { width: 20px; height: 20px; stroke-width: 1.75; }
.file-drop__link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.file-drop__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop__chosen { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

/* Verlauf: underlined tabs with counters */
.detail-log { border-top: 0; padding-top: 0; gap: 20px; }
.detail-log__head { border-bottom: 1px solid var(--fill-5); align-items: flex-end; }
.tabs { display: flex; gap: 24px; flex: 1; }
.tabs input { position: absolute; opacity: 0; pointer-events: none; }
.tabs label {
    padding: 0 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer;
    font-size: 14px; font-weight: 400; color: var(--muted); transition: color .12s, border-color .12s;
}
.tabs label:hover { color: var(--text); }
.tabs input:checked + label { color: var(--text); font-weight: 500; border-bottom-color: var(--accent); }
.tabs input:focus-visible + label { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.tabs__count { color: var(--muted); font-family: var(--font-mono); font-size: 12px; font-weight: 400; margin-left: 2px; }
.detail-log__head .icon-btn { margin-bottom: 8px; }

/* Comment box with toolbar */
.comment-compose { display: flex; gap: 14px; align-items: flex-start; }
.comment-compose > .comment-form { flex: 1; min-width: 0; }
.entry__avatar { width: 34px; height: 34px; font-size: 12px; }
.comment-box__foot { justify-content: flex-start; gap: 4px; padding: 6px 10px 10px; }
.comment-tool { width: 32px; height: 32px; }
.comment-box__hint { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.comment-box__send { margin-left: 8px; }
.comment-box__hint[hidden] + .comment-box__send { margin-left: auto; }
.comment-box__send svg { width: 14px; height: 14px; stroke-width: 1.75; }
.dropzone--compact { padding: 8px 12px; border-width: 1px; }
.dropzone--compact .dropzone__prompt { font-size: 12.5px; }

/* Threads: replies indented below their top-level comment */
.thread { gap: 8px; }
.entry__head .entry__time { margin-left: 0; }
.entry__head .entry__time::before { content: "·"; margin-right: 8px; color: var(--muted); }
.thread__replies { display: flex; flex-direction: column; gap: 8px; margin-left: 48px; padding-left: 16px; border-left: 2px solid var(--fill-5); }
.entry--reply .entry__main { padding: 10px 14px; }
.entry--reply .entry__avatar { width: 26px; height: 26px; font-size: 10.5px; }
.thread__reply { margin-left: 48px; }
.thread__reply > summary {
    display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
    font-size: 12px; color: var(--muted); cursor: pointer; list-style: none;
}
.thread__reply > summary::-webkit-details-marker { display: none; }
.thread__reply > summary:hover { background: var(--bg-hover); color: var(--text); }
.thread__reply > summary svg { width: 14px; height: 14px; stroke-width: 1.75; }
.thread__reply[open] > summary { color: var(--link); }
.thread__reply .comment-form { margin-top: 8px; }
.thread__reply-count { color: var(--muted); }
.entry:target .entry__main { border-color: var(--accent-line); }

/* Sidebar: status button + Beobachten */
.side-status { display: flex; gap: 8px; }
.status-btn {
    --status: var(--c-todo);
    flex: 1; height: 40px; padding: 0 14px; margin: 0; border: 0; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--status); color: var(--on-accent); font: inherit; font-size: 13px; font-weight: 600;
}
.status-btn--in_progress { --status: var(--c-progress); }
.status-btn--done { --status: var(--c-done); }
.status-btn--backlog { --status: var(--c-neutral); }
.status-btn:hover { filter: brightness(1.08); }
.status-btn__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--on-accent); flex: none; }
.status-btn svg { width: 14px; height: 14px; stroke-width: 2; }
.side-status__watch { margin: 0; display: flex; }
.watch-btn {
    height: 40px; padding: 0 14px; margin: 0; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-control); background: var(--surface-2);
    color: var(--text); font: inherit; font-size: 13px; font-weight: 500;
}
.watch-btn:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.watch-btn.is-on { border-color: var(--accent-line); background: #171a26; color: var(--accent-text); }
.watch-btn svg { width: 16px; height: 16px; stroke-width: 1.75; }

/* Details: two-column label/value list */
.side-card--details { padding: 6px 18px 6px; gap: 0; }
.side-card--details .side-card__title { padding: 12px 0 6px; }
.details-list { margin: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); font-size: 13px; }
.details-list > dt { padding: 11px 0; color: var(--muted); border-top: 1px solid var(--border-faint); }
.details-list > dd {
    margin: 0; padding: 8px 0; min-height: 42px; border-top: 1px solid var(--border-faint);
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0;
}
.details-list__mono, .details-list__mono .fact-link { font-family: var(--font-mono); font-size: 12.5px; }
.details-list .fact-link { display: inline-flex; align-items: center; gap: 6px; }
.details-list .fact-link svg { width: 14px; height: 14px; stroke-width: 1.75; }
.details-list > dd.is-overdue, .details-list > dd.is-overdue .fact-link { color: var(--danger-text); }
.details-list__people { flex-direction: column; align-items: flex-start !important; }
.details-person { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.details-person__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details-person__rm { margin: 0; display: flex; }
.details-list__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.details-list .people-self { margin: 0; }
.side-card--row { flex-direction: row; align-items: center; }
.side-card__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.side-watchers { --stack-ring: var(--surface); }
.side-card__headline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.time-sum { font-size: 13px; color: var(--muted); }
.time-sum strong { color: var(--text); font-weight: 500; font-family: var(--font-mono); font-size: 12.5px; }
.time-sum.is-over strong { color: var(--danger-text); }
.time-over { margin: 0; font-size: 12px; font-weight: 500; color: var(--danger-text); }

/* Dependencies as relation chips (terms Vorher/Nachher) */
.dep-row + .dep-row { margin-top: 6px; }
.rel-list { display: flex; flex-direction: column; gap: 2px; }
.rel-item { display: flex; align-items: center; gap: 6px; }
.rel-item__rm { margin: 0; display: flex; }
.rel {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 9px 12px; margin: 0 0 0 -12px;
    border-radius: 10px; color: var(--text); transition: background .12s;
}
.rel:hover { background: var(--row-hover); }
.rel__kind { font-size: 12px; font-weight: 500; color: var(--orange); }
.rel--after .rel__kind { color: var(--accent-text); }
.rel.is-done .rel__kind { color: var(--mint); }
.rel__task { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel__id { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.toast--success {
    background: linear-gradient(var(--success-bg), var(--success-bg)), var(--bg-subtle); color: var(--success-fg); border-color: var(--success-border);
}

/* ---------- Task groups: "Gruppe auflösen" ---------- */

.group-dissolve { margin: 0; display: flex; }
.kgroup__action {
    width: 26px; height: 26px; padding: 0; margin: 0; border: 0; border-radius: 7px; flex: none;
    display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); cursor: pointer;
}
.kgroup__action:hover { background: var(--bg-hover); color: var(--danger-text); }
.kgroup__action svg { width: 15px; height: 15px; stroke-width: 1.75; }
.group-head__side { display: flex; align-items: center; gap: 12px; }
.group-dissolve__btn { gap: 6px; }
.group-dissolve__btn svg { width: 14px; height: 14px; stroke-width: 1.75; }


/* ---------- Profile ---------- */

/* Sidebar: profile (gear) next to logout */
.sidebar__profile.is-active { background: var(--sidebar-active); color: var(--text); }
.sidebar__profile:hover { color: var(--text); }
.sidebar__profile svg { width: 18px; height: 18px; }

/* Profile */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head__avatar { width: 44px; height: 44px; font-size: 15px; }
.profile-form { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }

/* Profile: personal API keys */
.api-key-new { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; }
.api-key-new__row { max-width: none; }
.api-key-new__value { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface); color: var(--text); border: 1px solid var(--border-light); border-radius: var(--r-md); padding: 8px 10px; }
.api-key-list__item > .member-list__identity { flex: 1; }
.form-card .form-hint code { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-secondary); }
.api-key-list__prefix { font-family: var(--font-mono); font-size: 11.5px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.api-key-form { padding-top: 12px; border-top: 1px solid var(--border-faint); max-width: 560px; }
.api-key-form__title { margin: 0; font-size: 13px; font-weight: 600; }
.api-key-form__projects { border: 0; padding: 0; margin: 0; gap: 6px; }
.api-key-form__projects legend { font-size: 12px; font-weight: 500; color: var(--text-tertiary); margin-bottom: 6px; padding: 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }

/* ---------- Meine Aufgaben (Kalender | Board) ---------- */

/* View switcher in the page header (links styled like .seg radios) */
.seg--views a { font-size: 13px; color: var(--muted); padding: 5px 14px; border-radius: 7px; text-decoration: none; transition: color .12s, background .12s; }
.seg--views a:hover { color: var(--text); }
.seg--views a.is-active { background: var(--bg-selected); color: var(--text); font-weight: 500; }
.seg--views a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

/* Board of a card in cross-board views */
.board-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kcard__board { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-tertiary); min-width: 0; }
.kcard__board { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bucket__empty { margin: 8px 4px; font-size: 13px; color: var(--muted); text-align: center; }
.bucket__cards.drag-over .bucket__empty { display: none; }

/* Calendar: rolling window, task bars across their period */
.week { background: var(--surface); border: 1px solid #191b23; border-radius: var(--r-xl); padding: 10px; overflow-x: auto; }
.week__grid {
    display: grid; grid-template-columns: repeat(var(--cols), minmax(118px, 1fr));
    grid-template-rows: auto repeat(var(--lanes), 44px) minmax(96px, 1fr);
    column-gap: 0; min-width: calc(var(--cols) * 118px); position: relative;
}
/* Each day header stays in its own column: min-width 0 so the grid track does
   not grow with the content, and the "Heute" badge wraps below the date when
   the column is too narrow for one line. */
.week__head {
    grid-row: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; overflow: hidden;
    padding: 6px 10px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border-alt);
    font-variant-numeric: tabular-nums;
}
.week__dayname { font-size: 12px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .04em; }
.week__date { font-size: 15px; font-weight: 600; color: var(--text); }
.week__head.is-weekend .week__dayname, .week__head.is-weekend .week__date { color: var(--muted); }
.week__today {
    margin-left: auto; flex: none; white-space: nowrap; font-size: 11px; font-weight: 600; color: var(--on-accent); background: var(--accent);
    padding: 1px 8px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .04em;
}
.week__head.is-today { border-bottom-color: var(--accent); }
.week__cell { grid-row: 2 / -1; border-left: 1px solid var(--border-faint); border-radius: var(--r-sm); transition: background .12s; }
.week__cell.is-first { border-left: 0; }
.week__cell.is-weekend { background: rgba(255, 255, 255, .012); }
.week__cell.is-today { background: var(--accent-soft); }
.week__cell.drag-over { background: rgba(139, 156, 255, .1); outline: 1.5px dashed var(--accent); outline-offset: -3px; }
.week__empty { margin: 12px 4px 4px; font-size: 13px; color: var(--muted); }
.week-bar {
    --bar-color: var(--c-todo);
    position: relative; z-index: 1; align-self: center; margin: 0 4px; min-width: 0; overflow: hidden;
    display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; min-height: 38px;
    background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--bar-color);
    border-radius: var(--r-md); box-shadow: var(--shadow-card); color: var(--text); text-decoration: none; cursor: grab;
    transition: border-color .15s;
}
.week-bar:hover { border-color: var(--border-strong); border-left-color: var(--bar-color); }
.week-bar--in_progress { --bar-color: var(--c-progress); }
.week-bar--done { --bar-color: var(--c-done); background: var(--bg-subtle); }
.week-bar--backlog { --bar-color: var(--c-neutral); }
.week-bar--done .week-bar__title { color: var(--text-tertiary); text-decoration: line-through; text-decoration-color: #4a4f60; }
.week-bar.is-clipped-start { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.week-bar.is-clipped-end { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; border-right-style: dashed; }
.week-bar.is-late { border-color: var(--overdue-border); }
.week-bar.is-dragging-bar { opacity: .35; }
.week-bar__id { font-family: var(--font-mono); font-size: 11px; color: var(--muted); flex: none; }
.week-bar__title { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-bar__urgency { flex: none; }
.week-bar.is-short .week-bar__id, .week-bar.is-short .week-bar__hours { display: none; }
.week-bar.is-short { padding-left: 10px; gap: 6px; }
.week-bar__hours { flex: none; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.week-unscheduled { margin-top: 24px; }
.mine-row__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-row .row-list__title { min-width: 0; }
