th {
  font-weight: bold !important;
}

.task-manager-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.task-manager-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.task-manager-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.add-task-btn, .import-task-btn {
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ai-assist-btn {
    background: #fff;
    color: #2563eb;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .1s, box-shadow .2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    background-clip: padding-box;
    box-shadow: 0 0 0 2px transparent;
    background-image: none;
}

.ai-assist-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: linear-gradient(to right, #2563eb, #7c3aed);
    z-index: -1;
}

.ai-assist-btn:hover {
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
    color: #fff;
}

.ai-assist-btn:hover svg path {
    fill: white;
}

.view-subtasks-btn {
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    width: 110px;
    height: 30px;
    cursor: pointer;
    margin-top: 5%;
    transition: background-color 0.2s ease;
}

.add-task-btn:hover, .import-task-btn:hover {
    background-color: #1d4ed8;
}

/* ── Row 2: Toolbar ── */
.task-manager-toolbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0px 24px;
}

.view-toggle {
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;

    background-color: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn:hover:not(.view-active) {
    background-color: #f3f4f6;
}

/* ── Right Controls: Search + Filter ── */
.task-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

/* ── Search Box ── */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;

    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 14px;
}

.search-box svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: #374151;
    background: transparent;
    width: 180px;
}

.search-box input::placeholder {
    color: #9ca3af;
}

/* ── Filter Button ── */
.filter-btn, button.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    -webkit-appearance: none;
    appearance: none;
    background-color: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-btn:hover, button.filter-btn:hover {
    background-color: #f3f4f6 !important;
}

.kanban-board {
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
    height: calc(100vh - 100px);
    align-items: flex-start;
}

.kanban-column {
    background: #f4f5f7;
    border-radius: 10px;
    min-width: 225px;
    max-width: 275px;
    padding: 15px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: fit-content;
    min-height: 500px;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.kanban-column h3 {
    text-align: center;
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #999;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.task-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.task-card.priority-1 { border-left-color: #e53935; }
.task-card.priority-2 { border-left-color: #fbc02d; }
.task-card.priority-3 { border-left-color: #43a047; }

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.task-title {
    font-weight: 600;
    font-size: 14px;
    color: #172b4d;
    line-height: 1.4;
    flex: 1;
    margin-right: 8px;
}

.priority-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-1 .priority-icon { background-color: #e53935; }
.priority-2 .priority-icon { background-color: #fbc02d; }
.priority-3 .priority-icon { background-color: #43a047; }

.task-meta {
    font-size: 12px;
    color: #5e6c84;
    margin-bottom: 8px;
}

.task-meta-item {
    margin-bottom: 2px;
}

.assignee {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.assignee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #0052cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
}

.assignee-name {
    font-size: 12px;
    color: #5e6c84;
}

.progress-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-bar {
    background: #dfe1e6;
    border-radius: 3px;
    overflow: hidden;
    height: 6px;
    flex: 1;
    margin-right: 8px;
}

.progress-fill {
    height: 6px;
    background: #4caf50;
    border-radius: 3px;
}

.progress-text {
    font-size: 11px;
    color: #5e6c84;
    font-weight: 500;
}

.no-tasks {
    font-size: 12px;
    color: #8993a4;
    text-align: center;
    padding: 20px;
    font-style: italic;
}
.kanban-column.drag-over {
    outline: 3px dashed rgba(13,110,253,0.5);
    background: rgba(13,110,253,0.03);
}
/* List view styles */
.list-view { padding: 20px; }
.list-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.list-table thead th { text-align: left; padding: 10px; background: #999898; border-bottom: 1px solid #e0e6ef; font-size: 13px; overflow: hidden; }
.list-table tbody td { padding: 10px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; font-size: 13px; overflow: hidden; }

/* Column widths so the table never grows wider than the project accordion (percentages always sum to <=100%) */
.list-table .col-code { width: 6%; }
.list-table .col-name { width: 8%; overflow-wrap: break-word; word-break: break-word; }
.list-table .col-desc { width: 19%; overflow-wrap: break-word; word-break: break-word; }
.list-table .col-status { width: 8%; }
.list-table .col-priority { width: 6%; }
.list-table .col-urgency { width: 0; }
.list-table .col-assignee { width: 7%; }
.list-table .col-timeline { width: 12%; }
.list-table .col-percent { width: 8%; }
.list-table .col-comments { width: 6%; }
.list-table .col-actions { width: 6%; }

.list-table .col-name,
.list-table .col-desc { white-space: normal; }

.list-table .col-percent progress { width: 60px; max-width: 100%; vertical-align: middle; }
.list-row { cursor: pointer; }
/* .list-row:hover { background: #cacacb; } */
/* More specific selectors to override the sortable striping on odd rows */
/* .list-table.sortable tbody tr:hover,
.list-table.sortable tbody tr.list-row:hover,
.list-table.sortable tbody tr:hover td {
    background-color: #cacacb !important;
    color: inherit !important;
} */
.list-table tr:nth-child(even) {
    background-color: #ffffff !important; 
}
.view-active { background-color: #0d6efd; color: white; border-color: #0d6efd; }

/* Subtask toggle styles */
.subtask-toggle {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    padding: 0;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.subtask-toggle .arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #374151; /* right-pointing arrow */
    transition: transform 0.15s ease;
}

.subtask-toggle[aria-expanded="true"] .arrow {
    transform: rotate(90deg);
}

.subtasks-container {
    margin-top: 8px;
    padding-left: 28px;
    font-size: 13px;
    color: #374151;
}

.subtask-item { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }

/* Badges for Status and Priority */
.badge, .badge2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
}

.badge-backlog {
    background-color: #ffe5fb;
    color: #ed0bf5;
    border: 1px solid #fc4df3;
}

.badge-on-hold {
    background-color: #fff4e5;
    color: #f59e0b;
    border: 1px solid #fcd34d;
}

.badge-in-progress {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #93c5fd;
}

.badge-in-review {
    background-color: #fffeef;
    color: #d4eb25;
    border: 1px solid #f8fd93;
}

.badge-done {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #86efac;
}

.badge-high {
    background-color: #fff1f1;
    color: #ef4444;
    border: 1px solid #fca5a5;
}

.badge-medium {
    background-color: #fefce8;
    color: #ca8a04;
    border: 1px solid #fde047;
}

.badge-low {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #86efac;
}

/*Dropdown menu*/

.dropdown-wrapper,
.task-dropdown-wrapper,
.task-card-dropdown {
    position: relative;
    display: inline-block;
}

/* ── Trigger Button ── */
.action-btn,
.task-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 1px;

    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: auto;
}

.action-btn:hover,
.task-action-btn:hover {
    background-color: #1d4ed8;
}

.dropdown-menu,
.task-dropdown-menu,
.task-card-dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: calc(100% + 4px); /* Just below the button (reduced) */
    right: 0;              /* Align to right edge of button */
    z-index: 1040;

    background-color: #ffffff;
    /* remove visible border so hover backgrounds can reach the very top/bottom */
    border: 0;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);

    min-width: 160px;
    overflow: hidden;
    padding: 0; /* ensure no extra internal spacing */
}

.dropdown-menu.open,
.task-dropdown-menu.open,
.task-card-dropdown-menu.open {
    display: block;
}

.dropdown-menu ul,
.task-dropdown-menu ul,
.task-card-dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-menu li,
.task-dropdown-menu li,
.task-card-dropdown-menu li {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 6px 12px; /* tighter vertical spacing */
    margin: 0;

    background: none;
    border: none;
    text-align: left;

    font-size: 0.9rem;
    font-weight: 400;
    color: #374151;
    cursor: pointer;

    transition: background-color 0.15s ease;
    border-radius: 0; /* let the menu's rounding handle corners */
}

/* Ensure hover/background covers rounded corners at top/bottom */
.dropdown-item:first-child,
.dropdown-item:last-child {
    /* no per-item rounding to avoid tiny gaps at edges */
    border-radius: 0;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

/* Filter panel styles */
.filter-panel {
    position: absolute;
    top: 64px; /* below the toolbar */
    right: 24px;
    z-index: 1200;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.12);
    min-width: 260px;
}
.filter-row { display:flex; flex-direction: column; gap:6px; margin-bottom:8px; }
.filter-row label { font-size: 0.8rem; color: #374151; font-weight:600; }
.filter-row select, .filter-row input { padding:6px 8px; border:1px solid #d1d5db; border-radius:6px; font-size:0.9rem; }
.filter-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:6px; }

/* Ensure filter panel doesn't cover kanban scrollbar on small screens */
@media (max-width: 900px){
    .filter-panel { right: 12px; left: 12px; top: auto; bottom: 20px; }
}

.col-comments { position: relative; }

.comment-unread-counter {
	position: relative;
	top: -2px;
	right: -2px;
	background: #dc3545; /* bootstrap danger red */
	color: #ffffff;
	border-radius: 50%;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	font-size: 0.65rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ── Project Accordion Groups (List View) ── */
#list-projects-container {
    counter-reset: project-counter;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px;
}

.project-group {
    counter-increment: project-counter;
    min-width: 0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
}

/* Cycling accent colors for project group headers */
.project-group:nth-child(6n+1) .project-group-header { background: #ede9fe; border-left: 4px solid #7c3aed; }
.project-group:nth-child(6n+2) .project-group-header { background: #ccfbf1; border-left: 4px solid #0d9488; }
.project-group:nth-child(6n+3) .project-group-header { background: #fef3c7; border-left: 4px solid #d97706; }
.project-group:nth-child(6n+4) .project-group-header { background: #ffe4e6; border-left: 4px solid #e11d48; }
.project-group:nth-child(6n+5) .project-group-header { background: #e0f2fe; border-left: 4px solid #0284c7; }
.project-group:nth-child(6n+6) .project-group-header { background: #dcfce7; border-left: 4px solid #16a34a; }

/* Ad-hoc group always neutral */
.project-group-adhoc .project-group-header {
    background: #f3f4f6 !important;
    border-left: 4px solid #6b7280 !important;
}

.project-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    cursor: pointer;
    user-select: none;
    transition: filter 0.15s;
    border-radius: 10px 10px 0 0;
}

.project-group-header.header-collapsed {
    border-radius: 10px;
}

.project-group-header:hover { filter: brightness(0.97); }

.project-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a1a2e;
}

.project-counter::before {
    content: counter(project-counter);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.12);
    font-size: 0.75rem;
    font-weight: 700;
    color: inherit;
}

.project-group-adhoc .project-counter::before {
    background: rgba(107,114,128,0.2);
}

.project-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.project-table-wrapper.collapsed .project-chevron,
.project-group-header[data-collapsed="1"] .project-chevron {
    display: none; /* handled via JS transform instead */
}

.project-name { flex: 1; }

.project-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-players-badge {
    display: flex;
    align-items: flex-start;
}

.player-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0052cc;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid #fff;
    margin-left: -8px;
    flex-shrink: 0;
}

.project-players-badge .player-avatar-sm:first-child { margin-left: 0; }

.project-task-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(0,0,0,0.15);
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
    padding: 0 4px;
}

.project-done-label {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
}

.project-table-wrapper {
    border-radius: 0 0 10px 10px;
    overflow-x: auto;
    max-width: 100%;
}

.project-table-wrapper.collapsed {
    display: none;
}

.empty-project-row {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 16px !important;
}

/* ══════════════════════════════════════════════════════════════════════
   Gantt Chart view (My Work sub-tab)
   ══════════════════════════════════════════════════════════════════════ */

.gantt-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 4px 0 14px;
}

.gantt-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #e0e6ef;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: filter 0.15s;
}

.gantt-nav-btn:hover { filter: brightness(0.95); }

.gantt-nav-btn svg {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    stroke: #374151;
    fill: none;
    pointer-events: none;
}

.gantt-nav-label {
    min-width: 200px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a2e;
}

.gantt-nav-today {
    border: 1px solid #e0e6ef;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    cursor: pointer;
    transition: filter 0.15s;
}

.gantt-nav-today:hover { filter: brightness(0.95); }

.gantt-scroll {
    overflow-x: auto;
    /* Needs its own vertical scroll (not the page's) for position:sticky
       headers below to have anything to stick against — a sticky element's
       reference is its nearest scrolling ancestor, and .gantt-scroll counts
       as one the moment overflow-x is non-visible, whether or not this rule
       says so. Without a capped height there'd be nothing to scroll inside
       it (auto-height always matches content height), so "sticky" would be
       a no-op. */
    overflow-y: auto;
    max-height: 65vh;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
}

.gantt-grid {
    display: grid;
    /* Day columns have a 16px floor but stretch to fill any leftover width
       (a 31-day month rarely fills a wide screen at a fixed 16px/day) —
       they only shrink back to that floor, triggering .gantt-scroll's
       horizontal scrollbar, on screens too narrow to fit the whole month. */
    grid-template-columns: 260px repeat(var(--gantt-days), minmax(16px, 1fr));
    grid-auto-rows: 36px;
    width: 100%;
}

/* One project's task rows, as a single toggle target for accordion
   collapse/expand. `display: contents` lets its children (label cells,
   bars) still participate directly in the outer .gantt-grid's row/column
   placement — only .collapsed removes them from layout entirely, which is
   what keeps the shared grid gap-free when a group is closed. */
.gantt-project-rows {
    display: contents;
}

.gantt-project-rows.collapsed {
    display: none;
}

.gantt-group-header.project-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 10px;
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f3f4f6;
    border-right: 1px solid #e0e6ef;
    border-bottom: 1px solid #f1f3f5;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
    border-radius: 0;
}

.gantt-group-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-label-cell {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border-right: 1px solid #e0e6ef;
    border-bottom: 1px solid #f1f3f5;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
    font-size: 13px;
    cursor: pointer;
    min-width: 0;
}

.gantt-label-cell:hover { filter: brightness(0.97); }

.gantt-header-label {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #d3d1d1;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 12px;
    cursor: default;
}

.gantt-header-label:hover { filter: none; }

.gantt-col-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-col-timeline {
    flex: 0 0 78px;
    color: #6b7280;
    font-size: 0.75rem;
    white-space: nowrap;
}

.gantt-header-label .gantt-col-timeline,
.gantt-header-label .gantt-col-duration { color: inherit; }

.gantt-col-duration {
    flex: 0 0 46px;
    color: #6b7280;
    font-size: 0.75rem;
    white-space: nowrap;
}

.gantt-header-month,
.gantt-header-week {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d3d1d1;
    color: #1a1a2e;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-left: 1px solid rgba(0,0,0,0.1);
    font-size: 12px;
}

.gantt-header-month {
    font-weight: 700;
}

.gantt-header-week {
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 11px;
    font-weight: 600;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-bar {
    align-self: center;
    height: 20px;
    margin: 0 1px;
    border-radius: 5px;
    background-color: #0d6efd;
    /* Thin vertical lines marking each day within the bar's span — no
       numbers, just the divisions (the header only shows week blocks now). */
    background-image: repeating-linear-gradient(
        to right,
        rgba(255,255,255,0.55) 0,
        rgba(255,255,255,0.55) 1px,
        transparent 1px,
        transparent calc(100% / var(--gantt-bar-days, 1))
    );
    cursor: pointer;
    transition: filter 0.15s;
}

.gantt-bar:hover {
    filter: brightness(0.9);
}

/* ══════════════════════════════════════════════════════════════════════
   Overview tab + top-level tab nav (Overview / My Work / Attention / Wrap Up)
   ══════════════════════════════════════════════════════════════════════ */

.task-manager-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.task-manager-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.main-tab-nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
    /* Freeze the tab row below the fixed #topbar (56px tall) on scroll */
    position: sticky;
    top: 56px;
    z-index: 50;
    background: #f2f2f7;
}

.main-tab-nav-tabs {
    display: flex;
    flex-direction: row;
    gap: 24px;
}

.main-tab-nav-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.main-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 2px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.main-tab-btn:hover {
    color: #1a1a2e;
}

.main-tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.main-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #fff1f1;
    color: #ef4444;
    font-size: 0.72rem;
    font-weight: 700;
}

/* .main-tab-panel intentionally has no shared padding — My Work's existing
   views (toolbar, kanban board, list, projects) already manage their own
   padding and must keep their original layout width untouched. Overview/
   placeholder tabs add their own padding below. */

#overview-tab {
    padding: 0 24px 24px;
}

.main-tab-placeholder {
    padding: 60px 20px;
    text-align: center;
    color: #6b7280;
}

.main-tab-placeholder h3 {
    color: #1a1a2e;
    margin-bottom: 6px;
}

/* Generic "main content + Zeni sidebar" split, shared by any tab that
   embeds the Zeni panel (Overview, Attention, ...) */
.tab-split-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    overflow-x: auto;
}

.tab-split-main {
    flex: 1;
    min-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Stat cards ── */
.stat-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.stat-card-caption {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.stat-card-link {
    font-size: 0.82rem;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    width: fit-content;
}

.stat-card-link:hover {
    text-decoration: underline;
}

/* ── Panels (Project Health / Workload / Attention) ── */
.overview-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
}

.overview-panel-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 14px;
}

.info-dot {
    color: #9ca3af;
    font-size: 0.85rem;
    cursor: help;
}

.overview-no-data {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 16px;
}

.overview-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.overview-panel-half {
    margin: 0;
}

/* ── Project Health table ── */
.project-health-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

.project-health-table th {
    text-align: left;
    font-size: 0.8rem;
    color: #6b7280;
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.project-health-table td {
    padding: 10px 8px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.health-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.health-on-track {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #86efac;
}

.health-at-risk {
    background-color: #fff4e5;
    color: #f59e0b;
    border: 1px solid #fcd34d;
}

.progress-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-track {
    flex: 1;
    height: 6px;
    background: #dfe1e6;
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}

.progress-bar-fill {
    height: 100%;
    background: #16a34a;
    border-radius: 3px;
}

.progress-cell-value {
    font-size: 0.82rem;
    color: #6b7280;
    white-space: nowrap;
}

/* ── Workload Distribution ── */
.workload-row {
    display: grid;
    grid-template-columns: 28px 90px 1fr 40px auto;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.workload-name {
    font-size: 0.88rem;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workload-track {
    min-width: 0;
}

.workload-fill-overloaded { background: #ef4444; }
.workload-fill-high       { background: #f59e0b; }
.workload-fill-balanced   { background: #16a34a; }
.workload-fill-light      { background: #9ca3af; }

.workload-pct {
    font-size: 0.82rem;
    color: #6b7280;
    text-align: right;
}

.workload-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.workload-badge-overloaded { background: #fff1f1; color: #ef4444; border: 1px solid #fca5a5; }
.workload-badge-high       { background: #fff4e5; color: #f59e0b; border: 1px solid #fcd34d; }
.workload-badge-balanced   { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }
.workload-badge-light      { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }

/* ── Task Requiring Attention ── */
.attention-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
    color: #1a1a2e;
}

.attention-row:last-child {
    border-bottom: none;
}

.attention-count {
    color: #6b7280;
    font-size: 0.85rem;
}

/* ── Zeni Assistant card ── */
.zeni-card {
    width: 360px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.zeni-body {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
}

.zeni-chat-col {
    flex: 0 0 260px;
    min-width: 0;
    border-right: 1px solid #f3f4f6;
    padding-right: 20px;
}

.zeni-info-col {
    flex: 1;
    min-width: 0;
}

.zeni-chat-wrapper {
    padding-top: 4px;
}

.zeni-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.zeni-sparkle {
    background: linear-gradient(to right, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.zeni-greeting {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1a1a2e;
}

.zeni-subgreeting {
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: #6b7280;
}

.zeni-section {
    padding: 14px 0;
    border-top: 1px solid #f3f4f6;
}

.zeni-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    margin-bottom: 10px;
}

.zeni-priority-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.zeni-priority-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.zeni-priority-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a2e;
}

.zeni-priority-subtitle {
    font-size: 0.78rem;
    color: #6b7280;
}

.zeni-todo-btn {
    width: 100%;
    background: #fff;
    color: #2563eb;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.zeni-todo-btn:hover {
    background: #eff6ff;
}

.zeni-action-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
}

.zeni-action-card:hover {
    background: #f3f4f6;
}

.zeni-action-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a2e;
}

.zeni-action-subtitle {
    font-size: 0.76rem;
    color: #6b7280;
    margin-top: 2px;
}

.zeni-action-chevron {
    color: #9ca3af;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.zeni-empty {
    padding: 14px 0;
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
}

.zeni-ask-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

/* task_ai_panel.html's .tai-sources-row is styled for the dark slide-in
   panel by default (border-top: #2d2d4e) — override for the light card. */
.zeni-card .tai-sources-row {
    padding: 10px 0 0;
    border-top: 1px solid #f3f4f6;
}

.zeni-ask-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
    resize: none;
    font-family: inherit;
    line-height: 1.4;
    max-height: 120px;
}

.zeni-ask-input:focus {
    border-color: #2563eb;
}

.zeni-ask-send {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zeni-ask-send:hover {
    background: #1d4ed8;
}

/* Responsive: stack Zeni card below main content on narrower screens */
@media (max-width: 1100px) {
    .tab-split-layout {
        flex-direction: column;
    }
    .zeni-chat-col {
        flex: 1 1 auto;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #f3f4f6;
        padding-right: 0;
        padding-bottom: 16px;
    }
    .overview-row {
        grid-template-columns: 1fr;
    }
    .stat-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ══════════════════════════════════════════════════════════════════════
   Attention tab
   ══════════════════════════════════════════════════════════════════════ */

#attention-tab {
    padding: 0 24px 24px;
}

.attention-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
}

.attention-panel-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.attention-panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.attention-panel-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

.attention-table {
    width: 100%;
    border-collapse: collapse;
}

.attention-table th {
    text-align: left;
    font-size: 0.8rem;
    color: #6b7280;
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.attention-table td {
    padding: 12px 8px;
    font-size: 0.9rem;
    color: #1a1a2e;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.attention-impact {
    color: #6b7280;
}

.severity-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
}

.severity-critical {
    background-color: #fff1f1;
    color: #ef4444;
    border: 1px solid #fca5a5;
}

.severity-high {
    background-color: #fff4e5;
    color: #f59e0b;
    border: 1px solid #fcd34d;
}

.attention-done-btn {
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.attention-done-btn:hover {
    background-color: #1d4ed8;
}

/* ══════════════════════════════════════════════════════════════════════
   Wrap Up tab
   ══════════════════════════════════════════════════════════════════════ */

#wrapup-tab {
    padding: 0 24px 24px;
}

.wrapup-meeting-text {
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

.wrapup-meeting-wrap {
    position: relative;
    overflow: hidden;
    max-height: 8.4em;
    transition: max-height 0.25s ease;
}

.wrapup-meeting-wrap.expanded {
    max-height: none;
}

.wrapup-meeting-wrap.truncated:not(.expanded)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.2em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
}

.wrapup-meeting-toggle {
    background: none;
    border: none;
    padding: 8px 0 0;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4f46e5;
    cursor: pointer;
}

.wrapup-meeting-toggle:hover {
    text-decoration: underline;
}

.wrapup-daily-summary {
    margin-bottom: 10px;
}

.wrapup-summary-list {
    margin: 0;
    padding-left: 1.1em;
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.6;
}

.wrapup-summary-list li {
    margin-bottom: 4px;
}

.wrapup-summary-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #6b7280;
}

.wrapup-summary-spinner::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid #d1d5db;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: wrapupSpin 0.7s linear infinite;
}

@keyframes wrapupSpin {
    to { transform: rotate(360deg); }
}

.activity-feed-row {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.88rem;
}

.activity-feed-row:last-child {
    border-bottom: none;
}

.activity-feed-time {
    flex-shrink: 0;
    width: 80px;
    color: #6b7280;
    font-weight: 600;
}

.activity-feed-text {
    color: #1a1a2e;
}

/* ========================================================================
   Weekly "To Do List" (sticky-notes) page
   ======================================================================== */
.tdl-page {
    padding: 4px 4px 40px;
}
.tdl-page-header {
    padding: 8px 4px 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}
.tdl-page-title {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}
.tdl-page-subtitle {
    color: #6b7280;
    margin: 4px 0 0;
    font-size: 14px;
}

/* 3-column layout: history | main | zeni */
.todolist-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    overflow-x: auto;
}

/* History sidebar */
.tdl-history {
    width: 180px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 12px;
}
.tdl-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 10px;
    border-bottom: 1px solid #eef0f3;
    margin-bottom: 8px;
}
.tdl-history-title {
    font-weight: 600;
    color: #374151;
}
/* Collapsible year > month grouping */
.tdl-history-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 6px;
    border-radius: 6px;
    cursor: pointer;
    color: #374151;
    font-weight: 600;
    list-style: none;
    user-select: none;
}
.tdl-history-toggle::-webkit-details-marker {
    display: none;
}
.tdl-history-toggle::before {
    content: "\203A";           /* chevron, rotates when open */
    display: inline-block;
    width: 10px;
    color: #9ca3af;
    transition: transform 0.15s ease;
}
details[open] > .tdl-history-toggle::before {
    transform: rotate(90deg);
}
.tdl-history-toggle:hover {
    background: #f3f4f6;
}

.tdl-history-year > .tdl-history-toggle {
    font-size: 0.95rem;
}
.tdl-history-month {
    margin-left: 10px;
}
.tdl-history-month > .tdl-history-toggle {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
}
.tdl-history-month .tdl-history-item {
    margin-left: 12px;
}

.tdl-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    padding: 2px 6px 2px 4px;
    cursor: pointer;
}
.tdl-history-item:hover {
    background: #f3f4f6;
}
.tdl-history-item.active {
    background: #eaf2ff;
}
.tdl-history-item.active .tdl-history-label {
    color: #1d6ff2;
    font-weight: 600;
}
.tdl-history-link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    padding: 8px 4px;
    color: #374151;
}
.tdl-history-link i {
    color: #9ca3af;
}
.tdl-history-del {
    color: #c0c4cc;
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    visibility: hidden;
}
.tdl-history-item:hover .tdl-history-del {
    visibility: visible;
}
.tdl-history-del:hover {
    color: #ef4444;
    background: #fee2e2;
}
.tdl-history-empty,
.tdl-empty {
    color: #9ca3af;
    font-size: 14px;
    padding: 12px 6px;
}

/* Main dated list */
.tdl-main {
    flex: 1;
    min-width: 420px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 28px 28px;
    min-height: 520px;
}
.tdl-day-group {
    margin-bottom: 18px;
}
.tdl-day-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    margin: 10px 0 14px;
}
.tdl-day-divider::before,
.tdl-day-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #e5e7eb;
}
.tdl-day-divider span {
    padding: 0 16px;
}

.tdl-entries {
    list-style: none;
    counter-reset: tdl;
    margin: 0;
    padding: 0;
    /* Keep a drop target even when a day has no entries yet */
    min-height: 26px;
}

/* Where the dragged item will land */
.tdl-drop-placeholder {
    border: 1px dashed #93c5fd;
    background: #eff6ff;
    border-radius: 6px;
    margin: 2px 0;
    visibility: visible !important;
}
.tdl-entry {
    counter-increment: tdl;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 28px 5px 4px;
    border-radius: 6px;
    position: relative;
}
.tdl-entry:hover {
    background: #f9fafb;
}
.tdl-entry::before {
    content: counter(tdl) ".";
    color: #6b7280;
    min-width: 20px;
    text-align: right;
    padding-top: 1px;
}
.tdl-drag {
    cursor: grab;
    color: #d1d5db;
    font-size: 12px;
    line-height: 1.4;
    user-select: none;
    visibility: hidden;
}
.tdl-entry:hover .tdl-drag {
    visibility: visible;
}
.tdl-check {
    margin-top: 3px;
    cursor: pointer;
}
.tdl-text {
    flex: 1;
    min-width: 0;
    color: #1f2937;
    cursor: text;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.tdl-edit-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    padding: 2px 6px;
    font: inherit;
    line-height: 1.5;
    resize: none;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.tdl-done .tdl-text {
    text-decoration: line-through;
    color: #9ca3af;
}
.tdl-del {
    background: none;
    border: none;
    color: #c0c4cc;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    visibility: hidden;
    position: absolute;
    top: 6px;
    right: 2px;
}
.tdl-entry:hover .tdl-del {
    visibility: visible;
}
.tdl-del:hover {
    color: #ef4444;
}

/* Add row ("Start typing...") */
.tdl-add-row {
    padding: 6px 4px 2px 28px;
}
.tdl-add-input {
    width: 100%;
    border: none;
    outline: none;
    font: inherit;
    color: #1f2937;
    background: transparent;
    padding: 4px 0;
    line-height: 1.5;
    resize: none;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    display: block;
}
.tdl-add-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Reuse .zeni-card width from the shared Zeni styles; keep the layout responsive */
.todolist-layout .zeni-card {
    flex-shrink: 0;
    width: 30%;
}

/* ── Panel toggles: hide History / minimize Zeni ── */
.tdl-icon-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.tdl-icon-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* The "show history" button only exists while History is hidden */
.tdl-show-history {
    display: none;
    margin-bottom: 4px;
}
.todolist-layout.tdl-hide-history .tdl-history {
    display: none;
}
.todolist-layout.tdl-hide-history .tdl-show-history {
    display: inline-flex;
}

/* Minimized Zeni collapses to just its title bar so the restore control stays visible */
.zeni-min-btn {
    margin-left: auto;
}
.todolist-layout .zeni-card.zeni-card-collapsed {
    width: auto;
}
.zeni-card.zeni-card-collapsed .zeni-body {
    display: none;
}

/* Stacked Zeni variant (To Do List page): AI Recommended Actions on top,
   Ask Zeni below — instead of the side-by-side columns used on the tabs. */
.zeni-card-stacked .zeni-body {
    flex-direction: column;
    gap: 14px;
}

.zeni-card-stacked .zeni-info-col,
.zeni-card-stacked .zeni-chat-col {
    flex: 0 0 auto;
    width: 100%;
}

.zeni-card-stacked .zeni-chat-col {
    border-right: none;
    padding-right: 0;
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
}

@media (max-width: 1100px) {
    .todolist-layout {
        flex-direction: column;
    }
    .tdl-history,
    .tdl-main,
    .todolist-layout .zeni-card {
        width: 100%;
    }
    .tdl-main {
        min-width: 0;
    }
}