/* Tasks Board - Kanban Styles */

.tasks-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border-docs);
    border-radius: 12px;
    margin: 24px 40px;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

/* Container for constrained layout */
.tasks-board-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 24px;
}

.tasks-board-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    color: var(--text-secondary, #94a3b8);
    opacity: 0.8;
}

.tasks-board-empty-icon {
    font-size: 64px;
    opacity: 0.5;
    margin-bottom: 8px;
}

.tasks-board-empty p {
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

.tasks-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    flex-shrink: 0;
    gap: 16px;
}

.tasks-board-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    margin: 0;
    letter-spacing: -0.02em;
}

.tasks-board-columns {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    overflow-x: auto;
    flex: 1;
    align-items: flex-start;
}

.tasks-board-content {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* View Switcher */
.view-switcher {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-docs);
}

.view-switch-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.view-switch-btn:hover {
    color: var(--text-primary, #e2e8f0);
    background: rgba(255, 255, 255, 0.03);
}

.view-switch-btn.active {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.1));
    color: var(--text-primary, #e2e8f0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Table View Styles */
.tasks-table-view {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.task-table-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--border-docs);
    border-radius: 10px;
    transition: all 0.2s ease;
    padding: 4px;
    background: var(--bg-primary);
}

.task-table-group.drag-over {
    border-color: var(--accent-color, #818cf8);
    background: rgba(129, 140, 248, 0.05);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.1);
}

.task-table-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid transparent;
    border-radius: 6px;
    margin-bottom: 2px;
}

.group-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.group-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
}

.group-count {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.06));
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.group-add-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
    visibility: hidden;
}

.task-table-group:hover .group-add-btn {
    visibility: visible;
}

.group-add-btn:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.05));
    color: var(--text-primary, #e2e8f0);
}


.task-table-row {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--bg-secondary);
    gap: 16px;
    margin-bottom: 2px;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-docs);
}

.task-table-row:active {
    cursor: grabbing;
    transform: scale(0.995);
}

.task-table-row:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.03));
    border-color: var(--border-hover, rgba(255, 255, 255, 0.15));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}



.table-cell-check {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Interactive Checkbox */
.task-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-secondary, #94a3b8);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.task-checkbox:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Status Picker Dropdown */
.status-picker-dropdown {
    background: var(--bg-secondary, #1e1e24);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: 6px;
    z-index: 100;
    min-width: 150px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary, #e2e8f0);
    transition: background 0.15s ease;
}

.status-picker-item:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.05));
}

.status-dot-small {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.table-cell-name {
    flex: 5;
    font-size: 14px;
    color: var(--text-primary, #e2e8f0);
    font-weight: 500;
}

.table-cell-type {
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-type-badge {
    font-size: 16px;
    line-height: 1;
    filter: grayscale(0.3);
    transition: filter 0.2s;
}

.task-table-row:hover .task-type-badge {
    filter: grayscale(0);
}

.table-cell-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 4;
}

.task-item {
    /* border-left: 1px solid var(--border-docs); */
    /* padding-left: 17px; */
    position: relative;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.task-item:not(:first-child)::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    height: 12px;
    width: 1px;
    background: var(--border-docs);
}

.task-item-default {
    color: var(--text-disabled, #64748b) !important;
    font-style: italic;
    opacity: 0.7;
}

.task-badge {
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    border-radius: 4px;
}

.task-assignee,
.task-due {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 50px;
}

.table-cell-actions {
    width: 32px;
    display: flex;
    justify-content: flex-end;
}

.task-row-delete {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
    transition: all 0.2s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.task-table-row:hover .task-row-delete {
    opacity: 1;
}

.task-row-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}


/* Column (Kanban) */
.tasks-column {
    min-width: 280px;
    max-width: 320px;
    flex: 1;
    flex-shrink: 0;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tasks-column.drag-over {
    border-color: var(--accent, #818cf8);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
    background: rgba(129, 140, 248, 0.03);
}

.drag-over {
    border-top: 2px solid var(--accent) !important;
}

.tasks-column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-docs);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px 12px 0 0;
}

.tasks-column-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.tasks-column-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tasks-column-count {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    font-weight: 500;
}

.tasks-column-add {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s ease;
    opacity: 0;
}

.tasks-column:hover .tasks-column-add {
    opacity: 1;
}

.tasks-column-add:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #e2e8f0);
}

.tasks-column-body {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 100px;
}

/* Task Card (Kanban) */
.task-card {
    background: var(--card-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-docs);
    border-radius: 10px;
    padding: 14px;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.task-card:hover {
    border: 1px solid var(--accent);
    transform: translateY(-2px);
}

.task-card:active {
    cursor: grabbing;
    opacity: 0.8;
    transform: scale(0.98);
}

.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.task-card-name {
    font-size: 14px;
    color: var(--text-primary, #e2e8f0);
    line-height: 1.4;
    flex: 1;
    word-break: break-word;
    font-weight: 500;
}

.task-card-delete {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 14px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.task-card:hover .task-card-delete {
    opacity: 1;
}

.task-card-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    align-items: center;
}

.task-card-priority {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-urgent {
    background: rgba(239, 68, 68, 0.15);
    color: #f33d3d;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.priority-high {
    background: rgba(249, 115, 22, 0.15);
    color: #f79e40;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.priority-medium {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.priority-low {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.priority-none {
    background-color: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.task-card-assignee,
.task-card-due {
    color: var(--text-secondary, #94a3b8);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Scrollbar for columns */
.tasks-column-body::-webkit-scrollbar {
    width: 4px;
}

.tasks-column-body::-webkit-scrollbar-track {
    background: transparent;
}

.tasks-column-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Board scrollbar */
.tasks-board-columns::-webkit-scrollbar {
    height: 8px;
}

.tasks-board-columns::-webkit-scrollbar-track {
    background: transparent;
}

.tasks-board-columns::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Theme Unicorn */
.theme-unicorn .tasks-column.drag-over {
    border-color: var(--unicorn-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--unicorn-color) 20%, transparent);
}



.theme-unicorn .view-switch-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-secundary);
}

.theme-unicorn .task-table-row:hover {
    background: rgba(255, 255, 255, 0.08);
    /* slightly brighter hover */
}

/* Drag Scroll Active State */
.tasks-board-columns.active-drag {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

/* Container for constrained layout */
.tasks-board-container {
    width: 100%;
    /* max-width: 1200px; */
    /* Match editor-main or similar */
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
}

.tasks-board-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    color: var(--text-secondary, #94a3b8);
    opacity: 0.6;
}

.tasks-board-empty-icon {
    font-size: 48px;
}

.tasks-board-empty p {
    font-size: 14px;
    margin: 0;
}

.tasks-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    /* Remove horizontal padding as container has it */
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    flex-shrink: 0;
    gap: 16px;
}

.tasks-board-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    margin: 0;
}

.tasks-board-columns {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    overflow-x: auto;
    flex: 1;
    align-items: flex-start;
}

.tasks-board-content {
    flex: 1;
    /* overflow: hidden; */
    position: relative;
    display: flex;
    flex-direction: column;
}

/* View Switcher */
.view-switcher {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 6px;
}

.view-switch-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.view-switch-btn:hover {
    color: var(--text-primary, #e2e8f0);
}

.view-switch-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #e2e8f0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Table View Styles */
.tasks-table-view {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.task-table-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--border-docs);
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 2px;
    /* background-color: #f7f7f7; */
}

.task-table-group.drag-over {
    border-color: var(--accent-color, #818cf8);
    background: rgba(129, 140, 248, 0.05);
}

.task-table-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    border-bottom: 1px solid #2a27270d;
    background-color: var(--bg-secondary);
}

.group-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.group-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
}

.group-count {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 10px;
}

.group-add-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
    visibility: hidden;
    /* Only show on hover of header/group if desired, or keep generic */
}

.task-table-group:hover .group-add-btn {
    visibility: visible;
}

.group-add-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #e2e8f0);
}


.task-table-row {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    background: var(--bg-secondary);
    gap: 12px;
    margin-bottom: 3px;
    cursor: grab;
    transition: all 0.15s ease;
    border: 1px solid var(--border-docs);
    box-shadow: 1px 1px 2px #1a1a1a1c;
}

.task-table-row:active {
    cursor: grabbing;
    background: rgba(255, 255, 255, 0.06);
}

.task-table-row:hover {
    background: var(--unicorn-color);
    border-color: var(--accent);
    border-style: dashed;
}

.task-table-row.row-active-z {
    z-index: 1000;
    position: relative;
    border-color: var(--accent);
}



.table-cell-check {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* For dropdown positioning */
}

/* Interactive Checkbox */
.task-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-secondary, #94a3b8);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.task-checkbox:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Status Picker Dropdown */
.status-picker-dropdown {
    background: var(--bg-secondary, #1e1e24);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 6px;
    padding: 4px;
    z-index: 100;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.inline-dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99;
    cursor: default;
}

.status-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-primary, #e2e8f0);
    transition: background 0.15s ease;
}

.status-picker-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.status-dot-small {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}



.table-cell-type {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-type-badge {
    font-size: 14px;
    line-height: 1;
}

.table-cell-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 5;
}

.task-item {
    border-left: 1px solid var(--border-docs);
    padding-left: 17px;
}

.task-item-default {
    color: #b3b3b3 !important;
    font-style: italic;
}

.task-badge {
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 500;
    min-width: 70px;
}



.table-cell-actions {
    width: 24px;
    display: flex;
    justify-content: flex-end;
}

.task-row-delete {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: all 0.15s;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.task-table-row:hover .task-row-delete {
    opacity: 1;
}

.task-row-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}


/* Column (Kanban) */
.tasks-column {
    min-width: 260px;
    max-width: 300px;
    flex: 1;
    flex-shrink: 0;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tasks-column.drag-over {
    border-color: var(--accent, #818cf8);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
    background: rgba(129, 140, 248, 0.03);
}

.drag-over {
    border-top: 1px dashed var(--accent) !important;
}

.tasks-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 2px solid;
    flex-shrink: 0;
}

.tasks-column-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tasks-column-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tasks-column-count {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.tasks-column-add {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s ease;
    opacity: 0;
}

.tasks-column:hover .tasks-column-add {
    opacity: 1;
}

.tasks-column-add:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #e2e8f0);
}

.tasks-column-body {
    padding: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 60px;
}



.priority-urgent {
    background: rgba(239, 68, 68, 0.15);
    color: #f33d3d;
}

.priority-high {
    background: rgba(249, 115, 22, 0.15);
    color: #f79e40;
}

.priority-medium {
    background: rgba(234, 179, 8, 0.15);
    color: #bfa72b;
}

.priority-low {
    background: rgba(34, 197, 94, 0.15);
    color: #59956e;
}

.priority-none {
    background-color: #c3c3c329;
    color: #918989;
}


/* Scrollbar for columns */
.tasks-column-body::-webkit-scrollbar {
    width: 4px;
}

.tasks-column-body::-webkit-scrollbar-track {
    background: transparent;
}

.tasks-column-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Board scrollbar */
.tasks-board-columns::-webkit-scrollbar {
    height: 6px;
}

.tasks-board-columns::-webkit-scrollbar-track {
    background: transparent;
}

.tasks-board-columns::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Theme Unicorn */
.theme-unicorn .tasks-column.drag-over {
    border-color: var(--unicorn-color);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--unicorn-color) 20%, transparent);
}




/* Drag Scroll Active State */

.task-row-anchor {
    border: 1px dashed var(--border-docs);
    border-radius: 3px;
    padding: 1px;
    font-size: 0.8em;
    line-height: normal;
    display: inline-block;
    text-align: center;
    padding-block: 1px;
    padding-inline: 6px;
}

.task-row-anchor.fullfilled {
    border: 1px solid var(--accent);
    background-color: var(--bg-primary);
    cursor: pointer;
}

.task-row-anchor.fullfilled:hover {
    background-color: var(--bg-secondary);
    color: var(--bg-primary);
}

.project-link-btn {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-docs);
    border-radius: 4px;
    padding: 7px 6px;
    font-size: 10px;
    font-weight: 500;
    display: flex;
    cursor: pointer;
    align-items: baseline;
}

/* ═══════════════════════════════════════════
   Tasks Dashboard - Mini Analytics Card
   ═══════════════════════════════════════════ */

.tasks-dashboard {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

/* ── Diablo Health Orb ── */

.dash-orb-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    flex-shrink: 0;
}

.dash-orb-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.dash-orb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 30% 20%, #0d0d0d, #050505);
    border: 2px solid #1a1a1a;
    transition: border-color 0.6s, box-shadow 0.6s;
}

.dash-orb-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.6s ease,
                box-shadow 0.6s ease;
    border-radius: 0 0 50% 50%;
}

/* Liquid wave surface animation */
.dash-orb-liquid::before {
    content: "";
    position: absolute;
    top: -6px;
    left: -20%;
    width: 140%;
    height: 14px;
    background:
        radial-gradient(ellipse at 30% 80%, rgba(255,255,255,0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(255,255,255,0.15) 0%, transparent 50%);
    animation: orbWave 3s ease-in-out infinite;
    border-radius: 50%;
}

/* Floating bubble effect */
.dash-orb-liquid::after {
    content: "";
    position: absolute;
    bottom: 20%;
    left: 25%;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255,255,255,0.3), transparent);
    border-radius: 50%;
    animation: orbBubble 4s ease-in-out infinite 0.5s;
}

@keyframes orbWave {
    0%, 100% { transform: translateX(-4px) scaleY(1) rotate(-2deg); }
    33% { transform: translateX(3px) scaleY(1.8) rotate(1deg); }
    66% { transform: translateX(-2px) scaleY(1.2) rotate(-1deg); }
}

@keyframes orbBubble {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    25% { transform: translateY(-8px) scale(1.2); opacity: 0.7; }
    50% { transform: translateY(-16px) scale(0.8); opacity: 0.3; }
    75% { transform: translateY(-10px) scale(1.1); opacity: 0.5; }
}

.dash-orb-glass {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at 35% 25%,
        rgba(255, 255, 255, 0.14) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.dash-orb-shine {
    position: absolute;
    top: 7px;
    left: 13px;
    width: 11px;
    height: 7px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50%;
    transform: rotate(-25deg);
    pointer-events: none;
}

.dash-orb-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.dash-orb-pct {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.dash-orb-sub {
    font-size: 10px;
    color: var(--text-secondary, #94a3b8);
    font-weight: 500;
    line-height: 1;
}

/* ── Right Panel (stats + distribution) ── */

.dash-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

/* ── Stat Counters ── */

.dash-stats {
    display: flex;
    align-items: center;
    gap: 0;
}

.dash-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    padding: 6px 8px;
}

.dash-stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color, rgba(255, 255, 255, 0.08));
    flex-shrink: 0;
}

.dash-stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.dash-stat-label {
    font-size: 10px;
    color: var(--text-secondary, #94a3b8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.dash-stat-testing {
    color: #f97316;
}

.dash-stat-overdue {
    color: #ef4444;
}

.dash-stat-urgent {
    color: #f59e0b;
}

.dash-stat-unassigned {
    color: var(--text-secondary, #94a3b8);
}

/* ── Status Distribution Bar ── */

.dash-distrib {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 8px;
}

.dash-distrib-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    gap: 1px;
}

.dash-distrib-seg {
    height: 100%;
    min-width: 3px;
    transition: width 0.4s ease;
    border-radius: 1px;
}

.dash-distrib-seg:first-child {
    border-radius: 3px 1px 1px 3px;
}

.dash-distrib-seg:last-child {
    border-radius: 1px 3px 3px 1px;
}

.dash-distrib-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.dash-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dash-legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-legend-text {
    font-size: 10px;
    color: var(--text-secondary, #94a3b8);
    white-space: nowrap;
}

/* ── Overdue Indicators ── */

.task-overdue {
    color: #ef4444 !important;
    font-style: normal !important;
    opacity: 1 !important;
}

.row-overdue {
    border-left: 2px solid rgba(239, 68, 68, 0.5) !important;
}

/* ── Done Checkbox ── */

.task-checkbox-done {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #22c55e;
}/* ═══════════════════════════════════════════════════════════════
   Task Filter Bar Styles
   ═══════════════════════════════════════════════════════════════ */

.task-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 4px 12px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

.task-filter-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.task-filter-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.filter-search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    opacity: 0.6;
    pointer-events: none;
}

.filter-search-input {
    width: 100%;
    padding: 8px 32px 8px 36px;
    border: 1px solid var(--border-docs);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.2s ease;
}

.filter-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

.filter-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.filter-clear-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.filter-clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-docs);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.05));
    color: var(--text-primary);
    border-color: var(--border-hover, rgba(255, 255, 255, 0.15));
}

.filter-toggle-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.filter-badge {
    color: #22c55e;
    font-size: 16px;
    line-height: 0;
}

.filter-clear-all {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border-docs);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-clear-all:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.filter-results-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-docs);
}

.task-filter-expanded {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-docs);
    border-radius: 10px;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 70px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.filter-chip {
    padding: 5px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-docs);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-chip:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.05));
    border-color: var(--border-hover, rgba(255, 255, 255, 0.15));
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   Enhanced View Switcher Styles (Light & Dark Mode)
   ═══════════════════════════════════════════════════════════════ */

.view-switcher {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary, rgba(0, 0, 0, 0.06));
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border-docs);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.view-switch-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-secondary, #64748b);
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-switch-btn::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.view-switch-btn:hover {
    color: var(--text-primary, #1e293b);
    background: rgba(255, 255, 255, 0.5);
}

.view-switch-btn:hover::before {
    opacity: 0.8;
}

.view-switch-btn.active {
    background: var(--bg-primary, #ffffff);
    color: var(--text-primary, #1e293b);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

.view-switch-btn.active::before {
    opacity: 1;
}

/* Table view icon (grid-like) */
.view-switch-btn:nth-child(1)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'%3E%3C/rect%3E%3Crect x='14' y='3' width='7' height='7'%3E%3C/rect%3E%3Crect x='14' y='14' width='7' height='7'%3E%3C/rect%3E%3Crect x='3' y='14' width='7' height='7'%3E%3C/rect%3E%3C/svg%3E");
}

/* Kanban view icon (columns) */
.view-switch-btn:nth-child(2)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='5' height='18'%3E%3C/rect%3E%3Crect x='9.5' y='3' width='5' height='18'%3E%3C/rect%3E%3Crect x='16' y='3' width='5' height='18'%3E%3C/rect%3E%3C/svg%3E");
}

/* Light mode adjustments for view switcher */
@media (prefers-color-scheme: light) {
    .view-switcher {
        background: rgba(0, 0, 0, 0.06);
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    .view-switch-btn {
        color: #64748b;
    }
    
    .view-switch-btn:hover {
        color: #1e293b;
        background: rgba(255, 255, 255, 0.8);
    }
    
    .view-switch-btn.active {
        background: #ffffff;
        color: #1e293b;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    }
}

/* Dark mode adjustments for view switcher */
@media (prefers-color-scheme: dark) {
    .view-switcher {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    
    .view-switch-btn {
        color: #94a3b8;
    }
    
    .view-switch-btn:hover {
        color: #e2e8f0;
        background: rgba(255, 255, 255, 0.08);
    }
    
    .view-switch-btn.active {
        background: rgba(30, 41, 59, 0.9);
        color: #f1f5f9;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }
}

/* Theme-specific overrides */
.theme-unicorn .view-switcher {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}


.theme-dark-unicorn .view-switcher {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-dark-unicorn .view-switch-btn.active {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .task-filter-main {
        flex-direction: column;
        align-items: stretch;
    }
    
    .task-filter-search {
        max-width: none;
    }
    
    .filter-results-count {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .view-switcher {
        align-self: flex-end;
    }
    
    .view-switch-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .view-switch-btn::before {
        width: 12px;
        height: 12px;
    }
}

/* ============================================================================
   Task Tags
   ============================================================================ */

/* Tag pill (used in table rows and kanban cards) */
.task-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-tag-pill-sm {
    padding: 0px 6px;
    font-size: 10px;
    max-width: 180px;
}

/* Overflow badge (+N) */
.task-tag-overflow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    background: var(--bg-tertiary, #374151);
    color: var(--text-secondary, #9ca3af);
    cursor: pointer;
    flex-shrink: 0;
}

.task-tag-overflow:hover {
    background: var(--accent, #6366f1);
    color: white;
}

/* Tag empty icon */
.task-tag-empty {
    opacity: 0.3;
    cursor: pointer;
    font-size: 13px;
}

.task-tag-empty:hover {
    opacity: 0.7;
}

/* Table cell for tags */
.table-cell-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 60px;
    max-width: 120px;
    cursor: pointer;
    padding: 0 4px;
}

/* Kanban card tags container */
.task-card-tags {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    margin-top: 4px;
}

/* Tag filter dot */
.tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    flex-shrink: 0;
}

/* Tag picker dropdown */
.tag-picker-dropdown {
    min-width: 160px;
}

.tag-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-picker-check {
    width: 16px;
    font-size: 12px;
    color: var(--accent, #6366f1);
}

.tag-picker-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-picker-empty {
    color: var(--text-disabled, #6b7280);
    font-style: italic;
}

/* Tag management modal */
.tag-manager-modal {
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.tag-manager-modal .modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.tag-manager-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.tag-manager-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: var(--bg-tertiary, #1f2937);
}

.tag-manager-name {
    flex: 1;
    font-size: 13px;
}

.tag-manager-empty {
    color: var(--text-disabled, #6b7280);
    font-style: italic;
    padding: 12px 0;
    text-align: center;
}

.tag-color-preview {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-color-input {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
}

.tag-name-input {
    flex: 1;
    min-width: 0;
}

.tag-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #9ca3af);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.tag-action-btn:hover {
    color: var(--text-primary, #f3f4f6);
    background: var(--bg-secondary, #374151);
}

.tag-delete-btn:hover {
    color: #ef4444;
}

.tag-manager-add {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color, #374151);
}

.tag-add-btn {
    background: var(--accent, #6366f1);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.tag-add-btn:hover {
    opacity: 0.9;
}

.tag-manager-btn {
    border-left: 1px solid var(--border-color, #374151) !important;
    margin-left: 4px;
}

/* Copy from scope */
.tag-manager-copy-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #374151);
}

.tag-copy-from-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #9ca3af);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
    width: 100%;
    text-align: left;
}

.tag-copy-from-btn:hover {
    color: var(--text-primary, #e5e7eb);
}

.tag-copy-scope-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.tag-copy-scope-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: none;
    border: 1px solid var(--border-color, #374151);
    color: var(--text-primary, #e5e7eb);
    cursor: pointer;
    font-size: 13px;
    text-align: left;
}

.tag-copy-scope-item:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.05));
    border-color: var(--accent-color, #3b82f6);
}

.tag-copy-scope-name {
    flex: 1;
}

.tag-copy-scope-detail {
    font-size: 11px;
    color: var(--text-disabled, #6b7280);
    white-space: nowrap;
}

.tag-copy-scope-count {
    font-size: 11px;
    color: var(--text-disabled, #6b7280);
    white-space: nowrap;
}

/* Modal tag chips */
.modal-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-tag-chip {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    border: 1.5px solid;
    cursor: pointer;
    background: transparent;
    transition: all 0.15s ease;
}

.modal-tag-chip:hover {
    opacity: 0.85;
}

.modal-tag-chip.active {
    font-weight: 500;
}

/* Assignee picker dropdown */
.assignee-picker-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.assignee-picker-check {
    width: 16px;
    font-size: 12px;
    color: var(--accent);
}

.assignee-picker-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 600;
    color: white;
    background: var(--accent);
    letter-spacing: -0.5px;
}

.assignee-picker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal assignee chips */
.modal-assignees-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-assignee-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    border: 1.5px solid var(--border);
    cursor: pointer;
    background: transparent;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.modal-assignee-chip:hover {
    opacity: 0.85;
}

.modal-assignee-chip.active {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
    font-weight: 500;
}

/* Assignee avatar display (task row + card) */
.assignee-avatars {
    display: flex;
    align-items: center;
    position: relative;
}

.assignee-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    margin-left: -6px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.assignee-avatar:first-child {
    margin-left: 0;
}

.assignee-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.assignee-avatar-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 600;
    color: white;
    background: var(--accent);
    letter-spacing: -0.5px;
}

.assignee-overflow {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    margin-left: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.assignee-avatar-wrapper {
    position: relative;
    display: inline-flex;
}

.assignee-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.assignee-avatar-wrapper:hover .assignee-tooltip {
    opacity: 1;
}

.assignee-ghost {
    opacity: 0.3;
    font-size: 14px;
    cursor: pointer;
}

.assignee-ghost:hover {
    opacity: 0.6;
}

/* Task Comment Button + Popover */
.task-comment-btn {
    cursor: pointer;
    position: relative;
    font-size: 13px;
    opacity: 0.35;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.15s;
}

.task-comment-btn:hover {
    opacity: 1;
}

.task-comment-btn.has-comments {
    opacity: 0.7;
}

.task-comment-count {
    font-size: 9px;
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Comment popover (hover preview) */
.comment-popover {
    position: fixed;
    width: 300px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    padding: 8px 0;
}

.comment-popover-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.comment-bubble {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
}

.comment-bubble + .comment-bubble {
    border-top: 1px solid var(--border-docs);
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.comment-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 10px;
    color: var(--text-secondary);
}

.comment-text {
    font-size: 12px;
    color: var(--text-primary);
    word-break: break-word;
    white-space: pre-wrap;
}

/* Comment modal (click to create/manage) */
.comment-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    backdrop-filter: blur(2px);
}

.comment-modal {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    animation: slideUp 0.3s ease;
}

.comment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-docs);
}

.comment-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.comment-modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
}

.comment-modal-close:hover {
    color: var(--text-primary);
}

.comment-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    max-height: 400px;
}

.comment-modal-item {
    display: flex;
    gap: 10px;
    padding: 10px 20px;
    position: relative;
}

.comment-modal-item + .comment-modal-item {
    border-top: 1px solid var(--border-docs);
}

.comment-modal-item-body {
    flex: 1;
    min-width: 0;
}

.comment-modal-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.comment-modal-item:hover .comment-modal-actions {
    opacity: 1;
}

.comment-modal-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.comment-modal-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.comment-modal-action-btn.danger:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.comment-modal-input {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-docs);
}

.comment-modal-input textarea {
    flex: 1;
    min-height: 36px;
    max-height: 100px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    resize: none;
    font-family: inherit;
}

.comment-modal-input textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-modal-send {
    padding: 8px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    align-self: flex-end;
}

.comment-modal-send:hover {
    opacity: 0.9;
}

.comment-modal-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.comment-modal-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}
