/* CSS Design System for Premium Task Management Dashboard */

:root {
    /* Color Palette - Dark Theme (Default) */
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-sidebar: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-input: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.16);
    
    /* Brand Accent Colors */
    --accent-blue: #3b82f6;
    --accent-blue-rgb: 59, 130, 246;
    --accent-indigo: #6366f1;
    --accent-indigo-rgb: 99, 102, 241;
    --accent-purple: #8b5cf6;
    --accent-purple-rgb: 139, 92, 246;
    --accent-emerald: #10b981;
    --accent-emerald-rgb: 16, 185, 129;
    
    /* Task Priority Colors */
    --priority-high: #ef4444;
    --priority-medium: #f59e0b;
    --priority-low: #10b981;
    
    /* System States */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #06b6d4;
    
    --card-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    --card-border: 1px solid rgba(255, 255, 255, 0.06);
    --glass-blur: blur(16px);
    --transition-speed: 0.25s;
    --font-sans: 'Outfit', 'Sarabun', sans-serif;
}

/* Light Theme Variables Override */
body.light-theme {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-sidebar: #0f172a; /* Contrast Dark Sidebar in Light Mode */
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --bg-input: #f8fafc;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-hover: rgba(0, 0, 0, 0.16);
    
    --card-shadow: 0 10px 30px rgba(148, 163, 184, 0.12);
    --card-border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Base resets & styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    line-height: 1.5;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
    transition: width var(--transition-speed);
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-icon {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.brand-info h1 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    line-height: 1.2;
}

.brand-info span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.sidebar-menu {
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #94a3b8; /* Always look readable on dark sidebar */
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--accent-indigo);
}

.menu-item[data-view="dashboard"].active { box-shadow: inset 3px 0 0 var(--accent-indigo); background: rgba(99, 102, 241, 0.1); color: #818cf8; }
.menu-item[data-view="kanban"].active { box-shadow: inset 3px 0 0 var(--accent-blue); background: rgba(59, 130, 246, 0.1); color: #60a5fa; }
.menu-item[data-view="team"].active { box-shadow: inset 3px 0 0 var(--accent-emerald); background: rgba(16, 185, 129, 0.1); color: #34d399; }
.menu-item[data-view="settings"].active { box-shadow: inset 3px 0 0 var(--text-primary); background: rgba(255, 255, 255, 0.08); }

.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* User Profile in Sidebar Footer */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px;
    border-radius: 8px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.sidebar-user-info {
    flex-grow: 1;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 12px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 10px;
    color: #94a3b8;
}

/* Main Content styling */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100vh;
}

/* Topbar Header styling */
.topbar {
    padding: 18px 30px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.header-title h2 {
    font-size: 20px;
    font-weight: 700;
}

.header-title p {
    font-size: 12px;
    margin-top: 2px;
}

/* Role Selector Toggle widget in Topbar */
.role-badge-selector {
    display: flex;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 3px;
    align-items: center;
}

.role-btn {
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.role-btn:hover {
    color: var(--text-primary);
}

.role-btn.active {
    background-color: var(--accent-indigo);
    color: white;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.role-btn.active.member-role {
    background-color: var(--accent-blue);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

/* Member Dropdown for Kanban Board Filter */
.member-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-dropdown {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.member-dropdown:focus {
    border-color: var(--accent-indigo);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

/* Dashboard Body and Grid System */
.dashboard-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Glassmorphism Cards */
.card {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

/* KPI Cards Layout */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.kpi-card {
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}
.kpi-card.indigo::before { background-color: var(--accent-indigo); }
.kpi-card.blue::before { background-color: var(--accent-blue); }
.kpi-card.emerald::before { background-color: var(--accent-emerald); }
.kpi-card.orange::before { background-color: var(--priority-medium); }

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    margin: 12px 0 4px 0;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.kpi-footer {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kpi-card.indigo .icon-box { background-color: rgba(99, 102, 241, 0.1); color: var(--accent-indigo); }
.kpi-card.blue .icon-box { background-color: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.kpi-card.emerald .icon-box { background-color: rgba(16, 185, 129, 0.1); color: var(--accent-emerald); }
.kpi-card.orange .icon-box { background-color: rgba(245, 158, 11, 0.1); color: var(--priority-medium); }

/* Grid systems */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3col {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr;
    gap: 24px;
}

@media (max-width: 1200px) {
    .grid-3col {
        grid-template-columns: 1fr 1fr;
    }
    .grid-3col > :first-child {
        grid-column: span 2;
    }
}

@media (max-width: 850px) {
    .grid-2col, .grid-3col {
        grid-template-columns: 1fr;
    }
    .grid-3col > :first-child {
        grid-column: span 1;
    }
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Kanban Board Styling */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
}

@media (max-width: 1100px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

.kanban-column {
    background-color: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 550px;
    transition: background-color var(--transition-speed);
}

.kanban-column.dragover {
    background-color: rgba(99, 102, 241, 0.05);
    border-color: var(--accent-indigo);
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 4px;
}

.column-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.column-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.column-count {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

body.light-theme .column-count {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Kanban column header colors */
.kanban-column.todo .column-color-indicator { background-color: var(--text-muted); }
.kanban-column.inprogress .column-color-indicator { background-color: var(--accent-blue); }
.kanban-column.inreview .column-color-indicator { background-color: var(--accent-purple); }
.kanban-column.completed .column-color-indicator { background-color: var(--accent-emerald); }

.kanban-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    min-height: 480px;
}

/* Kanban Card Styling */
.kanban-card {
    background-color: var(--bg-card);
    border: var(--card-border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.kanban-card:hover {
    border-color: var(--border-color-hover);
    background-color: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.dragging {
    opacity: 0.4;
    border: 2px dashed var(--accent-indigo);
    background-color: transparent;
    transform: scale(0.98);
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.card-tag.priority-high { background-color: rgba(239, 68, 68, 0.15); color: #f87171; }
.card-tag.priority-medium { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.card-tag.priority-low { background-color: rgba(16, 185, 129, 0.15); color: #34d399; }

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.card-progress-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-bar-container {
    background-color: rgba(255, 255, 255, 0.08);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

body.light-theme .progress-bar-container {
    background-color: rgba(0, 0, 0, 0.06);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-bar-fill.blue { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.progress-bar-fill.indigo { background: linear-gradient(90deg, #6366f1, #818cf8); }
.progress-bar-fill.emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-bar-fill.orange { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 4px;
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.card-meta-item svg {
    color: var(--text-muted);
}

.card-assignee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    border: 1.5px solid var(--bg-card);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Productivity Table / Task List in Manager View */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.custom-table th {
    padding: 12px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

body.light-theme .custom-table tr:hover td {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Custom visual chart helper classes */
.workload-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.workload-progress-bar {
    width: 120px;
    flex-shrink: 0;
}

/* Timeline / Activity List */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    border: 2px solid var(--bg-primary);
}

.timeline-dot.blue { background-color: var(--accent-blue); }
.timeline-dot.emerald { background-color: var(--accent-emerald); }
.timeline-dot.orange { background-color: var(--priority-medium); }

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.timeline-time {
    font-size: 10px;
    color: var(--text-muted);
}

/* Modals styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: var(--card-border);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content.large {
    max-width: 800px;
}

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

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

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

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

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Forms and elements */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .form-row .form-group {
        margin-bottom: 20px;
    }
}

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="date"],
select,
textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* Subtasks Checklist Builder */
.subtasks-builder-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.subtask-builder-row {
    display: flex;
    gap: 8px;
}

.subtask-list-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.subtask-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}

body.light-theme .subtask-item-row {
    background-color: rgba(0, 0, 0, 0.02);
}

.subtask-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
}

.btn-remove-subtask {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* General Buttons */
.btn {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent-indigo);
    color: white;
}

.btn-primary:hover {
    background-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color-hover);
}

body.light-theme .btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

body.light-theme .btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-success {
    background-color: var(--accent-emerald);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-danger {
    background-color: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Task Detail Panel (Split details in Modal) */
.task-detail-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 24px;
}

@media (max-width: 700px) {
    .task-detail-grid {
        grid-template-columns: 1fr;
    }
}

.task-detail-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

body.light-theme .task-detail-sidebar {
    background-color: rgba(0, 0, 0, 0.02);
}

.task-detail-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-detail-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 4px;
}

.task-desc-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Subtask Interactive checklist in Detail View */
.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.checklist-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.checklist-checkbox.checked {
    background-color: var(--accent-indigo);
    border-color: var(--accent-indigo);
}

.checklist-checkbox svg {
    color: white;
    display: none;
}

.checklist-checkbox.checked svg {
    display: block;
}

.checklist-item-text.checked {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Comments Section */
.comments-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.comment-input-row {
    display: flex;
    gap: 12px;
}

.comment-input-row input {
    flex-grow: 1;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.comment-item {
    display: flex;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
}

body.light-theme .comment-item {
    background-color: rgba(0, 0, 0, 0.02);
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.comment-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
}

.comment-header-meta {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-secondary);
}

.comment-time {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
}

.comment-text {
    color: var(--text-primary);
    line-height: 1.4;
}

/* Empty placeholder */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    width: 100%;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

body.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* SVG Chart Layout widgets */
.chart-svg-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 11px;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.task-list-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.task-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
}

/* Utility classes */
.text-orange { color: #f59e0b !important; }
.text-indigo { color: #818cf8 !important; }
.text-blue { color: #60a5fa !important; }
.text-emerald { color: #34d399 !important; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
