/* Project Table Styles */
:root {
	--primary-color: #09111F;
	--secondary-color: #0F1828;
	--accent-color: #273247;
	--highlight-color: #ffb21e;
	--text-muted: #9EA0A6;
	--border-color: #1B2433;
}

.project-table-wrapper {
	font-family: 'Work Sans', sans-serif;
}

/* Header with Filters */
.project-table-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 15px;
}

.project-table-filters {
	display: flex;
	align-items: center;
	gap: 12px;
}

.project-table-filters label {
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}

.pm-filter-dropdown {
	background: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: 3px;
	padding: 10px 16px;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
	min-width: 200px;
	font-family: 'Work Sans', sans-serif;
}

.pm-filter-dropdown:hover {
	border-color: rgba(255, 255, 255, 0.3);
}

.pm-filter-dropdown:focus {
	outline: none;
	border-color: var(--highlight-color);
}

.pm-filter-dropdown option {
	background: var(--secondary-color);
	color: #fff;
}

/* Table Container */
.project-table-container {
	background: var(--secondary-color);
	border-radius: 3px;
	border: 1px solid var(--border-color);
	overflow: hidden;
}

.projects-table {
	width: 100%;
	border-collapse: collapse;
}

/* Table Header */
.projects-table thead {
	background: var(--primary-color);
	border-bottom: 1px solid var(--border-color);
}

.projects-table thead th {
	padding: 16px 20px;
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--text-muted);
}

.projects-table thead th.col-drag {
	width: 40px;
	padding: 16px 10px;
}

.projects-table thead th.col-name {
	min-width: 200px;
	color: white !important;
}

.projects-table thead th.col-name a {
	color: white !important
}

.projects-table thead th.col-pm {
	width: 150px;
}

.projects-table thead th.col-status {
	width: 140px;
}

.projects-table thead th.col-tasks {
	width: 120px;
}

.projects-table thead th.col-progress {
	width: 150px;
}

.projects-table thead th.col-due-date {
	width: 150px;
}

.projects-table thead th.col-urgency {
	width: 130px;
}

/* Table Body */
.projects-table-body tr.project-row {
	border-bottom: 1px solid var(--border-color);
	transition: background-color 0.2s;
	cursor: move;
}

.projects-table-body tr.project-row:hover {
	background: rgba(255, 255, 255, 0.02);
}

.projects-table-body tr.project-row.sortable-ghost {
	opacity: 0.4;
}

.projects-table-body tr.project-row.sortable-drag {
	background: var(--accent-color);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.projects-table-body td {
	padding: 16px 20px;
	color: #fff;
	vertical-align: middle;
}

/* Drag Handle */
.col-drag {
	text-align: center;
	padding: 16px 10px !important;
}

.drag-handle {
	color: var(--text-muted);
	cursor: grab;
	font-size: 14px;
	transition: color 0.2s;
}

.drag-handle:hover {
	color: #fff;
}

.drag-handle:active {
	cursor: grabbing;
}

/* Project Name */
.project-name-link {
	color: white !important;
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	transition: color 0.2s;
}

.project-name-link:hover {
	color: var(--highlight-color);
}

/* PM Column */
.pm-avatar-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pm-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--border-color);
}

.pm-name {
	font-size: 13px;
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Status Indicators */
.status-indicators {
	display: flex;
	gap: 8px;
}

.status-indicator {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.2s;
	background: rgba(255, 255, 255, 0.05);
	font-size: 16px;
	opacity: 0.3;
}

.status-indicator:hover {
	opacity: 0.6;
	transform: scale(1.1);
}

.status-indicator.active {
	opacity: 1;
	transform: scale(1);
}

.status-indicator.red {
	color: #ef4444;
}

.status-indicator.red.active {
	background: rgba(239, 68, 68, 0.2);
}

.status-indicator.yellow {
	color: #f59e0b;
}

.status-indicator.yellow.active {
	background: rgba(245, 158, 11, 0.2);
}

.status-indicator.green {
	color: #10b981;
}

.status-indicator.green.active {
	background: rgba(16, 185, 129, 0.2);
}

/* Tasks Column */
.col-tasks {
	position: relative;
}

.tasks-toggle-btn {
	background: transparent;
	border: 1px solid var(--border-color);
	border-radius: 3px;
	padding: 8px 12px;
	color: var(--text-muted);
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: 'Work Sans', sans-serif;
	white-space: nowrap;
}

.tasks-toggle-btn:hover {
	border-color: var(--highlight-color);
	color: #fff;
	background: rgba(255, 178, 30, 0.1);
}

.tasks-toggle-btn i {
	font-size: 11px;
}

/* Tasks Modal */
.tasks-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(9, 17, 31, 0.95);
	z-index: 10002 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.tasks-modal {
	background: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: 6px;
	width: 100%;
	max-width: 600px;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	animation: slideUp 0.3s ease;
}

@keyframes slideUp {
	from {
		transform: translateY(20px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.tasks-modal-header {
	padding: 24px 30px;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}

.tasks-modal-header h2 {
	font-family: 'Work Sans', sans-serif;
	font-size: 20px;
	font-weight: 600;
	color: #fff;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.tasks-modal-close {
	background: transparent;
	border: none;
	color: var(--text-muted);
	font-size: 32px;
	cursor: pointer;
	padding: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	transition: all 0.2s;
	line-height: 1;
}

.tasks-modal-close:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.tasks-modal-content {
	padding: 30px;
	overflow-y: auto;
	flex: 1;
}

.tasks-modal-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	color: var(--text-muted);
	font-family: 'Work Sans', sans-serif;
}

.tasks-modal-loading i {
	font-size: 32px;
	margin-bottom: 16px;
	color: var(--highlight-color);
}

.tasks-modal-loading p {
	font-size: 14px;
	margin: 0;
}

.tasks-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.task-item {
	padding: 16px 20px;
	background: var(--primary-color);
	border-radius: 3px;
	font-size: 14px;
	color: #fff;
	border: 1px solid var(--border-color);
	transition: all 0.2s;
}

.task-item:hover {
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.02);
}

.tasks-empty {
	color: var(--text-muted);
	font-size: 14px;
	text-align: center;
	padding: 40px 20px;
}

.tasks-empty i {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.3;
	display: block;
}

/* Progress Column */
.progress-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
}

.progress-bar-container {
	flex: 1;
	height: 8px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	overflow: hidden;
	position: relative;
}

.progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--highlight-color) 0%, #E8B84D 100%);
	border-radius: 4px;
	transition: width 0.3s ease;
	min-width: 2%;
}

.progress-value {
	min-width: 45px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--highlight-color);
	padding: 4px 8px;
	border-radius: 3px;
	cursor: text;
	transition: all 0.2s;
	border: 1px solid transparent;
}

.progress-value:hover {
	background: rgba(255, 178, 30, 0.1);
}

.progress-value:focus {
	outline: none;
	background: var(--primary-color);
	border-color: var(--highlight-color);
}

/* Due Date Column */
.due-date-input {
	background: var(--primary-color);
	border: 1px solid var(--border-color);
	border-radius: 3px;
	padding: 8px 12px;
	color: #fff;
	font-size: 13px;
	font-family: 'Work Sans', sans-serif;
	cursor: pointer;
	transition: all 0.2s;
	width: 100%;
}

.due-date-input:hover {
	border-color: var(--highlight-color);
}

.due-date-input:focus {
	outline: none;
	border-color: var(--highlight-color);
	background: var(--primary-color);
}

/* Urgency Column */
.urgency-dropdown {
	background: var(--primary-color);
	border: 1px solid var(--border-color);
	border-radius: 3px;
	padding: 8px 12px;
	color: #fff;
	font-size: 13px;
	font-family: 'Work Sans', sans-serif;
	cursor: pointer;
	transition: all 0.2s;
	font-weight: 500;
	width: 100%;
}

.urgency-dropdown:hover {
	border-color: var(--highlight-color);
}

.urgency-dropdown:focus {
	outline: none;
	border-color: var(--highlight-color);
}

.urgency-dropdown.urgency-low {
	color: #10b981;
	border-color: rgba(16, 185, 129, 0.3);
}

.urgency-dropdown.urgency-medium {
	color: #f59e0b;
	border-color: rgba(245, 158, 11, 0.3);
}

.urgency-dropdown.urgency-high {
	color: #ef4444;
	border-color: rgba(239, 68, 68, 0.3);
}

.urgency-dropdown option {
	background: var(--secondary-color);
	color: #fff;
}

/* Empty State */
.empty-row td {
	padding: 60px 20px;
}

.empty-state {
	text-align: center;
	color: var(--text-muted);
}

.empty-state i {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.3;
}

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

/* Responsive */
@media (max-width: 1200px) {
	.projects-table thead th.col-tasks,
	.projects-table tbody td.col-tasks {
		display: none;
	}
}

@media (max-width: 992px) {
	.pm-name {
		display: none;
	}
	
	.projects-table thead th.col-pm {
		width: 60px;
	}
}

@media (max-width: 768px) {
	.project-table-container {
		overflow-x: auto;
	}
	
	.projects-table {
		min-width: 900px;
	}
	
	.project-table-filters {
		flex-direction: column;
		align-items: flex-start;
		width: 100%;
	}
	
	.pm-filter-dropdown {
		width: 100%;
		min-width: unset;
	}
	
	.tasks-modal {
		max-width: 100%;
		max-height: 100vh;
		border-radius: 0;
	}
	
	.tasks-modal-header {
		padding: 20px;
	}
	
	.tasks-modal-header h2 {
		font-size: 18px;
	}
	
	.tasks-modal-content {
		padding: 20px;
	}
}

