/* Tasks / Business Development Plans - New UI Styles */

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--gray-100);
    border-radius: 8px;
    padding: 4px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--gray-700);
}

.view-btn.active {
    background: white;
    color: var(--gray-900);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tasks Filters */
.tasks-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Tasks Board */
.tasks-board {
    overflow-x: auto;
    padding-bottom: 8px;
}

.board-columns {
    display: flex;
    gap: 20px;
    min-width: max-content;
}

.board-column {
    width: 320px;
    background: var(--gray-50);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 280px);
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.column-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--gray-700);
}

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

.column-count {
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 4px;
}

.column-menu {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.column-menu:hover {
    background: var(--gray-200);
    color: var(--gray-600);
}

.column-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    padding: 12px;
    min-height: 150px;
    position: relative;
}

.column-content.drag-over {
    background: var(--primary-light);
    border: 2px dashed var(--primary);
    border-radius: 8px;
}

.add-task-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    padding: 10px;
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    background: transparent;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-task-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Task Cards */
.task-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: visible;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.task-card.priority-high {
    border-left: 4px solid var(--danger);
}

.task-card.priority-medium {
    border-left: 4px solid var(--warning);
}

.task-card.priority-low {
    border-left: 4px solid var(--success);
}

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

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

.task-card-priority.high {
    background: #fee2e2;
    color: #991b1b;
}

.task-card-priority.medium {
    background: #fef3c7;
    color: #92400e;
}

.task-card-priority.low {
    background: #d1fae5;
    color: #065f46;
}

.task-card-menu {
    opacity: 0;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: opacity 0.2s;
}

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

.task-card-menu:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.task-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-description {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.task-card-assignees {
    display: flex;
    align-items: center;
}

.task-card-assignees .avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    margin-left: -6px;
}

.task-card-assignees .avatar:first-child {
    margin-left: 0;
}

.task-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-500);
}

.task-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-card-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
}

.task-card-due {
    font-size: 12px;
    color: var(--gray-500);
}

.task-card-due.overdue {
    color: var(--danger);
    font-weight: 500;
}

.task-card-due.soon {
    color: var(--warning);
    font-weight: 500;
}

.task-card-tags {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.task-card-tag {
    font-size: 11px;
    padding: 3px 8px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 12px;
}

/* Tasks List View */
.tasks-list .data-table {
    width: 100%;
    border-collapse: collapse;
}

.tasks-list .data-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.tasks-list .data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.tasks-list .data-table tr:hover {
    background: var(--gray-50);
}

.task-list-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.task-list-related {
    font-size: 13px;
    color: var(--gray-500);
}

/* Tag Suggestions */
.tag-suggestion {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-suggestion:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Task Tags Input */
.task-tags-input {
    min-height: 42px;
}

.task-tags-input .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    font-size: 12px;
}

.task-tags-input .tag button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0;
    font-size: 12px;
    opacity: 0.7;
}

.task-tags-input .tag button:hover {
    opacity: 1;
}

/* Workflow Steps */
.workflow-step {
    text-align: center;
    flex-shrink: 0;
}

.workflow-step.active .step-dot {
    background: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}

.workflow-step.active span {
    color: var(--primary) !important;
    font-weight: 600 !important;
}

.workflow-step.completed .step-dot {
    background: var(--success) !important;
}

.workflow-step.completed span {
    color: var(--success) !important;
}

/* Detail Card */
.detail-card {
    transition: all 0.2s;
}

.detail-card:hover {
    background: var(--gray-100) !important;
}

/* Subtasks */
.subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.subtask-item:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.subtask-item.completed {
    background: var(--gray-50);
}

.subtask-item.completed .subtask-text {
    text-decoration: line-through;
    color: var(--gray-500);
}

.subtask-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.subtask-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.subtask-text {
    flex: 1;
    font-size: 14px;
    color: var(--gray-800);
}

.subtask-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Subtask Empty State */
.subtask-empty-state {
    text-align: center;
    padding: 24px;
    color: var(--gray-400);
}

.subtask-empty-state i {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

/* Subtask Input Container */
.subtask-input-container {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--primary);
    margin-bottom: 8px;
    animation: slideDown 0.2s ease-out;
}

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

.subtask-input-container .form-input {
    flex: 1;
    border: none;
    padding: 0;
    background: transparent;
}

.subtask-input-container .form-input:focus {
    outline: none;
    box-shadow: none;
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
    padding-left: 24px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.activity-item {
    position: relative;
    padding-bottom: 20px;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.activity-item.comment::before {
    background: #8b5cf6;
    box-shadow: 0 0 0 2px #8b5cf6;
}

.activity-item.status-change::before {
    background: #10b981;
    box-shadow: 0 0 0 2px #10b981;
}

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

.activity-text {
    font-size: 14px;
    color: var(--gray-800);
}

.activity-time {
    font-size: 12px;
    color: var(--gray-400);
}

.activity-content {
    margin-top: 8px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-600);
}

/* Subtasks Dropdown in Task Cards */
.task-subtasks-dropdown {
    animation: fadeIn 0.15s ease-out;
}

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

.task-subtasks-dropdown::-webkit-scrollbar {
    width: 6px;
}

.task-subtasks-dropdown::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.task-subtasks-dropdown::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.task-subtasks-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Subtask Description */
.subtask-description {
    white-space: pre-wrap;
    word-break: break-word;
}

.subtask-description-edit textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.subtask-description-edit textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Responsive */
@media (max-width: 1200px) {
    .board-column {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .tasks-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select,
    .search-box input {
        width: 100% !important;
    }

    .board-columns {
        flex-direction: column;
    }

    .board-column {
        width: 100%;
        max-height: none;
    }
}