/* ═══ Dark mode modal & form styling ═══ */
[data-theme="dark"] .modal-content {
    background: #13131f !important;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    border-radius: 14px;
}
[data-theme="dark"] .modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 18px 24px;
}
[data-theme="dark"] .modal-header h3 {
    color: rgba(255,255,255,0.95);
    font-size: 17px;
    font-weight: 600;
}
[data-theme="dark"] .modal-close {
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
[data-theme="dark"] .modal-close:hover {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
}
[data-theme="dark"] .modal-body {
    padding: 20px 24px;
}
[data-theme="dark"] .modal-body label,
[data-theme="dark"] .form-group label {
    color: rgba(255,255,255,0.55);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}
[data-theme="dark"] .modal-body input[type="text"],
[data-theme="dark"] .modal-body textarea,
[data-theme="dark"] .modal-body select,
[data-theme="dark"] .form-group input[type="text"],
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: rgba(255,255,255,0.9) !important;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}
[data-theme="dark"] .modal-body input:focus,
[data-theme="dark"] .modal-body textarea:focus,
[data-theme="dark"] .modal-body select:focus {
    border-color: var(--accent) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
    background: rgba(255,255,255,0.05) !important;
}
[data-theme="dark"] .modal-body input::placeholder,
[data-theme="dark"] .modal-body textarea::placeholder {
    color: rgba(255,255,255,0.2);
}
[data-theme="dark"] .modal-body select option {
    background: #1a1a2e;
    color: rgba(255,255,255,0.9);
}
[data-theme="dark"] .form-group {
    margin-bottom: 16px;
}
[data-theme="dark"] .form-row {
    display: flex;
    gap: 14px;
}
[data-theme="dark"] .form-half {
    flex: 1;
}
[data-theme="dark"] .form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
[data-theme="dark"] .btn-primary,
[data-theme="dark"] #detailSaveBtn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] #detailSaveBtn:hover {
    background: #7c3aed;
    box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}
[data-theme="dark"] .btn-secondary {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
}
[data-theme="dark"] .btn-danger {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.2);
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
[data-theme="dark"] .btn-danger:hover {
    background: rgba(239,68,68,0.2);
    border-color: rgba(239,68,68,0.4);
}
[data-theme="dark"] .task-meta-info {
    color: rgba(255,255,255,0.35);
    font-size: 11px;
    padding: 10px 0;
}
[data-theme="dark"] .task-comments-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
[data-theme="dark"] .task-comments-list {
    max-height: 160px;
    overflow-y: auto;
    padding: 8px 0;
}
[data-theme="dark"] .task-comment-input {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
[data-theme="dark"] .task-comment-input input,
[data-theme="dark"] .task-comment-input select {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: rgba(255,255,255,0.9) !important;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
}
[data-theme="dark"] .task-comment-input button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
[data-theme="dark"] .task-comment-input button:hover {
    background: #7c3aed;
}

/* ═══ Kanban cards dark mode — modern style ═══ */
[data-theme="dark"] .kanban-column {
    background: transparent;
}
[data-theme="dark"] .column-header {
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
}
[data-theme="dark"] .column-header .count {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
}
[data-theme="dark"] .task-card {
    background: #16161e;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}
[data-theme="dark"] .task-card:hover {
    background: #1a1a26;
    border-color: rgba(139,92,246,0.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 0 1px rgba(139,92,246,0.1);
    transform: translateY(-2px);
}
[data-theme="dark"] .task-title {
    color: rgba(255,255,255,0.92);
    font-weight: 600;
}
[data-theme="dark"] .task-desc {
    color: rgba(255,255,255,0.35);
}
[data-theme="dark"] .task-assignee-name {
    color: rgba(255,255,255,0.5);
}
[data-theme="dark"] .task-time {
    color: rgba(255,255,255,0.25);
}
[data-theme="dark"] .task-tags .tag {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.04);
}
[data-theme="dark"] .task-card.dragging {
    box-shadow: 0 12px 40px rgba(139,92,246,0.2);
    border-color: rgba(139,92,246,0.4);
}
[data-theme="dark"] .column-cards.drag-over {
    background: rgba(139,92,246,0.06);
    border-color: rgba(139,92,246,0.3);
}
[data-theme="dark"] .empty-column-message {
    color: rgba(255,255,255,0.2) !important;
}
[data-theme="dark"] .kanban-show-more {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 4px;
}
[data-theme="dark"] .kanban-show-more:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
}
[data-theme="dark"] .kanban-search {
    border-bottom-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .search-agent-pill {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
}
[data-theme="dark"] .search-agent-pill.active {
    background: rgba(139,92,246,0.15);
    border-color: rgba(139,92,246,0.3);
    color: #a78bfa;
}
[data-theme="dark"] .search-tag-pill {
    border: 1px solid rgba(255,255,255,0.08);
}
[data-theme="dark"] .task-comment {
    border-bottom-color: rgba(255,255,255,0.04);
}
[data-theme="dark"] .task-comment-header strong {
    color: rgba(255,255,255,0.85);
}
[data-theme="dark"] .task-comment-time {
    color: rgba(255,255,255,0.25);
}
[data-theme="dark"] .task-comment-text {
    color: rgba(255,255,255,0.6);
}

/* ═══ New Proposal modal dark ═══ */
[data-theme="dark"] .proposal-templates {
    padding: 10px 0 16px;
}
[data-theme="dark"] .proposal-tpl-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    border-radius: 8px;
    transition: all 0.2s;
}
[data-theme="dark"] .proposal-tpl-btn:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
}
