/* ==========================================================================
   LIFE PLANNER & TODO SUCCESS DASHBOARD - STYLESHEET
   Aesthetics: Dark Modern, Glassmorphism, Neon Gradients & Fluid Animations
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-base: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1e293b;
    --bg-glass: rgba(17, 24, 39, 0.85);
    --bg-glass-card: rgba(30, 41, 59, 0.55);
    
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(99, 102, 241, 0.35);
    
    /* Brand Gradients */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-rose: #f43f5e;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    
    --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --grad-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --grad-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);

    /* Status Colors */
    --status-todo: #ef4444;
    --status-todo-bg: rgba(239, 68, 68, 0.12);
    --status-doing: #f59e0b;
    --status-doing-bg: rgba(245, 158, 11, 0.12);
    --status-done: #10b981;
    --status-done-bg: rgba(16, 185, 129, 0.12);

    /* Category Colors */
    --cat-career: #6366f1;
    --cat-finance: #10b981;
    --cat-health: #f43f5e;
    --cat-learning: #06b6d4;
    --cat-lifestyle: #8b5cf6;

    /* Text Colors */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 8px 30px rgba(99, 102, 241, 0.25);

    --font-family: 'Outfit', 'Sarabun', sans-serif;
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-base);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

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

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.25rem;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition-normal);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 1.5rem;
}

.brand-avatar-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.brand-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transition: var(--transition-fast);
}

.brand-avatar-img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

.avatar-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 11px;
    height: 11px;
    background: var(--accent-emerald);
    border: 2px solid var(--bg-surface);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-emerald);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.68rem;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    list-style: none;
    flex: 1;
}

.nav-item button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
}

.nav-item button i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    transition: var(--transition-fast);
}

.nav-item button:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.active button {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.nav-item.active button i {
    color: var(--primary);
    transform: scale(1.1);
}

/* Sidebar Productivity Card */
.sidebar-widget {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.sidebar-widget::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 100px;
    height: 100px;
    background: var(--primary-glow);
    filter: blur(30px);
    border-radius: 50%;
}

.widget-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.widget-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-progress-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 0.7rem;
    overflow: hidden;
}

.widget-progress-bar {
    height: 100%;
    background: var(--grad-primary);
    width: 0%;
    transition: width 0.6s ease;
}

/* Main Content Workspace */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 2rem 2.5rem;
    min-height: 100vh;
}

/* Header Bar */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-glass);
}

.page-info h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.page-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.cloud-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cloud-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    transition: var(--transition-fast);
}

.cloud-dot.online {
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
}

.cloud-dot.syncing {
    background: var(--accent-amber);
    box-shadow: 0 0 8px var(--accent-amber);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-glass);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon-only {
    padding: 0.65rem;
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Tab Views Container */
.tab-view {
    display: none;
    animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-view.active {
    display: block !important;
}

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

/* ==========================================================================
   MODULE 1: DASHBOARD VIEW
   ========================================================================== */
.dashboard-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.4rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.year-select-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.year-select-group label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
}

.year-select {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--primary);
    color: #ffffff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
    transition: var(--transition-fast);
}

.year-select:hover, .year-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.35);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-subtle);
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon-primary { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.stat-icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.stat-icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.stat-icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.stat-details h3 {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-details .value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.1rem;
}

.stat-subtext {
    font-size: 0.75rem;
    color: var(--accent-emerald);
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1100px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

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

.chart-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Badges & Achievements Section */
.achievements-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.badge-item.unlocked {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
}

.badge-icon {
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.badge-item.unlocked .badge-icon {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.badge-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

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


/* ==========================================================================
   MODULE 2: GOAL PLANNING VIEW
   ========================================================================== */
.goals-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-filter-chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.chip {
    padding: 0.45rem 0.95rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.chip:hover, .chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

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

.goal-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.goal-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-subtle);
}

.goal-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.goal-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.goal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.6rem;
    line-height: 1.35;
}

.goal-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    line-height: 1.5;
}

.goal-progress-section {
    margin: 1.25rem 0;
}

.goal-progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
}

.goal-progress-info span {
    color: var(--text-muted);
}
.goal-progress-info strong {
    color: var(--primary);
    font-weight: 700;
}

.goal-progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    background: var(--grad-primary);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.goal-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-glass);
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.goal-actions {
    display: flex;
    gap: 0.4rem;
}


/* ==========================================================================
   MODULE 3: KANBAN TASK BOARD VIEW
   ========================================================================== */
.kanban-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}

.search-box input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.6rem;
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.select-control {
    padding: 0.65rem 1rem;
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

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

.kanban-col {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    min-height: 550px;
    display: flex;
    flex-direction: column;
}

.kanban-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.col-title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.col-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.col-todo .col-indicator { background: var(--status-todo); box-shadow: 0 0 8px var(--status-todo); }
.col-doing .col-indicator { background: var(--status-doing); box-shadow: 0 0 8px var(--status-doing); }
.col-done .col-indicator { background: var(--status-done); box-shadow: 0 0 8px var(--status-done); }

.col-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.col-count {
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-weight: 600;
}

.kanban-tasks-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.task-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: grab;
    transition: var(--transition-fast);
    position: relative;
}

.task-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-subtle);
}

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

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

.task-goal-tag {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.priority-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.priority-medium { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.priority-low { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.task-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

.task-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.task-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.task-date.overdue {
    color: var(--status-todo);
    font-weight: 600;
}

.task-quick-btns {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.task-quick-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.task-quick-btn:hover {
    background: var(--primary);
    color: #fff;
}


/* ==========================================================================
   MODULE 4: CALENDAR VIEW
   ========================================================================== */
.calendar-wrapper {
    background: var(--bg-glass-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-subtle);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.cal-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cal-month-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.cal-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.legend-dot.todo { background: var(--status-todo); box-shadow: 0 0 6px var(--status-todo); }
.legend-dot.doing { background: var(--status-doing); box-shadow: 0 0 6px var(--status-doing); }
.legend-dot.done { background: var(--status-done); box-shadow: 0 0 6px var(--status-done); }

.cal-nav-btns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.cal-day-name {
    text-align: center;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0.4rem;
    border-bottom: 1px solid var(--border-glass);
    text-transform: uppercase;
}

.cal-day-name.sunday { color: #f87171; }
.cal-day-name.saturday { color: #38bdf8; }

.cal-day-cell {
    height: clamp(68px, 10vh, 92px);
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.cal-day-cell:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cal-day-cell.other-month {
    opacity: 0.25;
    background: rgba(10, 15, 26, 0.3);
}

.cal-day-cell.today {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.2);
}

.cal-day-num {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    align-self: flex-start;
}

.cal-day-cell.today .cal-day-num {
    background: var(--grad-primary);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.cal-tasks-dots {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 0.2rem;
    overflow: hidden;
}

.cal-task-pill {
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

.cal-task-pill.status-todo { background: rgba(239, 68, 68, 0.85); }
.cal-task-pill.status-doing { background: rgba(245, 158, 11, 0.85); }
.cal-task-pill.status-done { background: rgba(16, 185, 129, 0.85); }

.more-tasks-badge {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

/* Day Detail Modal Item list */
.day-task-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
}

.day-task-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
    border-radius: 4px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-task-pill.status-todo { background: rgba(239, 68, 68, 0.85); }
.cal-task-pill.status-doing { background: rgba(245, 158, 11, 0.85); }
.cal-task-pill.status-done { background: rgba(16, 185, 129, 0.85); }


/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 15, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 540px;
    padding: 1.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.92);
    transition: var(--transition-fast);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.modal-close-btn:hover { color: var(--accent-rose); }

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

/* Action Buttons inside forms */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 2.5rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}
.empty-state h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

/* Header Group styling */
.header-left-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 15, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Kanban Mobile Tabs */
.kanban-mobile-tabs {
    display: none;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.k-tab {
    flex: 1;
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-fast);
}

.k-tab.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS / IPAD / MOBILE)
   ========================================================================== */

/* iPad & Tablet Landscape / Portrait (<= 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .btn {
        justify-content: center;
        padding: 0.75rem 1rem;
    }

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

    .goals-header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .goals-grid {
        grid-template-columns: 1fr;
    }

    /* Kanban Mobile Tab View Switcher */
    .kanban-mobile-tabs {
        display: flex;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .kanban-col {
        display: none;
        min-height: 400px;
    }

    .kanban-col.mobile-active {
        display: flex;
    }

    /* Calendar Mobile Enhancements */
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .cal-header-left {
        gap: 0.8rem;
    }

    .cal-nav-btns {
        width: 100%;
        justify-content: space-between;
    }

    .cal-day-cell {
        height: 60px;
        padding: 0.2rem 0.3rem;
    }

    .cal-day-num {
        font-size: 0.75rem;
    }

    .cal-task-pill {
        font-size: 0.62rem;
        padding: 1px 3px;
    }

    /* Form Modals Responsive */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .modal-container {
        padding: 1.25rem;
        width: 94%;
    }

    /* Mobile Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border-glass);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 0 0.5rem;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
    }

    .m-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-family: inherit;
        font-size: 0.72rem;
        font-weight: 500;
        cursor: pointer;
        padding: 0.4rem 0;
        transition: var(--transition-fast);
    }

    .m-nav-item i {
        font-size: 1.25rem;
        transition: var(--transition-fast);
    }

    .m-nav-item.active {
        color: var(--primary);
    }

    .m-nav-item.active i {
        transform: translateY(-2px);
        color: var(--primary);
    }

    .main-content {
        padding-bottom: 90px !important;
    }
}
