/* LifeNotes web · pages: layouts specific to each of the 8 pages. */

/* ── Dashboard ────────────────────────────────────────── */
.dash-greet { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; margin: 2px 0 18px; }
.dash-stats { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 12px; max-width: 720px; }
.today-habits-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text-dim); font-size: 13px; }
.today-habits-bar .all { margin-left: auto; }

/* ── Tasks ────────────────────────────────────────────── */
.tasks-layout { display: flex; gap: 22px; align-items: flex-start; }
.tasks-list-col { flex: 1; min-width: 0; }
.tasks-detail-col { flex: 1.35; min-width: 0; position: sticky; top: 0; }
.tl-head-chips { display: flex; justify-content: space-between; gap: 10px; background: color-mix(in srgb, var(--surface-2) 50%, transparent); border-radius: var(--r-md); padding: 9px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.head-chip { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); }
.head-chip:hover { background: var(--surface-2); }
.head-chip i { color: var(--accent); font-size: 13px; }
.head-chip .caret { color: var(--text-faint); font-size: 11px; }
.detail-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.detail-title-row h2 { margin: 0; font-size: 19px; flex: 1; min-width: 0; }
.detail-title-row input { font-size: 17px; font-weight: 700; background: none; border: 0; padding: 6px 2px; border-radius: 0; }
.detail-title-row input:focus { box-shadow: none; }
.back-btn { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 15px; padding: 8px 10px; border-radius: 9px; }
.back-btn:hover { background: var(--surface-2); color: var(--text); }
.proj-strip-note { color: var(--text-dim); font-size: 13px; margin: 2px 0 12px; }

/* ── Notes ────────────────────────────────────────────── */
/* Filter/Sort/Category/Search/Overflow live as icon buttons in the shared
   #topbar-actions slot (NotesScreen.kt's real top app bar), not a secondary
   toolbar row. Search toggles this row open instead of always showing. */
.search-wrap { position: relative; max-width: 440px; margin-bottom: 16px; }
.search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 13px; pointer-events: none; }
.search-wrap input { padding-left: 36px; }
.notes-list { background: transparent; }
.note-editor-title { font-size: 22px; font-weight: 700; background: none; border: 0; padding: 8px 2px; border-radius: 0; }
.note-editor-title:focus { box-shadow: none; }
.note-editor-body { min-height: 320px; background: none; border: 0; padding: 8px 2px; border-radius: 0; font-size: 14.5px; line-height: 1.65; }
.note-editor-body:focus { box-shadow: none; }
.note-editor-body.wysiwyg:empty:before { content: attr(data-placeholder); color: var(--text-faint); }
.note-editor-body.wysiwyg h1, .note-editor-body.wysiwyg h2, .note-editor-body.wysiwyg h3,
.note-editor-body.wysiwyg h4, .note-editor-body.wysiwyg h5, .note-editor-body.wysiwyg h6 { margin: 16px 0 8px; }
.note-editor-body.wysiwyg h1:first-child, .note-editor-body.wysiwyg h2:first-child, .note-editor-body.wysiwyg h3:first-child { margin-top: 0; }
.note-editor-body.wysiwyg p { margin: 0 0 14px; }
.note-editor-body.wysiwyg ul, .note-editor-body.wysiwyg ol { margin: 0 0 14px; padding-left: 22px; }
.note-editor-body.wysiwyg li { margin: 2px 0; }
.note-editor-body.wysiwyg ul.md-checklist { list-style: none; padding-left: 2px; }
.note-editor-body.wysiwyg ul.md-checklist li { display: flex; align-items: baseline; gap: 8px; }
.note-editor-body.wysiwyg ul.md-checklist input[type="checkbox"] { margin-top: 3px; }
.note-editor-body.wysiwyg blockquote { margin: 0 0 14px; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--text-dim); font-style: italic; }
.note-editor-body.wysiwyg pre { margin: 0 0 14px; padding: 12px; background: var(--surface-2); border-radius: var(--r-sm); overflow-x: auto; }
.note-editor-body.wysiwyg code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.note-editor-body.wysiwyg pre code { background: none; padding: 0; }
.note-editor-body.wysiwyg :not(pre) > code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.note-editor-body.wysiwyg hr { border: 0; border-top: 1px solid var(--border-2); margin: 18px 0; }
.note-editor-body.wysiwyg a { color: var(--accent-hi); }
.note-editor-body.wysiwyg img { max-width: 100%; border-radius: var(--r-sm); display: block; margin: 8px 0; }
.editor-info-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.cl-item { display: flex; align-items: center; gap: 12px; padding: 8px 2px; }
.cl-item input[type="text"] { background: none; border: 0; border-radius: 0; padding: 4px 0; }
.cl-item input[type="text"]:focus { box-shadow: none; }
.cl-item .done { text-decoration: line-through; color: var(--text-faint); }

/* ── Habits ───────────────────────────────────────────── */
.habit-card { background: var(--surface); border-radius: var(--r-card); padding: 14px; margin-bottom: 10px; }
.habit-card.done-today { background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
.habit-head { display: flex; align-items: center; gap: 14px; }
.habit-title { font-size: 17px; font-weight: 600; }
.habit-title.dim { color: var(--text-dim); }
.habit-sub { color: var(--text-dim); font-size: 13px; margin-top: 1px; }
.habit-qty { display: inline-flex; align-items: baseline; gap: 3px; cursor: pointer; background: none; border: 0; color: var(--text); font: inherit; padding: 4px 8px; border-radius: var(--r-sm); }
.habit-qty:hover { background: var(--surface-2); }
.habit-qty .n { font-size: 17px; font-weight: 700; }
.habit-qty .d { color: var(--text-faint); font-size: 12px; }
.habit-flags { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.sec-divider { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 12px; margin: 20px 0 12px; }
.sec-divider::before, .sec-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sec-divider.bad { color: var(--danger); }

/* ── Goals ────────────────────────────────────────────── */
.goal-card { background: var(--surface); border-radius: var(--r-card); padding: 16px; margin-bottom: 10px; }
.goal-card.clickable { cursor: pointer; transition: background .12s; }
.goal-card.clickable:hover { background: var(--surface-3); }
.goal-meta { color: var(--text-dim); font-size: 12.5px; margin-top: 5px; }
.goal-meta .due-over, .due-over { color: var(--danger); }
.type-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Goal detail ──────────────────────────────────────── */
.goal-detail-title { margin: 0; font-size: 20px; color: var(--c, var(--text)); }
.goal-detail-card { margin-bottom: 18px; }
.goal-detail-desc { text-align: center; margin: 8px auto 0; max-width: 420px; }
.goal-header { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.goal-header-stat { color: var(--text); font-size: 14.5px; font-weight: 500; }
.goal-header-hint { color: var(--text-faint); font-size: 12px; }
.goal-header-btn { margin-top: 4px; }
.goal-qty-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.goal-qty-input { width: 64px; text-align: center; }
.goal-due-row, .goal-linked-row {
  display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 12px;
  background: var(--surface-2); border-radius: var(--r-sm); cursor: pointer; font-size: 13.5px; color: var(--text);
}
.goal-due-row:hover, .goal-linked-row:hover { background: var(--surface-3); }
.goal-due-row i:first-child { color: var(--text-dim); }
.goal-due-row .caret { margin-left: auto; color: var(--text-faint); font-size: 12px; }
.goal-linked-row { color: var(--accent-hi); }
.goal-linked-row i { color: var(--accent-hi); }
.goal-log-add { flex-wrap: wrap; }
.goal-log-amt { min-width: 22px; text-align: center; font-weight: 600; }
.goal-tasks-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; color: var(--text-dim); }
.goal-tasks-summary .progress-track { flex: 1; max-width: 220px; margin-top: 0; }
.goal-history-stat { text-align: center; margin: 4px 0 14px; }
.goal-history-stat .big { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.goal-history-stat .lbl { color: var(--text-dim); font-size: 12.5px; }
.goal-day-strip { display: flex; gap: 4px; margin-bottom: 18px; }
.goal-day-cell { flex: 1; height: 18px; border-radius: 4px; background: var(--surface-2); }
.goal-day-cell.done { background: var(--c, var(--accent)); }
.goal-notes-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.goal-note-editor { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.goal-note-textarea { min-height: 120px; background: var(--surface-2); border-radius: var(--r-sm); padding: 10px; }
.goal-note-row { padding: 12px 8px; border-bottom: 1px solid var(--border); cursor: pointer; }
.goal-note-row:last-child { border-bottom: 0; }
.goal-note-row:hover { background: var(--surface-2); }
.goal-note-preview { white-space: pre-wrap; }
.goal-note-row.expanded .goal-note-preview { color: var(--text); }

/* ── Trackers ─────────────────────────────────────────── */
.tracker-card { background: var(--surface); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.tracker-name { font-size: 16px; font-weight: 600; }
.tracker-sub { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tracker-sub .hit { color: var(--success); font-weight: 600; }

/* ── Pomodoro ─────────────────────────────────────────── */
.pomo-wrap { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pomo-seg { width: 100%; }
.pomo-modes { width: 78%; }
.assign-chip { border-style: dashed; }
.pomo-ring-box { position: relative; width: 280px; height: 280px; display: flex; align-items: center; justify-content: center; }
.pomo-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.pomo-time { font-size: 56px; font-weight: 700; letter-spacing: 1px; font-variant-numeric: tabular-nums; line-height: 1; }
.pomo-label { color: var(--text-dim); font-size: 15px; }
.pomo-controls { display: flex; align-items: center; gap: 18px; }
.pomo-btn {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface-2); color: var(--text); font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
}
.pomo-btn:hover { background: var(--surface-3); }
.pomo-btn.play { width: 72px; height: 72px; background: var(--mode-c, var(--accent)); color: var(--on-accent); font-size: 23px; }
.pomo-btn.play:hover { filter: brightness(1.1); }
.pomo-btn:disabled { opacity: .4; cursor: default; }
.pomo-stats { width: 100%; display: flex; background: var(--surface-2); border-radius: var(--r-card); padding: 16px 8px; }
.pomo-stats > div { flex: 1; text-align: center; }
.pomo-stats .n { font-size: 24px; font-weight: 700; color: var(--accent-hi); }
.pomo-stats .l { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.session-row { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); margin-bottom: 8px; }
.session-row i.mode-i { color: var(--mode-c, var(--accent)); width: 20px; text-align: center; }
.session-row .done-i { color: var(--success); }
.pomo-section { width: 100%; }
.ring-pulse { animation: ringpulse 2s ease-in-out infinite; }
@keyframes ringpulse { 50% { opacity: .55; } }

/* ── Settings ─────────────────────────────────────────── */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.theme-tile {
  background: var(--surface); border: 2px solid transparent; border-radius: var(--r-card);
  padding: 14px; cursor: pointer; font: inherit; color: var(--text); text-align: center;
}
.theme-tile:hover { border-color: var(--border-2); }
.theme-tile.active { border-color: var(--accent); }
.theme-strip { display: flex; gap: 5px; justify-content: center; margin-bottom: 10px; }
.theme-sw { width: 34px; height: 46px; border-radius: 7px; background: var(--c); }
/* Static swatches for the six Aurora themes (values match js/theme.js). */
.sw-borealis-bg { background: #1A1B26; } .sw-borealis-accent { background: #BB9AF7; } .sw-borealis-s2 { background: #282933; } .sw-borealis-s1 { background: #21222D; }
.sw-sapphire-bg { background: #171D2B; } .sw-sapphire-accent { background: #8FB5E0; } .sw-sapphire-s2 { background: #252B38; } .sw-sapphire-s1 { background: #1E2431; }
.sw-frost-bg { background: #171F25; } .sw-frost-accent { background: #8FD0CF; } .sw-frost-s2 { background: #252C32; } .sw-frost-s1 { background: #1E262C; }
.sw-magenta-bg { background: #1A1B26; } .sw-magenta-accent { background: #FF79C6; } .sw-magenta-s2 { background: #282933; } .sw-magenta-s1 { background: #21222D; }
.sw-crimson-bg { background: #1A1B26; } .sw-crimson-accent { background: #F92672; } .sw-crimson-s2 { background: #282933; } .sw-crimson-s1 { background: #21222D; }
.sw-lilac-bg { background: #1F1A2A; } .sw-lilac-accent { background: #CE93D8; } .sw-lilac-s2 { background: #2C2837; } .sw-lilac-s1 { background: #262130; }
.theme-name { font-size: 13.5px; font-weight: 600; }
.theme-name i { color: var(--accent); margin-left: 6px; font-size: 12px; }
.settings-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; max-width: 1100px; }

/* ── Narrow ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .tasks-layout { flex-direction: column; }
  .tasks-detail-col { position: static; width: 100%; }
  .dash-stats { grid-template-columns: repeat(3, 1fr); }
}
