:root {
  --bg: #0f1115;
  --bg-elevated: #171a21;
  --bg-hover: #1f232c;
  --border: #272b35;
  --text: #e6e8ee;
  --text-dim: #8a90a0;
  --text-muted: #5c6270;
  --accent: #e8a87c;
  --accent-hover: #f0b892;
  --accent-soft: rgba(232, 168, 124, 0.14);
  --success: #7fb074;
  --warn: #c9a14a;
  --danger: #e07171;
  --todo: #5c6270;
  --doing: #e8a87c;
  --done: #7fb074;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
}

[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-elevated: #ffffff;
  --bg-hover: #eef0f5;
  --border: #e0e3ea;
  --text: #1a1d24;
  --text-dim: #5c6270;
  --text-muted: #8a90a0;
  --accent: #c97a45;
  --accent-hover: #a85f2e;
  --accent-soft: rgba(201, 122, 69, 0.12);
  --success: #5a8a4f;
  --warn: #a88129;
  --danger: #c44d4d;
  --todo: #8a90a0;
  --doing: #c97a45;
  --done: #5a8a4f;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Text",
    Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* --- Top bar --- */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  height: 60px;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  min-width: 160px;
}
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--success));
}
.quick-add {
  flex: 1;
  max-width: 620px;
}
.quick-add input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.quick-add input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.kbd-hint {
  color: var(--text-muted);
  font-size: 12px;
}
kbd {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 12px;
  margin: 0 1px;
}

/* --- Layout --- */
.layout {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidebar {
  width: 168px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  flex-shrink: 0;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active {
  background: var(--bg-hover);
  color: var(--text);
  font-weight: 600;
}
.nav-icon {
  width: 18px;
  text-align: center;
  opacity: 0.65;
}
.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
}
.stat span { color: var(--text); font-weight: 600; }

/* --- View area --- */
.view {
  flex: 1;
  overflow-y: auto;
  padding: 32px 36px;
  min-width: 0;
}
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.view-header h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.view-header .meta {
  color: var(--text-muted);
  font-size: 12px;
}

/* --- Filter chips --- */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.chip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
}
.chip:hover { color: var(--text); background: var(--bg-hover); }
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1410;
  font-weight: 600;
}

/* --- Kanban board --- */
.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  height: calc(100% - 90px);
  min-height: 500px;
}
.column {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.column-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: -0.005em;
}
.column-header > span:first-child::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.column-header .count {
  background: var(--bg);
  color: var(--text-muted);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.column[data-status="todo"] .column-header > span:first-child::before { background: var(--todo); }
.column[data-status="doing"] .column-header > span:first-child::before { background: var(--doing); }
.column[data-status="done"] .column-header > span:first-child::before { background: var(--done); }
.column-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100px;
}
.column-body.drag-over {
  background: var(--bg-hover);
}

/* --- Task card --- */
.card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px 14px 18px;
  cursor: grab;
  transition: transform 0.12s, box-shadow 0.12s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  box-shadow: inset 0 0 0 1px var(--accent), 0 2px 10px rgba(0, 0, 0, 0.2);
}
.card.dragging { opacity: 0.4; }
.card.selected {
  box-shadow: inset 0 0 0 2px var(--accent), 0 2px 10px rgba(0, 0, 0, 0.2);
}
.card-title {
  font-weight: 600;
  margin-bottom: 8px;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.45;
}
.card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}
.card-project {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
}
.card-tag {
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 3px;
}
.card-priority {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  display: block;
  margin: 0;
}
.card-priority.high { background: var(--danger); }
.card-priority.med { background: var(--warn); }
.card-priority.low { background: var(--text-muted); opacity: 0.6; }

/* --- Today view --- */
.today-section { margin-bottom: 32px; }
.today-section h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.today-list { display: flex; flex-direction: column; gap: 10px; }
.daily-log-input {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.daily-log-input input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.daily-log-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* --- History timeline --- */
.timeline { display: flex; flex-direction: column; gap: 26px; }
.timeline-day h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.timeline-day .day-count {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 10px;
  text-transform: none;
  letter-spacing: 0;
}

/* --- CPT view --- */
.cpt-controls {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.cpt-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cpt-controls input[type="date"],
.cpt-controls select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.cpt-project-group {
  margin-bottom: 28px;
}
.cpt-project-group h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent);
  letter-spacing: -0.005em;
}
.cpt-task {
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color 0.12s;
}
.cpt-task:hover { border-color: var(--accent); }
.cpt-task-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}
.cpt-task-impact {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}
.cpt-task-impact.empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 12px;
}

/* --- Projects view --- */
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color 0.12s, transform 0.12s;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.project-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.project-card .project-stats {
  color: var(--text-muted);
  font-size: 12px;
}

/* --- Buttons --- */
.btn {
  background: var(--accent);
  color: #1a1410;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
  letter-spacing: -0.005em;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn.btn-secondary {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}
.btn.btn-secondary:hover { background: var(--bg-hover); }
.btn.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--border);
  font-weight: 500;
}
.btn.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.12s, color 0.12s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}
.modal-body {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
#modalContent { padding: 20px 22px 22px; }
.form-row { margin-bottom: 14px; }
.form-row label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.form-row input[type="text"],
.form-row textarea,
.form-row select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-row textarea { min-height: 64px; }
.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.modal-actions .left-actions { display: flex; gap: 8px; }
.modal-actions .right-actions { display: flex; gap: 8px; }

.daily-log-list {
  margin-top: 10px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 14px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.daily-log-entry {
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 3px;
}
.daily-log-entry .date {
  color: var(--accent);
  margin-right: 10px;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 12px;
  font-weight: 600;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 2000;
  font-size: 14px;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.hidden { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }

/* --- Empty states --- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.empty-state-icon {
  display: block;
  font-size: 44px;
  opacity: 0.2;
  margin: 0 auto 18px;
  line-height: 1;
}
.empty-state h3 {
  color: var(--text-dim);
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}
.column-empty {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 32px 16px;
  opacity: 0.55;
  font-style: italic;
}

/* --- Notes --- */
.notes-layout {
  display: flex;
  height: calc(100% - 70px);
  min-height: 500px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.notes-list {
  width: 280px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: var(--bg);
}
.notes-search {
  margin: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.notes-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.notes-list-items {
  flex: 1;
  overflow-y: auto;
}
.note-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.note-item:hover { background: var(--bg-hover); }
.note-item.active {
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}
.note-item .title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.note-item .preview {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}
.note-item .time {
  font-size: 12px;
  color: var(--text-muted);
  font-family: "SF Mono", Monaco, monospace;
}
.notes-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-elevated);
}
.notes-editor-live {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: transparent;
  border: none;
  outline: none;
  padding: 32px 40px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  font-family: inherit;
  letter-spacing: -0.005em;
  position: relative;
  caret-color: var(--accent);
}
.notes-editor-live:focus { outline: none; }
.notes-editor-live.is-empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  position: absolute;
  top: 32px;
  left: 40px;
  pointer-events: none;
  font-style: italic;
}

/* Live-rendered blocks */
.notes-editor-live h1,
.notes-editor-live h2,
.notes-editor-live h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0.8em 0 0.3em;
  color: var(--text);
}
.notes-editor-live h1 { font-size: 26px; }
.notes-editor-live h2 { font-size: 21px; }
.notes-editor-live h3 { font-size: 17px; }
.notes-editor-live > *:first-child { margin-top: 0; }
.notes-editor-live p {
  margin: 0 0 0.5em 0;
}
.notes-editor-live ul,
.notes-editor-live ol {
  margin: 0.2em 0 0.6em 0;
  padding-left: 26px;
}
.notes-editor-live li { margin-bottom: 2px; }
.notes-editor-live blockquote {
  border-left: 3px solid var(--accent);
  padding: 2px 14px;
  color: var(--text-dim);
  margin: 0.5em 0;
  font-style: italic;
}
.notes-editor-live code {
  font-family: "SF Mono", Monaco, monospace;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.88em;
  color: var(--accent);
  border: 1px solid var(--border);
}
.notes-editor-live pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  overflow-x: auto;
  margin: 0.5em 0;
  white-space: pre-wrap;
}
.notes-editor-live pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  display: block;
}
.notes-editor-live hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.2em 0;
}
.notes-editor-live strong { font-weight: 700; }
.notes-editor-live em { font-style: italic; }
.notes-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 10px 40px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* --- Slash menu --- */
.slash-menu {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 5000;
  min-width: 260px;
  max-width: 280px;
  max-height: 340px;
  overflow-y: auto;
  padding: 6px;
  font-family: inherit;
  animation: slashFadeIn 0.1s ease-out;
}
@keyframes slashFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.slash-menu-header {
  padding: 8px 10px 4px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.slash-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13px;
  transition: background 0.08s, color 0.08s;
}
.slash-menu-item.active {
  background: var(--accent-soft);
  color: var(--text);
}
.slash-menu-item .label {
  flex: 1;
  font-weight: 500;
}
.slash-menu-item .shortcut {
  font-family: "SF Mono", Monaco, monospace;
  font-size: 11px;
  color: var(--text-muted);
}
.slash-menu-item .icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  color: var(--text);
}
.slash-menu-item.active .icon { border-color: var(--accent); }
.slash-menu-item .icon[data-style="bold"] { font-weight: 800; }
.slash-menu-item .icon[data-style="italic"] { font-style: italic; }
.slash-menu-item .icon[data-style="mono"] {
  font-family: "SF Mono", Monaco, monospace;
  font-size: 11px;
}
.slash-menu-empty {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* --- Tooltips --- */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  white-space: pre-line;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s, transform 0.12s;
  z-index: 100;
  box-shadow: var(--shadow);
  min-width: 180px;
  text-align: left;
  font-family: inherit;
  transform: translateY(-4px);
  line-height: 1.7;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* --- Utilities --- */
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.mono { font-family: "SF Mono", Monaco, monospace; }

/* Scrollbars */
.view::-webkit-scrollbar,
.column-body::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.daily-log-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.view::-webkit-scrollbar-thumb,
.column-body::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.daily-log-list::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
  transition: background 0.2s;
}
.view:hover::-webkit-scrollbar-thumb,
.column-body:hover::-webkit-scrollbar-thumb,
.modal-body:hover::-webkit-scrollbar-thumb,
.daily-log-list:hover::-webkit-scrollbar-thumb {
  background: var(--border);
}
.view::-webkit-scrollbar-thumb:hover,
.column-body::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.daily-log-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
