/* ============================================
   TASKS PAGE — iOS LIQUID GLASS THEME
   Premium glassmorphism design inspired by iOS
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Background — светлый градиент */
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8eef3;
    
    /* Glass Effect — жидкое стекло */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-hover: rgba(255, 255, 255, 0.8);
    --glass-bg-solid: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-border-subtle: rgba(0, 0, 0, 0.08);
    --glass-border-hover: rgba(139, 92, 246, 0.4);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --glass-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
    --glass-blur: blur(20px);
    --glass-blur-strong: blur(40px);
    
    /* Text */
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    
    /* Accent Colors — яркие, сочные */
    --accent-primary: #8b5cf6;
    --accent-secondary: #a78bfa;
    --accent-tertiary: #c4b5fd;
    --accent-glow: rgba(139, 92, 246, 0.3);
    
    /* Status Colors */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-light: rgba(16, 185, 129, 0.08);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-light: rgba(245, 158, 11, 0.08);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-light: rgba(239, 68, 68, 0.08);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);
    --info-light: rgba(59, 130, 246, 0.08);
    
    /* Priority Colors */
    --priority-critical: #ef4444;
    --priority-high: #f97316;
    --priority-medium: #f59e0b;
    --priority-low: #10b981;
    
    /* Spacing & Radius */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px var(--accent-glow);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    
    /* Border */
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-light: rgba(0, 0, 0, 0.05);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: linear-gradient(135deg, #e0e7ee 0%, #f0f4f8 50%, #e8eef3 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Gradient Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 20%, rgba(236, 72, 153, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ============================================
   SCROLLBAR — тонкий, элегантный
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* ============================================
   HEADER — Liquid Glass
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-primary), #ec4899);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
    transition: var(--transition-normal);
}

.logo:hover {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.45);
}

.header-title h1 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-title p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.user-info:hover {
    background: var(--glass-bg-hover);
    box-shadow: var(--shadow-md);
}

.user-avatar, .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

/* ============================================
   BUTTONS — Liquid Style
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-normal);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: white;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.45);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border-subtle);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--glass-bg-hover);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 14px;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.45);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.45);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    position: relative;
    z-index: 1;
    max-width: 1800px;
    margin: 0 auto;
    padding: 28px;
}

/* ============================================
   STATS ROW — Glass Cards
   ============================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--glass-border-hover);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.stat-icon.blue { 
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1)); 
    color: var(--info); 
}
.stat-icon.green { 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1)); 
    color: var(--success); 
}
.stat-icon.yellow { 
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1)); 
    color: var(--warning); 
}
.stat-icon.red { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1)); 
    color: var(--danger); 
}
.stat-icon.purple { 
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.1)); 
    color: #a855f7; 
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
    font-weight: 500;
}

/* ============================================
   TOOLBAR
   ============================================ */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.toolbar-center {
    display: flex;
    align-items: center;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Search Input — Glass */
.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), var(--shadow-md);
    background: var(--glass-bg-solid);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Filter Tabs — Pill Style */
.filter-tabs, .tabs {
    display: flex;
    gap: 6px;
    background: var(--glass-bg);
    padding: 6px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border-subtle);
    box-shadow: var(--shadow-sm);
}

.filter-tab, .tab {
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-tab:hover, .tab:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
}

.filter-tab.active, .tab.active {
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

/* View Switcher */
.view-switcher {
    display: flex;
    gap: 6px;
    background: var(--glass-bg);
    padding: 6px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border-subtle);
    box-shadow: var(--shadow-sm);
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-btn:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
}

.view-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.view-btn i {
    font-size: 15px;
}

/* Filter Select */
.filter-dropdown select,
.form-select,
#filterProject,
#filterPriority {
    padding: 12px 40px 12px 16px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    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='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    min-width: 160px;
    box-shadow: var(--shadow-sm);
}

.filter-dropdown select:focus,
.form-select:focus,
#filterProject:focus,
#filterPriority:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), var(--shadow-md);
}

/* ============================================
   TASKS BOARD (Kanban) — Liquid Glass
   ============================================ */
.tasks-board {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 20px;
    align-items: flex-start;
}

.board-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 80px;
    color: var(--text-secondary);
    font-size: 15px;
    width: 100%;
}

.board-loading i {
    font-size: 28px;
    color: var(--accent-primary);
}

.task-column {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 500px;
    min-width: 320px;
    max-width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.task-column:hover {
    box-shadow: var(--shadow-lg);
}

.column-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--glass-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
}

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

.column-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.column-title h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.column-count, .count {
    background: var(--glass-bg-solid);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border-subtle);
}

.column-tasks {
    padding: 14px;
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
}

/* Drag & Drop States */
.column-tasks.drag-over {
    background: rgba(139, 92, 246, 0.08);
    border: 2px dashed var(--accent-primary);
    border-radius: var(--radius-lg);
    margin: 10px;
}

/* ============================================
   TASK CARD — Premium Glass
   ============================================ */
.task-card {
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.task-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(139, 92, 246, 0.1);
}

.task-card:last-child {
    margin-bottom: 0;
}

.task-card.dragging {
    opacity: 0.6;
    transform: rotate(3deg) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Priority Indicator — левая полоса */
.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.task-card.priority-critical::before { background: linear-gradient(180deg, var(--priority-critical), #dc2626); }
.task-card.priority-high::before { background: linear-gradient(180deg, var(--priority-high), #ea580c); }
.task-card.priority-medium::before { background: linear-gradient(180deg, var(--priority-medium), #d97706); }
.task-card.priority-low::before { background: linear-gradient(180deg, var(--priority-low), #059669); }

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

.task-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
    flex: 1;
}

.task-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--text-primary);
}

.task-menu-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    opacity: 0;
}

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

.task-menu-btn:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.task-description, .task-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

/* Task Tags */
.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.task-tag {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-tag.tag-bug { background: var(--danger-light); color: var(--danger); }
.task-tag.tag-feature { background: var(--info-light); color: var(--info); }
.task-tag.tag-urgent { background: var(--warning-light); color: var(--warning); }
.task-tag.tag-design { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.task-tag.tag-default { background: var(--glass-bg); color: var(--text-secondary); }

/* Task Project Badge */
.task-project-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: white;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.task-project-badge i {
    font-size: 10px;
    opacity: 0.9;
}

/* Subtasks Progress */
.task-subtasks-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--glass-bg);
    border-radius: var(--radius-sm);
}

.subtasks-bar {
    flex: 1;
    height: 6px;
    background: var(--glass-border-subtle);
    border-radius: 3px;
    overflow: hidden;
}

.subtasks-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--success));
    border-radius: 3px;
    transition: width var(--transition-normal);
}

.subtasks-text {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

/* Task Meta */
.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assignee-avatar, .avatar-sm {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.assignee-name {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.task-deadline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    color: var(--text-secondary);
    font-weight: 500;
}

.task-deadline i {
    font-size: 11px;
}

.task-deadline.overdue {
    background: var(--danger-light);
    color: var(--danger);
    animation: pulse 2s infinite;
}

.task-deadline.soon {
    background: var(--warning-light);
    color: var(--warning);
}

.task-deadline.today {
    background: var(--warning-light);
    color: var(--warning);
    font-weight: 700;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Task Attachments Count */
.task-attachments-count {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.task-attachments-count i {
    font-size: 12px;
}

/* Priority Badge */
.priority-badge {
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.priority-badge.critical { background: var(--danger-light); color: var(--danger); }
.priority-badge.high { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.priority-badge.medium { background: var(--warning-light); color: var(--warning); }
.priority-badge.low { background: var(--success-light); color: var(--success); }

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-high { 
    background: var(--danger-light); 
    color: var(--danger); 
}

.badge-medium { 
    background: var(--warning-light); 
    color: var(--warning); 
}

.badge-low { 
    background: var(--success-light); 
    color: var(--success); 
}

/* Empty Column */
.empty-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 24px;
    color: var(--text-muted);
    text-align: center;
}

.empty-column i {
    font-size: 52px;
    margin-bottom: 14px;
    opacity: 0.25;
    color: var(--accent-primary);
}

.empty-column p {
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   MODAL — Liquid Glass
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding: 50px 20px;
    z-index: 1000;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--glass-bg-solid);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(139, 92, 246, 0.1);
}

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

.modal-sm {
    max-width: 420px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 22px 28px;
    border-bottom: 1px solid var(--glass-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-title i {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.modal-title h3, .modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-title p {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

.modal-body {
    padding: 28px;
    max-height: 65vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 18px 28px;
    border-top: 1px solid var(--glass-border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   FORMS — Soft Glass
   ============================================ */
.form-group {
    margin-bottom: 22px;
}

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

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

.form-label .required, .form-group label .required {
    color: var(--danger);
    margin-left: 3px;
}

.form-input,
.form-select,
.form-textarea,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-inset);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12), var(--shadow-sm);
    background: white;
}

.form-input::placeholder,
.form-textarea::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea, .form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.form-select, .form-group select {
    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='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

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

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Tags Input */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-md);
    min-height: 52px;
    cursor: text;
    transition: all var(--transition-fast);
}

.tags-input-container:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
    background: white;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: white;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.tag-item button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    transition: color var(--transition-fast);
}

.tag-item button:hover {
    color: white;
}

.tags-input {
    flex: 1;
    min-width: 120px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.tags-input::placeholder {
    color: var(--text-muted);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* ============================================
   ATTACHMENTS — Glass Style
   ============================================ */
.attachments-upload {
    margin-bottom: 18px;
}

.upload-dropzone {
    border: 2px dashed rgba(139, 92, 246, 0.35);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    background: rgba(139, 92, 246, 0.04);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
    transform: scale(1.01);
}

.upload-dropzone i {
    font-size: 36px;
    color: var(--accent-primary);
    margin-bottom: 10px;
}

.upload-dropzone p {
    margin: 10px 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.upload-dropzone span {
    color: var(--text-muted);
    font-size: 12px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: white;
    border-radius: var(--radius-full);
    cursor: pointer;
    margin-top: 10px;
    transition: all var(--transition-normal);
    font-weight: 600;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

/* Upload Progress */
.upload-progress {
    padding: 18px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: var(--radius-md);
    margin-top: 14px;
}

.progress-bar {
    height: 8px;
    background: var(--glass-border-subtle);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    width: 0%;
    transition: width var(--transition-normal);
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Attachments List */
.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.attachment-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-sm);
}

.attachment-preview {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(139, 92, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-preview i {
    font-size: 22px;
    color: var(--accent-primary);
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.attachment-actions {
    display: flex;
    gap: 6px;
}

.attachment-actions button {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-actions button:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-primary);
}

.attachment-actions button.delete-btn:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* Empty attachments */
.no-attachments {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.no-attachments i {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.4;
}

/* Section count badge */
.section-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Image preview modal */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.image-preview-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-preview-overlay img {
    max-width: 92%;
    max-height: 92%;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.image-preview-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* ============================================
   TASK VIEW MODAL
   ============================================ */
.task-view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.task-view-title {
    flex: 1;
}

.task-view-title h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.task-view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.task-view-actions {
    display: flex;
    gap: 10px;
}

/* Info Grid */
.info-grid, .task-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 22px;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 26px;
    border: 1px solid var(--glass-border-subtle);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Description */
.task-description-full {
    padding: 22px;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 26px;
    border: 1px solid var(--glass-border-subtle);
}

.task-description-full h4 {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.task-description-full p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* Task Actions */
.task-actions {
    padding: 22px;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border-subtle);
}

.task-actions h4 {
    font-size: 14px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Status Section */
.status-section {
    margin-bottom: 26px;
}

.status-section h4 {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-weight: 600;
}

.status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.status-btn, .btn-status {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--glass-bg);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-btn:hover, .btn-status:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    border-color: var(--glass-border-subtle);
}

.status-btn.active, .btn-status.active {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-primary);
}

.status-btn.status-done.active {
    border-color: var(--success);
    background: var(--success-light);
    color: var(--success);
}

/* ============================================
   SUBTASKS
   ============================================ */
.subtasks-section {
    margin-bottom: 26px;
}

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

.subtasks-header h4 {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.subtasks-progress-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.subtasks-list {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border-subtle);
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--glass-border-subtle);
    transition: background var(--transition-fast);
}

.subtask-item:last-child {
    border-bottom: none;
}

.subtask-item:hover {
    background: rgba(139, 92, 246, 0.04);
}

.subtask-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    border: 2px solid var(--glass-border-subtle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.subtask-checkbox:hover {
    border-color: var(--accent-primary);
}

.subtask-checkbox.checked {
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
    color: white;
}

.subtask-checkbox.checked i {
    font-size: 11px;
}

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

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

.subtask-delete {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: all var(--transition-fast);
}

.subtask-item:hover .subtask-delete {
    opacity: 1;
}

.subtask-delete:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* Add Subtask */
.add-subtask-form {
    display: flex;
    gap: 10px;
    padding: 14px 18px;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    margin-top: 14px;
    border: 1px solid var(--glass-border-subtle);
}

.add-subtask-form input {
    flex: 1;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.add-subtask-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-section {
    padding-top: 22px;
    border-top: 1px solid var(--glass-border-subtle);
}

.comments-section h4 {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.comments-list {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 18px;
}

.comment-item, .comment {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
    border: 1px solid var(--glass-border-subtle);
}

.comment-item:last-child, .comment:last-child {
    margin-bottom: 0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--info), #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.comment-content {
    flex: 1;
    min-width: 0;
}

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

.comment-author {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.comment-date {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-form {
    display: flex;
    gap: 14px;
    flex-direction: column;
}

.comment-form textarea {
    flex: 1;
    padding: 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 90px;
    transition: all var(--transition-fast);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
    background: white;
}

.comment-form button {
    align-self: flex-end;
}

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

.no-comments i {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.3;
}

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

.toast {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    background: var(--glass-bg-solid);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    min-width: 320px;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.success { border-left: 5px solid var(--success); }
.toast.error { border-left: 5px solid var(--danger); }
.toast.warning { border-left: 5px solid var(--warning); }
.toast.info { border-left: 5px solid var(--info); }

.toast i {
    font-size: 20px;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

.toast span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: 18px;
    line-height: 1;
    transition: color var(--transition-fast);
}

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

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(120px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(120px) scale(0.9);
    }
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading, .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    z-index: 3000;
}

.loading-overlay p {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

/* ============================================
   CALENDAR VIEW — Glass
   ============================================ */
.calendar-view {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    animation: fadeIn 0.4s ease;
    box-shadow: var(--shadow-md);
}

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

.calendar-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 32px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--glass-border-subtle);
}

.calendar-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    min-width: 240px;
    text-align: center;
}

.calendar-grid {
    margin-bottom: 28px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--glass-border-subtle);
}

.weekday {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 12px;
}

.weekday.weekend {
    color: var(--danger);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.calendar-day {
    min-height: 130px;
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-lg);
    padding: 12px;
    transition: all var(--transition-fast);
    position: relative;
}

.calendar-day:hover {
    background: white;
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.calendar-day.other-month {
    opacity: 0.4;
    background: var(--glass-bg);
}

.calendar-day.today {
    background: rgba(139, 92, 246, 0.08);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.calendar-day.today .day-number {
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: white;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.calendar-day.has-overdue {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.3);
}

.calendar-day.weekend {
    background: rgba(239, 68, 68, 0.02);
}

.day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    transition: all var(--transition-fast);
}

.day-tasks {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 85px;
    overflow-y: auto;
}

.day-tasks::-webkit-scrollbar {
    width: 4px;
}

.day-tasks::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}

/* Calendar Task Cards */
.calendar-task {
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid;
}

.calendar-task:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.calendar-task.priority-critical {
    background: rgba(239, 68, 68, 0.12);
    border-left-color: var(--danger);
    color: var(--danger);
}

.calendar-task.priority-high {
    background: rgba(249, 115, 22, 0.12);
    border-left-color: #f97316;
    color: #ea580c;
}

.calendar-task.priority-medium {
    background: rgba(245, 158, 11, 0.12);
    border-left-color: var(--warning);
    color: #b45309;
}

.calendar-task.priority-low {
    background: rgba(16, 185, 129, 0.12);
    border-left-color: var(--success);
    color: #047857;
}

.calendar-task.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.day-more {
    font-size: 11px;
    color: var(--accent-primary);
    text-align: center;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all var(--transition-fast);
}

.day-more:hover {
    background: rgba(139, 92, 246, 0.12);
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--glass-border-subtle);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
}

.legend-dot.critical { background: linear-gradient(135deg, #ef4444, #dc2626); }
.legend-dot.high { background: linear-gradient(135deg, #f97316, #ea580c); }
.legend-dot.medium { background: linear-gradient(135deg, #f59e0b, #d97706); }
.legend-dot.low { background: linear-gradient(135deg, #10b981, #059669); }

/* ============================================
   ANALYTICS VIEW — Glass
   ============================================ */
.analytics-view {
    animation: fadeIn 0.4s ease;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--glass-border-subtle);
}

.analytics-header h2 {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 14px;
}

.analytics-header h2 i {
    color: var(--accent-primary);
}

.analytics-period {
    display: flex;
    gap: 8px;
    background: var(--glass-bg);
    padding: 8px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border-subtle);
    box-shadow: var(--shadow-sm);
}

.period-btn {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.period-btn:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
}

.period-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

/* Analytics Stats Cards */
.analytics-stats {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 22px;
    margin-bottom: 32px;
}

.analytics-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 26px;
    display: flex;
    align-items: center;
    gap: 22px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.analytics-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card-main {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02));
    border-color: rgba(16, 185, 129, 0.2);
}

.stat-icon-large {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.stat-icon-large.green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.08));
    color: var(--success);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-number {
    font-size: 46px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-trend {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.up::before {
    content: '↑';
}

.stat-trend.down {
    color: var(--danger);
}

.stat-trend.down::before {
    content: '↓';
}

.stat-mini-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-mini-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.08));
    color: var(--info);
}

.stat-mini-icon.yellow {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.08));
    color: var(--warning);
}

.stat-mini-icon.red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.08));
    color: var(--danger);
}

.stat-number-sm {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
}

.stat-label-sm {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Chart Cards */
.analytics-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-bottom: 22px;
}

.chart-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.chart-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}

.chart-card.chart-large {
    grid-column: span 1;
}

.chart-card.chart-full {
    grid-column: span 2;
}

.chart-header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--glass-border-subtle);
}

.chart-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.chart-header h3 i {
    color: var(--accent-primary);
    font-size: 18px;
}

.chart-body {
    padding: 26px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-pie-container {
    max-width: 300px;
    margin: 0 auto;
}

/* Top Performers */
.performers-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.performer-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.performer-item:hover {
    background: var(--glass-bg-hover);
    transform: translateX(6px);
    border-color: var(--glass-border-subtle);
}

.performer-rank {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
}

.performer-rank.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.35);
}

.performer-rank.silver {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
}

.performer-rank.bronze {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

.performer-rank.default {
    background: var(--glass-bg);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border-subtle);
}

.performer-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.performer-info {
    flex: 1;
    min-width: 0;
}

.performer-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.performer-stats {
    font-size: 12px;
    color: var(--text-secondary);
}

.performer-count {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-primary);
}

/* Activity Heatmap */
.heatmap-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.heatmap-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.heatmap-label {
    width: 44px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: right;
}

.heatmap-cells {
    display: flex;
    gap: 8px;
    flex: 1;
}

.heatmap-cell {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    cursor: default;
}

.heatmap-cell:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.heatmap-cell.level-0 {
    background: var(--glass-bg);
    color: var(--text-muted);
}

.heatmap-cell.level-1 {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-primary);
}

.heatmap-cell.level-2 {
    background: rgba(139, 92, 246, 0.25);
    color: var(--accent-primary);
}

.heatmap-cell.level-3 {
    background: rgba(139, 92, 246, 0.45);
    color: white;
}

.heatmap-cell.level-4 {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.heatmap-header {
    display: flex;
    gap: 8px;
    margin-left: 54px;
    margin-bottom: 6px;
}

.heatmap-header-cell {
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============================================
   PROJECTS — Glass Style
   ============================================ */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border-subtle);
    transition: all var(--transition-normal);
}

.project-item:hover {
    border-color: var(--accent-primary);
    background: var(--glass-bg-hover);
    box-shadow: var(--shadow-sm);
}

.project-color {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-name {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-stats {
    font-size: 12px;
    color: var(--text-muted);
}

.project-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.project-item:hover .project-actions {
    opacity: 1;
}

.project-actions button {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--transition-fast);
}

.project-actions .btn-edit {
    background: var(--glass-bg);
    color: var(--text-secondary);
}

.project-actions .btn-edit:hover {
    background: var(--accent-primary);
    color: white;
}

.project-actions .btn-delete {
    background: var(--glass-bg);
    color: var(--text-secondary);
}

.project-actions .btn-delete:hover {
    background: var(--danger);
    color: white;
}

.projects-empty {
    text-align: center;
    padding: 50px 24px;
    color: var(--text-muted);
}

.projects-empty i {
    font-size: 52px;
    opacity: 0.25;
    margin-bottom: 18px;
}

.projects-empty p {
    margin: 0;
    font-weight: 500;
}

/* ============================================
   STATUSES MODAL
   ============================================ */
.status-form {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 22px;
}

.status-form .form-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.status-form .form-group {
    margin-bottom: 0;
}

.status-form input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.status-form input[type="color"] {
    width: 54px;
    height: 46px;
    padding: 5px;
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
}

.status-form .btn {
    height: 46px;
    padding: 0 22px;
}

.statuses-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.status-item {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 16px 18px !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border-subtle) !important;
    border-radius: var(--radius-md) !important;
    cursor: grab;
    transition: all var(--transition-fast);
}

.status-item:hover {
    border-color: var(--accent-primary) !important;
    background: var(--glass-bg-hover) !important;
}

.status-drag-handle {
    color: var(--text-muted);
    font-size: 15px;
    cursor: grab;
}

.status-color-dot {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-sm);
}

.status-info {
    flex: 1;
    min-width: 0;
}

.status-name {
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    font-size: 15px !important;
    margin-bottom: 4px;
}

.status-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-meta code {
    background: rgba(139, 92, 246, 0.12) !important;
    padding: 4px 10px !important;
    border-radius: var(--radius-sm) !important;
    font-family: 'SF Mono', Monaco, monospace !important;
    font-size: 11px !important;
    color: var(--accent-primary) !important;
}

.status-badges {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.status-badge {
    font-size: 10px !important;
    padding: 5px 12px !important;
    border-radius: var(--radius-full) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
}

.status-badge.final {
    background: var(--success-light) !important;
    color: var(--success) !important;
}

.status-badge.tasks-count {
    background: rgba(139, 92, 246, 0.12) !important;
    color: var(--accent-primary) !important;
}

.status-actions {
    display: flex !important;
    gap: 6px;
    flex-shrink: 0;
}

.status-actions button {
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: var(--glass-bg) !important;
    color: var(--text-muted) !important;
    cursor: pointer;
    border-radius: var(--radius-sm) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.status-actions button:hover {
    background: rgba(139, 92, 246, 0.15) !important;
    color: var(--accent-primary) !important;
}

.status-actions button.delete-btn:hover {
    background: var(--danger-light) !important;
    color: var(--danger) !important;
}

.status-actions button:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

.statuses-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-secondary);
}

.statuses-hint i {
    color: var(--info);
}

/* ============================================
   TIME TRACKING
   ============================================ */
.header-timer-widget {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    margin-right: 18px;
    animation: pulse-green 2s infinite;
}

.header-timer-widget.active {
    display: flex;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

.header-timer-widget .timer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--success);
}

.header-timer-widget .timer-info i {
    font-size: 17px;
}

.header-timer-widget .header-timer-display {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--success);
}

.header-timer-widget .timer-task-title {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-timer-widget .timer-stop-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--danger-light);
    color: var(--danger);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.header-timer-widget .timer-stop-btn:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.1);
}

/* Timer Button on Card */
.task-card .timer-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--success-light);
    color: var(--success);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all var(--transition-fast);
}

.task-card .timer-btn:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.2);
    transform: scale(1.1);
}

.task-card .timer-btn.running {
    background: var(--danger-light);
    color: var(--danger);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.task-card .timer-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.task-card .card-timer {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 11px;
    color: var(--success);
    margin-left: 8px;
    font-weight: 600;
}

/* Time Section in Modal */
.time-section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--glass-border-subtle);
}

.time-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.time-section .section-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.time-section .section-header h4 i {
    color: var(--success);
}

.time-section .section-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.time-section .total-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.time-section .total-time strong {
    color: var(--success);
    font-family: 'SF Mono', Monaco, monospace;
}

/* Time Logs */
.time-logs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
}

.time-log-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.time-log-item:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: var(--glass-bg-hover);
}

.time-log-info {
    flex: 1;
}

.time-log-duration {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 17px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 5px;
}

.time-log-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.time-log-user {
    color: var(--text-secondary);
}

.time-log-desc {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.time-log-delete {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-fast);
}

.time-log-item:hover .time-log-delete {
    opacity: 1;
}

.time-log-delete:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.time-logs-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.time-logs-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.25;
    display: block;
}

/* ============================================
   REMINDERS
   ============================================ */
.reminders-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border-subtle);
}

.reminders-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.reminders-section .section-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.reminders-section .section-header h4 i {
    color: var(--warning);
}

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.reminder-item:hover {
    border-color: rgba(245, 158, 11, 0.3);
    background: var(--glass-bg-hover);
}

.reminder-item.sent {
    opacity: 0.5;
    background: var(--success-light);
}

.reminder-item.past:not(.sent) {
    border-color: rgba(239, 68, 68, 0.3);
    background: var(--danger-light);
}

.reminder-info {
    flex: 1;
}

.reminder-time {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
}

.reminder-time i {
    color: var(--warning);
}

.reminder-before {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.reminder-delete {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-fast);
}

.reminder-item:hover .reminder-delete {
    opacity: 1;
}

.reminder-delete:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.reminders-empty {
    text-align: center;
    padding: 28px;
    color: var(--text-muted);
}

.reminders-empty i {
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.25;
    display: block;
}

/* ============================================
   WATCHERS
   ============================================ */
.watchers-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border-subtle);
}

.watchers-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.watchers-section .section-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.watchers-section .section-header h4 i {
    color: var(--accent-primary);
}

#watchTaskBtn {
    transition: all var(--transition-fast);
}

#watchTaskBtn.watching {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-primary);
    border-color: rgba(139, 92, 246, 0.3);
}

#watchTaskBtn.watching:hover {
    background: rgba(139, 92, 246, 0.25);
}

.watchers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.watcher-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-full);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.watcher-item:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.08);
}

.watcher-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #a855f7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.watcher-name {
    color: var(--text-primary);
    font-weight: 500;
}

.watchers-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
}

.watchers-empty i {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.25;
    display: block;
}

/* ============================================
   RECURRING TASKS
   ============================================ */
.task-recurring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: var(--success-light);
    color: var(--success);
    font-size: 12px;
}

.task-recurring i {
    animation: rotate-slow 4s linear infinite;
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#taskRecurring {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234a5568'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

.recurring-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: var(--success-light);
    color: var(--success);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.recurring-badge i {
    font-size: 11px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1400px) {
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .analytics-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card-main {
        grid-column: span 2;
    }
}

@media (max-width: 1200px) {
    .analytics-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .tasks-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid, .task-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-charts {
        grid-template-columns: 1fr;
    }
    
    .chart-card.chart-large,
    .chart-card.chart-full {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 14px 18px;
    }
    
    .header-title h1 {
        font-size: 20px;
    }
    
    .container {
        padding: 18px;
    }
    
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-center,
    .toolbar-right {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
    }
    
    .view-switcher span {
        display: none;
    }
    
    .view-btn {
        padding: 10px 14px;
    }
    
    .tasks-board {
        flex-direction: column;
    }
    
    .task-column {
        min-width: 100%;
        max-width: 100%;
    }
    
    .modal {
        margin: 12px;
        max-height: calc(100vh - 24px);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .info-grid, .task-info-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .status-buttons {
        flex-direction: column;
    }
    
    .status-btn {
        width: 100%;
        justify-content: center;
    }
    
    .calendar-view {
        padding: 18px;
    }
    
    .calendar-day {
        min-height: 90px;
        padding: 8px;
    }
    
    .day-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .calendar-task {
        font-size: 10px;
        padding: 4px 6px;
    }
    
    .calendar-legend {
        flex-wrap: wrap;
        gap: 18px;
    }
    
    .calendar-title {
        font-size: 24px;
        min-width: 180px;
    }
    
    .analytics-header {
        flex-direction: column;
        gap: 18px;
        align-items: flex-start;
    }
    
    .analytics-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card-main {
        grid-column: span 1;
    }
    
    .heatmap-cells {
        gap: 5px;
    }
    
    .heatmap-cell {
        height: 36px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .filter-tabs, .tabs {
        width: 100%;
        overflow-x: auto;
    }
    
    .info-grid, .task-info-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-day {
        min-height: 70px;
    }
    
    .day-tasks {
        max-height: 45px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .stat-info h3 {
        font-size: 26px;
    }
}

/* ============================================
   FORCE FIX: Modal visibility (в самом конце!)
   ============================================ */
#projectsModal.active,
#statusesModal.active,
#editStatusModal.active,
#taskModal.active,
#taskViewModal.active,
#confirmModal.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}
/* ============================================
   CARD COLOR PICKER
   ============================================ */
.color-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-option {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--glass-bg);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
    transform: scale(1.1);
}

.color-option[data-color=""] {
    background: linear-gradient(135deg, #f0f0f0 45%, transparent 45%, transparent 55%, #f0f0f0 55%);
}

/* ============================================
   COLORED TASK CARDS
   ============================================ */
.task-card[data-color] {
    position: relative;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: transparent;
}

.task-card[data-color="#ef4444"]::before { background: #ef4444; }
.task-card[data-color="#f97316"]::before { background: #f97316; }
.task-card[data-color="#f59e0b"]::before { background: #f59e0b; }
.task-card[data-color="#84cc16"]::before { background: #84cc16; }
.task-card[data-color="#10b981"]::before { background: #10b981; }
.task-card[data-color="#06b6d4"]::before { background: #06b6d4; }
.task-card[data-color="#3b82f6"]::before { background: #3b82f6; }
.task-card[data-color="#8b5cf6"]::before { background: #8b5cf6; }
.task-card[data-color="#ec4899"]::before { background: #ec4899; }

/* Альтернативный стиль — левая полоска */
.task-card[data-color]::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 0;
    bottom: 12px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: transparent;
}

.task-card[data-color="#ef4444"]::after { background: #ef4444; }
.task-card[data-color="#f97316"]::after { background: #f97316; }
.task-card[data-color="#f59e0b"]::after { background: #f59e0b; }
.task-card[data-color="#84cc16"]::after { background: #84cc16; }
.task-card[data-color="#10b981"]::after { background: #10b981; }
.task-card[data-color="#06b6d4"]::after { background: #06b6d4; }
.task-card[data-color="#3b82f6"]::after { background: #3b82f6; }
.task-card[data-color="#8b5cf6"]::after { background: #8b5cf6; }
.task-card[data-color="#ec4899"]::after { background: #ec4899; }

/* Лёгкая подсветка фона карточки */
.task-card[data-color="#ef4444"] { background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), var(--glass-bg)); }
.task-card[data-color="#f97316"] { background: linear-gradient(135deg, rgba(249, 115, 22, 0.05), var(--glass-bg)); }
.task-card[data-color="#f59e0b"] { background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), var(--glass-bg)); }
.task-card[data-color="#84cc16"] { background: linear-gradient(135deg, rgba(132, 204, 22, 0.05), var(--glass-bg)); }
.task-card[data-color="#10b981"] { background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), var(--glass-bg)); }
.task-card[data-color="#06b6d4"] { background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), var(--glass-bg)); }
.task-card[data-color="#3b82f6"] { background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), var(--glass-bg)); }
.task-card[data-color="#8b5cf6"] { background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), var(--glass-bg)); }
.task-card[data-color="#ec4899"] { background: linear-gradient(135deg, rgba(236, 72, 153, 0.05), var(--glass-bg)); }

/* ===== КРАСИВЫЙ ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ ДЛЯ КАНБАН ===== */
.tasks-board {
    overflow-x: auto !important;
    overflow-y: visible;
    padding-bottom: 16px;
    margin-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Стилизация скроллбара для WebKit (Chrome, Safari, Edge) */
.tasks-board::-webkit-scrollbar {
    height: 10px;
    background: transparent;
}

.tasks-board::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 0 10px;
}

.tasks-board::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.tasks-board::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    background-clip: padding-box;
}

/* Firefox */
.tasks-board {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) rgba(255, 255, 255, 0.05);
}

/* ===== ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ ДЛЯ КАНБАН ===== */
.tasks-board {
    overflow: visible;
}

.tasks-board-inner {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 10px 5px 20px 5px;
    align-items: flex-start;
}

.tasks-board-inner::-webkit-scrollbar {
    height: 12px;
}

.tasks-board-inner::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.tasks-board-inner::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
}

.tasks-board-inner::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #a855f7, #ec4899);
}
