/* ==========================================================================
   TEAMFLOW - MODERN DARK GLASSMORPHISM STYLESHEET
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-primary: #080b11;
    --bg-secondary: #0f131e;
    --bg-card: rgba(20, 27, 45, 0.55);
    --bg-card-hover: rgba(28, 38, 62, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Brand Accent Colors */
    --color-primary: #6366f1;       /* Indigo */
    --color-primary-hover: #4f46e5;
    --color-secondary: #8b5cf6;     /* Purple/Violet */
    --color-accent: #d946ef;        /* Fuchsia */
    
    /* Status Colors */
    --status-todo: #64748b;         /* Slate */
    --status-todo-bg: rgba(100, 116, 139, 0.15);
    --status-inprogress: #0ea5e9;   /* Sky */
    --status-inprogress-bg: rgba(14, 165, 233, 0.15);
    --status-inreview: #f59e0b;     /* Amber */
    --status-inreview-bg: rgba(245, 158, 11, 0.15);
    --status-done: #10b981;         /* Emerald */
    --status-done-bg: rgba(16, 185, 129, 0.15);
    
    /* Priority Colors */
    --priority-high: #f43f5e;       /* Rose */
    --priority-high-bg: rgba(244, 63, 94, 0.15);
    --priority-medium: #f59e0b;     /* Amber */
    --priority-medium-bg: rgba(245, 158, 11, 0.12);
    --priority-low: #10b981;        /* Emerald */
    --priority-low-bg: rgba(16, 185, 129, 0.12);

    /* Misc */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow-blue: 0 0 20px rgba(99, 102, 241, 0.25);
    --shadow-glow-red: 0 0 20px rgba(244, 63, 94, 0.25);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(139, 92, 246, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.text-muted {
    color: var(--text-secondary) !important;
}
.text-danger {
    color: var(--priority-high) !important;
}
.d-none {
    display: none !important;
}
.p-0 {
    padding: 0 !important;
}
.text-right {
    text-align: right;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background: rgba(10, 15, 26, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow-blue);
}

.logo-icon {
    color: white;
    width: 22px;
    height: 22px;
}

.sidebar-brand h2 {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Role Selector Widget */
.role-selector-widget {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 24px;
}

.widget-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.widget-label i {
    width: 14px;
    height: 14px;
    color: var(--color-accent);
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.role-dropdown {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}

.role-dropdown:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

/* Sidebar Menu */
.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.sidebar-nav a i {
    width: 20px;
    height: 20px;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.sidebar-nav li.active a {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.badge {
    margin-left: auto;
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    border-radius: var(--radius-md);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.user-info h4 {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.user-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Bar */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-title h1 {
    font-size: 2.1rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title p {
    font-size: 0.95rem;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: var(--shadow-glow-blue);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

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

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

.btn-danger {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fda4af;
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.25);
    border-color: rgba(244, 63, 94, 0.5);
    color: white;
}

.btn-icon {
    padding: 10px;
    border-radius: var(--radius-md);
}

.btn-icon i {
    width: 20px;
    height: 20px;
}

.btn-icon-label i {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   GLASSMORPHISM CARD STYLES
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-card-hover);
}

/* ==========================================================================
   DASHBOARD STATS
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
}

.stat-card.urgent-glow {
    border-color: rgba(244, 63, 94, 0.15);
}

.stat-card.urgent-glow:hover {
    border-color: rgba(244, 63, 94, 0.35);
    box-shadow: var(--shadow-glow-red);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    width: 24px;
    height: 24px;
    color: white;
}

.icon-blue {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.35);
}
.icon-blue i { color: #818cf8; }

.icon-orange {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.icon-orange i { color: #fbbf24; }

.icon-green {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.icon-green i { color: #34d399; }

.icon-red {
    background: rgba(244, 63, 94, 0.2);
    border: 1px solid rgba(244, 63, 94, 0.35);
}
.icon-red i { color: #fb7185; }

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    font-family: var(--font-heading);
    margin-top: 2px;
}

/* ==========================================================================
   DASHBOARD DETAILS GRID
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.dashboard-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 380px;
}

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

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.card-title i {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.card-body {
    flex-grow: 1;
    overflow-y: auto;
}

/* Workload Bars */
.workload-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.workload-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.workload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.workload-member {
    display: flex;
    align-items: center;
    gap: 10px;
}

.workload-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.workload-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    width: 0%;
    transition: width 1s ease-out;
}

/* Urgent Tasks */
.urgent-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.urgent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(244, 63, 94, 0.06);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: var(--transition-smooth);
}

.urgent-item:hover {
    background: rgba(244, 63, 94, 0.1);
    transform: translateX(4px);
}

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

.urgent-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.urgent-deadline {
    font-size: 0.8rem;
    color: #fda4af;
    display: flex;
    align-items: center;
    gap: 4px;
}

.urgent-deadline i {
    width: 12px;
    height: 12px;
}

.urgent-assignee {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
    gap: 8px;
    padding: 20px;
}

.empty-state i {
    width: 48px;
    height: 48px;
    stroke-width: 1.5px;
    margin-bottom: 8px;
}

/* ==========================================================================
   COMPREHENSIVE TASK TABLE (BOTTOM)
   ========================================================================== */
.list-card {
    height: auto;
}

.list-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

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

.filter-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px 12px;
    gap: 8px;
}

.filter-group label {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.filter-group label i {
    width: 16px;
    height: 16px;
}

.filter-group select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.task-table th {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.task-table tbody tr {
    transition: var(--transition-smooth);
}

.task-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

/* Task Title cell */
.task-title-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-title-name {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.task-desc-brief {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Assignee cell */
.table-assignee {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-assignee-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-assignee-name {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Tag designs */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Priority tags */
.tag-priority-high {
    background: var(--priority-high-bg);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.25);
}
.tag-priority-medium {
    background: var(--priority-medium-bg);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.tag-priority-low {
    background: var(--priority-low-bg);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Status tags */
.tag-status-todo {
    background: var(--status-todo-bg);
    color: #cbd5e1;
    border: 1px solid rgba(100, 116, 139, 0.25);
}
.tag-status-inprogress {
    background: var(--status-inprogress-bg);
    color: #7dd3fc;
    border: 1px solid rgba(14, 165, 233, 0.25);
}
.tag-status-inreview {
    background: var(--status-inreview-bg);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.tag-status-done {
    background: var(--status-done-bg);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.deadline-cell {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.deadline-cell.overdue {
    color: var(--priority-high);
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-table-action {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-table-action:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-table-action.action-delete:hover {
    background: rgba(244, 63, 94, 0.15);
    color: #f87171;
    border-color: rgba(244, 63, 94, 0.3);
}

/* ==========================================================================
   KANBAN BOARD VIEW
   ========================================================================== */
.kanban-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.member-board-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.board-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow-blue);
}

.member-board-info h2 {
    font-size: 1.3rem;
    color: white;
}

.member-board-info p {
    font-size: 0.85rem;
    margin-top: 2px;
}

.board-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.kanban-column {
    background: rgba(10, 15, 28, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 280px);
    transition: var(--transition-smooth);
}

.kanban-column.drag-over {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.05);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

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

.indicator-todo { background: var(--status-todo); }
.indicator-in-progress { background: var(--status-inprogress); }
.indicator-in-review { background: var(--status-inreview); }
.indicator-done { background: var(--status-done); }

.column-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.01em;
}

.column-count {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
}

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

/* Kanban Task Card */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: grab;
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.task-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(30, 41, 59, 0.65);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.task-card.dragging {
    opacity: 0.4;
    transform: scale(0.95);
    border: 2px dashed var(--color-primary);
}

.card-priority-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 10px;
    margin-top: 10px;
}

.card-deadline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-deadline i {
    width: 12px;
    height: 12px;
}

.card-deadline.danger {
    color: var(--priority-high);
    font-weight: 600;
}

.card-assignee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   MODAL WINDOWS & BACKDROP
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 10, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 580px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: rotate(90deg);
}

.btn-close i {
    width: 16px;
    height: 16px;
}

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

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group label.required::after {
    content: " *";
    color: var(--priority-high);
}

.form-group input[type="text"],
.form-group textarea,
.form-group select,
.form-group input[type="date"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 22px 28px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
}

/* Task Detail Specifics */
.task-detail-content {
    max-width: 500px;
}

.detail-priority-tag {
    display: inline-flex;
    background: rgba(244, 63, 94, 0.15);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.25);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.3;
}

.detail-assignee-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.assignee-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.assignee-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.detail-description {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    white-space: pre-wrap;
}

.detail-dates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 16px;
    border-radius: var(--radius-md);
}

.date-block {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.date-block i {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.date-block.text-danger i {
    color: var(--priority-high);
}

.date-block span {
    display: block;
    font-size: 0.75rem;
}

.date-block strong {
    display: block;
    font-size: 0.85rem;
    color: white;
    margin-top: 2px;
}

.detail-status-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.status-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-badge {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--status-inprogress-bg);
    color: #7dd3fc;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.footer-actions-right {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-primary);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    min-width: 300px;
    max-width: 400px;
    animation: slide-in 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.toast.toast-success { border-left-color: var(--status-done); }
.toast.toast-warning { border-left-color: var(--status-inreview); }
.toast.toast-error { border-left-color: var(--priority-high); }

.toast-message {
    font-size: 0.85rem;
    font-weight: 500;
    flex-grow: 1;
}

.toast-icon {
    width: 18px;
    height: 18px;
}

.toast.toast-success .toast-icon { color: var(--status-done); }
.toast.toast-warning .toast-icon { color: var(--status-inreview); }
.toast.toast-error .toast-icon { color: var(--priority-high); }

/* ==========================================================================
   ANIMATIONS & TRANSITIONS
   ========================================================================== */
@keyframes slide-in {
    from {
        transform: translateX(100%) translateY(0);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.zoom-in {
    animation: zoom-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes zoom-in {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
    .kanban-column {
        min-height: 400px;
    }
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        width: 80px;
        padding: 24px 10px;
        align-items: center;
    }
    .sidebar-brand h2,
    .role-selector-widget,
    .sidebar-nav span,
    .user-info,
    .sidebar-footer {
        display: none;
    }
    .brand-logo {
        margin-bottom: 0;
    }
    .sidebar-brand {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 30px;
    }
    .sidebar-nav a {
        justify-content: center;
        padding: 12px;
    }
    .main-content {
        margin-left: 80px;
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .header-actions {
        width: 100%;
    }
    .btn-add-task {
        flex-grow: 1;
    }
}
