/* ============================================================
   Daily Notes (.daily-) + Import from Notion (.nimp-)
   Light + dark via style.css variables (dark = html[data-theme="dark"]).
   ============================================================ */

/* ============================================================
   Daily Notes — full-screen view
   ============================================================ */
.daily-root {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 56px 80px;
  color: var(--text);
}

/* ---- header ---- */
.daily-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.daily-title {
  flex: 1; min-width: 0;
  font-size: 34px; font-weight: 700; letter-spacing: -0.4px; color: var(--text);
}
.daily-today-btn {
  padding: 8px 18px; font-size: 14px; font-weight: 500; font-family: var(--font);
  color: #fff; background: var(--accent); border-radius: 7px; white-space: nowrap;
}
.daily-today-btn:hover { background: var(--accent-hover); }

/* ---- calendar card ---- */
.daily-cal {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px 14px; background: var(--bg);
}
.daily-cal-head { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.daily-cal-label { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); }
.daily-nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; color: var(--text-light);
}
.daily-nav-btn:hover { background: var(--bg-hover); color: var(--text); }

.daily-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.daily-dow {
  text-align: center; padding: 4px 0 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-faint);
}
.daily-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 44px; border-radius: 8px; font-family: var(--font);
  font-size: 13.5px; color: var(--text-light); cursor: pointer;
}
.daily-cell:hover { background: var(--bg-hover); color: var(--text); }
.daily-cell.blank { visibility: hidden; pointer-events: none; }
.daily-cell.today {
  box-shadow: inset 0 0 0 1.5px var(--accent);
  color: var(--accent); font-weight: 600;
}
.daily-cell-num { line-height: 1.2; }
.daily-dot {
  width: 5px; height: 5px; margin-top: 3px; border-radius: 50%;
  background: var(--accent); opacity: 0;
}
.daily-cell.has-note .daily-dot { opacity: 1; }
.daily-cell.has-note { color: var(--text); font-weight: 500; }

/* ---- sections (quick capture / recent) ---- */
.daily-section { margin-top: 30px; }
.daily-sec-head {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 8px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.daily-sec-title { font-size: 17px; font-weight: 600; color: var(--text); }
.daily-sec-count { font-size: 13px; color: var(--text-faint); }

/* ---- quick capture ---- */
.daily-capture { display: flex; align-items: center; gap: 8px; }
.daily-capture-input {
  flex: 1; min-width: 0; padding: 8px 11px; font-size: 14px; font-family: var(--font);
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: var(--bg-input); color: var(--text); outline: none;
}
.daily-capture-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 91, 214, 0.18); }
.daily-capture-input::placeholder { color: var(--text-placeholder); }
.daily-capture-add {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-size: 14px; font-weight: 500; font-family: var(--font);
  color: #fff; background: var(--accent); border-radius: 7px; white-space: nowrap;
}
.daily-capture-add:hover { background: var(--accent-hover); }
.daily-capture-add:disabled { opacity: 0.6; cursor: default; }

/* ---- recent notes ---- */
.daily-recent-list { display: flex; flex-direction: column; }
.daily-recent-row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 8px; border-radius: 7px; border-bottom: 1px solid var(--border);
  font-family: var(--font);
}
.daily-recent-row:hover { background: var(--bg-hover); }
.daily-recent-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.daily-recent-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.daily-recent-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.daily-recent-preview {
  font-size: 12.5px; color: var(--text-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.daily-recent-preview.empty { color: var(--text-faint); font-style: italic; }
.daily-recent-date {
  flex-shrink: 0; font-size: 12.5px; color: var(--text-light); white-space: nowrap;
  background: var(--bg-hover); border-radius: 12px; padding: 2px 10px;
}

.daily-empty {
  padding: 26px 8px; text-align: center; color: var(--text-faint); font-size: 14px;
}

@media (max-width: 720px) {
  .daily-root { padding: 24px 18px 60px; }
  .daily-cell { height: 38px; }
  .daily-capture { flex-wrap: wrap; }
  .daily-capture-input { flex-basis: 100%; }
}

/* ============================================================
   Import from Notion — modal
   ============================================================ */
.nimp-modal { width: 640px; max-height: 78vh; }
.nimp-body {
  padding: 16px 22px 18px; overflow-y: auto;
  display: flex; flex-direction: column;
}
.nimp-step { display: flex; flex-direction: column; gap: 12px; }
.nimp-step.hidden { display: none; }

/* ---- drop zone ---- */
.nimp-drop {
  border: 1.5px dashed var(--border-strong); border-radius: 10px;
  padding: 34px 20px; text-align: center; cursor: pointer;
  color: var(--text-light); outline: none;
  transition: border-color 0.12s, background 0.12s;
}
.nimp-drop:hover, .nimp-drop:focus-visible, .nimp-drop.over {
  border-color: var(--accent); background: rgba(91, 91, 214, 0.05);
}
.nimp-drop.busy { opacity: 0.6; pointer-events: none; }
.nimp-drop-icon { color: var(--text-faint); margin-bottom: 8px; }
.nimp-drop-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.nimp-drop-sub { font-size: 13px; margin-top: 3px; color: var(--text-light); }
.nimp-hint {
  font-size: 12.5px; line-height: 1.55; color: var(--text-light);
  background: var(--bg-callout); border-radius: 8px; padding: 10px 12px;
}

/* ---- preview ---- */
.nimp-summary { display: flex; flex-direction: column; gap: 4px; }
.nimp-summary-line { font-size: 13.5px; color: var(--text-light); }
.nimp-warn { font-size: 12.5px; color: var(--danger); }
.nimp-tree {
  border: 1px solid var(--border); border-radius: 8px;
  max-height: 260px; overflow-y: auto; padding: 6px;
}
.nimp-tree-row {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 6px; border-radius: 4px; font-size: 13.5px; color: var(--text);
  white-space: nowrap; overflow: hidden;
}
.nimp-tree-row:hover { background: var(--bg-hover); }
.nimp-tree-icon { flex-shrink: 0; font-size: 14px; }
.nimp-tree-title { overflow: hidden; text-overflow: ellipsis; }
.nimp-wrap-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text); cursor: pointer; user-select: none;
}
.nimp-wrap-row input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; cursor: pointer; }

/* ---- footer: back / import / progress ---- */
.nimp-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--border);
}
.nimp-foot.hidden { display: none; }
.nimp-back {
  padding: 8px 14px; font-size: 13.5px; font-family: var(--font); color: var(--text-light);
  border: 1px solid var(--border-strong); border-radius: 7px;
}
.nimp-back:hover { background: var(--bg-hover); color: var(--text); }
.nimp-back:disabled { opacity: 0.5; cursor: default; }
.nimp-import {
  padding: 8px 18px; font-size: 14px; font-weight: 500; font-family: var(--font);
  color: #fff; background: var(--accent); border-radius: 7px;
}
.nimp-import:hover { background: var(--accent-hover); }
.nimp-import:disabled { opacity: 0.6; cursor: default; }
.nimp-progress-wrap { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.nimp-progress-wrap.hidden { display: none; }
.nimp-progress {
  flex: 1; height: 8px; border-radius: 4px; overflow: hidden;
  background: var(--bg-hover);
}
.nimp-progress-bar {
  height: 100%; width: 0%; background: var(--accent);
  transition: width 0.15s ease;
}
.nimp-progress-label { font-size: 12.5px; color: var(--text-light); white-space: nowrap; }

@media (max-width: 680px) {
  .nimp-modal { width: calc(100vw - 24px); }
}
