*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #1D71B8;
  --primary-light: #4A9AE5;
  --primary-dark: #145A94;
  --primary-bg: #E3F0FA;
  --bg: #F1F5F9;
  --surface: #FFFFFF;
  --surface-hover: #F8FAFC;
  --text: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --tag-urgent: #FEE2E2;
  --tag-urgent-text: #DC2626;
  --tag-trabajo: #E3F0FA;
  --tag-trabajo-text: #1D71B8;
  --tag-estudio: #FEF3C7;
  --tag-estudio-text: #D97706;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 56px;
  --input-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
html, body { height: 100%; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
body { display: flex; flex-direction: column; }

/* Header */
.header { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: var(--primary); color: white; flex-shrink: 0; position: relative; z-index: 10; }
.header-logo { height: 28px; width: auto; display: block; flex-shrink: 0; }
.header-left { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; overflow: hidden; flex: 1; min-width: 0; }
.header-verse-wrap { overflow: hidden; width: 100%; }
.header-verse { font-size: 10px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; max-width: 100%; display: block; }
.header-verse.marquee { text-overflow: clip; overflow: visible; max-width: none; width: max-content; animation: marquee 14s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 8% { transform: translateX(0); } 92% { transform: translateX(calc(var(--marquee-dist, -200px))); } 100% { transform: translateX(calc(var(--marquee-dist, -200px))); } }
.header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.header-btn { background: none; border: none; color: white; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.85; transition: all 0.15s; position: relative; }
.header-btn:hover { background: rgba(255,255,255,0.15); opacity: 1; }
.header-btn svg { width: 20px; height: 20px; }
.bell-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; background: var(--danger); color: white; font-size: 9px; font-weight: 700; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; pointer-events: none; }

/* Notification panel */
.notif-panel { display: none; position: fixed; top: var(--header-h); right: 12px; width: 320px; max-height: 60vh; background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,0.15); z-index: 40; overflow-y: auto; }
.notif-panel.show { display: block; animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.notif-list { padding: 8px 0; }
.notif-empty { padding: 32px 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.notif-actions { padding: 4px 12px; border-bottom: 1px solid var(--border); text-align: right; }
.notif-clear { background: none; border: none; font-size: 11px; color: var(--danger); cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: background 0.15s; }
.notif-clear:hover { background: var(--tag-urgent); }
.notif-item { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--primary-bg); }
.notif-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.3; }
.notif-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Search */
.search-wrap { display: none; align-items: center; gap: 6px; }
.search-wrap.open { display: flex; }
.search-wrap input { background: rgba(255,255,255,0.15); border: none; border-radius: 8px; padding: 6px 12px; font-size: 14px; color: white; outline: none; width: 180px; }
.search-wrap input::placeholder { color: rgba(255,255,255,0.6); }
.search-wrap .header-btn { width: 28px; height: 28px; }

/* Stats bar */
.stats-bar { display: flex; gap: 4px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; overflow-x: auto; }
.stat { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--bg); color: var(--text-secondary); }
.stat svg { width: 14px; height: 14px; }
.stat.overdue { background: var(--tag-urgent); color: var(--tag-urgent-text); }
.stat.today { background: var(--primary-bg); color: var(--primary); }

/* Tabs */
.tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; overflow-x: auto; gap: 0; }
.tab { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px 2px; background: none; border: none; font-size: 12px; font-weight: 500; color: var(--text-secondary); cursor: pointer; position: relative; transition: color 0.15s; min-width: 0; }
.tab svg { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.5; transition: opacity 0.15s; display: block; }
.tab.active svg { opacity: 1; }
.tab::after { content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px; background: transparent; border-radius: 2px 2px 0 0; transition: all 0.2s; }
.tab.active { color: var(--primary); }
.tab.active::after { background: var(--primary); left: 16%; right: 16%; }
.tab .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; background: var(--primary); color: white; font-size: 9px; font-weight: 700; border-radius: 8px; padding: 0 5px; vertical-align: middle; flex-shrink: 0; position: absolute; top: 4px; right: 4px; }
.tab .badge.urgent { background: var(--danger); }

/* Overdue banner */
.overdue-banner { display: none; align-items: center; gap: 10px; padding: 10px 16px; background: var(--tag-urgent); color: var(--tag-urgent-text); font-size: 13px; font-weight: 500; flex-shrink: 0; cursor: pointer; }
.overdue-banner.show { display: flex; }
.overdue-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.overdue-banner .count { background: var(--tag-urgent-text); color: white; padding: 0 8px; border-radius: 10px; font-size: 11px; line-height: 18px; margin-left: auto; }

/* Main content */
.main { flex: 1; overflow-y: auto; padding: 12px 16px; -webkit-overflow-scrolling: touch; }
.main::-webkit-scrollbar { width: 4px; }
.main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Section headers */
.section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); padding: 16px 4px 8px; }
.section-title:first-child { padding-top: 4px; }

/* Items */
.item { background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 8px; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s; position: relative; display: flex; gap: 10px; align-items: flex-start; }
.item:active { transform: scale(0.99); }
.item.done { opacity: 0.55; }
.item.done .item-title { text-decoration: line-through; color: var(--text-muted); }
.item.high { border-left: 3px solid #EF4444; }
.item.subtask { margin-left: 32px; border-left: 2px solid var(--border); padding-left: 12px; background: var(--surface-hover); }

.item-check { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; margin-top: 1px; transition: all 0.2s; background: none; }
.item-check:hover { border-color: var(--primary); }
.item-check.checked { background: var(--success); border-color: var(--success); }
.item-check.checked svg { display: block; }
.item-check svg { display: none; width: 12px; height: 12px; color: white; }

.item-priority { flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 2px; border-radius: 50%; opacity: 0.45; transition: opacity 0.15s, transform 0.15s; margin-top: 2px; }
.item-priority:hover { opacity: 1; transform: scale(1.2); }
.item-priority svg { width: 14px; height: 14px; display: block; }
.item.high .item-priority { opacity: 1; }

.item-body { flex: 1; min-width: 0; }
.item-title { font-size: 14px; font-weight: 500; line-height: 1.4; word-break: break-word; }
.item-meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-time { display: inline-flex; align-items: center; gap: 3px; }
.item-time svg { width: 14px; height: 14px; }
.item-time.soon { color: var(--warning); font-weight: 500; }
.item-time.overdue { color: var(--danger); font-weight: 600; }

.item-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.tag.urgente { background: var(--tag-urgent); color: var(--tag-urgent-text); }
.tag.trabajo { background: var(--tag-trabajo); color: var(--tag-trabajo-text); }
.tag.estudio { background: var(--tag-estudio); color: var(--tag-estudio-text); }

.item-actions { display: flex; gap: 2px; margin-top: 6px; flex-wrap: wrap; }
.item-action { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 11px; color: var(--text-secondary); cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 3px; }
.item-action:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.item-action svg { width: 12px; height: 12px; }

.item-url { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--primary); text-decoration: none; }
.item-recurrence { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--primary); background: var(--primary-bg); padding: 1px 6px; border-radius: 4px; }
.item-recurrence svg { width: 11px; height: 11px; }
.item-url:hover { text-decoration: underline; }
.item-url svg { width: 12px; height: 12px; }

.item-parent { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-muted); background: var(--bg); padding: 1px 6px; border-radius: 4px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-parent svg { width: 11px; height: 11px; flex-shrink: 0; }

.item-btn { flex-shrink: 0; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; opacity: 0; transition: opacity 0.15s; }
.item:hover .item-btn { opacity: 1; }
.item-btn svg { width: 16px; height: 16px; display: block; }
.item-edit:hover { color: var(--primary); }
.item-delete { flex-shrink: 0; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; opacity: 0; transition: opacity 0.15s; }
.item:hover .item-delete { opacity: 1; }
.item-delete:hover { color: var(--danger); }
.item-delete svg { width: 16px; height: 16px; }

/* Month quick-add */
.month-add { display: flex; gap: 6px; margin: 8px 0 12px; }
.month-add input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; outline: none; color: var(--text); transition: border-color 0.15s; }
.month-add input:focus { border-color: var(--primary); }
.month-add input::placeholder { color: var(--text-muted); }
.month-add button { background: var(--primary); color: white; border: none; border-radius: 8px; width: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.15s; }
.month-add button:hover { background: var(--primary-dark); }
.month-add button svg { width: 16px; height: 16px; }

/* Show done toggle */
.show-done { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 10px 16px; margin-top: 8px; background: none; border: 1px dashed var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
.show-done:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.show-done svg { width: 16px; height: 16px; }
.show-done.active { border-style: solid; background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; }
.empty-state .hint { font-size: 12px; margin-top: 4px; }

/* Quick input */
.quick-input { flex-shrink: 0; padding: 12px 16px calc(12px + var(--safe-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
.input-wrap { display: flex; gap: 8px; background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius); padding: 2px; transition: border-color 0.15s; }
.input-wrap:focus-within { border-color: var(--primary); }
.input-wrap input { flex: 1; background: none; border: none; padding: 10px 12px; font-size: 16px; outline: none; color: var(--text); }
.input-wrap input::placeholder { color: var(--text-muted); }
.input-wrap button { background: var(--primary); color: white; border: none; border-radius: var(--radius-sm); width: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; flex-shrink: 0; }
.input-wrap button:hover { background: var(--primary-dark); }
.input-wrap button svg { width: 18px; height: 18px; }
#btnMic { background: var(--text-muted); }
#btnMic.listening { background: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

.voice-status { font-size: 12px; color: var(--text-secondary); text-align: center; padding: 4px 0 0; min-height: 20px; display: none; }
.voice-status.show { display: block; }
.voice-status.listening { color: var(--danger); font-weight: 500; }

/* Week view */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.week-day { text-align: center; padding: 8px 2px; border-radius: var(--radius-sm); font-size: 12px; color: var(--text-secondary); }
.week-day.today { background: var(--primary); color: white; font-weight: 600; }
.week-day-name { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.7; }
.week-day-num { font-size: 16px; font-weight: 500; margin-top: 2px; }
.week-day.has-items .week-day-num::after { content: ''; display: block; width: 4px; height: 4px; background: var(--primary); border-radius: 50%; margin: 2px auto 0; }

.week-section-title { font-size: 12px; font-weight: 600; color: var(--text); padding: 12px 4px 6px; border-bottom: 1px solid var(--border); margin-top: 4px; }

/* Month view */
.month-nav { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 16px; }
.month-nav-title { font-size: 16px; font-weight: 600; color: var(--text); }
.month-nav-btn { background: none; border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); transition: all 0.15s; }
.month-nav-btn:hover { background: var(--bg); color: var(--text); }
.month-nav-btn svg { width: 18px; height: 18px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.month-header-cell { text-align: center; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); padding: 4px 0; }
.month-cell { text-align: center; padding: 6px 2px; border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; transition: all 0.15s; position: relative; min-height: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.month-cell:hover { background: var(--surface-hover); }
.month-cell.other { color: var(--text-muted); opacity: 0.4; cursor: default; }
.month-cell.other:hover { background: none; }
.month-cell.today { background: var(--primary); color: white; font-weight: 600; }
.month-cell.today:hover { background: var(--primary-dark); }
.month-cell.selected { outline: 2px solid var(--primary); outline-offset: -2px; background: var(--primary-bg); }
.month-cell.today.selected { outline-color: white; }
.month-dot { display: none; width: 4px; height: 4px; background: var(--primary); border-radius: 50%; margin-top: 2px; }
.month-cell.today .month-dot { background: white; }
.month-cell.has-items .month-dot { display: block; }
.month-selected-title { font-size: 13px; font-weight: 600; color: var(--text); padding: 16px 4px 8px; margin-top: 16px; border-top: 2px solid var(--border); }

/* Note card */

/* Input mode toggle */
.input-mode { display: flex; gap: 4px; padding: 0 0 8px; }
.mode-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; font-size: 11px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
.mode-btn:hover { border-color: var(--primary); color: var(--primary); }
.mode-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.mode-btn[data-mode="note"].active { background: var(--warning); border-color: var(--warning); }

/* Toast */
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--text); color: white; padding: 10px 20px; border-radius: var(--radius); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transition: all 0.3s ease; z-index: 100; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 900px) {
  .toast { bottom: 24px; }
}

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 50; align-items: flex-end; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; width: 100%; max-width: 500px; max-height: 80vh; overflow-y: auto; padding: 20px 24px; animation: slideUp 0.25s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.modal h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 12px 0 8px; }
.modal-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.modal-item:last-child { border-bottom: none; }
.modal-item:hover .modal-item-title { color: var(--primary); }
.modal-item-title { font-size: 14px; font-weight: 500; flex: 1; }
.modal-item-meta { font-size: 12px; color: var(--text-secondary); }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-btn { flex: 1; padding: 10px; border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.modal-btn.primary { background: var(--primary); color: white; }
.modal-btn.primary:hover { background: var(--primary-dark); }
.modal-btn.secondary { background: var(--bg); color: var(--text-secondary); }
.modal-btn.secondary:hover { background: var(--border); }
.modal-btn.danger { background: var(--tag-urgent); color: var(--tag-urgent-text); }
.modal-btn.danger:hover { background: var(--danger); color: white; }

/* Edit modal */
.edit-field { margin-bottom: 14px; }
.edit-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.edit-field input, .edit-field select { width: 100%; padding: 10px 12px; font-size: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); outline: none; transition: border-color 0.15s; }
.edit-field input:focus, .edit-field select:focus { border-color: var(--primary); background: white; }
.edit-field select { cursor: pointer; }

/* Digest modal */
.digest-stat { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.digest-stat:last-child { border-bottom: none; }
.digest-stat svg { width: 18px; height: 18px; flex-shrink: 0; }
.digest-stat .num { font-weight: 700; font-size: 18px; margin-right: 4px; }
.digest-stat .label { color: var(--text-secondary); }

/* Search results hint */
.search-hint { font-size: 12px; color: var(--text-muted); padding: 4px 4px 12px; }

/* Responsive */
@media (min-width: 640px) {
  .modal-overlay.show { align-items: center; }
  .modal { border-radius: var(--radius); max-height: 70vh; }
}

@media (min-width: 900px) {
  body { max-width: 800px; margin: 20px auto; min-height: calc(100vh - 40px); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
  :root { --header-h: 60px; --input-h: 80px; }
  .header { padding: 0 28px; }
  .header-logo { height: 32px; }
  .header-left { flex-direction: row; align-items: center; gap: 10px; }
  .header-verse { font-size: 13px; opacity: 0.9; }
  .notif-panel { right: 28px; width: 360px; }
  .stats-bar { padding: 10px 28px; gap: 8px; }
  .stat { font-size: 13px; padding: 6px 14px; }
  .quick-input { order: 1; padding: 14px 28px; border-top: none; border-bottom: 1px solid var(--border); }
  .input-mode { padding: 0 0 10px; gap: 6px; }
  .mode-btn { font-size: 12px; padding: 4px 12px; }
  .overdue-banner { order: 2; }
  .main { order: 3; padding: 16px 28px; }
  .section-title { font-size: 12px; padding: 20px 4px 10px; letter-spacing: 1px; }
  .item { padding: 16px 20px; margin-bottom: 10px; border-radius: var(--radius); }
  .item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: none; }
  .item-title { font-size: 15px; }
  .item-meta { font-size: 13px; margin-top: 6px; }
  .item.subtask { margin-left: 40px; }
  .input-wrap { border-radius: 10px; gap: 10px; }
  .input-wrap input { font-size: 16px; padding: 14px 16px; letter-spacing: 0.3px; }
  .input-wrap button { width: 46px; border-radius: 8px; }
  .input-wrap button svg { width: 22px; height: 22px; }
  .search-wrap input { width: 240px; font-size: 15px; }
  .month-nav-title { font-size: 18px; }
  .month-cell { min-height: 44px; font-size: 15px; padding: 8px 4px; }
  .month-dot { width: 5px; height: 5px; }
  .month-selected-title { font-size: 14px; padding: 20px 4px 10px; }
  .month-add input { font-size: 15px; padding: 10px 14px; }
  .month-add button { width: 42px; }
  .month-add button svg { width: 18px; height: 18px; }
  .tabs { padding: 0 4px; }
  .tab { padding: 12px 4px; }
  .tab svg { width: 22px; height: 22px; }
  .tab .badge { top: 6px; right: 8px; font-size: 10px; min-width: 18px; height: 18px; }
  .empty-state { padding: 64px 20px; }
  .empty-state svg { width: 56px; height: 56px; }
  .empty-state p { font-size: 16px; }
}

@media (min-width: 1280px) {
  body { max-width: 960px; margin: 28px auto; min-height: calc(100vh - 56px); border-radius: 16px; }
  :root { --header-h: 64px; --input-h: 88px; }
  .header { padding: 0 36px; }
  .header-logo { height: 34px; }
  .stats-bar { padding: 12px 36px; }
  .stat { font-size: 14px; padding: 7px 16px; }
  .quick-input { padding: 16px 36px; }
  .main { padding: 20px 36px; }
  .section-title { font-size: 13px; padding: 24px 4px 12px; }
  .item { padding: 18px 24px; margin-bottom: 12px; }
  .item-check { width: 26px; height: 26px; }
  .item-check svg { width: 14px; height: 14px; }
  .item-title { font-size: 17px; }
  .item-meta { font-size: 14px; }
  .item.subtask { margin-left: 48px; }
  .input-wrap input { font-size: 17px; padding: 16px 20px; }
  .input-wrap button { width: 52px; }
  .input-wrap button svg { width: 24px; height: 24px; }
  .tab { padding: 14px 6px; }
  .tab svg { width: 24px; height: 24px; }
  .tab .badge { top: 8px; right: 12px; font-size: 10px; min-width: 18px; height: 18px; }
  .search-wrap input { width: 300px; font-size: 16px; }
  .month-cell { min-height: 52px; font-size: 16px; padding: 10px 6px; }
}

@media (min-width: 1600px) {
  body { max-width: 1100px; margin: 36px auto; min-height: calc(100vh - 72px); }
  .main { padding: 24px 40px; }
  .quick-input { padding: 18px 40px; }
  .header { padding: 0 40px; }
  .stats-bar { padding: 14px 40px; }
  .header-logo { height: 36px; }
  .item { padding: 20px 28px; }
  .item-title { font-size: 18px; }
}