/* ==========================================
   TASK TRACKER — Premium Dark Design System v2
   Refined palette, bento grid, smooth animations
   ========================================== */

:root {
    /* -- Refined Color Palette -- */
    --bg-primary: #09090b;
    --bg-secondary: #0f0f13;
    --bg-tertiary: #151519;
    --bg-elevated: #1a1a21;
    --bg-hover: #22222d;
    --bg-glass: rgba(15, 15, 20, 0.8);
    --bg-card: rgba(18, 18, 25, 0.9);

    --text-primary: #e4e4e9;
    --text-secondary: #8b8b9e;
    --text-muted: #55556a;

    --border: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(139, 92, 246, 0.15);

    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --accent-subtle: rgba(139, 92, 246, 0.08);
    --accent-glow: rgba(139, 92, 246, 0.2);

    --gradient-accent: linear-gradient(135deg, #8b5cf6, #a78bfa, #c4b5fd);
    --gradient-card: linear-gradient(145deg, rgba(139, 92, 246, 0.04), rgba(168, 85, 247, 0.02));
    --gradient-warm: linear-gradient(135deg, #f97316, #fb923c);
    --gradient-emerald: linear-gradient(135deg, #10b981, #34d399);
    --gradient-rose: linear-gradient(135deg, #f43f5e, #fb7185);
    --gradient-sky: linear-gradient(135deg, #0ea5e9, #38bdf8);

    /* Importance */
    --low: #34d399;
    --medium: #fbbf24;
    --high: #fb923c;
    --urgent: #f43f5e;

    /* Status */
    --status-todo: #6b7280;
    --status-in-progress: #3b82f6;
    --status-blocked: #f43f5e;
    --status-review: #f59e0b;
    --status-done: #10b981;

    /* Spacing */
    --sidebar-width: 240px;
    --sidebar-width-collapsed: 76px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

    color-scheme: dark;
}

html[data-theme='light'] {
    color-scheme: light;
    --bg-primary: #f5f7fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef2f8;
    --bg-elevated: #ffffff;
    --bg-hover: #e6ebf4;
    --bg-glass: rgba(255, 255, 255, 0.84);
    --bg-card: rgba(255, 255, 255, 0.92);

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;

    --border: rgba(15, 23, 42, 0.08);
    --border-light: rgba(15, 23, 42, 0.12);
    --border-glow: rgba(109, 40, 217, 0.12);

    --accent-subtle: rgba(109, 40, 217, 0.08);
    --accent-glow: rgba(109, 40, 217, 0.18);
    --gradient-card: linear-gradient(145deg, rgba(109, 40, 217, 0.05), rgba(59, 130, 246, 0.03));
}

html[data-theme='light'] ::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.2);
}

html[data-theme='light'] ::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.32);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Eliminate 300ms tap delay on all interactive elements */
a, button, input, select, textarea, label,
.nav-btn, .btn, .btn-icon, .task-card, .manage-task-card,
.kanban-task-card, .kanban-move-btn, .goal-header,
.auth-tab, .auth-button, .filter-pill, .tab-btn {
    touch-action: manipulation;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   SCROLLBAR
   ========================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* ==========================================
   SIDEBAR
   ========================================== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    background-image: linear-gradient(180deg, rgba(139, 92, 246, 0.03) 0%, transparent 40%, rgba(139, 92, 246, 0.02) 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition-slow);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 22px;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 14px rgba(139, 92, 246, 0.6));
    }
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.sidebar-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.sidebar-toggle-icon {
    transition: transform var(--transition-slow);
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-family: inherit;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(3px);
}

.nav-btn.active {
    background: var(--accent-subtle);
    color: var(--accent);
    border-left: 3px solid var(--accent);
    box-shadow: -2px 0 12px rgba(139, 92, 246, 0.2), 0 0 16px rgba(139, 92, 246, 0.06), inset 0 0 20px rgba(139, 92, 246, 0.04);
}

.nav-icon {
    width: 22px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon svg {
    flex-shrink: 0;
}

.nav-label {
    letter-spacing: 0.1px;
}

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-export {
    width: 100%;
    justify-content: center;
    font-size: 12px;
}

.btn-notification {
    width: 100%;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
}

.sidebar-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

body.sidebar-collapsed {
    --sidebar-width: var(--sidebar-width-collapsed);
}

body.sidebar-collapsed .sidebar-header {
    padding: 16px 8px;
}

body.sidebar-collapsed .logo {
    gap: 0;
}

body.sidebar-collapsed .logo-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .sidebar-info span:last-child,
body.sidebar-collapsed .btn-export span:last-child,
body.sidebar-collapsed .btn-notification span:last-child {
    display: none;
}

body.sidebar-collapsed .sidebar-nav {
    padding: 12px 8px;
}

body.sidebar-collapsed .nav-btn {
    justify-content: center;
    gap: 0;
    padding: 11px 10px;
}

body.sidebar-collapsed .nav-btn:hover {
    transform: none;
}

body.sidebar-collapsed .sidebar-footer {
    align-items: center;
}

body.sidebar-collapsed .btn-export {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-toggle {
    width: 30px;
    height: 30px;
}

body.sidebar-collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.info-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--status-done);
    box-shadow: 0 0 6px var(--status-done);
    animation: dot-pulse 2.5s ease-in-out infinite;
}

@keyframes dot-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ==========================================
   MAIN CONTENT
   ========================================== */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px 40px;
    max-width: 1300px;
    transition: margin-left var(--transition-slow);
}

html[data-theme='light'] .sidebar {
    background-image: linear-gradient(180deg, rgba(109, 40, 217, 0.025) 0%, transparent 40%, rgba(59, 130, 246, 0.02) 100%);
}

html[data-theme='light'] .sidebar-toggle {
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.03);
}

html[data-theme='light'] .nav-btn:hover,
html[data-theme='light'] .task-card:hover,
html[data-theme='light'] .manage-task-card:hover,
html[data-theme='light'] .kanban-task-card:hover,
html[data-theme='light'] .note-card:hover {
    background: rgba(15, 23, 42, 0.04);
}

html[data-theme='light'] .task-card {
    background: var(--bg-card);
}

html[data-theme='light'] .priority-bar-track,
html[data-theme='light'] .progress-bar-mini,
html[data-theme='light'] .heatmap-cell,
html[data-theme='light'] .kanban-count,
html[data-theme='light'] .kanban-move-btn {
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme='light'] .task-card:hover,
html[data-theme='light'] .manage-task-card:hover,
html[data-theme='light'] .kanban-task-card:hover,
html[data-theme='light'] .note-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.view {
    display: none;
    content-visibility: hidden;
}

.view.active {
    display: block;
    content-visibility: visible;
    animation: viewEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes viewEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Faster view transition on mobile for better INP */
@media (max-width: 768px) {
    .view.active {
        animation-duration: 0.15s;
    }
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.view-header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: var(--text-primary);
}

.view-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
    font-weight: 400;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-glow {
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.btn-glow:hover {
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.35);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(244, 63, 94, 0.1);
    color: var(--urgent);
    border: 1px solid rgba(244, 63, 94, 0.15);
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.18);
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
}

.btn-large {
    padding: 14px 40px;
    font-size: 16px;
}

.btn-icon {
    padding: 6px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all var(--transition);
}

.btn-icon:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    transform: scale(1.05);
}

/* ==========================================
   BENTO GRID DASHBOARD
   ========================================== */

.bento-grid,
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.dashboard-col-large {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-col-small {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition);
    animation: cardEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.bento-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15), inset 0 0 20px rgba(139, 92, 246, 0.1);
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-sm {
    grid-column: span 1;
}

.bento-md {
    grid-column: span 2;
}

.bento-wide {
    grid-column: span 3;
}

.bento-full {
    grid-column: span 4;
}

.bento-card-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 4px;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Settings Additions */
.btn-color-preset {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-color-preset:hover {
    transform: scale(1.15);
}

.btn-color-preset.active {
    border-color: white;
    box-shadow: 0 0 8px var(--accent);
}

.w-full {
    width: 100%;
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .main-content {
        padding: 24px;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-full,
    .bento-wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding-top: 10px;
    }

    .sidebar .logo-text,
    .sidebar .nav-label,
    .sidebar-info,
    .sidebar-footer {
        display: none;
    }

    .sidebar-header {
        padding: 10px;
        justify-content: center;
    }

    .main-content {
        margin-left: 70px;
    }

    .nav-btn {
        justify-content: center;
        padding: 12px;
    }

    .nav-icon {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .bento-grid,
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }

    .bento-card,
    .bento-sm,
    .bento-md,
    .bento-wide,
    .bento-full {
        grid-column: span 1;
    }

    .view-header h1 {
        font-size: 24px;
    }
}

.bento-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bento-card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.bento-badge {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 500;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bento-card:nth-child(1) {
    animation-delay: 0s;
}

.bento-card:nth-child(2) {
    animation-delay: 0.03s;
}

.bento-card:nth-child(3) {
    animation-delay: 0.06s;
}

.bento-card:nth-child(4) {
    animation-delay: 0.09s;
}

.bento-card:nth-child(5) {
    animation-delay: 0.12s;
}

.bento-card:nth-child(6) {
    animation-delay: 0.15s;
}

.bento-card:nth-child(7) {
    animation-delay: 0.18s;
}

.bento-card:nth-child(8) {
    animation-delay: 0.21s;
}

.bento-card:nth-child(n+9) {
    animation-delay: 0.24s;
}

/* Stat card variations */
.stat-card-streak .stat-value {
    color: #fb923c;
}

.stat-card-focus .stat-value {
    color: #3b82f6;
}

.stat-card-avg .stat-value {
    color: #a78bfa;
    font-size: 22px;
}

.stat-card-sessions .stat-value {
    color: #f43f5e;
}

/* Chart container */
.chart-container {
    height: 140px;
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding-top: 8px;
}

.chart-bar {
    flex: 1;
    min-width: 4px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity var(--transition);
    opacity: 0.5;
    position: relative;
}

.chart-bar:hover {
    opacity: 1;
    transform: scaleY(1.05);
    transform-origin: bottom;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

.chart-bar.has-value {
    opacity: 0.8;
}

.chart-bar.has-value:hover {
    opacity: 1;
    transform: scaleY(1.05);
    transform-origin: bottom;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

/* Priority Breakdown */
.priority-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.priority-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-label {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
}

.priority-bar-track {
    flex: 2;
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
}

.priority-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.priority-count {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 20px;
    text-align: right;
}

/* Donut chart */
.donut-chart-container {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 120px;
}

.donut-svg {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-time {
    margin-left: auto;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Heatmap */
.heatmap-container {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    overflow-x: auto;
    padding-bottom: 4px;
}

.heatmap-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.03);
    transition: all var(--transition);
}

.heatmap-cell:hover {
    transform: scale(1.4);
    outline: 1px solid var(--accent);
    box-shadow: 0 0 10px var(--accent);
    z-index: 2;
    position: relative;
}

.heatmap-cell.level-1 {
    background: rgba(139, 92, 246, 0.15);
}

.heatmap-cell.level-2 {
    background: rgba(139, 92, 246, 0.3);
}

.heatmap-cell.level-3 {
    background: rgba(139, 92, 246, 0.5);
}

.heatmap-cell.level-4 {
    background: rgba(139, 92, 246, 0.75);
}

/* ==========================================
   GOALS VIEW
   ========================================== */

.goals-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.goal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    animation: cardEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.goal-card:hover {
    border-color: var(--border-light);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.goal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    cursor: pointer;
    transition: background var(--transition);
}

.goal-header:hover {
    background: rgba(255, 255, 255, 0.015);
}

.goal-chevron {
    font-size: 11px;
    color: var(--text-muted);
    transition: transform var(--transition), color var(--transition);
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.goal-chevron.open {
    color: var(--accent);
}

.goal-info {
    flex: 1;
}

.goal-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.goal-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
    align-items: center;
}

.goal-progress-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-mini {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-mini-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-actions {
    display: flex;
    gap: 2px;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.goal-card:hover .goal-actions {
    opacity: 1;
}

.goal-body {
    display: none;
    padding: 0 22px 18px;
    border-top: 1px solid var(--border);
}

.goal-body.open {
    display: block;
    animation: slideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.goal-description {
    color: var(--text-secondary);
    font-size: 12px;
    padding: 14px 0 10px;
    line-height: 1.6;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

/* ==========================================
   TASK CARDS
   ========================================== */

.task-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
}

.task-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-light);
    transform: translateX(3px);
}

.task-importance-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-importance-dot.low {
    background: var(--low);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.3);
}

.task-importance-dot.medium {
    background: var(--medium);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.3);
}

.task-importance-dot.high {
    background: var(--high);
    box-shadow: 0 0 6px rgba(251, 146, 60, 0.3);
}

.task-importance-dot.urgent {
    background: var(--urgent);
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.3);
    animation: urgent-pulse 2s ease-in-out infinite;
}

@keyframes urgent-pulse {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(244, 63, 94, 0.3);
    }

    50% {
        box-shadow: 0 0 12px rgba(244, 63, 94, 0.6);
    }
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-goal-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.task-due {
    font-size: 10px;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-due.overdue {
    color: var(--urgent);
    font-weight: 600;
}

.task-due.due-soon {
    color: var(--medium);
}

.task-due.due-later {
    color: var(--text-muted);
}

.task-tags {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.tag {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.task-subtask-count {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-subtask-count .done-ratio {
    color: var(--status-done);
}

.task-status-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.task-status-badge.todo {
    background: rgba(107, 114, 128, 0.12);
    color: var(--status-todo);
}

.task-status-badge.in-progress {
    background: rgba(59, 130, 246, 0.1);
    color: var(--status-in-progress);
}

.task-status-badge.blocked {
    background: rgba(244, 63, 94, 0.1);
    color: var(--status-blocked);
}

.task-status-badge.review {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-review);
}

.task-status-badge.done {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-done);
}

.task-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.task-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity var(--transition);
}

.task-card:hover .task-actions {
    opacity: 1;
}

.add-task-row {
    margin-top: 10px;
}

/* ==========================================
   MANAGE TASKS VIEW
   ========================================== */

.manage-toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    max-width: 380px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    opacity: 0.4;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    transition: all var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.filter-pill:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

.filter-pill.active {
    background: var(--accent-subtle);
    color: var(--accent);
    border-color: var(--border-glow);
}

.task-summary-bar {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding: 0 2px;
}

.manage-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.manage-task-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    cursor: pointer;
}

.manage-task-card:hover {
    border-color: var(--border-light);
    transform: translateX(3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.manage-task-card:hover .task-actions {
    opacity: 1;
}

/* ==========================================
   KANBAN BOARD
   ========================================== */

.kanban-goal-selector select {
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.kanban-mobile-shell {
    display: none;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    min-height: 500px;
}

.kanban-column {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.kanban-column-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    flex: 1;
}

.kanban-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.kanban-dot.todo {
    background: var(--status-todo);
}

.kanban-dot.in-progress {
    background: var(--status-in-progress);
}

.kanban-dot.done {
    background: var(--status-done);
}

.kanban-count {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 10px;
}

.kanban-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100px;
    padding: 4px 0;
}

.kanban-cards.drag-over {
    background: var(--accent-subtle);
    border-radius: var(--radius-sm);
}

.kanban-task-card {
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: all var(--transition);
}

.kanban-task-card:active {
    cursor: grabbing;
}

.kanban-task-card:hover {
    border-color: var(--border-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kanban-task-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.kanban-task-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.kanban-task-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--text-muted);
}

/* Mobile move buttons — hidden on desktop */
.kanban-move-btns {
    display: none;
}

@media (hover: none) and (pointer: coarse) {
    .kanban-move-btns {
        display: flex !important;
        gap: 6px;
        margin-top: 10px;
    }

    .kanban-move-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex: 1;
        padding: 8px 6px;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-sm);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text-secondary);
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
        transition: all var(--transition);
        font-family: inherit;
        min-height: 36px;
    }

    .kanban-move-btn:active {
        background: var(--accent-subtle);
        border-color: var(--accent);
        color: var(--accent);
        transform: scale(0.96);
    }
}

/* ==========================================
   TIMER VIEW
   ========================================== */

.timer-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius);
    width: fit-content;
}

.timer-tab {
    padding: 9px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-family: inherit;
}

.timer-tab:hover {
    color: var(--text-primary);
}

.timer-tab.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.2);
}

.timer-task-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    font-size: 13px;
    color: var(--text-secondary);
}

.timer-task-selector select {
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    min-width: 250px;
}

.timer-display-container {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.timer-ring {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.timer-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 4;
}

.timer-ring-progress {
    fill: none;
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.5s linear;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.3));
}

.timer-time {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
    z-index: 1;
}

.timer-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 4px;
    z-index: 1;
}

.countdown-input {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.countdown-input input {
    width: 80px;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    text-align: center;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}

.laps-container {
    max-width: 400px;
    margin: 0 auto;
}

.laps-container h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.laps-container ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.laps-container li {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.pomodoro-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.pomodoro-dots {
    letter-spacing: 4px;
}

/* ==========================================
   NOTES VIEW
   ========================================== */

.notes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.note-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 120px;
    animation: cardEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.note-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.note-card-title {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.note-card-actions {
    opacity: 0;
    transition: opacity var(--transition);
}

.note-card:hover .note-card-actions {
    opacity: 1;
}

.note-card-content {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.note-card-date {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ==========================================
   DASHBOARD SECTIONS
   ========================================== */

.goals-progress-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-progress-card {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.goal-progress-card:last-child {
    border-bottom: none;
}

.goal-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.goal-progress-title {
    font-size: 13px;
    font-weight: 500;
}

.goal-progress-percent {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-progress-meta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.status-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-bar-label {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 80px;
}

.status-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-bar-fill.todo {
    background: var(--status-todo);
}

.status-bar-fill.in-progress {
    background: var(--status-in-progress);
}

.status-bar-fill.blocked {
    background: var(--status-blocked);
}

.status-bar-fill.review {
    background: var(--status-review);
}

.status-bar-fill.done {
    background: var(--status-done);
}

.status-bar-count {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 20px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.recent-sessions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.session-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.session-card:last-child {
    border-bottom: none;
}

.session-type {
    font-size: 18px;
}

.session-info {
    flex: 1;
}

.session-task-name {
    font-size: 13px;
    font-weight: 500;
}

.session-date {
    font-size: 10px;
    color: var(--text-muted);
}

.session-duration {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   EMPTY STATES
   ========================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 14px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
}

.empty-state-small {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================
   MODALS
   ========================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-slow);
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
}

.modal-lg {
    width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ==========================================
   FORMS
   ========================================== */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    line-height: 1.6;
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-group {
    flex: 1;
}

/* Subtasks */
.subtasks-editor {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
}

.subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.subtask-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background var(--transition);
}

.subtask-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.subtask-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.subtask-item .subtask-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.subtask-item.completed .subtask-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.subtask-item .btn-icon {
    font-size: 12px;
    padding: 4px;
}

.subtask-add-row {
    display: flex;
    gap: 6px;
}

.subtask-input {
    flex: 1;
    padding: 6px 10px !important;
    font-size: 12px !important;
    background: var(--bg-primary) !important;
}

/* Export options */
.export-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-export-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    text-align: left;
    width: 100%;
}

.btn-export-option .export-icon {
    font-size: 24px;
}

.btn-export-option strong {
    display: block;
    font-size: 14px;
}

.btn-export-option small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1100px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-wide {
        grid-column: span 2;
    }

    .bento-full {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar-toggle {
        display: none;
    }

    .sidebar .nav-label,
    .sidebar .logo-text,
    .sidebar .sidebar-info span,
    .btn-export span:last-child {
        display: none;
    }

    .sidebar-header {
        padding: 16px;
        justify-content: center;
    }

    .sidebar-nav {
        padding: 12px 8px;
    }

    .nav-btn {
        justify-content: center;
        padding: 10px;
        gap: 0;
    }

    .main-content {
        margin-left: 60px;
        padding: 20px;
    }

    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ==========================================
   3D CORNER MASCOT
   ========================================== */

#mascot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 120px;
    height: 140px;
    z-index: 999;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mascot-container:hover {
    transform: scale(1.1);
}

#mascot-container canvas {
    border-radius: 16px;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}
.subtask-input {
    flex: 1;
    padding: 6px 10px !important;
    font-size: 12px !important;
    background: var(--bg-primary) !important;
}

/* Export options */
.export-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-export-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    text-align: left;
    width: 100%;
}

.btn-export-option .export-icon {
    font-size: 24px;
}

.btn-export-option strong {
    display: block;
    font-size: 14px;
}

.btn-export-option small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1100px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-wide {
        grid-column: span 2;
    }

    .bento-full {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar .nav-label,
    .sidebar .logo-text,
    .sidebar .sidebar-info span,
    .btn-export span:last-child {
        display: none;
    }

    .sidebar-header {
        padding: 16px;
        justify-content: center;
    }

    .sidebar-nav {
        padding: 12px 8px;
    }

    .nav-btn {
        justify-content: center;
        padding: 10px;
        gap: 0;
    }

    .main-content {
        margin-left: 60px;
        padding: 20px;
    }

    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ==========================================
   3D CORNER MASCOT
   ========================================== */

#mascot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 120px;
    height: 140px;
    z-index: 999;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mascot-container:hover {
    transform: scale(1.1);
}

#mascot-container canvas {
    border-radius: 16px;
}

/* ==========================================
   3D LOADING OVERLAY
   ========================================== */


/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}

/* Focus Task Card */
.focus-task-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
    padding: 32px;
}

.focus-task-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    min-height: 250px;
}

.focus-task-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.focus-goal-label {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.focus-importance {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.focus-task-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 32px;
    background: linear-gradient(to right, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.focus-task-actions {
    display: flex;
    gap: 16px;
}

.btn-focus-start {
    padding: 12px 24px;
    font-size: 16px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Priority Breakdown */
.priority-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.priority-row {
    display: grid;
    grid-template-columns: 12px 80px 1fr 30px;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.priority-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.priority-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease-out;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(10px);
    min-width: 240px;
    max-width: 380px;
}

.toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-exit {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
}

.toast-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-success {
    border-left: 3px solid var(--status-done);
}

.toast-success .toast-icon {
    color: var(--status-done);
}

.toast-error {
    border-left: 3px solid var(--urgent);
}

.toast-error .toast-icon {
    color: var(--urgent);
}

.toast-info {
    border-left: 3px solid var(--status-in-progress);
}

.toast-info .toast-icon {
    color: var(--status-in-progress);
}

/* ==========================================
   GREETING BANNER
   ========================================== */

.ambient-orb {
    position: absolute;
    top: -150px;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 20s ease-in-out infinite alternate;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

.greeting-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 0 24px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.greeting-text h2 {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 30%, #a78bfa 70%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite alternate;
    line-height: 1.1;
}

@keyframes textShimmer {
    0% {
        filter: brightness(1) drop-shadow(0 0 0px rgba(139, 92, 246, 0));
    }

    100% {
        filter: brightness(1.15) drop-shadow(0 0 10px rgba(139, 92, 246, 0.45));
    }
}

.greeting-text p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 5px;
    font-weight: 400;
    font-style: italic;
    opacity: 0.85;
}

.greeting-date {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
    opacity: 0.75;
}

/* ==========================================
   PRIORITY DOTS (filter pills)
   ========================================== */

.filter-pill .priority-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 2px;
}

.filter-pill .priority-dot.urgent {
    background: var(--urgent);
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.4);
}

.filter-pill .priority-dot.high {
    background: var(--high);
    box-shadow: 0 0 6px rgba(251, 146, 60, 0.4);
}

.filter-pill .priority-dot.medium {
    background: var(--medium);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.4);
}

.filter-pill .priority-dot.low {
    background: var(--low);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.4);
}

/* ==========================================
   FOCUS STATES & ACCESSIBILITY
   ========================================== */

:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.btn:focus-visible,
.btn-icon:focus-visible,
.nav-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-color: var(--accent) !important;
}

.filter-pill:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.modal-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ==========================================
   EMPTY STATE ICONS (SVG styling)
   ========================================== */

.empty-icon svg {
    color: var(--text-muted);
    opacity: 0.5;
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   UI/UX POLISH FORMS / UTILS
   ========================================== */

.max-w-4xl {
    max-width: 56rem !important;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.settings-card {
    transition: transform 0.2s ease-in-out;
}

.settings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Gamification */
.up-next-task {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--accent-subtle);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    flex: 1;
}

.up-next-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.daily-plan-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.daily-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-size: 13px;
    transition: all var(--transition);
}

.daily-action-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
    border-color: var(--border-glow);
}

.daily-action-title {
    flex: 1;
    color: var(--text-primary);
}

.daily-action-item.done {
    opacity: 0.5;
}

.daily-action-item.done .daily-action-title {
    text-decoration: line-through;
}

.daily-action-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.daily-action-item.done .daily-action-check {
    background: var(--status-done);
    border-color: var(--status-done);
    color: var(--bg-primary);
}

/* ==========================================
   SYSTEM LOGS
   ========================================== */

.logs-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.system-logs-list {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

.log-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
    transition: background-color var(--transition);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry:hover {
    background: var(--bg-elevated);
}

.log-message {
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
}

.log-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   MOBILE TOPBAR & BOTTOM NAV (Hidden on Desktop)
   ========================================== */
.mobile-topbar {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* -- Hide Sidebar -- */
    .sidebar {
        display: none !important;
    }

    body {
        background-color: var(--bg-primary);
        background-image:
            radial-gradient(120% 80% at 0% 0%, rgba(168, 85, 247, 0.18), transparent 60%),
            radial-gradient(100% 80% at 100% 0%, rgba(236, 72, 153, 0.12), transparent 60%);
        background-attachment: fixed;
    }

    /* -- Main Layout -- */
    .main-content {
        margin: 0 auto;
        padding: 0 16px 100px 16px;
        max-width: 480px;
        width: 100%;
    }

    /* -- Mobile Top Bar -- */
    .mobile-topbar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 30;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 16px;
        margin: 0 -16px 16px -16px;
        background: rgba(13, 11, 26, 0.72);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(82, 70, 114, 0.5);
        box-shadow: 0 8px 30px -18px rgba(0, 0, 0, 0.7);
    }
    
    html[data-theme='light'] .mobile-topbar {
        background: rgba(255, 255, 255, 0.8);
        border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1 1 auto;
        min-width: 0;
    }

    .mobile-brand > div {
        min-width: 0;
    }

    .mobile-brand-logo {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        background: var(--gradient-accent);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 30px -8px rgba(168, 85, 247, 0.55);
        color: white;
    }

    .mobile-brand-name {
        font-weight: 800;
        font-size: 14px;
        line-height: 1.1;
        letter-spacing: 0.2px;
        background: var(--gradient-accent);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-brand-status {
        font-size: 9px;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 5px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-dot-live {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--status-done);
        box-shadow: 0 0 6px var(--status-done);
        animation: dot-pulse 2s infinite;
    }

    .mobile-top-actions {
        display: flex;
        gap: 8px;
        margin-left: auto;
        flex-shrink: 0;
    }

    .mobile-icon-btn {
        position: relative;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: rgba(40, 34, 68, 0.4);
        border: 1px solid rgba(60, 50, 100, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        transition: background 0.2s, color 0.2s;
        cursor: pointer;
    }
    
    html[data-theme='light'] .mobile-icon-btn {
        background: rgba(15, 23, 42, 0.05);
        border: 1px solid rgba(15, 23, 42, 0.1);
    }

    .mobile-icon-btn:hover {
        background: rgba(42, 36, 64, 0.8);
        color: var(--text-primary);
    }

    .ambient-orb {
        display: none;
    }

    /* -- Mobile Bottom Nav -- */
    .mobile-bottom-nav {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        padding: 8px 12px 12px;
        pointer-events: none;
    }

    .mobile-bottom-nav-inner {
        pointer-events: auto;
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        background: rgba(24, 20, 50, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(42, 35, 74, 0.6);
        border-radius: 22px;
        box-shadow: 0 8px 30px -12px rgba(80, 30, 140, 0.6);
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        padding: 4px;
        overflow-x: hidden;
        scrollbar-width: none;
    }
    
    .mobile-bottom-nav-inner::-webkit-scrollbar {
        display: none;
    }
    
    html[data-theme='light'] .mobile-bottom-nav-inner {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(15, 23, 42, 0.1);
        box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        min-width: 0;
        width: 100%;
        flex: 1;
        padding: 4px 2px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .mobile-nav-icon-wrap {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        transition: all 0.25s ease;
    }

    .mobile-nav-label {
        font-size: 9.5px;
        color: var(--text-muted);
        font-weight: 600;
        transition: color 0.2s;
        display: block;
        width: 100%;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-btn.active .mobile-nav-icon-wrap {
        background: var(--gradient-accent);
        color: white;
        box-shadow: 0 8px 24px -6px rgba(139, 92, 246, 0.55);
        transform: translateY(-2px);
    }

    .mobile-nav-btn.active .mobile-nav-label {
        color: var(--accent);
    }

    .notification-trigger.is-highlighted {
        border-color: rgba(168, 85, 247, 0.95);
        box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35), 0 0 0 4px rgba(168, 85, 247, 0.12), 0 10px 24px -10px rgba(168, 85, 247, 0.75);
        animation: notification-glow 1.4s ease-in-out 2;
    }

    .notification-trigger.is-highlighted svg {
        color: white;
    }

    /* -- Typography & Headers -- */
    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
    }

    .view-header h1 {
        font-size: 24px;
        margin: 0;
        background: var(--gradient-accent);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .kanban-view-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }

    .kanban-view-header .kanban-goal-selector {
        flex-shrink: 0;
        max-width: 160px;
    }

    .kanban-view-header .kanban-goal-selector select {
        width: 100%;
        min-height: 32px;
        padding: 6px 12px;
        border-radius: 999px;
        background: rgba(40, 34, 68, 0.4);
        border: 1px solid rgba(60, 50, 100, 0.5);
        color: var(--text-primary);
        font-size: 11px;
        line-height: 1;
    }

    .kanban-mobile-shell {
        display: block;
        margin-bottom: 16px;
    }

    .kanban-status-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 12px;
    }

    .kanban-status-card {
        border-radius: 16px;
        padding: 12px;
        background: rgba(40, 34, 68, 0.25);
        border: 1px solid rgba(60, 50, 100, 0.5);
        text-align: left;
        transition: all var(--transition);
    }

    .kanban-status-card.active {
        background: var(--gradient-card);
        box-shadow: var(--shadow-card);
    }

    .kanban-status-card[data-status="todo"].active {
        border-color: var(--status-todo);
        box-shadow: 0 0 0 1px var(--status-todo), var(--shadow-card);
    }

    .kanban-status-card[data-status="in-progress"].active {
        border-color: var(--status-in-progress);
        box-shadow: 0 0 0 1px var(--status-in-progress), var(--shadow-card);
    }

    .kanban-status-card[data-status="done"].active {
        border-color: var(--status-done);
        box-shadow: 0 0 0 1px var(--status-done), var(--shadow-card);
    }

    .kanban-status-head {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 4px;
    }

    .kanban-status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .kanban-status-dot.todo {
        background: var(--status-todo);
    }

    .kanban-status-dot.in-progress {
        background: var(--status-in-progress);
    }

    .kanban-status-dot.done {
        background: var(--status-done);
    }

    .kanban-status-label {
        font-size: 10px;
        font-weight: 500;
        color: var(--text-secondary);
    }

    .kanban-status-card.active .kanban-status-label {
        color: var(--text-primary);
    }

    .kanban-status-count {
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
    }

    .kanban-status-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .kanban-mobile-card {
        background: var(--gradient-card);
        border: 1px solid rgba(42, 35, 74, 0.7);
        border-radius: 16px;
        box-shadow: var(--shadow-card);
        padding: 14px;
        display: flex;
        gap: 8px;
        align-items: flex-start;
    }

    .kanban-mobile-main {
        flex: 1;
        min-width: 0;
    }

    .kanban-mobile-title {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
        margin-bottom: 6px;
    }

    .kanban-mobile-meta {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
    }

    .kanban-mobile-pill {
        font-size: 10px;
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(60, 50, 100, 0.5);
        color: var(--text-secondary);
    }

    .kanban-mobile-date {
        font-size: 10px;
        color: var(--text-secondary);
    }

    .kanban-mobile-empty {
        border: 1px dashed rgba(60, 50, 100, 0.6);
        border-radius: 16px;
        padding: 32px 16px;
        text-align: center;
        color: var(--text-secondary);
        font-size: 12px;
    }

    .kanban-mobile-add {
        margin-top: 16px;
        width: 100%;
        border: 1px dashed rgba(60, 50, 100, 0.6);
        border-radius: 16px;
        padding: 12px;
        font-size: 12px;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        background: transparent;
    }

    .kanban-board {
        display: none;
    }

    .greeting-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 0 0 16px 0;
    }

    .greeting-text h2 {
        font-size: 30px;
        font-weight: 800;
        letter-spacing: -0.5px;
        margin: 0;
        background: var(--gradient-accent);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
    
    .greeting-date {
        font-size: 12px;
        color: var(--text-muted);
        margin: 0;
        align-self: flex-start;
    }

    /* -- Grids -- */
    .bento-grid,
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .dashboard-main-grid,
    .dashboard-trio-grid,
    .dashboard-extras-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bento-card,
    .bento-sm,
    .bento-md,
    .bento-wide,
    .bento-full {
        grid-column: span 1;
        border-radius: 18px;
        padding: 16px;
    }

    .bento-card {
        background: var(--bg-card);
        border: 1px solid var(--border);
        box-shadow: 0 8px 30px -12px rgba(80, 30, 140, 0.6);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
    
    html[data-theme='light'] .bento-card {
        border: 1px solid rgba(15, 23, 42, 0.1);
        box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.1);
    }

    .stat-value {
        font-size: 24px;
    }

    .bento-card-header {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }

    .bento-card-header h3 {
        font-size: 13px;
        letter-spacing: 0.2px;
    }

    /* -- Manage / Tasks View -- */
    .manage-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-pills {
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-pill {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
        min-height: 40px;
        font-size: 12px;
    }

    .task-card,
    .manage-task-card {
        padding: 14px;
        border-radius: 16px;
    }
    
    .task-actions {
        opacity: 1; /* always visible on touch */
    }

    /* -- Goal Cards -- */
    .goal-card {
        border-radius: 18px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        box-shadow: 0 8px 30px -12px rgba(80, 30, 140, 0.6);
    }
    
    .goal-header {
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .goal-info {
        min-width: 0;
    }

    .goal-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .goal-progress-mini {
        flex: 1;
        min-width: 0;
    }

    .progress-bar-mini {
        width: 100%;
    }

    .goal-actions {
        opacity: 1;
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
    }

    .goal-body {
        padding: 0 16px 16px;
    }

    /* -- Kanban View -- */
    .kanban-board {
        grid-template-columns: 1fr;
        gap: 12px;
        overflow: visible;
        padding-bottom: 20px;
    }

    .kanban-column {
        min-width: 0;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 18px;
        padding: 16px;
        box-shadow: 0 8px 30px -12px rgba(80, 30, 140, 0.6);
    }

    .kanban-column-header {
        padding: 0 0 12px 0;
        border-bottom: none;
    }

    .kanban-cards {
        min-height: 20px; /* Don't take up massive space if empty */
        padding-bottom: 0;
    }

    .kanban-task-card {
        border-radius: 12px;
        background: rgba(40, 34, 68, 0.25);
        border-color: rgba(60, 50, 100, 0.4);
    }

    .kanban-move-btns {
        display: flex !important;
        gap: 6px;
        margin-top: 10px;
    }

    .kanban-move-btn {
        flex: 1;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
    }
    
    html[data-theme='light'] .kanban-move-btn {
        background: rgba(15, 23, 42, 0.05);
    }

    /* -- Timer View -- */
    .timer-container {
        padding: 16px;
        border-radius: 18px;
        background: var(--bg-card);
        border: 1px solid var(--border);
    }

    .timer-tabs {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .timer-tab {
        flex: 1 1 calc(50% - 6px);
        min-height: 44px;
        font-size: 13px;
    }

    .timer-task-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .timer-ring {
        width: 260px;
        height: 260px;
    }

    .timer-time {
        font-size: 56px;
    }

    .timer-controls {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .timer-controls .btn {
        width: 100%;
        min-height: 48px;
    }

    /* -- Notes View -- */
    .notes-container {
        grid-template-columns: 1fr;
    }

    .note-card {
        border-radius: 16px;
        padding: 16px;
    }

    /* -- Modals -- */
    .modal,
    .modal-lg {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 40px);
        border-radius: 20px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
        min-height: 44px;
    }

    /* -- Global Elements -- */
    .btn {
        min-height: 44px;
        font-size: 14px;
        justify-content: center;
    }

    select, input[type="text"], input[type="date"], input[type="password"], input[type="email"], textarea {
        min-height: 44px;
        font-size: 16px !important; /* Prevents iOS auto-zoom */
    }

    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 90px; /* Above bottom nav */
        width: auto;
    }

    #mascot-container {
        display: none;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .timer-ring {
        width: 220px;
        height: 220px;
    }
    
    .timer-time {
        font-size: 48px;
    }
}

@keyframes notification-glow {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-1px) scale(1.02);
    }
}
