/* ============================================
   TASKFLOW — CSS Design System
   A refined, modern task management interface
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors - Light Mode */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f4f4f5;
    --bg-hover: #e4e4e7;
    --bg-active: #d4d4d8;
    
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-tertiary: #a1a1aa;
    --text-inverse: #fafafa;
    
    --border-color: #e4e4e7;
    --border-light: #f4f4f5;
    
    --accent-primary: #4f46e5;
    --accent-primary-hover: #4338ca;
    --accent-primary-light: #eef2ff;
    
    --priority-high: #ef4444;
    --priority-high-bg: #fef2f2;
    --priority-medium: #f59e0b;
    --priority-medium-bg: #fffbeb;
    --priority-low: #22c55e;
    --priority-low-bg: #f0fdf4;
    
    --status-pending: #6b7280;
    --status-progress: #3b82f6;
    --status-waiting: #f59e0b;
    --status-complete: #22c55e;
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Typography */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    
    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;
    --header-height: 64px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0a0a0b;
    --bg-secondary: #141416;
    --bg-tertiary: #1c1c1f;
    --bg-hover: #27272a;
    --bg-active: #3f3f46;
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-inverse: #18181b;
    
    --border-color: #27272a;
    --border-light: #1c1c1f;
    
    --accent-primary-light: #1e1b4b;
    
    --priority-high-bg: #450a0a;
    --priority-medium-bg: #451a03;
    --priority-low-bg: #052e16;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Screen Management */
.screen {
    min-height: 100vh;
}

.screen.hidden {
    display: none;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at top, var(--accent-primary-light) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, var(--priority-high-bg) 0%, transparent 40%);
}

.login-container {
    width: 100%;
    max-width: 380px;
    padding: 2rem;
}

.login-brand {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-lg);
}

.brand-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.login-brand h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.tagline {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.login-form {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-light);
}

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

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

.login-hint {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-align: center;
}

.error-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--priority-high-bg);
    color: var(--priority-high);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    text-align: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-sans);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-hover);
    border-color: var(--bg-active);
}

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

.btn-primary:hover {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
}

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

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

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

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

.btn-icon-small {
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-icon-small svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   APP LAYOUT
   ============================================ */
#app-screen {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

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

.brand-small {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.brand-small svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 500;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-tertiary);
    border-radius: 999px;
}

.nav-item.active .nav-badge {
    background: var(--accent-primary);
    color: white;
}

.projects-list {
    max-height: 200px;
    overflow-y: auto;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.project-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.project-item.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
}

.project-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.project-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .icon-sun {
    display: none;
}

[data-theme="dark"] .icon-moon {
    display: block;
}

.icon-moon {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed + .main-content {
    margin-left: 0;
}

/* Top Bar */
.top-bar {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1.5rem;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-left h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
}

.top-bar-center {
    flex: 1;
    max-width: 500px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container svg {
    position: absolute;
    left: 1rem;
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.search-container input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    font-size: 0.9rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.search-kbd {
    position: absolute;
    right: 0.75rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent-primary-light);
    border-bottom: 1px solid var(--accent-primary);
}

.bulk-actions-bar.hidden {
    display: none;
}

#selected-count {
    font-weight: 500;
    color: var(--accent-primary);
}

.bulk-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

/* ============================================
   TASK LIST
   ============================================ */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.task-group {
    margin-bottom: 2rem;
}

.task-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.task-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-group-count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
}

/* Task Card */
.task-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.task-card:hover {
    border-color: var(--bg-active);
    box-shadow: var(--shadow-md);
}

.task-card.dragging {
    opacity: 0.5;
    box-shadow: var(--shadow-lg);
}

.task-card.completed {
    opacity: 0.6;
}

.task-card.completed .task-title {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

.task-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.task-checkbox.checked {
    background: var(--status-complete);
    border-color: var(--status-complete);
}

.task-checkbox.checked::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.task-bulk-checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

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

.task-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.task-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

.task-priority {
    flex-shrink: 0;
    padding: 0.125rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}

.task-priority.high {
    background: var(--priority-high-bg);
    color: var(--priority-high);
}

.task-priority.medium {
    background: var(--priority-medium-bg);
    color: var(--priority-medium);
}

.task-priority.low {
    background: var(--priority-low-bg);
    color: var(--priority-low);
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-meta-item svg {
    width: 14px;
    height: 14px;
}

.task-meta .task-project {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-meta .project-dot {
    width: 8px;
    height: 8px;
}

.task-due.overdue {
    color: var(--priority-high);
}

.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.task-tag {
    padding: 0.125rem 0.5rem;
    font-size: 0.7rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.task-subtasks-preview {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.task-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

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

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    max-width: 300px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
    animation: fadeIn var(--transition-fast);
}

.modal-overlay.hidden {
    display: none;
}

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

.modal {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    animation: slideUp var(--transition-normal);
}

.modal-small {
    max-width: 400px;
}

.modal-quick {
    max-width: 600px;
    background: transparent;
    box-shadow: none;
}

.modal-shortcuts {
    max-width: 360px;
}

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

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

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Quick Capture */
#quick-capture-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    box-shadow: var(--shadow-xl);
}

#quick-capture-input:focus {
    outline: none;
}

.quick-capture-hint {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Color Picker */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.color-option {
    width: 28px;
    height: 28px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

/* Subtasks & Attachments */
.subtasks-area,
.attachments-area {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.subtask-input,
.attachment-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.subtask-input input,
.attachment-input input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.subtasks-list,
.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.subtask-item,
.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.subtask-item input[type="checkbox"] {
    accent-color: var(--accent-primary);
}

.subtask-item span,
.attachment-item a {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-item a {
    color: var(--accent-primary);
    text-decoration: none;
}

.attachment-item a:hover {
    text-decoration: underline;
}

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

/* Shortcuts List */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shortcut-item kbd {
    min-width: 60px;
    padding: 0.25rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
}

.shortcut-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   STATS VIEW
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.stat-card h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-subtext {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

.chart-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.chart-container h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 120px;
}

.chart-bar {
    flex: 1;
    background: var(--accent-primary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    min-height: 4px;
    transition: height var(--transition-normal);
}

.chart-labels {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.chart-label {
    flex: 1;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-align: center;
}

/* ============================================
   NOTES VIEW
   ============================================ */
.notes-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: all var(--transition-fast);
}

.note-card:hover {
    box-shadow: var(--shadow-md);
}

.note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.note-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.note-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.note-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.note-input textarea {
    width: 100%;
    min-height: 100px;
    padding: 0;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    background: transparent;
    border: none;
    color: var(--text-primary);
    resize: none;
}

.note-input textarea:focus {
    outline: none;
}

.note-input-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 300;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: slideInRight var(--transition-normal);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 3px solid var(--status-complete);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast-message {
    font-size: 0.9rem;
}

.toast-close {
    padding: 0;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
}

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

.toast-undo {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.toast-undo:hover {
    background: var(--accent-primary-hover);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .search-kbd {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .top-bar {
        padding: 0 1rem;
    }
    
    .top-bar-center {
        display: none;
    }
    
    .filter-bar {
        flex-direction: column;
        padding: 0.75rem 1rem;
    }
    
    .filter-group {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .filter-select {
        flex: 1;
        min-width: 100px;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .modal {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .btn span {
        display: none;
    }
    
    .btn svg {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-form {
        padding: 1.5rem;
    }
    
    .task-card {
        padding: 0.875rem;
    }
    
    .task-meta {
        gap: 0.5rem;
    }
}

/* ============================================
   STATS VIEW - Additional Styles
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.stat-card-warning .stat-value {
    color: var(--priority-high);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
}

.stats-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

.completion-chart {
    padding: 1rem 0;
}

.chart-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.chart-bar {
    width: 100%;
    background: var(--accent-primary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    min-height: 4px;
    position: relative;
    transition: height var(--transition-normal);
}

.chart-bar-value {
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.chart-bar-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.priority-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.priority-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.priority-count {
    font-weight: 600;
    color: var(--text-primary);
}

.project-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-stat-item .project-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.project-stat-item .project-name {
    flex: 1;
    color: var(--text-secondary);
}

.project-stat-item .project-count {
    font-weight: 600;
    color: var(--text-primary);
}

.export-buttons {
    display: flex;
    gap: 1rem;
}

/* Notes Grid */
.notes-toolbar {
    margin-bottom: 1.5rem;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.note-card {
    cursor: pointer;
}

.note-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.note-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.note-card:hover .note-actions {
    opacity: 1;
}

.note-editor {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.note-title-input {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.note-content-input {
    min-height: 150px;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    resize: vertical;
}

.note-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
}

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

/* Loading & Empty States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-tertiary);
}

.error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--priority-high);
}

/* Toast show state */
.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Toast info type */
.toast-info {
    border-left: 3px solid var(--accent-primary);
}

/* Print Styles */
@media print {
    .sidebar,
    .top-bar,
    .filter-bar,
    .bulk-actions-bar,
    .task-actions,
    .toast-container {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .task-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
