/* ── Variables (iOS Dark) ──────────────────────────────────── */
:root {
    --bg:           #000000;
    --bg-2:         #1c1c1e;
    --bg-3:         #2c2c2e;
    --bg-hover:     #3a3a3c;
    --border:       rgba(255,255,255,0.1);
    --border-2:     rgba(255,255,255,0.05);

    --text:         #ffffff;
    --text-2:       rgba(235,235,245,0.6);
    --text-3:       rgba(235,235,245,0.3);

    --accent:       #7c3aed;
    --accent-hover: #6d28d9;
    --accent-light: rgba(124, 58, 237, 0.15);

    --success:      #30d158;
    --success-text: #30d158;

    --warning:      #ff9f0a;
    --warning-text: #ff9f0a;
    --warning-bg:   rgba(255,159,10,0.10);

    --danger:       #ff453a;
    --danger-text:  #ff453a;
    --danger-bg:    rgba(255,69,58,0.10);
    --danger-light: rgba(255,69,58,0.15);

    --sidebar-w: 260px;
    --header-h:  56px;
    --radius:    14px;
    --radius-sm: 10px;

    --glass-bg:         rgba(28,28,30,0.72);
    --glass-blur:       blur(20px) saturate(180%);
    --shadow-sm:        0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:        0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg:        0 8px 32px rgba(0,0,0,0.4);
    --transition-spring: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Light Mode (iOS Light) ───────────────────────────────── */
body.light {
    --bg:           #f2f2f7;
    --bg-2:         #ffffff;
    --bg-3:         #e5e5ea;
    --bg-hover:     #d1d1d6;
    --border:       rgba(0,0,0,0.08);
    --border-2:     rgba(0,0,0,0.04);

    --text:         #000000;
    --text-2:       rgba(60,60,67,0.6);
    --text-3:       rgba(60,60,67,0.3);

    --accent:       #7c3aed;
    --accent-hover: #6d28d9;
    --accent-light: rgba(124, 58, 237, 0.10);

    --success:      #34c759;
    --success-text: #34c759;

    --warning:      #ff9500;
    --warning-text: #ff9500;
    --warning-bg:   rgba(255,149,0,0.10);

    --danger:       #ff3b30;
    --danger-text:  #ff3b30;
    --danger-bg:    rgba(255,59,48,0.08);
    --danger-light: rgba(255,59,48,0.12);

    --glass-bg:         rgba(255,255,255,0.72);
    --glass-blur:       blur(20px) saturate(180%);
    --shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:        0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg:        0 8px 32px rgba(0,0,0,0.12);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.47;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ────────────────────────────────────────────────── */
.app {
    display: flex;
    height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-right: none;
    box-shadow: 1px 0 0 var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

@supports not (backdrop-filter: blur(20px)) {
    .sidebar { background: var(--bg-2); }
}

.sidebar-header {
    padding: 20px 18px 16px;
    border-bottom: none;
    flex-shrink: 0;
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px 18px;
    font-size: 11px;
    color: var(--text-3);
    border-top: 1px solid var(--border-2);
    flex-shrink: 0;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.logo-icon {
    width: 30px;
    height: 30px;
    background: var(--accent);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
}

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
    flex: 1;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.nav-section-header {
    padding: 14px 10px 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-3);
}

.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: none;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s var(--transition-spring), color 0.2s;
    text-align: left;
}

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

.nav-btn.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.nav-btn.drop-target {
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: inset 2px 0 0 var(--accent);
    font-weight: 600;
}

.nav-icon {
    font-size: 15px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.nav-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-badge {
    background: var(--bg-3);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-divider {
    height: 0.5px;
    background: var(--border);
    margin: 10px 12px;
}

/* ── Category delete button ─────────────────────────────────── */
.nav-item-wrap {
    display: flex;
    align-items: center;
}

.nav-item-wrap .nav-btn {
    flex: 1;
    min-width: 0;
}

.cat-delete-btn {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 5px 6px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
    line-height: 1;
    margin-right: 4px;
}

.nav-item-wrap:hover .cat-delete-btn {
    opacity: 1;
}

.cat-delete-btn:hover {
    color: var(--danger-text);
    background: var(--danger-bg);
}

.add-category-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: none;
    background: none;
    color: var(--accent);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
    width: 100%;
    margin-top: 4px;
}

.add-category-btn:hover {
    background: var(--accent-light);
}

/* ── Main ───────────────────────────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.main-header {
    height: var(--header-h);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: none;
    box-shadow: 0 0.5px 0 var(--border);
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    flex-shrink: 0;
    gap: 16px;
    position: relative;
}

@supports not (backdrop-filter: blur(20px)) {
    .main-header { background: var(--bg); }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Weather Widget ─────────────────────────────────────────── */
.header-weather {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-3);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.header-weather:hover {
    background: var(--bg-hover);
}

.weather-icon {
    font-size: 18px;
    line-height: 1;
}

.weather-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.weather-current {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.weather-range {
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.2;
    white-space: nowrap;
}

.weather-city {
    font-size: 12px;
    color: var(--text-3);
    border-left: 1px solid var(--border-2);
    padding-left: 8px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 680px) {
    .weather-city { display: none; }
    .header-weather { padding: 4px 8px; gap: 5px; }
}

/* ── Theme Toggle ───────────────────────────────────────────── */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--radius);
    transition: background 0.15s;
}

.theme-toggle:hover {
    background: var(--bg-3);
}

.theme-toggle-track {
    width: 44px;
    height: 26px;
    background: var(--bg-3);
    border: none;
    border-radius: 13px;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: background 0.3s;
    flex-shrink: 0;
}

body.light .theme-toggle-track {
    background: var(--accent);
}

.theme-toggle-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.3s var(--transition-spring);
}

body.light .theme-toggle-thumb {
    transform: translateX(18px);
    background: white;
}

.theme-toggle-icon {
    font-size: 14px;
    line-height: 1;
}

.view-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.view-count {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
}

/* ── Header Clock ───────────────────────────────────────────── */
.header-clock {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    pointer-events: none;
    user-select: none;
}

.clock-time {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.clock-date {
    font-size: 13px;
    color: var(--text-2);
    letter-spacing: 0.03em;
}

/* ── Stats Bar ──────────────────────────────────────────────── */
.stats-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-bottom: 0.5px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    white-space: nowrap;
    transition: all 0.2s var(--transition-spring);
}

.stat-chip-total {
    background: var(--bg-3);
    color: var(--text);
}

.stat-chip-overdue {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.stat-chip-today {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.stat-chip-upcoming {
    background: rgba(48, 209, 88, 0.10);
    color: var(--success-text);
}

.stat-chip-nodate {
    background: var(--bg-3);
    color: var(--text-3);
}

.stat-chip[data-count="0"] {
    opacity: 0.35;
}

/* Active filter state */
.stat-chip.filter-active {
    font-weight: 700;
    box-shadow: 0 0 0 2px currentColor;
}

.stat-chip.filter-active.stat-chip-total {
    box-shadow: 0 0 0 2px var(--text-2);
}

/* Hover on filterable chips */
.stat-chip[style*="pointer"] {
    transition: all 0.2s var(--transition-spring);
}

.stat-chip[style*="pointer"]:hover {
    transform: scale(0.97);
    opacity: 0.85;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
}

.menu-toggle:hover {
    background: var(--bg-3);
    color: var(--text);
}

/* ── Task Container ─────────────────────────────────────────── */
.task-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 40px;
}

#task-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Priority Sections ──────────────────────────────────────── */
.priority-section {
    min-height: 4px;
    background: var(--bg-2);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 4px;
}

.priority-section-header {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    padding: 12px 16px 6px;
}

.priority-section.priority-high .priority-section-header {
    color: var(--danger-text);
}

.priority-drop-hint {
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
    padding: 8px 0;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    margin: 2px 0 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.priority-section.drag-over .priority-drop-hint {
    opacity: 1;
}

/* ── Drag & Drop ────────────────────────────────────────────── */
.task-drag-handle {
    color: var(--text-3);
    font-size: 18px;
    cursor: grab;
    padding: 0 2px 0 0;
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
    align-self: center;
    line-height: 1;
    user-select: none;
}

.task-card:hover .task-drag-handle {
    opacity: 1;
}

.task-drag-handle:active {
    cursor: grabbing;
}

.task-card.dragging {
    opacity: 0.35;
    border-style: dashed;
}

.drop-indicator {
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    margin: 2px 0;
    pointer-events: none;
    box-shadow: 0 0 8px var(--accent-light);
}

/* ── Priority Toggle (iOS Segmented Control) ──────────────── */
.priority-toggle {
    display: flex;
    gap: 0;
    background: var(--bg-3);
    border-radius: 10px;
    padding: 2px;
}

.prio-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.25s var(--transition-spring);
}

.prio-btn:hover {
    color: var(--text);
}

.prio-btn.prio-active[data-prio="normal"] {
    background: var(--bg-2);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
}

.prio-btn.prio-active[data-prio="high"] {
    background: var(--danger-bg);
    color: var(--danger-text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
}

/* High priority card: subtle red background tint */
.priority-section.priority-high .task-card:not(.task-overdue):not(.task-today) {
    background: rgba(255,69,58,0.05);
}

/* ── Task Card ──────────────────────────────────────────────── */
.task-card {
    background: var(--bg-2);
    border: none;
    border-left: none;
    border-radius: 0;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background 0.2s;
    cursor: default;
    position: relative;
}

.task-card + .task-card {
    box-shadow: inset 0 0.5px 0 var(--border);
}

.task-card:hover {
    background: var(--bg-hover);
}

/* Status: Today */
.task-card.task-today {
    background: var(--warning-bg);
}

.task-card.task-today:hover {
    background: rgba(255,159,10,0.15);
}

/* Status: Overdue */
.task-card.task-overdue {
    background: var(--danger-bg);
    animation: overdue-glow 2.8s ease-in-out infinite;
}

.task-card.task-overdue:hover {
    background: rgba(255,69,58,0.15);
}

@keyframes overdue-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 69, 58, 0); }
    50%       { box-shadow: 0 0 12px rgba(255, 69, 58, 0.10); }
}

/* Status: Archived */
.task-card.task-archived {
    opacity: 0.5;
    animation: none;
}

/* ── Checkbox ───────────────────────────────────────────────── */
.task-check-area {
    display: flex;
    align-items: flex-start;
    padding-top: 1px;
    cursor: pointer;
    flex-shrink: 0;
}

.task-checkbox {
    display: none;
}

.task-checkmark {
    width: 19px;
    height: 19px;
    border: 2px solid var(--text-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    flex-shrink: 0;
}

.task-check-area:hover .task-checkmark {
    border-color: var(--accent);
    background: var(--accent-light);
}

.task-card.task-today .task-check-area:hover .task-checkmark {
    border-color: var(--warning);
    background: var(--warning-bg);
}

.task-card.task-overdue .task-check-area:hover .task-checkmark {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.task-checkbox:checked + .task-checkmark {
    background: var(--success);
    border-color: var(--success);
}

.task-checkbox:checked + .task-checkmark::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* ── Task Content ───────────────────────────────────────────── */
.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
    line-height: 1.45;
}

.task-title-done {
    text-decoration: line-through;
    color: var(--text-3);
}

.task-desc {
    font-size: 12.5px;
    color: var(--text-2);
    margin-top: 4px;
    word-break: break-word;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
    align-items: center;
}

.task-tag {
    font-size: 12px;
    padding: 3px 10px;
    background: var(--bg-3);
    color: var(--text-2);
    border-radius: 12px;
    border: none;
    white-space: nowrap;
}

.tag-recurring {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
    border-color: rgba(124, 58, 237, 0.3);
}

.task-date {
    font-size: 12px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 3px;
}

.date-today {
    color: var(--warning-text);
    font-weight: 600;
}

.date-overdue {
    color: var(--danger-text);
    font-weight: 600;
}

/* ── Edit Button ────────────────────────────────────────────── */
.task-edit-btn {
    background: none;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    padding: 4px 7px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    flex-shrink: 0;
    line-height: 1;
}

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

.task-edit-btn:hover {
    color: var(--accent);
    background: var(--accent-light);
}

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 6px;
}

.empty-icon {
    font-size: 52px;
    margin-bottom: 10px;
    opacity: 0.4;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-2);
}

.empty-sub {
    font-size: 13px;
    color: var(--text-3);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--transition-spring);
    white-space: nowrap;
    line-height: 1.4;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(0.98);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
}

.btn-ghost:hover {
    background: var(--accent-light);
}

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

.btn-danger:hover {
    background: #cc2d22;
    transform: scale(0.98);
}

.btn-danger-ghost {
    background: transparent;
    color: var(--danger-text);
}

.btn-danger-ghost:hover {
    background: var(--danger-bg);
}

/* ── Modal Overlay ──────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 0;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-2);
    border: none;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s var(--transition-spring);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.visible .modal {
    transform: translateY(0);
}

/* Desktop: centered modal */
@media (min-width: 768px) {
    .modal-overlay { align-items: center; padding: 16px; }
    .modal { border-radius: 20px; max-height: 85vh; }
}

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

/* iOS Sheet Handle */
.modal-handle {
    width: 36px;
    height: 5px;
    background: var(--text-3);
    border-radius: 3px;
    margin: 8px auto 0;
    flex-shrink: 0;
}

.modal-header {
    padding: 16px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.modal-close {
    background: var(--bg-3);
    border: none;
    color: var(--text-2);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.modal-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    padding: 0 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.footer-right {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* ── Form Fields ────────────────────────────────────────────── */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.field-input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 16px;
    padding: 10px 14px;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.field-input.field-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-light);
}

.field-textarea {
    resize: vertical;
    min-height: 76px;
    line-height: 1.5;
}

.field-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b949e'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.field-select option {
    background: var(--bg-2);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Custom Checkbox ────────────────────────────────────────── */
.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 44px;
    height: 26px;
    border: none;
    border-radius: 13px;
    background: var(--bg-3);
    transition: background 0.3s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 2px;
    position: relative;
}

.checkbox-custom::after {
    content: '';
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.3s var(--transition-spring);
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--accent);
}

.checkbox-input:checked + .checkbox-custom::after {
    transform: translateX(18px);
    content: '';
    color: transparent;
    font-size: 0;
}

.checkbox-label {
    font-size: 14px;
    color: var(--text);
}

.interval-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
}

.interval-input {
    width: 72px;
    text-align: center;
}

/* ── Confirm Message ────────────────────────────────────────── */
.confirm-message {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
}

/* ── Mobile Sidebar Overlay ─────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Scrollbar (iOS Thin) ───────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-3); border-radius: 3px; opacity: 0.5; }
::-webkit-scrollbar-thumb:hover { background: var(--text-2); }

/* ── Date/Time picker dark fix ──────────────────────────────── */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

/* ── Responsive ─────────────────────────────────────────────── */
/* ── Task Project Badge ──────────────────────────────────────── */
.tag-project {
    background: rgba(124, 58, 237, 0.18);
    color: #c4b5fd;
    border-color: rgba(124, 58, 237, 0.35);
    cursor: pointer;
}

.task-card.task-is-project {
    cursor: pointer;
}

/* ── Field extras ───────────────────────────────────────────── */
.field-divider-wrap {
    margin: 4px 0;
}

.field-divider {
    height: 1px;
    background: var(--border-2);
}

.field-hint {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
    line-height: 1.4;
}

.checkbox-project {
    background: var(--accent-light) !important;
}

.checkbox-input:checked + .checkbox-project {
    background: var(--accent) !important;
}

/* ── Project Container ──────────────────────────────────────── */
.project-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ── Project Hero ───────────────────────────────────────────── */
.project-hero {
    padding: 24px 28px 20px;
    border-bottom: none;
    box-shadow: 0 0.5px 0 var(--border);
    background: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, transparent 60%);
    flex-shrink: 0;
}

.project-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.project-hero-info {
    min-width: 0;
}

.project-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.project-desc-text {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.5;
}

.project-progress-wrap {
    margin-top: 4px;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-2);
}

.progress-pct {
    font-weight: 600;
    color: var(--accent);
}

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

.progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* ── Project Tabs ───────────────────────────────────────────── */
.proj-tabs {
    display: flex;
    gap: 2px;
    padding: 12px 28px 0;
    border-bottom: 0.5px solid var(--border);
    flex-shrink: 0;
    background: var(--bg);
}

.proj-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px 10px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.proj-tab-btn:hover {
    color: var(--text);
}

.proj-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Project Tab Content ────────────────────────────────────── */
.proj-tab-content {
    padding: 20px 28px 32px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#proj-tab-notes {
    overflow: hidden !important;
    padding-bottom: 16px;
    min-height: 0;
    flex: 1;
}

/* ── Add Forms ──────────────────────────────────────────────── */
.proj-add-form {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.proj-add-form .field-input {
    flex: 1;
    min-width: 180px;
}

.proj-add-form-ms {
    flex-direction: column;
}

.ms-add-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ms-add-row .field-input {
    flex: 1;
    min-width: 180px;
}

.ms-notes-input {
    width: 100%;
    resize: vertical;
    min-height: 52px;
    font-size: 13px;
    flex: none;
}

.ms-date-input {
    flex: 0 0 160px !important;
    min-width: auto !important;
}

/* ── Milestone Timeline ─────────────────────────────────────── */
.milestone-timeline {
    display: flex;
    flex-direction: column;
    position: relative;
}

.milestone-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}

.milestone-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 8px 0;
    position: relative;
}

.milestone-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--border);
    background: var(--bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
    transition: all 0.2s;
    margin-top: 2px;
    cursor: pointer;
}

.milestone-dot:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.milestone-item.ms-done .milestone-dot:hover {
    border-color: var(--text-2);
    box-shadow: 0 0 0 3px rgba(139,148,158,0.15);
}

.milestone-item.ms-done .milestone-dot {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.milestone-item.ms-overdue .milestone-dot {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    animation: overdue-glow 2.8s ease-in-out infinite;
}

.milestone-item.ms-today .milestone-dot {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
}

.milestone-body {
    flex: 1;
    min-width: 0;
    padding: 4px 0;
}

.milestone-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.milestone-item.ms-done .milestone-title {
    text-decoration: line-through;
    color: var(--text-3);
}

.milestone-date-label {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}

.milestone-date-label.date-overdue {
    color: var(--danger-text);
    font-weight: 600;
}

.milestone-date-label.date-today {
    color: var(--warning-text);
    font-weight: 600;
}

.milestone-notes {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 5px;
    line-height: 1.5;
    white-space: pre-wrap;
    border-left: 2px solid var(--border);
    padding-left: 8px;
}

.milestone-item.ms-done .milestone-notes {
    color: var(--text-3);
}

.ms-inline-edit {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ms-inline-textarea {
    width: 100%;
    min-height: 60px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    padding: 6px 10px;
    resize: vertical;
    line-height: 1.5;
    font-family: inherit;
}

.ms-inline-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.ms-inline-btns {
    display: flex;
    gap: 6px;
}

.milestone-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

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

.ms-notes-btn, .ms-toggle-btn, .ms-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 7px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    color: var(--text-3);
    line-height: 1;
}

.ms-notes-btn:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.ms-toggle-btn:hover {
    background: var(--bg-hover);
    color: var(--success-text);
}

.ms-delete-btn:hover {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.milestone-empty {
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
    padding: 32px 0;
}

/* ── File Attachments ───────────────────────────────────────── */
.attach-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--bg);
    transition: all 0.2s var(--transition-spring);
}

.attach-dropzone.drag-over {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: scale(0.99);
}

.attach-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.attach-list:empty {
    margin-bottom: 0;
}

.attach-list-lg .attach-item {
    width: 140px;
    height: 140px;
}

.attach-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: none;
    background: var(--bg-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--transition-spring);
    box-shadow: var(--shadow-sm);
}

.attach-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.attach-item:hover .attach-remove {
    opacity: 1;
}

.attach-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.attach-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 4px;
}

.attach-name {
    font-size: 10px;
    color: var(--text-2);
    text-align: center;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.attach-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    line-height: 1;
}

.attach-add-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}

.attach-add-label:hover {
    background: var(--bg-3);
    color: var(--accent);
}

.attach-add-label input[type="file"] {
    display: none;
}

.attach-count-badge {
    font-size: 11px;
    color: var(--text-2);
    background: var(--bg-3);
    border: none;
    border-radius: 10px;
    padding: 2px 7px;
    white-space: nowrap;
}

/* ── Notebook ───────────────────────────────────────────────── */
.notebook {
    display: flex;
    gap: 0;
    flex: 1;
    min-height: 0;
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.notebook-sidebar {
    width: 160px;
    flex-shrink: 0;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.notebook-pages-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.nb-page-item {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.1s;
}

.nb-page-item:hover {
    background: var(--bg-3);
    color: var(--text);
}

.nb-page-item.active {
    background: var(--accent-light);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nb-add-page-btn {
    margin: 6px 8px 10px;
    padding: 6px 10px;
    background: none;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-3);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.nb-add-page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.notebook-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    gap: 10px;
    background: var(--bg);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.nb-page-title-input {
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-2);
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    padding: 4px 0 8px;
    outline: none;
    width: 100%;
}

.nb-page-title-input:focus {
    border-bottom-color: var(--accent);
}

/* ── Notes Body & Toolbar ───────────────────────────────────── */
.notes-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.notes-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    flex-shrink: 0;
}

.notes-tool-btn {
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    transition: background 0.1s, color 0.1s;
    line-height: 1;
    font-family: inherit;
    min-width: 28px;
}

.notes-tool-btn:hover {
    background: var(--bg-3);
    color: var(--text);
}

.notes-tool-btn.active {
    background: var(--accent-light);
    color: var(--accent);
}

.notes-tool-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 4px;
    flex-shrink: 0;
}

/* ── Notes Scroll Wrapper ───────────────────────────────────── */
.notes-editor-scroll {
    flex-grow: 1;
    height: 0;
    min-height: 400px;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.notes-editor-scroll:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* ── Notes Editor (contenteditable) ────────────────────────── */
.notes-editor {
    min-height: 100%;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.7;
    padding: 14px;
    outline: none;
}

.notes-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--text-3);
    pointer-events: none;
    display: block;
}

.notes-editor ul,
.notes-editor ol {
    margin: 4px 0;
    padding-left: 24px;
}

.notes-editor li {
    margin: 2px 0;
}

.notes-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.notes-saved-hint {
    font-size: 13px;
    color: var(--success-text);
    font-weight: 500;
}

/* ── Requirements ───────────────────────────────────────────── */
.req-stats-bar {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-2);
    margin-bottom: 4px;
}

.req-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-2);
}

.req-stats-counts strong {
    color: var(--text);
    font-size: 15px;
}

.req-stats-pct {
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
}

.req-progress-bar {
    height: 8px;
    border-radius: 4px;
}

.req-main-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0;
}

.req-expand-btn {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.req-expand-btn:hover {
    color: var(--accent);
}

.req-details-area {
    padding: 10px 14px 12px 42px;
    background: var(--bg-2);
    border-top: 1px solid var(--border-2);
}

.req-details-input {
    width: 100%;
    min-height: 80px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    padding: 8px 10px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.req-details-input:focus {
    border-color: var(--accent);
}

.req-details-actions {
    margin-top: 8px;
}

.req-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.req-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-2);
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s var(--transition-spring);
    box-shadow: var(--shadow-sm);
}

.req-item:hover {
    background: var(--bg-3);
}

.req-main-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.req-check-area {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.req-checkbox {
    display: none;
}

.req-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}

.req-check-area:hover .req-checkmark {
    border-color: var(--accent);
    background: var(--accent-light);
}

.req-checkbox:checked + .req-checkmark {
    background: var(--success);
    border-color: var(--success);
}

.req-checkbox:checked + .req-checkmark::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.req-title {
    flex: 1;
    font-size: 14px;
    color: var(--text);
    word-break: break-word;
}

.req-item.req-done .req-title {
    text-decoration: line-through;
    color: var(--text-3);
}

.req-delete-btn {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    line-height: 1;
}

.req-item:hover .req-delete-btn {
    opacity: 1;
}

.req-delete-btn:hover {
    color: var(--danger-text);
    background: var(--danger-bg);
}

.req-empty {
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
    padding: 32px 0;
}

/* ── Today Sidebar Section ───────────────────────────────────── */
.sidebar-today {
    border-top: 1px solid var(--border-2);
    flex-shrink: 0;
}

.sidebar-today-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 5px;
}

.today-count-badge {
    background: var(--warning);
    color: #000;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
}

.today-panel-body {
    overflow-y: auto;
    max-height: 220px;
}

.today-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    padding: 8px 14px 4px;
}

.today-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    cursor: pointer;
    transition: background 0.1s;
}

.today-item:hover {
    background: var(--bg-3);
}

.today-item-icon {
    font-size: 13px;
    flex-shrink: 0;
}

.today-check-btn {
    background: none;
    border: none;
    font-size: 15px;
    color: var(--text-3);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s, transform 0.1s;
}

.today-check-btn:hover {
    color: var(--success-text);
    transform: scale(1.2);
}

.today-item-body {
    flex: 1;
    min-width: 0;
}

.today-item-title {
    font-size: 13px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.today-item-sub {
    font-size: 11px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.today-item-tag {
    font-size: 10px;
    color: var(--text-3);
    background: var(--bg-3);
    border: none;
    border-radius: 8px;
    padding: 2px 7px;
    flex-shrink: 0;
    white-space: nowrap;
}

.today-empty {
    padding: 18px 14px;
    font-size: 13px;
    color: var(--text-3);
    text-align: center;
}

/* ── View Mode Toggle (iOS Segmented Control) ──────────────── */
.view-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-3);
    border: none;
    border-radius: 9px;
    padding: 2px;
    margin-left: 10px;
}

.vm-btn {
    background: none;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.25s var(--transition-spring);
    position: relative;
}

.vm-btn:hover {
    color: var(--text);
}

.vm-btn.active {
    background: var(--bg-2);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
}

/* ── Kanban Board ────────────────────────────────────────────── */
.kanban-board {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    overflow-x: auto;
    align-items: flex-start;
    height: 100%;
    box-sizing: border-box;
}

.kanban-col {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    background: var(--bg-2);
    border: none;
    border-radius: 16px;
    max-height: calc(100vh - 160px);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.kanban-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 0.5px solid var(--border);
    flex-shrink: 0;
}

.kanban-col-dot {
    font-size: 14px;
}

.kanban-col-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kanban-col-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    background: var(--bg-3);
    border-radius: 10px;
    padding: 1px 8px;
    min-width: 22px;
    text-align: center;
}

.kanban-col-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 80px;
    transition: background 0.15s;
}

.kanban-col-body.kb-drop-active {
    background: var(--accent-light);
    outline: 2px dashed var(--accent);
    outline-offset: -4px;
    border-radius: 6px;
}

.kanban-empty {
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    padding: 20px 0;
}

.kb-card {
    background: var(--bg);
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: grab;
    transition: box-shadow 0.2s var(--transition-spring), transform 0.2s var(--transition-spring);
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.kb-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kb-card.kb-dragging {
    opacity: 0.4;
    transform: scale(0.97);
}

.kb-card.kb-card-high {
    border-left: 3px solid var(--danger-text);
}

.kb-card.kb-card-done {
    opacity: 0.6;
}

.kb-card.kb-card-done .kb-card-title {
    text-decoration: line-through;
    color: var(--text-3);
}

.kb-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
    line-height: 1.4;
}

.kb-card-desc {
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-date {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 4px;
}

.kb-date-overdue {
    color: var(--danger-text);
}

.kb-date-today {
    color: var(--warning-text);
}

.kb-card-tags {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.kb-tag {
    font-size: 11px;
    background: var(--bg-3);
    border: none;
    border-radius: 6px;
    padding: 2px 7px;
    color: var(--text-3);
}

.kb-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    border-top: 0.5px solid var(--border);
    padding-top: 6px;
}

.kb-edit-btn {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.1s, color 0.1s;
}

.kb-edit-btn:hover {
    background: var(--bg-3);
    color: var(--accent);
}

/* ── Hustlemode ────────────────────────────────────────────── */

/* Hustlemode Nav */
.nav-btn-hustle {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.12) 0%, rgba(239, 68, 68, 0.08) 100%);
    color: #fb923c !important;
    font-weight: 600 !important;
}

.nav-btn-hustle.active {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.22) 0%, rgba(239, 68, 68, 0.15) 100%);
    color: #fb923c !important;
}

.nav-btn-hustle .nav-badge {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

/* Hustlemode Morning Modal */
.hustle-modal {
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.hustle-modal-header {
    padding: 28px 24px 8px;
    text-align: center;
    flex-shrink: 0;
}

.hustle-greeting-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 12px;
}

.hustle-greeting-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.hustle-greeting-sub {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
}

.hustle-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px 6px;
    flex-shrink: 0;
}

.hustle-list-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

.hustle-select-all-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.hustle-select-all-btn:hover {
    background: var(--accent-light);
}

.hustle-task-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hustle-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s var(--transition-spring);
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.hustle-task-item:hover {
    background: var(--bg-3);
    transform: scale(0.99);
}

.hustle-task-item:has(.hustle-task-cb:checked) {
    background: rgba(251, 146, 60, 0.08);
    box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.4);
}

.hustle-task-cb {
    display: none;
}

.hustle-task-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-3);
    border-radius: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}

.hustle-task-cb:checked + .hustle-task-checkmark {
    background: #fb923c;
    border-color: #fb923c;
}

.hustle-task-cb:checked + .hustle-task-checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

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

.hustle-task-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

.hustle-task-desc {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hustle-task-tag {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    background: var(--bg-3);
    color: var(--text-2);
    border-radius: 8px;
    border: none;
    margin-top: 4px;
    margin-right: 4px;
}

.hustle-tag-high {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: rgba(218, 54, 51, 0.3);
}

.hustle-modal-footer {
    padding: 12px 24px 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-shrink: 0;
    border-top: 0.5px solid var(--border);
}

.hustle-confirm-btn {
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: white;
    border: none;
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--transition-spring);
}

.hustle-confirm-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: scale(0.98);
}

.hustle-confirm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.hustle-skip-btn {
    background: var(--bg-3);
    border: none;
    color: var(--text-2);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--transition-spring);
}

.hustle-skip-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* Hustlemode View */
.hustle-progress-wrap {
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.08) 0%, rgba(239, 68, 68, 0.04) 100%);
    border: none;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.hustle-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.hustle-progress-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.hustle-progress-pct {
    font-size: 14px;
    font-weight: 700;
    color: #fb923c;
}

.hustle-bar {
    background: linear-gradient(90deg, #fb923c, #f97316) !important;
}

.hustle-complete-msg {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #fb923c;
    margin-top: 12px;
    padding: 8px;
    animation: hustle-pulse 2s ease-in-out infinite;
}

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

.hustle-done-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    padding: 16px 0 6px;
    margin-top: 8px;
    border-top: 1px solid var(--border-2);
}

/* ═══════════════════════════════════════════════════════════════ */
/*  CLOUD SYNC                                                    */
/* ═══════════════════════════════════════════════════════════════ */

/* ── Sidebar Sync Button ──────────────────────────────────── */
.sidebar-sync {
    padding: 8px 16px;
    border-top: 1px solid var(--border);
}
.sync-sidebar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.sync-sidebar-btn:hover {
    background: var(--hover);
    color: var(--text);
}
.sync-sidebar-btn.sync-active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(16, 185, 129, 0.08));
    color: #22c55e;
}
.sync-sidebar-icon {
    font-size: 18px;
    line-height: 1;
}

/* ── Sync Modal ───────────────────────────────────────────── */
.sync-modal {
    max-width: 400px;
    width: 90vw;
}
.sync-modal-body {
    padding: 20px 24px 24px;
}

/* Tabs */
.sync-tabs {
    display: flex;
    background: var(--hover);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 20px;
}
.sync-tab {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.sync-tab.active {
    background: var(--card-bg);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Form */
.sync-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    margin-top: 14px;
}
.sync-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.sync-input:focus {
    border-color: var(--accent);
}
.sync-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}
.sync-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}
.sync-submit-btn {
    width: 100%;
    margin-top: 4px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
}
.sync-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 8px;
}
.sync-offline-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Connected State */
.sync-status-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    background: var(--hover);
    margin-bottom: 20px;
}
.sync-connected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.06));
}
.sync-status-icon {
    font-size: 28px;
    line-height: 1;
    color: #22c55e;
}
.sync-status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sync-status-label {
    font-size: 15px;
    font-weight: 600;
    color: #22c55e;
}
.sync-status-email {
    font-size: 13px;
    color: var(--text-secondary);
}
.sync-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.sync-action-btn {
    flex: 1;
    padding: 10px;
    font-size: 13px;
}
.sync-logout-btn {
    width: 100%;
    padding: 10px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.sync-logout-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

/* ═══════════════════════════════════════════════════════════════ */
/*  POMODORO TIMER                                                */
/* ═══════════════════════════════════════════════════════════════ */

/* ── Nav Button ────────────────────────────────────────────── */
.nav-btn-pomodoro {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(168, 85, 247, 0.08));
    color: #a78bfa !important;
    font-weight: 600 !important;
}
.nav-btn-pomodoro.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(168, 85, 247, 0.15));
    color: #a78bfa !important;
}
.nav-btn-pomodoro .nav-badge {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

/* ── Container ─────────────────────────────────────────────── */
.pomodoro-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pomo-view {
    width: 100%;
    max-width: 420px;
}

/* ── Phase Tabs (Segmented Control) ────────────────────────── */
.pomo-phase-tabs {
    display: flex;
    background: var(--bg-3);
    border-radius: 10px;
    padding: 2px;
    gap: 0;
}

.pomo-phase-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.25s var(--transition-spring);
    white-space: nowrap;
}
.pomo-phase-btn:hover { color: var(--text); }
.pomo-phase-btn.active {
    background: var(--bg-2);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.pomo-phase-btn.active[data-phase="focus"]      { color: var(--accent); }
.pomo-phase-btn.active[data-phase="shortBreak"] { color: var(--success); }
.pomo-phase-btn.active[data-phase="longBreak"]  { color: #3b82f6; }

/* ── Circular Timer ────────────────────────────────────────── */
.pomo-circle-wrap {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 32px auto 24px;
}

.pomo-circle-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.15));
}

.pomo-track { stroke-width: 8; }

.pomo-progress {
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.pomo-circle-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pomo-time {
    font-size: 52px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    letter-spacing: 0.02em;
    line-height: 1;
}

.pomo-phase-label {
    font-size: 14px;
    color: var(--text-2);
    margin-top: 6px;
    font-weight: 500;
}

/* ── Controls ──────────────────────────────────────────────── */
.pomo-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 8px 0 16px;
}

.pomo-start-btn {
    min-width: 140px;
    font-size: 16px;
    padding: 12px 28px !important;
    border-radius: 14px;
}

.pomo-start-btn.pomo-pause {
    background: var(--bg-3);
    color: var(--text);
}
.pomo-start-btn.pomo-pause:hover {
    background: var(--bg-hover);
}

.pomo-ctrl-btn {
    font-size: 20px !important;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
}

/* ── Session Dots ──────────────────────────────────────────── */
.pomo-sessions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 24px;
}

.pomo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-3);
    transition: background 0.3s, transform 0.3s var(--transition-spring);
}

.pomo-dot.filled {
    background: var(--accent);
    transform: scale(1.15);
}

/* ── Task Section ──────────────────────────────────────────── */
.pomo-section-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    padding: 20px 0 8px;
}

.pomo-task-select {
    width: 100%;
}

/* ── Stats ─────────────────────────────────────────────────── */
.pomo-stats-grid {
    display: flex;
    gap: 12px;
}

.pomo-stat-card {
    flex: 1;
    background: var(--bg-2);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.pomo-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.pomo-stat-label {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 4px;
}

.pomo-task-stats { margin-top: 12px; }

.pomo-task-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.pomo-task-stat-title {
    font-size: 13px;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pomo-task-stat-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
    margin-left: 12px;
}

/* ── Settings ──────────────────────────────────────────────── */
.pomo-settings-section {
    margin-top: 8px;
}

.pomo-settings-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-3);
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 20px 0 8px;
}
.pomo-settings-toggle:hover { color: var(--text-2); }

.pomo-settings-body {
    background: var(--bg-2);
    border-radius: var(--radius);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
}

.pomo-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text);
}

.pomo-setting-row + .pomo-setting-row {
    border-top: 0.5px solid var(--border-2);
}

.pomo-setting-input {
    width: 80px !important;
    text-align: center;
}

/* ── Header Mini-Timer ─────────────────────────────────────── */
.pomodoro-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 6px;
    background: var(--bg-3);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
    box-shadow: var(--shadow-sm);
}
.pomodoro-mini:hover { background: var(--bg-hover); }

.pomo-mini-ring {
    position: relative;
    width: 28px;
    height: 28px;
}

.pomo-mini-svg { width: 100%; height: 100%; }

.pomo-mini-track {
    fill: none;
    stroke: var(--bg-hover);
    stroke-width: 3;
}

.pomo-mini-progress {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100.53;
    stroke-dashoffset: 0;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 1s linear;
}

.pomo-mini-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.pomo-mini-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pomo-mini-time {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1.2;
}

.pomo-mini-label {
    font-size: 10px;
    color: var(--text-2);
    line-height: 1.2;
}

/* Phase colors for mini timer */
.pomodoro-mini.phase-focus .pomo-mini-progress       { stroke: var(--accent); }
.pomodoro-mini.phase-shortBreak .pomo-mini-progress   { stroke: var(--success); }
.pomodoro-mini.phase-longBreak .pomo-mini-progress    { stroke: #3b82f6; }

/* ── Responsive (Mobile ≤ 680px) ────────────────────────────── */
@media (max-width: 680px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.35s var(--transition-spring);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }

    .sidebar-overlay {
        display: block;
    }

    .menu-toggle {
        display: block;
    }

    .task-container {
        padding: 14px 16px 40px;
    }

    .main-header {
        padding: 0 16px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .view-title {
        font-size: 17px;
    }

    /* Modals: full-width sheet on mobile */
    .modal-overlay { padding: 0; }
    .modal {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
    }

    .project-hero {
        padding: 16px 18px;
    }

    .proj-tabs {
        padding: 8px 18px 0;
        overflow-x: auto;
    }

    .proj-tab-content {
        padding: 16px 18px 32px;
    }

    .proj-add-form {
        flex-direction: column;
    }

    .ms-date-input {
        flex: 1 !important;
    }

    .project-name {
        font-size: 18px;
    }

    /* Kanban: Single column scroll on mobile */
    .kanban-board {
        padding: 14px 16px;
        gap: 12px;
    }

    .kanban-col {
        flex: 0 0 260px;
    }

    /* Pomodoro mobile */
    .pomodoro-container {
        padding: 16px 18px 40px;
    }
    .pomo-circle-wrap {
        width: 220px;
        height: 220px;
        margin: 24px auto 20px;
    }
    .pomo-time {
        font-size: 42px;
    }
    .pomo-mini-info { display: none; }
    .pomodoro-mini { padding: 4px 6px; }
}
