/* Design Tokens & CSS Variables */
:root {
    --bg-gradient: linear-gradient(135deg, #f0f7f6 0%, #fafdfd 50%, #e8f2f1 100%);
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: 1px solid rgba(255, 255, 255, 0.6);
    --card-radius: 20px;
    --card-shadow: 0 8px 32px rgba(12, 88, 85, 0.05);
    --backdrop-blur: blur(20px) saturate(180%);
    
    /* Elegant FAANG Color Palette */
    --text-primary: #0f2928;
    --text-secondary: #4a6b6a;
    --accent-color: #0c5855;
    --accent-hover: #083e3c;
    
    /* Priority Colors (Muted, Elegant, High Contrast) */
    --urgent-important-bg: rgba(239, 68, 68, 0.05);
    --urgent-important-border: rgba(239, 68, 68, 0.25);
    --urgent-important-text: #b91c1c;

    --important-not-urgent-bg: rgba(245, 158, 11, 0.05);
    --important-not-urgent-border: rgba(245, 158, 11, 0.25);
    --important-not-urgent-text: #b45309;

    --urgent-not-important-bg: rgba(59, 130, 246, 0.05);
    --urgent-not-important-border: rgba(59, 130, 246, 0.25);
    --urgent-not-important-text: #1d4ed8;

    --neither-bg: rgba(16, 185, 129, 0.05);
    --neither-border: rgba(16, 185, 129, 0.25);
    --neither-text: #047857;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    background: #f0f7f6;
}

/* Ambient Animating Background */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: var(--bg-gradient);
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Glassmorphism Panel Base */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.08);
}

/* Header Styling */
.app-header {
    position: relative;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    margin-bottom: 24px;
    border-radius: var(--card-radius);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: var(--backdrop-blur);
    border: var(--card-border);
}

.app-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* Date Navigator */
.date-navigator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

.current-date-display {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 100px;
    text-align: center;
}

.today-badge {
    background: var(--accent-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.today-badge:hover {
    background: var(--accent-hover);
}

.app-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(12, 88, 85, 0.08);
}

.nav-link.active {
    color: #fff;
    background: var(--accent-color);
}

/* 3-Column Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    flex-grow: 1;
    align-items: stretch;
}

.grid-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0; /* Important for inner scrolls */
}

/* Panel Titles */
.panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* COLUMN 1: Brain Dump & Auto-Generated Todos */
.braindump-card {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 250px;
}

.braindump-textarea {
    width: 100%;
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(12, 88, 85, 0.15);
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    resize: none;
    outline: none;
    overflow-y: auto;
    transition: border-color 0.2s, background 0.2s;
}

.braindump-textarea:focus {
    border-color: rgba(12, 88, 85, 0.4);
    background: rgba(255, 255, 255, 0.85);
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.btn {
    background: var(--accent-color);
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    outline: none;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}


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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(12, 88, 85, 0.25);
}

.autotodos-card {
    display: flex;
    flex-direction: column;
    height: calc(100% - 270px);
    min-height: 250px;
}

.todo-list-container {
    flex-grow: 1;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbar for scrollable boxes */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(12, 88, 85, 0.01);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(12, 88, 85, 0.12);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(12, 88, 85, 0.25);
}

/* Todo Items */
.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: grab;
    user-select: none;
    transition: background 0.2s, transform 0.2s;
}

.todo-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.7);
}

.todo-content-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}

/* iOS style Checkbox */
.todo-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(12, 88, 85, 0.25);
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s, border-color 0.2s;
}

.todo-checkbox:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.todo-checkbox:checked::after {
    content: "";
    width: 8px;
    height: 4px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translate(0.5px, -0.5px);
}

.todo-text {
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: color 0.2s, text-decoration 0.2s;
}

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

.todo-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.action-btn.delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.action-btn.focus-pomo {
    background: rgba(45, 212, 191, 0.08);
    border: 1px solid rgba(45, 212, 191, 0.3) !important;
    color: #2dd4bf;
    font-weight: 600;
}

.action-btn.focus-pomo:hover {
    background: rgba(45, 212, 191, 0.2);
    color: #ffffff;
}

.action-btn.breakdown {
    background: rgba(12, 88, 85, 0.05);
    border: 1px solid rgba(45, 212, 191, 0.3) !important;
    color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 0 4px rgba(45, 212, 191, 0.15);
    animation: breakdownGlow 2s infinite ease-in-out;
}

@keyframes breakdownGlow {
    0%, 100% {
        box-shadow: 0 0 4px rgba(45, 212, 191, 0.15), inset 0 0 2px rgba(45, 212, 191, 0.1);
        border-color: rgba(45, 212, 191, 0.3);
    }
    50% {
        box-shadow: 0 0 10px rgba(45, 212, 191, 0.55), inset 0 0 4px rgba(45, 212, 191, 0.2);
        border-color: rgba(45, 212, 191, 0.75);
        background: rgba(45, 212, 191, 0.1);
        color: #0c5855;
    }
}

/* Add Todo Mini Form */
.add-todo-inline {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.inline-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(12, 88, 85, 0.15);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: var(--text-primary);
    outline: none;
}

.inline-input:focus {
    border-color: rgba(12, 88, 85, 0.4);
    background: rgba(255, 255, 255, 0.85);
}


/* COLUMN 2: Eisenhower Matrix (Scrollable Priority Stack) */
.eisenhower-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: 4px;
}

.priority-block {
    margin-bottom: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 14px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    /* Blocks are always fully visible — no collapse */
}

.priority-header {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
    user-select: none;
    min-width: 0;
    gap: 6px;
}

.priority-count {
    background: rgba(12, 88, 85, 0.06);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Custom styles per Priority Block */
.priority-block.stop_todo {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.35);
}
.priority-block.stop_todo .priority-header {
    color: #f87171;
}

.priority-block.urgent_important {
    background: var(--urgent-important-bg);
    border-color: var(--urgent-important-border);
}
.priority-block.urgent_important .priority-header {
    color: var(--urgent-important-text);
}

.priority-block.important_not_urgent {
    background: var(--important-not-urgent-bg);
    border-color: var(--important-not-urgent-border);
}
.priority-block.important_not_urgent .priority-header {
    color: var(--important-not-urgent-text);
}

.priority-block.urgent_not_important {
    background: var(--urgent-not-important-bg);
    border-color: var(--urgent-not-important-border);
}
.priority-block.urgent_not_important .priority-header {
    color: var(--urgent-not-important-text);
}

.priority-block.neither {
    background: var(--neither-bg);
    border-color: var(--neither-border);
}
.priority-block.neither .priority-header {
    color: var(--neither-text);
}

/* Priority color dots — explicit classes to guarantee rendering on mobile */
.priority-dot {
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    min-height: 10px !important;
    border-radius: 50% !important;
    margin-right: 2px;
}
.priority-dot.dot-red    { background-color: #ef4444 !important; }
.priority-dot.dot-amber  { background-color: #f59e0b !important; }
.priority-dot.dot-blue   { background-color: #3b82f6 !important; }
.priority-dot.dot-green  { background-color: #10b981 !important; }
.priority-dot.dot-grey   { background-color: #9ca3af !important; }

.priority-list {
    flex-grow: 1;
    overflow-y: visible;
    min-height: 0;
}

.priority-list.drag-over {
    border: 2px dashed rgba(12, 88, 85, 0.25);
    border-radius: 10px;
    background: rgba(12, 88, 85, 0.04);
}


/* COLUMN 3: Daily Reflection Notes & AI Suggestions */
.reflection-card {
    display: flex;
    flex-direction: column;
    flex-grow: 2;
    min-height: 250px;
}

.reflection-textarea {
    width: 100%;
    flex-grow: 1;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(12, 88, 85, 0.15);
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    resize: none;
    overflow-y: auto;
    transition: border-color 0.2s, background-color 0.2s;
}

.reflection-textarea:focus {
    border-color: rgba(12, 88, 85, 0.4);
    background: rgba(255, 255, 255, 0.85);
}

/* AI suggestions panels */
.reflection-results-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

.reflection-result-box {
    padding: 14px;
    border-radius: 14px;
    background: rgba(12, 88, 85, 0.03);
    border: 1px solid rgba(12, 88, 85, 0.08);
    opacity: 1;
    transition: opacity 0.5s ease;
}

.reflection-result-box.empty {
    opacity: 0.6;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.result-box-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reflection-result-content {
    font-size: 0.88rem;
    line-height: 1.5;
}

.reflection-result-content ul {
    list-style-type: none;
}

.reflection-result-content li {
    margin-bottom: 6px;
    position: relative;
    padding-left: 14px;
}

.reflection-result-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}


.form-group {
    margin-bottom: 8px;
}

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

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(12, 88, 85, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.82rem;
    color: var(--text-primary);
    outline: none;
}

.form-control:focus {
    border-color: rgba(12, 88, 85, 0.4);
}

.creator-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}


/* POMODORO TIMER CARD */
.pomodoro-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.timer-visual {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.timer-ring {
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: rgba(12, 88, 85, 0.06);
    stroke-width: 6;
}

.timer-ring-progress {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 377; /* 2 * PI * r (r=60) */
    stroke-dashoffset: 377;
    transition: stroke-dashoffset 1s linear;
}

.timer-digits {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timer-controls {
    display: flex;
    gap: 8px;
}

.pomodoro-stats {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 12px;
}


/* REFLECTION INSIGHTS CARD */
.reflection-insights-card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
}


/* ANALYTICS SECTION */
.analytics-section {
    margin-top: 24px;
    margin-bottom: 12px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

.analytics-summary-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-two-plots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-chart-panel {
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.chart-wrapper {
    flex-grow: 1;
    position: relative;
    width: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streak-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.streak-number {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--accent-color);
    line-height: 1;
    margin: 12px 0 4px 0;
}

.streak-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.totals-card {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 24px;
}

.total-stat-item {
    display: flex;
    flex-direction: column;
}

.total-stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.total-stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}


/* RESPONSIVE LAYOUT (MOBILE COMPATIBILITY) */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .analytics-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .app-container {
        padding: 12px;
        overflow-x: hidden;
    }
    body {
        overflow-x: hidden;
    }
    /* App header: 2-row clean layout on mobile
       Row 1 = [Logo left]   [Hamburger right]
       Row 2 = [← date →  centered] */
    .app-header {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        row-gap: 8px !important;
        column-gap: 0 !important;
        text-align: left !important;
        padding: 10px 14px !important;
    }
    /* Logo: row 1, takes remaining space */
    .header-logo {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }
    #mobile-toggle-projects-btn {
        order: 1 !important;
    }
    /* Hamburger: row 1, end */
    .hamburger-btn {
        order: 1 !important;
        flex-shrink: 0;
    }
    /* Date navigator: row 2, full width, centered */
    .date-navigator {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    .app-nav {
        justify-content: center;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .priority-block {
        min-height: 100px;
    }
    .app-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px !important;
    }
    .nav-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    .user-profile-badge {
        padding: 4px 10px !important;
        font-size: 0.8rem !important;
        gap: 6px !important;
    }
    .avatar-img {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.7rem !important;
    }
    /* Fix #5: Force analytics grids to single column on mobile */
    .analytics-grid {
        grid-template-columns: 1fr !important;
    }
    .analytics-section {
        overflow-x: hidden;
    }
    /* Fix #2: Make todo actions always visible on touch (no hover on mobile) */
    .todo-actions {
        opacity: 1;
    }
}


/* ===== Touch Drag Clone Styles ===== */
.touch-drag-clone {
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-blur);
    border: var(--card-border);
    border-radius: 10px;
    padding: 10px 12px;
    transition: none;
}


/* ===== Projects Page Styles ===== */
.projects-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 60px;
}

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

.projects-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.projects-header h2 span {
    color: var(--accent-color);
}

.project-add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.project-add-form .form-control {
    flex: 1;
    min-width: 150px;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(31, 38, 135, 0.08);
}

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

.project-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.project-name a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.project-name a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.project-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.project-url-display {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    word-break: break-all;
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.project-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.project-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .project-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .project-actions {
        justify-content: flex-end;
    }
    .project-add-form {
        flex-direction: column;
    }
}


/* ===== LOCK HEIGHTS & ENABLE SCROLLING ON DESKTOP (Dashboard Only) ===== */
@media (min-width: 1025px) {
    /* Fix #6: Only lock overflow on dashboard pages, not landing/analytics/ops/projects */
    .dashboard-page,
    .dashboard-page body {
        height: 100vh;
        overflow: hidden;
    }

    .dashboard-page .app-container {
        height: 100vh;
        overflow: hidden;
        padding: 20px 24px;
        display: flex;
        flex-direction: column;
    }

    .dashboard-page .main-content {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .dashboard-page .dashboard-grid {
        height: 100%;
        overflow: hidden;
        align-items: stretch;
    }

    .dashboard-page .grid-column {
        height: 100%;
        overflow: hidden;
    }

    /* Column 1 Sizing */
    .dashboard-page .braindump-card {
        flex: 0 0 240px;
    }

    .dashboard-page .autotodos-card {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .dashboard-page .todo-list-container {
        flex: 1;
        max-height: none;
        overflow-y: auto;
        min-height: 0;
    }

    /* Column 2 (Eisenhower) Sizing — always-visible, scrollable column */
    .dashboard-page .eisenhower-column {
        height: 100%;
        max-height: 100%;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .dashboard-page .priority-block {
        flex: 0 0 auto;
        height: auto;
        display: flex;
        flex-direction: column;
        margin-bottom: 12px;
        flex-shrink: 0;
    }

    .dashboard-page .priority-list {
        overflow-y: visible;
        max-height: none;
        min-height: 0;
    }

    /* Column 3 (Reflection) Sizing */
    .dashboard-page .reflection-card {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .dashboard-page .reflection-textarea {
        flex: 1;
        min-height: 0;
    }

    .dashboard-page .reflection-insights-card {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .dashboard-page .reflection-insights-card .reflection-results-stack {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        margin-top: 12px;
        padding-right: 4px;
    }
}




/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — full overrides for <=768px
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    body, html { overflow-x: hidden; }

    .app-container {
        padding: 12px !important;
        min-height: 100vh;
        overflow: visible !important;
        height: auto !important;
    }

    .app-header {
        padding: 10px 14px !important;
        margin-bottom: 14px !important;
        flex-wrap: wrap !important;
        row-gap: 8px !important;
    }

    /* Date navigator: row 2 — compact, centered */
    .date-navigator {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 4px 0 !important;
        border-top: 1px solid rgba(12,88,85,0.06) !important;
        width: 100% !important;
        order: 2 !important;
    }
    .date-navigator .nav-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85rem !important;
        flex-shrink: 0 !important;
    }
    .current-date-display {
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        min-width: 90px !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
    .today-badge {
        font-size: 0.7rem !important;
        padding: 3px 8px !important;
    }

    .main-content {
        overflow: visible !important;
        height: auto !important;
        flex: none !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        height: auto !important;
        overflow: visible !important;
    }

    .grid-column {
        height: auto !important;
        overflow: visible !important;
    }

    .braindump-card { flex: none !important; min-height: 180px; }
    .braindump-textarea { min-height: 120px !important; height: 120px; }

    .autotodos-card { height: auto !important; min-height: 200px; }
    .todo-list-container { max-height: 240px !important; flex: none; }

    .eisenhower-column { height: auto !important; overflow: visible !important; max-height: none !important; }
    .priority-block { flex: none !important; height: auto !important; min-height: 80px !important; }
    .priority-list { max-height: 150px !important; overflow-y: auto; }

    .reflection-card { flex: none !important; min-height: 200px; display: flex !important; flex-direction: column !important; }
    .reflection-textarea { min-height: 120px !important; flex: 1 !important; }
    .reflection-results-stack { max-height: 250px !important; }

    /* Always show todo actions on mobile (touch devices have no :hover) */
    .todo-actions { opacity: 1 !important; }

    /* Ensure grid column that holds Notes is never hidden */
    .dashboard-grid .grid-column:last-child {
        display: flex !important;
        flex-direction: column !important;
    }


    .glass-panel { padding: 16px !important; }
    .btn { padding: 10px 16px !important; font-size: 0.9rem !important; }

    /* Command banner: responsive stacked layout on mobile */
    .command-banner { min-height: auto !important; border-radius: 12px !important; }
    .command-banner-content {
        padding: 10px 12px !important;
        gap: 8px !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .banner-subtitle { display: none !important; }
    .banner-title {
        font-size: 0.65rem !important;
        letter-spacing: 1.2px !important;
        white-space: nowrap !important;
    }
    .banner-left { gap: 8px !important; justify-content: center !important; width: 100% !important; }
    .banner-right {
        gap: 8px !important;
        flex-shrink: 0;
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        margin-top: 4px !important;
    }
    .banner-stat {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 6px 10px !important;
        background: rgba(255,255,255,0.06) !important;
        border: 1px solid rgba(45,212,191,0.15) !important;
        border-radius: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
        gap: 1px !important;
    }
    .banner-stat.pending-dropdown-container {
        /* let base banner-stat styling apply */
    }
    .banner-stat-num {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        line-height: 1 !important;
    }
    .banner-stat-label {
        font-size: 0.55rem !important;
        letter-spacing: 0.6px !important;
        text-transform: uppercase !important;
        opacity: 0.7 !important;
    }

    .hero-title { font-size: 2.2rem !important; letter-spacing: -1px !important; }
    .hero-tagline { font-size: 1rem !important; }
    .hero-cta-group { flex-direction: column !important; align-items: center !important; }
    .btn-hero { width: 100% !important; max-width: 320px !important; text-align: center !important; }

    .profile-grid { padding: 0 !important; }
    .pomodoro-card { min-height: auto !important; }
}

/* Tablet 769-1024 */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px;
        height: auto !important;
        overflow: visible !important;
    }
    .dashboard-page, .dashboard-page body {
        height: auto !important; overflow: auto !important;
    }
    .dashboard-page .app-container { height: auto !important; overflow: visible !important; }
    .dashboard-page .main-content { flex: none !important; overflow: visible !important; }
    .dashboard-page .grid-column { height: auto !important; overflow: visible !important; }
    .app-header { padding: 14px 18px; }
}

/* Custom Confirm Dialog Overlay */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(12, 88, 85, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-confirm-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Glass panel styling customized for the alert box */
.custom-confirm-box {
    max-width: 400px;
    width: 90%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(12, 88, 85, 0.15);
    padding: 24px;
    transform: scale(0.9) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-confirm-overlay.show .custom-confirm-box {
    transform: scale(1) translateY(0);
}

.custom-confirm-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.custom-confirm-body p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.custom-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.custom-confirm-actions .btn {
    padding: 8px 20px;
    font-size: 0.88rem;
    border-radius: 12px;
}

.custom-confirm-actions .btn.confirm-ok {
    background: #ef4444; /* Clean delete action color */
}

.custom-confirm-actions .btn.confirm-ok:hover {
    background: #dc2626;
}

.custom-confirm-actions .btn.confirm-cancel {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    border: 1px solid rgba(12, 88, 85, 0.15);
}

.custom-confirm-actions .btn.confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(12, 88, 85, 0.3);
}

/* Voice Input Recording Animation */
#voice-input-btn.recording {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
    animation: pulseRecording 1.5s infinite alternate ease-in-out;
}

@keyframes pulseRecording {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* Soundwave Voice Recording Animation */
.soundwave-container {
    display: flex;
    align-items: center;
    gap: 2.5px;
    height: 14px;
}

.soundwave-container .bar {
    width: 2.5px;
    background-color: #ef4444;
    border-radius: 1px;
    display: inline-block;
    animation: soundwaveBounce 0.8s ease-in-out infinite alternate;
}

.soundwave-container .bar-1 { height: 6px; animation-delay: 0.1s; }
.soundwave-container .bar-2 { height: 12px; animation-delay: 0.3s; }
.soundwave-container .bar-3 { height: 8px; animation-delay: 0.2s; }
.soundwave-container .bar-4 { height: 14px; animation-delay: 0.5s; }
.soundwave-container .bar-5 { height: 6px; animation-delay: 0.4s; }

@keyframes soundwaveBounce {
    0% {
        transform: scaleY(0.3);
    }
    100% {
        transform: scaleY(1.3);
    }
}


/* ── Task Breakdown Column & Panel Styles ── */

/* Desktop: expand grid to 4 columns */
@media (min-width: 1025px) {
    .dashboard-grid.breakdown-open {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    .dashboard-page .dashboard-grid.breakdown-open {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Tablet (769–1024px): breakdown appears as 3rd column, 2-col then wraps */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-grid.breakdown-open {
        grid-template-columns: 1fr 1fr !important;
        height: auto !important;
        overflow: visible !important;
    }
    /* On tablet, breakdown col flows below as normal grid cell */
    .task-breakdown-column {
        grid-column: span 2;
    }
}

/* Desktop slide-in column animation */
@media (min-width: 1025px) {
    .task-breakdown-column {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
        animation: slideInFromRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Mobile Bottom-Sheet for Breakdown Panel ── */
@media (max-width: 768px) {
    /* Mobile: breakdown column is a BOTTOM SHEET, not a grid child */
    .task-breakdown-column {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: 88vh !important;
        z-index: 9000 !important;
        border-radius: 24px 24px 0 0 !important;
        overflow: hidden !important;
        display: none; /* JS controls this */
        flex-direction: column !important;
        background: rgba(240, 247, 246, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(255,255,255,0.6) !important;
        box-shadow: 0 -8px 40px rgba(12, 88, 85, 0.18) !important;
        /* Slide in from bottom animation */
        animation: slideUpFromBottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Bottom-sheet handle bar */
    .task-breakdown-column::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(12, 88, 85, 0.2);
        border-radius: 2px;
        margin: 12px auto 4px;
        flex-shrink: 0;
    }

    /* Keep grid at 1 column even when breakdown is open */
    .dashboard-grid.breakdown-open {
        grid-template-columns: 1fr !important;
    }

    /* Backdrop for bottom sheet */
    .mobile-breakdown-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 8999;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    .mobile-breakdown-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Bottom sheet card styling */
    .breakdown-card {
        border-radius: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        flex-shrink: 0;
        overflow-y: auto !important;
        max-height: calc(88vh - 28px) !important;
        padding: 16px !important;
    }

    /* Fields container scrolls inside the sheet */
    .breakdown-fields-container {
        max-height: 55vh !important;
        overflow-y: auto !important;
        padding-right: 2px;
    }

    /* Make breakdown textareas comfortable on mobile */
    .breakdown-textarea {
        font-size: 0.95rem !important;
        min-height: 70px !important;
        padding: 12px !important;
    }

    /* Lock body scroll when sheet is open */
    body.breakdown-open-mobile {
        overflow: hidden !important;
    }
}

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

.breakdown-card {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 250px;
    height: 100%;
    overflow-y: auto;
}

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

.breakdown-header .panel-title {
    width: 100%;
    margin-bottom: 0;
}

.close-panel-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.close-panel-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #ef4444;
}

.breakdown-fields-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.breakdown-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.breakdown-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
}

.breakdown-textarea {
    width: 100%;
    min-height: 60px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(12, 88, 85, 0.15);
    border-radius: 12px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-primary);
    resize: none;
    outline: none;
    overflow-y: auto;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.breakdown-textarea:focus {
    border-color: rgba(12, 88, 85, 0.4);
    background: rgba(255, 255, 255, 0.85);
}

.breakdown-save-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 10px;
    text-align: right;
    transition: opacity 0.2s;
}

.todo-item.active-breakdown {
    border-left: 3.5px solid var(--accent-color) !important;
    background: rgba(12, 88, 85, 0.04) !important;
    box-shadow: 0 4px 12px rgba(12, 88, 85, 0.08) !important;
}

/* Action button styling */
.action-btn.breakdown {
    color: var(--accent-color);
}
.action-btn.breakdown:hover {
    background: rgba(12, 88, 85, 0.08);
}

/* Custom Webkit scrollbars for premium aesthetics */
.breakdown-fields-container::-webkit-scrollbar,
.braindump-textarea::-webkit-scrollbar,
.reflection-textarea::-webkit-scrollbar,
.breakdown-textarea::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.breakdown-fields-container::-webkit-scrollbar-track,
.braindump-textarea::-webkit-scrollbar-track,
.reflection-textarea::-webkit-scrollbar-track,
.breakdown-textarea::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
}
.breakdown-fields-container::-webkit-scrollbar-thumb,
.braindump-textarea::-webkit-scrollbar-thumb,
.reflection-textarea::-webkit-scrollbar-thumb,
.breakdown-textarea::-webkit-scrollbar-thumb {
    background: rgba(12, 88, 85, 0.25);
    border-radius: 3px;
}
.breakdown-fields-container::-webkit-scrollbar-thumb:hover,
.braindump-textarea::-webkit-scrollbar-thumb:hover,
.reflection-textarea::-webkit-scrollbar-thumb:hover,
.breakdown-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(12, 88, 85, 0.4);
}


/* ===== MOBILE BOTTOM TAB NAVIGATION ===== */
.mobile-tab-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-tab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 72px;
        background: rgba(10, 30, 30, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(45, 212, 191, 0.2);
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
        z-index: 9999;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px;
    }

    .mobile-tab-bar .tab-btn {
        background: none;
        border: none;
        color: var(--text-secondary);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        font-family: inherit;
        cursor: pointer;
        padding: 8px 0;
        transition: color 0.2s ease, transform 0.1s ease;
    }

    .mobile-tab-bar .tab-btn .tab-icon {
        font-size: 1.45rem;
        margin-bottom: 4px;
        transition: transform 0.2s ease;
    }

    .mobile-tab-bar .tab-btn .tab-icon svg {
        width: 23px !important;
        height: 23px !important;
    }

    .mobile-tab-bar .tab-btn .tab-label {
        font-size: 0.74rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-tab-bar .tab-btn.active {
        color: #2dd4bf;
    }

    .mobile-tab-bar .tab-btn.active .tab-icon {
        transform: translateY(-2px) scale(1.1);
    }

    /* Hide inactive content on mobile */
    .glass-panel[data-mobile-tab] {
        display: none !important;
    }

    /* Show only active tab content */
    .glass-panel[data-mobile-tab].active-tab-content {
        display: flex !important;
    }

    /* Ensure space at the bottom for the fixed tab bar */
    .app-container {
        padding-bottom: 94px !important;
    }
}


/* ── Global Toast Notification ── */
.toast-notification {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(12, 62, 60, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(45, 212, 191, 0.35);
    color: #fff;
    padding: 10px 22px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(12, 88, 85, 0.22);
    z-index: 10500;
    opacity: 0;
    pointer-events: auto; /* enable links inside toast! */
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Todo Item Slide Out Animation for Triage ── */
.todo-item.moving-priority {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.5s ease !important;
    transform: translateX(110%) !important;
    opacity: 0 !important;
}



/* ── Priority Selector inside Details Panel ── */
.breakdown-priority-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(12, 88, 85, 0.04);
    border: 1px solid rgba(12, 88, 85, 0.08);
    border-radius: 12px;
    margin-bottom: 16px;
}

.breakdown-priority-selector .priority-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.breakdown-priority-selector .priority-buttons {
    display: flex;
    gap: 8px;
}

.breakdown-priority-selector .p-btn {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(12, 88, 85, 0.12);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    padding: 0;
}

.breakdown-priority-selector .p-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--accent-color);
}

.breakdown-priority-selector .p-btn.active {
    background: #ffffff !important;
    border: 2px solid var(--accent-color) !important;
    box-shadow: 0 4px 12px rgba(12, 88, 85, 0.18);
    transform: scale(1.15);
}


.todo-priority-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
    margin: 0 0 0 8px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

.todo-priority-select:hover {
    background-color: rgba(12, 88, 85, 0.08);
}

.todo-priority-select option {
    background-color: #ffffff;
    color: #1a2a2a;
    font-size: 0.9rem;
}

/* ── "Manly Glow" Animation for Unassigned Priority Dropdown ── */
@keyframes manlyGlow {
    0% {
        box-shadow: 0 0 4px rgba(45, 212, 191, 0.15);
        border-color: rgba(45, 212, 191, 0.3);
        background: rgba(45, 212, 191, 0.04);
    }
    50% {
        box-shadow: 0 0 14px rgba(45, 212, 191, 0.65), inset 0 0 4px rgba(45, 212, 191, 0.2);
        border-color: rgba(45, 212, 191, 0.7);
        background: rgba(45, 212, 191, 0.15);
    }
    100% {
        box-shadow: 0 0 4px rgba(45, 212, 191, 0.15);
        border-color: rgba(45, 212, 191, 0.3);
        background: rgba(45, 212, 191, 0.04);
    }
}

.todo-priority-select.is-unassigned {
    width: auto !important;
    max-width: 130px !important;
    padding: 2px 10px 2px 8px !important;
    border: 1px solid rgba(45, 212, 191, 0.35) !important;
    border-radius: 20px !important;
    animation: manlyGlow 2.2s infinite ease-in-out !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: var(--accent-color) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-shadow: 0 0 1px rgba(45, 212, 191, 0.2);
}

/* ── Priority select → colored dot via wrapper (global) ── */
.priority-dot-wrapper {
    position: relative;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    margin-left: 8px;
}
/* Colored backgrounds per priority */
.priority-dot-wrapper[data-priority="urgent_important"]     { background: #ef4444; }
.priority-dot-wrapper[data-priority="important_not_urgent"] { background: #f59e0b; }
.priority-dot-wrapper[data-priority="urgent_not_important"] { background: #3b82f6; }
.priority-dot-wrapper[data-priority="neither"]              { background: #10b981; }
/* Select is invisible but covers the dot to receive tap/click events */
.priority-dot-wrapper .todo-priority-select {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    border: none !important;
    animation: none !important;
}

/* Category-specific task creator button */
.add-priority-task-btn {
    background: rgba(12, 88, 85, 0.08);
    color: var(--accent-color);
    border: 1.5px solid rgba(12, 88, 85, 0.25);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    line-height: 1;
}

.add-priority-task-btn:hover {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    transform: scale(1.15) rotate(90deg);
}

/* Category-specific inline input field */
.inline-add-input-wrapper {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px dashed rgba(12, 88, 85, 0.35);
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    animation: slideDownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.inline-add-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: inherit;
}

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


/* ===== CURRENT PROJECTS COMPONENT ON DASHBOARD ===== */
.current-projects-card {
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.project-add-inline {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.project-list-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.75);
}

.project-item.dragging {
    opacity: 0.5;
    border: 1.5px dashed var(--accent-color);
}

.project-drag-handle {
    cursor: grab;
    margin-right: 8px;
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 0.9rem;
    user-select: none;
}

.project-content-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
    margin-right: 8px;
}

.project-name-text {
    font-size: 0.85rem;
    font-weight: 600;
}

.project-name-text a {
    color: var(--accent-color);
    text-decoration: none;
}

.project-name-text a:hover {
    text-decoration: underline;
}

.project-desc-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.project-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

/* Sort buttons for mobile & accessibility */
.project-sort-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
}

.project-sort-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.action-btn.project-edit-btn:hover {
    background: rgba(12, 88, 85, 0.08);
}

.action-btn.project-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Mobile responsive overrides & Projects Sidebar styling */
#mobile-toggle-projects-btn {
    display: none !important;
}

@media (max-width: 768px) {
    #mobile-toggle-projects-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.7);
        color: var(--text-primary);
        cursor: pointer;
    }
    
    #mobile-toggle-projects-btn:hover {
        background: rgba(255, 255, 255, 0.9);
    }

    .project-actions {
        opacity: 1 !important; /* Always show actions on mobile touch screen */
    }
}

/* Projects Sidebar Overlay */
.projects-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Projects Sidebar Panel (Drawer) */
.projects-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(400px, 90vw);
    height: 100vh;
    z-index: 10101;
    background: rgba(240, 247, 246, 0.97);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.projects-sidebar.open {
    transform: translateX(0);
}

/* Style for scrollbar in sidebar */
.projects-sidebar .project-list-container::-webkit-scrollbar {
    width: 6px;
}
.projects-sidebar .project-list-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}
.projects-sidebar .project-list-container::-webkit-scrollbar-thumb {
    background: rgba(12, 88, 85, 0.2);
    border-radius: 3px;
}
.projects-sidebar .project-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(12, 88, 85, 0.4);
}

/* ==========================================================================
   POMODORO TIMER STYLES (Focus Sprints HUD)
   ========================================================================== */

/* Navigation pulse animations when timer is running */
.pomo-nav-btn.active-timer {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 12px;
}
.pomo-nav-btn.active-timer span {
    animation: pomoPulse 2s infinite alternate;
}

@keyframes pomoPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 1px #ef4444); }
    100% { transform: scale(1.05); filter: drop-shadow(0 0 4px #ef4444); }
}

/* Mobile nav display helpers */
@media (max-width: 768px) {
    #mobile-pomo-nav-btn {
        display: flex !important;
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.7);
        color: var(--text-primary);
        cursor: pointer;
    }
    #mobile-pomo-nav-btn:hover {
        background: rgba(255, 255, 255, 0.9);
    }
    .pomo-btn-text {
        display: none !important;
    }
    .mobile-reminder-btn {
        display: flex !important;
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.7);
        color: var(--text-primary);
        cursor: pointer;
        order: 1 !important;
    }
    .mobile-reminder-btn:hover {
        background: rgba(255, 255, 255, 0.9);
    }
}

/* Reminders bell — active (enabled) state */
.reminder-toggle-btn.active {
    color: var(--accent-color) !important;
}
.reminder-toggle-btn.active svg {
    fill: rgba(45, 212, 191, 0.2);
}

/* Pomodoro Popup Overlay */
.pomo-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pomo-popup-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Glassmorphic Popup Panel (Centered HUD Card) */
.pomo-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    width: min(440px, 92vw);
    max-height: 90vh;
    z-index: 10201;
    background: rgba(8, 24, 23, 0.93);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(45, 212, 191, 0.22);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 24px rgba(45, 212, 191, 0.1);
    display: flex;
    flex-direction: column;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    color: #e2f1f0;
}

.pomo-popup.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.pomo-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(45, 212, 191, 0.12);
    padding-bottom: 14px;
    margin-bottom: 20px;
}

.pomo-popup-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2dd4bf;
    margin: 0;
    letter-spacing: -0.2px;
}

.pomo-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    outline: none;
}
.pomo-close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    transform: scale(1.05);
}

/* Timer Circle Visualization */
.pomo-timer-display-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.pomo-circle-container {
    position: relative;
    width: 170px;
    height: 170px;
}

.pomo-circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pomo-circle-bg {
    fill: none;
    stroke: rgba(45, 212, 191, 0.12);
    stroke-width: 4;
}

.pomo-circle-progress {
    fill: none;
    stroke: #2dd4bf;
    stroke-width: 4.5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 10px rgba(45, 212, 191, 0.5));
    transition: stroke-dashoffset 0.3s linear, stroke 0.3s ease;
}

.pomo-timer-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-shadow: 0 0 14px rgba(45, 212, 191, 0.35);
}

.pomo-session-status {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(45, 212, 191, 0.85);
    letter-spacing: 0.5px;
    text-align: center;
    min-height: 22px;
}

/* Controls Setup */
.pomo-section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(45, 212, 191, 0.7);
    margin-bottom: 10px;
}

.pomo-preset-btn {
    padding: 10px 0;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    background: rgba(45, 212, 191, 0.08);
    border: 1px solid rgba(45, 212, 191, 0.2);
    color: #e0f2f1;
    transition: all 0.2s ease;
    cursor: pointer;
}
.pomo-preset-btn:hover {
    background: rgba(45, 212, 191, 0.2);
    border-color: #2dd4bf;
    color: #ffffff;
    transform: translateY(-1px);
}

.pomo-custom-input {
    flex-grow: 1;
    padding: 10px 14px;
    font-size: 0.88rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(45, 212, 191, 0.25) !important;
    color: #ffffff !important;
}

.pomo-custom-input:focus {
    border-color: #2dd4bf !important;
}

/* Today's Focus Logs */
.pomo-logs-section {
    display: flex;
    flex-direction: column;
    margin-top: 14px;
    flex-grow: 1;
    min-height: 120px;
}

.pomo-logs-list {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 170px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.pomo-logs-list::-webkit-scrollbar {
    width: 4px;
}
.pomo-logs-list::-webkit-scrollbar-track {
    background: transparent;
}
.pomo-logs-list::-webkit-scrollbar-thumb {
    background: rgba(45, 212, 191, 0.25);
    border-radius: 2px;
}

.pomo-log-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 0.82rem;
}

.pomo-log-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: rgba(45, 212, 191, 0.75);
    white-space: nowrap;
    padding-top: 1px;
}

.pomo-log-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pomo-log-desc {
    color: #e2f1f0;
    word-break: break-word;
}

.pomo-log-meta {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
}

.pomo-log-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    padding: 24px 0;
}

/* Accomplishment Prompt Modal (Full Overlay Modal) */
.pomo-prompt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.pomo-prompt-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.pomo-prompt-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    width: min(480px, 92vw);
    z-index: 10301;
    background: rgba(8, 30, 28, 0.98);
    border: 1px solid rgba(45, 212, 191, 0.35);
    border-radius: 28px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    padding: 28px;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    color: #ffffff;
}

.pomo-prompt-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.pomo-prompt-header h3 {
    margin: 0 0 10px;
    font-family: 'Outfit', sans-serif;
    color: #2dd4bf;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
}

.pomo-prompt-body p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #b2dcd8;
    text-align: center;
    margin: 0 0 16px;
}

.pomo-prompt-textarea {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 14px;
    color: #ffffff;
    padding: 12px;
    font-size: 0.9rem;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
    margin-bottom: 20px;
}

.pomo-prompt-textarea:focus {
    border-color: #2dd4bf;
}

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

.pomo-prompt-actions .btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.pomo-prompt-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a5d5d0;
}
.pomo-prompt-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.pomo-prompt-actions .btn:not(.btn-secondary) {
    background: linear-gradient(135deg, #0c5855, #2dd4bf);
    border: none;
    color: #ffffff;
}
.pomo-prompt-actions .btn:not(.btn-secondary):hover {
    box-shadow: 0 4px 15px rgba(45, 212, 191, 0.4);
}

/* The drag scale is a registered property so it can transition on its own,
   independently of the position the drag loop writes. */
@property --pomo-drag-scale {
    syntax: '<number>';
    inherits: false;
    initial-value: 1;
}

/* Floating Mini-Timer Widget (PiP style) */
.pomo-mini-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10099;
    background: rgba(8, 26, 25, 0.88);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1.5px solid rgba(45, 212, 191, 0.35);
    border-radius: 20px;
    padding: 8px 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45), 0 0 12px rgba(45, 212, 191, 0.15);
    cursor: grab;
    user-select: none;
    touch-action: none; /* the drag owns the gesture; the page must not pan */
    display: flex;
    align-items: center;

    /* Position and scale are composed into one transform. The drag loop writes
       only the offsets, so hover/press scale can never fight it — and no
       transition sits on transform to fight the spring either. */
    --pomo-drag-x: 0px;
    --pomo-drag-y: 0px;
    --pomo-drag-scale: 1;
    transform: translate3d(var(--pomo-drag-x), var(--pomo-drag-y), 0)
               scale(var(--pomo-drag-scale));
    transition: box-shadow 0.2s,
                background-color 0.2s,
                --pomo-drag-scale 120ms ease-out;
}

/* Lifted while held: reads as picked up, and survives the whole drag. */
.pomo-mini-widget.is-dragging {
    cursor: grabbing;
    --pomo-drag-scale: 1.04;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 20px rgba(45, 212, 191, 0.28);
}

.pomo-mini-widget.is-dragging .pomo-mini-content {
    pointer-events: none;
}

@media (min-width: 769px) {
    .pomo-mini-widget {
        display: none !important;
    }
}

.pomo-mini-widget:hover {
    background: rgba(10, 32, 30, 0.95);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 16px rgba(45, 212, 191, 0.3);
}

.pomo-mini-content {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none; /* Let drag events fall to the outer container */
}

.pomo-mini-icon-svg {
    stroke: #2dd4bf;
    flex-shrink: 0;
    animation: minipulse 2s infinite alternate;
}

@keyframes minipulse {
    0% { filter: drop-shadow(0 0 0px rgba(45, 212, 191, 0)); }
    100% { filter: drop-shadow(0 0 3px rgba(45, 212, 191, 0.7)); }
}

.pomo-mini-timer-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Adjust position on mobile to clear bottom navigation bar */
@media (max-width: 768px) {
    .pomo-mini-widget {
        bottom: 84px;
        right: 16px;
        padding: 6px 12px;
    }
    .pomo-mini-timer-text {
        font-size: 0.82rem;
    }
}

/* Picture in Picture Window Styling (Luxury Frosted Horizon) */
.pomo-pip-body {
    background: radial-gradient(circle at center, #0e2725 0%, #061514 100%) !important;
    color: #e2f1f0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.pomo-pip-time {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 2.6rem !important;
    font-weight: 700 !important;
    color: #2dd4bf !important;
    line-height: 1.1 !important;
    letter-spacing: -0.5px !important;
    text-shadow: 0 0 18px rgba(45, 212, 191, 0.5) !important;
}

.pomo-pip-label {
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: rgba(45, 212, 191, 0.6) !important;
    margin-top: 4px !important;
    font-weight: 600 !important;
}

.pomo-pip-controls {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 10px !important;
}

.pomo-pip-icon-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(45, 212, 191, 0.3) !important;
    color: #2dd4bf !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: background 0.2s, transform 0.15s, border-color 0.2s, box-shadow 0.2s !important;
}

.pomo-pip-icon-btn:hover {
    background: rgba(45, 212, 191, 0.22) !important;
    border-color: rgba(45, 212, 191, 0.6) !important;
    transform: scale(1.08) !important;
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.35) !important;
}

.pomo-pip-icon-btn:active {
    transform: scale(0.95) !important;
}

.pomo-analytic-tag {
    cursor: default;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
}

.pomo-analytic-tag:hover {
    transform: scale(1.06) translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.25);
    border-color: rgba(45, 212, 191, 0.5) !important;
    background: rgba(45, 212, 191, 0.2) !important;
}




/* ═══════════════════════════════════════════════════
   24-HOUR FOCUS DAY VIEW MODAL
   ═══════════════════════════════════════════════════ */

/* "My Day" button inside pomo popup */
.pomo-day-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.25);
    color: #2dd4bf;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    letter-spacing: 0.3px;
}
.pomo-day-view-btn:hover {
    background: rgba(45, 212, 191, 0.2);
    border-color: rgba(45, 212, 191, 0.5);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.2);
}

/* Overlay */
.day-view-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.day-view-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Modal */
.day-view-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.96);
    width: min(920px, 95vw);
    max-height: 88vh;
    z-index: 10501;
    background: rgba(6, 22, 20, 0.97);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 24px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9), 0 0 60px rgba(45, 212, 191, 0.07);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    overflow: hidden;
}
.day-view-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

/* Header */
.day-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(45, 212, 191, 0.12);
    flex-shrink: 0;
}
.day-view-icon {
    width: 38px;
    height: 38px;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.day-view-title {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}
.day-view-subtitle {
    font-size: 0.78rem;
    color: rgba(45, 212, 191, 0.7);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

/* Body */
.day-view-body {
    padding: 20px 24px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Ruler + Track wrapper */
.day-ruler-wrapper {
    position: relative;
    user-select: none;
}

/* 24-hour ruler row */
.day-ruler {
    display: flex;
    justify-content: space-between;
    padding: 0 0 6px 0;
}
.day-ruler-mark {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    width: calc(100% / 24);
    text-align: left;
}
.day-ruler-mark:last-child {
    text-align: right;
    width: auto;
}

/* Session track */
.day-track {
    position: relative;
    height: 64px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: visible;
}

/* Hour grid lines inside track */
.day-track::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 0px,
        rgba(255,255,255,0.05) 1px,
        transparent 1px,
        transparent calc(100% / 24)
    );
    border-radius: 12px;
    pointer-events: none;
}

/* Session block */
.day-session-block {
    position: absolute;
    top: 8px;
    height: 48px;
    min-width: 6px;
    background: linear-gradient(135deg, #0c9e93, #2dd4bf);
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(45, 212, 191, 0.3);
    border: 1px solid rgba(45, 212, 191, 0.4);
}
.day-session-block:hover {
    filter: brightness(1.15);
    transform: scaleY(1.06);
    box-shadow: 0 4px 18px rgba(45, 212, 191, 0.5);
    z-index: 2;
}
.day-session-block.selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.4), 0 4px 18px rgba(45, 212, 191, 0.5);
    filter: brightness(1.15);
}
.day-session-block-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.75);
    white-space: nowrap;
    overflow: hidden;
    padding: 0 5px;
    text-overflow: ellipsis;
    pointer-events: none;
}

/* Now line */
.day-now-line {
    position: absolute;
    top: -8px;
    bottom: -8px;
    width: 2px;
    background: #ef4444;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
    z-index: 5;
    pointer-events: none;
    display: none;
}
.day-now-line::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.9);
}

/* Legend */
.day-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.day-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Outfit', sans-serif;
}
.day-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

/* Detail panel */
.day-detail-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 20px;
    min-height: 90px;
    display: flex;
    align-items: center;
}
.day-detail-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.82rem;
    font-family: 'Outfit', sans-serif;
    width: 100%;
    justify-content: center;
}
.day-detail-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.day-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.day-detail-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(45, 212, 191, 0.6);
    font-family: 'JetBrains Mono', monospace;
    min-width: 65px;
}
.day-detail-value {
    font-size: 0.88rem;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}
.day-detail-log-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.day-detail-log-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Outfit', sans-serif;
    line-height: 1.5;
    flex: 1;
}

/* Scrollbar for day-view-body */
.day-view-body::-webkit-scrollbar { width: 4px; }
.day-view-body::-webkit-scrollbar-track { background: transparent; }
.day-view-body::-webkit-scrollbar-thumb { background: rgba(45, 212, 191, 0.3); border-radius: 4px; }

/* ── Focus History Controls Bar & Tabs ── */
.focus-modal-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(45, 212, 191, 0.12);
    flex-wrap: wrap;
    gap: 12px;
}

.focus-view-tabs {
    display: flex;
    align-items: center;
    background: rgba(12, 88, 85, 0.06);
    padding: 3px;
    border-radius: 12px;
    border: 1px solid rgba(12, 88, 85, 0.1);
}

.focus-view-tab {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 9px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #475569);
    cursor: pointer;
    transition: all 0.2s ease;
}

.focus-view-tab:hover {
    color: var(--text-primary, #0f172a);
}

.focus-view-tab.active {
    background: #0c8882;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(12, 136, 130, 0.3);
}

.focus-date-navigator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.focus-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(12, 88, 85, 0.08);
    border: 1px solid rgba(12, 88, 85, 0.15);
    color: var(--text-primary, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s;
}

.focus-nav-btn:hover {
    background: #0c8882;
    border-color: #0c8882;
    color: #ffffff;
}

.focus-date-display {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    min-width: 140px;
    text-align: center;
}

.focus-today-badge {
    background: rgba(45, 212, 191, 0.15);
    border: 1px solid rgba(45, 212, 191, 0.3);
    color: #2dd4bf;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.focus-today-badge:hover {
    background: #2dd4bf;
    color: #061614;
}

/* ── Mobile-First Responsive Analytics & Focus Highlights ── */
.analytics-summary-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-three-plots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.pomo-split-grid {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 20px;
    width: 100%;
    align-items: stretch;
}

.audit-micro-panel-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: start;
}

.analytics-chart-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.pomo-chart-wrapper {
    width: 100%;
    position: relative;
    height: 440px;
    min-height: 380px;
}

@media (max-width: 992px) {
    .analytics-three-plots-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .pomo-split-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .audit-micro-panel-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .pomo-chart-wrapper {
        height: 320px !important;
        min-height: 260px !important;
    }

    .pomo-stats-bracket {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 14px !important;
    }

    .pomo-stats-bracket > div:first-child {
        grid-column: 1 / -1;
        margin-bottom: 2px !important;
    }

    .pomo-stats-bracket > .bracket-metric-card:last-child {
        grid-column: 1 / -1;
    }

    .bracket-metric-card {
        padding: 10px 12px !important;
    }

    .bracket-metric-card div:first-child {
        font-size: 0.72rem !important;
    }

    .bracket-metric-card span[id] {
        font-size: 1.05rem !important;
    }
}

@media (max-width: 600px) {
    .analytics-summary-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .analytics-header-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 14px !important;
    }

    .analytics-controls-wrap {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .focus-view-tabs {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .focus-view-tab {
        flex: 1 !important;
        text-align: center !important;
        padding: 8px 0 !important;
        font-size: 0.88rem !important;
    }

    .focus-date-navigator {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .focus-nav-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.1rem !important;
    }

    .focus-date-display {
        font-size: 0.95rem !important;
        flex: 1 !important;
    }

    .focus-today-badge {
        padding: 6px 12px !important;
        font-size: 0.82rem !important;
    }

    .pomo-stats-bracket {
        grid-template-columns: 1fr !important;
    }

    .pomo-stats-bracket > .bracket-metric-card:last-child {
        grid-column: auto !important;
    }
}

/* Ultra-Narrow Foldable Screen Fixes (e.g. Z Fold 7 folded ~344px - 400px) */
@media (max-width: 480px) {
    .analytics-section {
        padding: 4px 0 !important;
        overflow-x: hidden !important;
    }

    .glass-panel {
        padding: 12px !important;
        border-radius: 12px !important;
        margin-bottom: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .panel-title {
        font-size: 0.95rem !important;
        word-break: break-word !important;
    }

    .chart-wrapper {
        height: 220px !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .pomo-chart-wrapper {
        height: 260px !important;
        min-height: 200px !important;
    }

    #auditTimelineGrid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)) !important;
        gap: 6px !important;
    }
}

/* ── Focus Stats Row ── */
.focus-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.focus-stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.focus-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #2dd4bf;
    line-height: 1.1;
}

.focus-stat-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
}

/* ── Week View Bar Chart ── */
.week-chart-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 16px 14px;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 180px;
    gap: 8px;
}

.week-bar-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 6px;
    cursor: pointer;
}

.week-bar-track {
    width: 100%;
    max-width: 32px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.week-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, #2dd4bf, #0c9e93);
    border-radius: 8px;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 2px;
}

.week-bar-column.is-today .week-bar-fill {
    background: linear-gradient(180deg, #38bdf8, #0284c7);
}

.week-bar-val {
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    color: rgba(255, 255, 255, 0.6);
}

.week-bar-day {
    font-size: 0.72rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.week-bar-column.is-today .week-bar-day {
    color: #38bdf8;
}

/* ── Month Calendar Grid ── */
.month-calendar-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
}

.month-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
}

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

.month-day-cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.month-day-cell:hover {
    border-color: rgba(45, 212, 191, 0.5);
    transform: scale(1.05);
}

.month-day-cell.empty {
    opacity: 0;
    pointer-events: none;
}

.month-day-cell.has-focus {
    background: rgba(45, 212, 191, 0.15);
    border-color: rgba(45, 212, 191, 0.35);
    color: #2dd4bf;
}

.month-day-cell.high-focus {
    background: rgba(45, 212, 191, 0.35);
    border-color: #2dd4bf;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.3);
}

.month-day-cell.is-today {
    box-shadow: 0 0 0 2px #38bdf8;
}

.month-cell-badge {
    font-size: 0.55rem;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.8;
    margin-top: 1px;
}

/* ── Focus History Log List ── */
.focus-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.focus-history-day-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.focus-history-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #2dd4bf;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 6px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.focus-history-day-header:hover {
    color: #5eead4;
}

.focus-history-day-header .history-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
    margin-right: 6px;
}

.focus-history-day-logs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
}

.focus-history-day-logs.collapsed {
    display: none;
}

/* ── Eisenhower View Mode Switcher (Matrix vs Signal & Noise) ── */
.eisen-mode-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.eisen-mode-btn:hover {
    color: #ffffff;
}

.eisen-mode-btn.active {
    background: #2dd4bf;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.3);
}

.eisenhower-column.mode-signal .priority-block.urgent_important {
    border: 2px solid #2dd4bf !important;
    background: rgba(45, 212, 191, 0.12) !important;
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.18);
    position: relative;
}

.eisenhower-column.mode-signal .priority-block.urgent_important .priority-header::after {
    content: " ⚡ SIGNAL";
    font-size: 0.65rem;
    font-weight: 800;
    background: #2dd4bf;
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.eisenhower-column.mode-signal .priority-block:not(.urgent_important) {
    opacity: 0.72;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(0, 0, 0, 0.15) !important;
}

.eisenhower-column.mode-signal .priority-block:not(.urgent_important) .priority-header::after {
    content: " 💤 NOISE";
    font-size: 0.62rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 6px;
}

/* ── Timeline Zoom Toolbar ── */
.timeline-zoom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 8px;
}

.zoom-label {
    font-size: 0.76rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.zoom-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-zoom-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.timeline-zoom-btn:hover {
    background: rgba(45, 212, 191, 0.25);
    border-color: #2dd4bf;
    color: #2dd4bf;
}

.timeline-zoom-btn.reset {
    width: auto;
    padding: 0 8px;
    font-size: 0.7rem;
}

.zoom-value-badge {
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #2dd4bf;
    min-width: 42px;
    text-align: center;
}

.day-ruler-wrapper {
    position: relative;
    user-select: none;
    overflow-x: auto;
    padding-bottom: 6px;
    max-width: 100%;
}

.day-ruler-wrapper::-webkit-scrollbar {
    height: 5px;
}
.day-ruler-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
.day-ruler-wrapper::-webkit-scrollbar-thumb {
    background: rgba(45, 212, 191, 0.4);
    border-radius: 4px;
}

.day-ruler, .day-track {
    transition: min-width 0.25s ease, width 0.25s ease;
    min-width: 100%;
}

/* ── Samsung Z Fold 7 & Narrow Folded Screen Responsive Fixes (< 480px) ── */
@media (max-width: 480px) {
    .pomo-day-modal {
        width: 96% !important;
        max-width: 100vw !important;
        margin: 6px auto !important;
        border-radius: 14px !important;
        max-height: 94vh !important;
    }

    .day-view-header {
        padding: 10px 14px !important;
        gap: 8px !important;
    }

    .day-view-title {
        font-size: 1rem !important;
    }

    .focus-modal-controls-bar {
        padding: 8px 12px !important;
        gap: 8px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .focus-view-tabs {
        width: 100% !important;
        justify-content: space-around !important;
    }

    .focus-view-tab {
        flex: 1 !important;
        text-align: center !important;
        padding: 6px 8px !important;
    }

    .focus-date-navigator {
        width: 100% !important;
        justify-content: center !important;
    }

    .day-view-body {
        padding: 12px 14px !important;
        gap: 14px !important;
    }

    .focus-stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .focus-stat-card {
        padding: 10px 12px !important;
    }

    .focus-stat-value {
        font-size: 1.15rem !important;
    }

    .timeline-zoom-bar {
        padding: 4px 8px !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .eisenhower-header-bar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .view-mode-toggle-group {
        width: 100% !important;
    }

    .eisen-mode-btn {
        flex: 1 !important;
        text-align: center !important;
    }

    /* MOBILE RESPONSIVE STYLES FOR PRODUCTIVE ANALYTICS */
    .analytics-section {
        margin-top: 12px;
    }

    .analytics-summary-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin-bottom: 16px !important;
    }

    .analytics-two-plots-grid,
    .analytics-three-plots-grid,
    .audit-micro-panel-grid,
    .pomo-split-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin-bottom: 16px !important;
    }

    .analytics-chart-panel {
        min-height: 280px !important;
        padding: 16px !important;
    }

    .chart-wrapper {
        min-height: 240px !important;
        height: 250px !important;
    }

    .pomo-chart-wrapper {
        min-height: 350px !important;
        height: 380px !important;
    }

    .analytics-header-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 14px 16px !important;
    }

    .analytics-controls-wrap {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .analytics-controls-wrap .focus-view-tabs {
        width: 100% !important;
        display: flex !important;
    }

    .analytics-controls-wrap .focus-view-tab {
        flex: 1 !important;
        text-align: center !important;
        padding: 8px 12px !important;
    }

    .analytics-controls-wrap .focus-date-navigator {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .analytics-controls-wrap .focus-date-display {
        flex: 1 !important;
        text-align: center !important;
        min-width: auto !important;
    }
}

.analytics-chart-panel {
    min-height: 380px;
}

.chart-wrapper {
    min-height: 300px;
    height: 320px;
}

.pomo-chart-wrapper {
    height: 460px !important;
    min-height: 420px !important;
}

/* ==========================================================================
   PRESS FEEDBACK
   Feedback belongs on pointer-down, not on release. Hover does nothing on
   touch, so without these the installed PWA gives no response at all until
   the server answers. Compositor-friendly (transform only) and fast enough
   to read as instant.
   ========================================================================== */

.btn,
.btn-secondary,
.nav-btn,
.nav-link,
.action-btn,
.today-badge,
.todo-item,
.todo-checkbox,
.project-item,
.project-sort-btn,
.close-panel-btn,
.add-priority-task-btn,
.p-btn,
.priority-dot-wrapper,
.pomo-btn,
.pomo-close-btn,
.pomo-preset-btn,
.pomo-nav-btn,
.pomo-pip-icon-btn,
.pomo-day-view-btn,
.pomo-log-item,
.focus-view-tab,
.focus-nav-btn,
.focus-today-badge,
.eisen-mode-btn,
.timeline-zoom-btn,
.zoom-btn,
.reminder-toggle-btn,
.mobile-reminder-btn,
.mobile-tab-bar .tab-btn,
#mobile-pomo-nav-btn,
#mobile-toggle-projects-btn,
.day-session-block,
.focus-history-day-header {
    transition: transform 100ms ease-out,
                background-color 200ms ease,
                opacity 200ms ease;
}

/* Buttons and controls: firm push. */
.btn:active,
.btn-secondary:active,
.nav-btn:active,
.nav-link:active,
.action-btn:active,
.today-badge:active,
.todo-checkbox:active,
.project-sort-btn:active,
.close-panel-btn:active,
.add-priority-task-btn:active,
.p-btn:active,
.priority-dot-wrapper:active,
.pomo-btn:active,
.pomo-close-btn:active,
.pomo-preset-btn:active,
.pomo-nav-btn:active,
.pomo-pip-icon-btn:active,
.pomo-day-view-btn:active,
.focus-view-tab:active,
.focus-nav-btn:active,
.focus-today-badge:active,
.eisen-mode-btn:active,
.timeline-zoom-btn:active,
.zoom-btn:active,
.reminder-toggle-btn:active,
.mobile-reminder-btn:active,
.mobile-tab-bar .tab-btn:active,
#mobile-pomo-nav-btn:active,
#mobile-toggle-projects-btn:active {
    transform: scale(0.94);
}

/* Large rows: a smaller scale reads as a press without looking like a jump. */
.todo-item:active,
.project-item:active,
.pomo-log-item:active,
.day-session-block:active,
.focus-history-day-header:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.85);
}

/* A row being dragged is not being pressed — don't stack the two transforms. */
.todo-item.dragging:active,
.project-item.dragging:active {
    transform: scale(0.98);
}

/* Touch has no hover, so row actions must be reachable without one. */
@media (hover: none) {
    .todo-actions,
    .project-actions {
        opacity: 1;
    }
}

/* ==========================================================================
   ACCESSIBILITY PREFERENCES
   Three independent signals. Reduced motion still keeps feedback — it just
   stops using movement to deliver it.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 150ms !important;
        scroll-behavior: auto !important;
    }

    /* Full-viewport looping background: stop it, keep the colour. */
    .ambient-bg {
        animation: none;
        background-position: 0% 50%;
    }

    /* Slides and springs become cross-fades; no travel, no overshoot.
       The popup keeps its centring transform — only the scale/offset goes. */
    .projects-sidebar {
        transform: none !important;
        opacity: 0;
        pointer-events: none;
    }

    .projects-sidebar.open {
        opacity: 1;
        pointer-events: auto;
    }

    .pomo-popup,
    .pomo-popup.open {
        transform: translate(-50%, -50%) !important;
    }

    /* Attention loops become a static state. */
    .pomo-nav-btn.active-timer span,
    .pomo-mini-widget {
        animation: none !important;
    }

    /* Press feedback survives, expressed as tone rather than movement. */
    .btn:active,
    .nav-btn:active,
    .nav-link:active,
    .action-btn:active,
    .todo-item:active,
    .project-item:active,
    .pomo-btn:active,
    .focus-view-tab:active,
    .eisen-mode-btn:active {
        transform: none !important;
        filter: brightness(0.92);
    }
}

@media (prefers-reduced-transparency: reduce) {
    :root {
        --card-bg: #ffffff;
        --backdrop-blur: none;
        --card-border: 1px solid rgba(12, 88, 85, 0.18);
    }

    .glass-panel,
    .app-header,
    .projects-sidebar,
    .pomo-mini-widget {
        background: #ffffff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .pomo-popup {
        background: #081817;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .projects-sidebar-overlay,
    .pomo-popup-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(0, 0, 0, 0.55);
    }

    .todo-item,
    .project-item {
        background: #f6faf9;
    }
}

@media (prefers-contrast: more) {
    :root {
        --card-bg: #ffffff;
        --text-secondary: #2c4a49;
        --card-border: 1px solid rgba(12, 88, 85, 0.45);
    }

    .glass-panel,
    .app-header,
    .todo-item,
    .project-item {
        background: #ffffff;
        border: 1px solid rgba(12, 88, 85, 0.45);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .todo-checkbox {
        border-width: 2px;
        border-color: rgba(12, 88, 85, 0.7);
    }

    .nav-link.active,
    .today-badge {
        outline: 1px solid var(--accent-hover);
    }
}





