/* ========================================================================
   SIMTU Components — odpowiedniki widgetów z trunk/CLAUDE.md sekcja 5.
   Każdy komponent zgodny z designem Qt'owego SIMTU.
   ======================================================================== */

/* ── App layout (titlebar + sidebar + content) ──────────────────────── */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.titlebar {
    height: var(--titlebar-h);
    background: var(--bg-void);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 var(--panel-pad);
    flex-shrink: 0;
    -webkit-app-region: drag;       /* PWA standalone */
    user-select: none;
}

.titlebar .logo {
    width: 26px;
    height: 26px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 13px;
}

.titlebar .title {
    margin-left: var(--space-3);
    font: 500 12px/1 "Inter", sans-serif;
    color: var(--text-secondary);
}

.titlebar .actions {
    margin-left: auto;
    display: flex;
    gap: var(--space-2);
    -webkit-app-region: no-drag;
}

.titlebar .actions button {
    padding: 4px 10px;
    font: 500 11px "Inter", sans-serif;
    color: var(--text-secondary);
    background: rgba(29, 29, 29, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}
.titlebar .actions button:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ── Main area (sidebar + content) ──────────────────────────────────── */
.main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ── Sidebar — Left icon rail ───────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-void);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    gap: var(--module-gap);
    flex-shrink: 0;
}

.sidebar-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.sidebar-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sidebar-icon:hover {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}
.sidebar-icon.active {
    background: var(--accent);
    color: white;
}
.sidebar-spacer { flex: 1; }
.sidebar-sep {
    width: 32px;
    height: 1px;
    background: var(--border-subtle);
    margin: 2px 0;
}

/* ── Content area (top tabs + page) ─────────────────────────────────── */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tabbar {
    height: var(--nav-h);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    gap: 2px;
    flex-shrink: 0;
}

.tab {
    padding: 0 14px;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    font: 500 10px/1 "Inter", sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.tab:hover  { color: var(--text-primary); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }

.page {
    flex: 1;
    overflow-y: auto;
    padding: var(--panel-pad);
}

/* ── Glazed dark panel / module ─────────────────────────────────────── */
.module {
    background: var(--bg-module);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

/* ── Status badge (pill) ─────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font: 500 10px/14px "Inter", sans-serif;
    border: 1px solid;
}
.badge-success { background: rgba(34,197,94,0.12);  color: #4ADE80; border-color: rgba(34,197,94,0.3); }
.badge-warning { background: rgba(245,158,11,0.12); color: #FCD34D; border-color: rgba(245,158,11,0.3); }
.badge-danger  { background: rgba(239,68,68,0.12);  color: #F87171; border-color: rgba(239,68,68,0.3); }
.badge-info    { background: rgba(59,130,246,0.12); color: #60A5FA; border-color: rgba(59,130,246,0.3); }
.badge-high    { background: var(--status-warning); color: #1a1a1a;  border-color: transparent; }

/* ── Avatar badge (gradient circles) ─────────────────────────────────── */
.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 700 9px/1 "Inter", sans-serif;
    color: white;
    border: 2px solid var(--bg-primary);
    flex-shrink: 0;
}
.avatar.lg { width: 36px; height: 36px; font-size: 11px; }
.avatar-stack > .avatar + .avatar { margin-left: -6px; }

/* Domyślne gradient'y per inicjały — CLAUDE.md §2 */
.avatar.av-sb { background: linear-gradient(135deg, #EC4899, #8B5CF6); }
.avatar.av-ec { background: linear-gradient(135deg, #3B82F6, #06B6D4); }
.avatar.av-db { background: linear-gradient(135deg, #8B5CF6, #6366F1); }
.avatar.av-mt { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.avatar.av-md { background: linear-gradient(135deg, #10B981, #3B82F6); }
.avatar.av-default { background: linear-gradient(135deg, #6B7280, #4B5563); }

/* ── Search bar (Inter Medium 10px, 16px height) ────────────────────── */
.search-bar {
    height: 26px;
    background: var(--bg-input);
    border: none;
    border-radius: var(--radius-md);
    padding: 0 9px;
    color: var(--text-primary);
    font: 500 10px/14px "Inter", sans-serif;
    outline: none;
}
.search-bar::placeholder { color: var(--text-secondary); }
.search-bar:focus { box-shadow: 0 0 0 1px var(--accent-border); }

/* ── Primary action button (magenta accent) ─────────────────────────── */
.btn-accent {
    background: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    padding: 6px 14px;
    font: 600 11px "Inter", sans-serif;
    border: none;
    transition: background 0.15s;
}
.btn-accent:hover  { background: var(--accent-hover); }
.btn-accent:active { background: #C40058; }
.btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Secondary (glazed) button ──────────────────────────────────────── */
.btn-nav {
    background: rgba(29,29,29,0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    padding: 4px 10px;
    font: 500 11px "Inter", sans-serif;
}
.btn-nav:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }

/* ── Input ──────────────────────────────────────────────────────────── */
.input {
    width: 100%;
    height: 32px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0 var(--space-3);
    color: var(--text-primary);
    font: 400 13px "Inter", sans-serif;
    outline: none;
    transition: border-color 0.15s;
}
.input:focus { border-color: var(--accent-border); }
.input::placeholder { color: var(--text-tertiary); }

/* ── Donut chart (SVG-based, używane na Dashboard) ──────────────────── */
.donut {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}
.donut .ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.06);
    stroke-width: 10;
}
.donut .ring-seg {
    fill: none;
    stroke-width: 10;
    stroke-linecap: butt;
    transition: stroke-dashoffset 0.6s ease;
}
.donut .center-label {
    fill: var(--text-primary);
    font: 600 22px "Inter", sans-serif;
    text-anchor: middle;
    dominant-baseline: central;
}

.donut-legend {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    column-gap: var(--space-3);
    row-gap: 6px;
    align-items: center;
    margin-left: var(--space-4);
    min-width: 0;
    flex: 1;
}
.donut-legend .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.donut-legend .label { font: 400 10px "Inter", sans-serif; color: var(--text-secondary); }
.donut-legend .value { font: 500 10px "Inter", sans-serif; color: var(--text-primary); text-align: right; }
.donut-legend .pct   { font: 400 10px "Inter", sans-serif; color: var(--text-tertiary); text-align: right; }

/* ── Login layout ───────────────────────────────────────────────────── */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}
.login-card {
    width: 360px;
    background: var(--bg-module);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    backdrop-filter: blur(20px);
}
.login-card .logo {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 22px;
    margin: 0 auto var(--space-4) auto;
}
.login-card h1 {
    text-align: center;
    font: 600 16px "Inter", sans-serif;
    margin-bottom: var(--space-2);
}
.login-card .subtitle {
    text-align: center;
    font: 400 12px "Inter", sans-serif;
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
}
.login-card .field {
    margin-bottom: var(--space-3);
}
.login-card .field label {
    display: block;
    font: 500 10px/14px "Inter", sans-serif;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.login-card button[type="submit"] {
    width: 100%;
    margin-top: var(--space-3);
    height: 36px;
}
.login-card .error {
    margin-top: var(--space-3);
    padding: 8px 12px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius-md);
    color: #F87171;
    font: 400 12px "Inter", sans-serif;
    display: none;
}
.login-card .error.visible { display: block; }

/* ════════════════════════════════════════════════════════════════════════
   LIST SCREENS — Personal List, Task List
   Pixel-perfect z Qt SIMTU (mainscreens/SimtuPersonalListWidget +
   widgets/tasklist/SimtuTaskListTreeWidget). Wszystkie wartości px/rgba
   zgodne z Qt setStyleSheet / paintEvent.
   ════════════════════════════════════════════════════════════════════════ */

.list-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: rgba(28, 28, 38, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
}

/* ── Toolbar header (h=36) — Add/Edit/Delete buttons ────────────────── */
.list-toolbar-header {
    height: 36px;
    display: flex;
    align-items: center;
    padding: 5px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 6px;
    flex-shrink: 0;
}
.list-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

/* Action buttons — 93×26 each, Qt-exact dimensions */
.btn-add, .btn-edit, .btn-delete {
    height: 26px;
    min-width: 93px;
    padding: 0 12px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.btn-add {
    background: #FF0A78;
    color: white;
    font: 700 10px "Inter", sans-serif;
    border-color: transparent;
}
.btn-add:hover  { background: #E8006A; }
.btn-add:active { background: #CC005E; }

.btn-edit {
    background: rgba(255, 255, 255, 0.04);
    color: #f0f0f0;
    border-color: rgba(255, 255, 255, 0.10);
    font: 500 10px "Inter", sans-serif;
}
.btn-edit:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
    font: 500 10px "Inter", sans-serif;
}
.btn-delete:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.16);
}

.btn-add:disabled, .btn-edit:disabled, .btn-delete:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Toolbar chips row (search + filter chips) ──────────────────────── */
.list-toolbar-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 12px;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

/* Search bar — 180×26, override defaultu z components.css top */
.list-toolbar-chips .search-bar {
    width: 180px;
    height: 26px;
    padding: 0 9px;
    background: rgba(28, 28, 38, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: #f0f0f0;
    font: 500 10px "Inter", sans-serif;
    outline: none;
    transition: border-color 0.1s;
}
.list-toolbar-chips .search-bar::placeholder { color: #767677; }
.list-toolbar-chips .search-bar:focus { border-color: rgba(255, 10, 120, 0.35); }
.list-toolbar-chips .search-bar::selection { background: #FF0A78; color: white; }

/* Filter chips — Qt fixed-size, color-coded per status */
.filter-chip {
    height: 22px;
    padding: 0 10px;
    border-radius: 11px;
    border: 1px solid;
    font: 500 10px/22px "Inter", sans-serif;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: font-weight 0.1s;
}
.filter-chip.active { font-weight: 700; }

/* Per-status colors from Qt spec */
.chip-all         { background: rgba( 96,165,250,0.12); color: #60A5FA; border-color: rgba( 96,165,250,0.30); }
.chip-not-started { background: rgba(156,156,156,0.12); color: #9c9c9c; border-color: rgba(156,156,156,0.30); }
.chip-in-progress { background: rgba(252,211, 77,0.12); color: #FCD34D; border-color: rgba(252,211, 77,0.30); }
.chip-overdue     { background: rgba(248,113,113,0.12); color: #F87171; border-color: rgba(248,113,113,0.30); }
.chip-completed   { background: rgba( 74,222,128,0.12); color: #4ADE80; border-color: rgba( 74,222,128,0.30); }

/* "☰ Filters" button (Task List only) — push to right */
.filter-extras { margin-left: auto; }
.btn-filters {
    height: 22px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #9c9c9c;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    font: 500 10px/22px "Inter", sans-serif;
    cursor: pointer;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.btn-filters:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #f0f0f0;
    border-color: rgba(255, 255, 255, 0.16);
}

/* ── Scrollable list area ───────────────────────────────────────────── */
.list-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
}

.list-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-tertiary);
    font: 400 13px "Inter", sans-serif;
}

/* ── Sticky column header (Personal+Task share base) ────────────────── */
.list-col-header {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 28px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: grid;
    align-items: center;
    padding: 0 12px;
    font: 500 9px/1 "Inter", sans-serif;
    color: #767677;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
/* Personal List header grid: status-slot | title | project | date | notes  */
.list-col-header.personal {
    grid-template-columns: 26px 347px 100px 65px 1fr;
    padding-left: 38px;
    gap: 12px;
}

/* ── Personal List: bucket header ───────────────────────────────────── */
.list-bucket { display: flex; flex-direction: column; }
.bucket-header {
    height: 42px;
    padding: 22px 12px 8px 12px;
    font: 600 11px/1 "Inter", sans-serif;
    color: #9c9c9c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: flex-end;
}

/* ── Personal List: row ─────────────────────────────────────────────── */
.list-rows { display: flex; flex-direction: column; }
.list-row {
    height: 40px;
    display: grid;
    grid-template-columns: 26px 347px 100px 65px 1fr;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    cursor: pointer;
    position: relative;
}
.list-row + .list-row::before {
    content: "";
    position: absolute;
    top: 0; left: 12px; right: 12px;
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
}
.list-row:hover {
    background: rgba(255, 255, 255, 0.03);
}
.list-row.selected {
    background: rgba(255, 255, 255, 0.07);
}

.cell-status { display: flex; align-items: center; justify-content: center; }
.cell-title {
    font: 500 12px "Inter", sans-serif;
    color: #f0f0f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cell-title.completed {
    text-decoration: line-through;
    color: #767677;
}
.cell-project { display: flex; align-items: center; justify-content: flex-start; }
.cell-project .project-badge {
    height: 18px;
    padding: 0 10px;
    border-radius: 4px;
    font: 500 10px/18px "Inter", sans-serif;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cell-project.empty {
    color: #767677;
    font: 500 11px "Inter", sans-serif;
}
.cell-date {
    font: 500 10px "Inter", sans-serif;
    color: #d4d4d4;
}
.cell-date.overdue { color: #EF4444; }
.cell-notes {
    font: 500 10px "Inter", sans-serif;
    color: #9c9c9c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Status circle (Personal=14px, Task=12px) ───────────────────────── */
.status-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-sizing: border-box;
}
.status-circle.sm { width: 12px; height: 12px; }
.status-circle.hollow {
    border: 1.5px solid;
    background: transparent;
}
.status-circle.hollow.gh-not-started { background: rgba(118, 118, 119, 0.16); }
.status-circle.hollow.gh-in-progress { background: rgba(245, 158,  11, 0.16); }
.status-circle.hollow.gh-overdue     { background: rgba(239,  68,  68, 0.16); }
.status-circle.filled svg {
    width: 10px; height: 10px;
    fill: none;
    stroke: white;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.status-circle.sm.filled svg { width: 9px; height: 9px; }

/* ════════════════════════════════════════════════════════════════════════
   TASK LIST — Tree table
   ════════════════════════════════════════════════════════════════════════ */

.task-table {
    display: flex;
    flex-direction: column;
    min-width: 1066px;        /* 280+100+90+90+96+96+110+110 + indent ~94 */
}

/* Column header (sticky top) */
.task-col-header {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 28px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    grid-template-columns: 56px 280px 100px 90px 90px 96px 96px 110px 110px;
    align-items: center;
    padding: 0 12px;
    font: 500 9px/1 "Inter", sans-serif;
    color: #767677;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.task-col-header > div { padding: 0 6px; }

/* Task row (36px fixed, manual grid mirror header) */
.task-row {
    height: 36px;
    display: grid;
    grid-template-columns: 56px 280px 100px 90px 90px 96px 96px 110px 110px;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.task-row:hover { background: rgba(255, 255, 255, 0.03); }
.task-row.selected {
    background: rgba(255, 10, 120, 0.08);
    box-shadow: inset 2px 0 0 #FF0A78;
}

/* First slot — expand button + status circle slot (combined: 56px wide) */
.task-cell-leader {
    display: flex;
    align-items: center;
    gap: 6px;
}
.task-cell-leader .indent-spacer { flex-shrink: 0; }
.task-expand {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 700 14px/1 "Inter", sans-serif;
    color: #f0f0f0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.1s;
}
.task-expand:hover { color: #FF0A78; }
.task-expand.hidden { visibility: hidden; }

.task-cell-name {
    padding: 0 6px;
    font: 400 12px "Inter", sans-serif;
    color: #f0f0f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-cell-name.completed {
    text-decoration: line-through;
    color: #767677;
}

.task-cell { padding: 0 6px; overflow: hidden; }

/* Status pill (in column) — pill 22px, 9999 radius */
.status-pill {
    display: inline-block;
    height: 18px;
    padding: 0 8px;
    border-radius: 9999px;
    border: 1px solid;
    font: 500 10px/18px "Inter", sans-serif;
}
.status-pill.s-not-started { background: rgba( 59,130,246,0.12); color: #60A5FA; border-color: rgba( 59,130,246,0.30); }
.status-pill.s-in-progress { background: rgba(245,158, 11,0.12); color: #FCD34D; border-color: rgba(245,158, 11,0.30); }
.status-pill.s-overdue     { background: rgba(239, 68, 68,0.12); color: #F87171; border-color: rgba(239, 68, 68,0.30); }
.status-pill.s-completed   { background: rgba( 34,197, 94,0.12); color: #4ADE80; border-color: rgba( 34,197, 94,0.30); }

/* Priority pill — Qt: High=orange solid, Medium=red solid, Low=gray bg */
.priority-pill {
    display: inline-block;
    height: 18px;
    padding: 0 8px;
    border-radius: 9999px;
    font: 500 10px/18px "Inter", sans-serif;
}
.priority-pill.p-high    { background: #F59E0B; color: #1a1a1a; }
.priority-pill.p-medium  { background: #EF4444; color: white; }
.priority-pill.p-low     { background: rgba(255,255,255,0.08); color: #9c9c9c; }

/* Project badge (Task List variant) — 8px radius, lighter color text */
.project-badge {
    display: inline-block;
    height: 18px;
    padding: 0 8px;
    border-radius: 8px;
    font: 500 10px/18px "Inter", sans-serif;
}

/* Avatar stack — 22x22 with -6 overlap, 2px black border */
.avatar-stack {
    display: inline-flex;
    align-items: center;
}
.avatar-stack > .avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font: 700 9px/1 "Inter", sans-serif;
    flex-shrink: 0;
}
.avatar-stack > .avatar + .avatar { margin-left: -6px; }
.avatar-more {
    margin-left: 4px;
    font: 700 9px "Inter", sans-serif;
    color: #9c9c9c;
}
.assignee-empty { color: #767677; font: 500 11px "Inter", sans-serif; }

.task-cell-date {
    font: 500 11px "Inter", sans-serif;
    color: #d4d4d4;
}
.date-empty { color: #767677; font: 500 11px "Inter", sans-serif; }

/* Progress bar — Qt: thin track + % text obok */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 18px;
}
.progress-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 9999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}
.progress-pct {
    font: 500 10px "Inter", sans-serif;
    color: #9c9c9c;
    min-width: 28px;
    text-align: right;
}

/* ── Task List table (tree z 9 kolumnami) ───────────────────────────── */
.task-table {
    display: flex;
    flex-direction: column;
    min-width: 940px;     /* poniżej tego scroll horizontal */
}

.task-row {
    display: grid;
    grid-template-columns:
        28px                    /* expand button */
        minmax(180px, 1fr)      /* name (+ status circle inside) */
        110px                   /* status badge */
        100px                   /* assignee avatars */
        90px                    /* priority */
        90px                    /* start date */
        90px                    /* due date */
        130px                   /* project pill */
        120px;                  /* progress bar */
    align-items: center;
    gap: var(--space-2);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.1s;
}
.task-row:hover:not(.task-row-header) { background: rgba(255,255,255,0.03); }
.task-row.selected {
    background: rgba(229,0,107,0.08);
    box-shadow: inset 2px 0 0 var(--accent);
}

.task-row-header {
    position: sticky;
    top: 0;
    z-index: 1;
    cursor: default;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
}
.task-row-header .task-cell {
    font: 600 10px "Inter", sans-serif;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.task-cell {
    font: 400 11px "Inter", sans-serif;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-cell-expand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--text-tertiary);
}
.task-cell-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.task-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-cell-date {
    color: var(--text-secondary);
    font-size: 10px;
}

.task-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
    font-size: 8px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}
.task-expand:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

/* Avatar empty/more indicators */
.assignee-empty,
.date-empty {
    color: var(--text-tertiary);
    font-size: 11px;
}
.assignee-more {
    margin-left: 2px;
    font: 600 9px "Inter", sans-serif;
    color: var(--text-tertiary);
}

/* Progress bar (mini) */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}
.progress-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}
.progress-pct {
    font: 500 10px "Inter", sans-serif;
    color: var(--text-secondary);
    min-width: 28px;
    text-align: right;
}

.task-rows {
    display: flex;
    flex-direction: column;
}

/* ── Dashboard grid ─────────────────────────────────────────────────── */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: var(--module-gap);
    height: 100%;
}
.dashboard .widget {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
}
.dashboard .widget h3 {
    font: 500 14px "Inter", sans-serif;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}
.dashboard .chart-row {
    display: flex;
    align-items: center;
}
