/* Round 12 — recovering a forgotten day (js/dayReviewView.js): the Quick add "Ghi cho" row, the past-day
   banner, the "Ghi vào: …" line of the steps / note dialogs, the midnight note inside an open sheet, Today's
   link to the day review and the review sheet itself. Tokens only (css/app.css). Another day is always shown
   in the warm peach (never the mint of "today"). */

/* Quick add › Ghi cho: Hôm nay · Hôm qua · Ngày khác… (one slim row under the sheet's head). */
.qa-day { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; min-width: 0; }
.qa-day-label { flex: 0 0 auto; color: var(--text-secondary); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
button.qa-day-chip { flex: 0 1 auto; min-width: 0; margin: 0; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: var(--surface-soft); color: var(--text-primary); font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 0 0 1px var(--line); }
button.qa-day-chip:hover { background: var(--accent-light); color: var(--accent-strong); }
button.qa-day-chip.active { background: var(--accent-light); color: var(--accent-strong); box-shadow: inset 0 0 0 1.5px var(--accent); }
.qa-past-day button.qa-day-chip.active, .day-review-sheet button.qa-day-chip.active.is-past { background: var(--peach-light); color: var(--peach-strong); box-shadow: inset 0 0 0 1.5px var(--peach); }
.qa-day-other { position: relative; display: inline-flex; min-width: 0; flex: 0 1 auto; }
.qa-day-other button.qa-day-chip { width: 100%; }
/* The real date field lies over "Ngày khác…": a phone opens its own date picker on the tap. */
.qa-day-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.qa-day-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
@media (max-width: 360px) { .qa-day { gap: 4px; } .qa-day-label { font-size: 11px; letter-spacing: 0; } button.qa-day-chip { padding: 0 9px; font-size: 13px; } }
/* A short phone (360 × 640): the row costs as little height as it can, so the tiles stay above the fold. */
@media (max-height: 700px) { .qa-day { margin-bottom: 6px; } #quick-add-sheet button.qa-day-chip { min-height: 32px; } }

/* Another day is open: one slim line under the top bar, on every tab. */
.past-day-banner { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 59; display: flex; align-items: center; gap: 8px; margin: -4px 0 10px; padding: 4px 6px 4px 12px; border-radius: 12px; background: var(--peach-light); color: var(--peach-strong); box-shadow: 0 0 0 1px color-mix(in srgb, var(--peach) 30%, transparent), var(--shadow-1); font-size: 13px; font-weight: 700; line-height: 1.35; }
.pdb-text { flex: 1 1 auto; min-width: 0; }
.pdb-actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.past-day-banner .link-btn.pdb-review { min-height: 36px; padding: 0 8px; color: var(--peach-strong); font-size: 13px; }
button.pdb-back { margin: 0; min-height: 36px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--peach-strong); color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; }
button.pdb-back:hover { background: color-mix(in srgb, var(--peach-strong) 85%, #000); }

/* "Ghi vào: Hôm qua · Thứ 5, 22/10" in the steps / note dialogs. */
.log-day-line { margin: -2px 0 10px; color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.log-day-line.is-past { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--peach-light); color: var(--peach-strong); }

/* Midnight passed under an open sheet: it keeps its day, and says so. */
.rollover-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 12px; background: var(--yellow-light); color: var(--yellow-ink); font-size: 13px; font-weight: 700; line-height: 1.45; }

/* Today › one line to the day's review. */
button.day-review-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin: 0 0 12px; padding: 8px 14px; border-radius: var(--radius-lg); background: var(--surface); color: var(--text-primary); text-align: left; box-shadow: 0 0 0 1px var(--line-soft), var(--shadow-1); }
button.day-review-link:hover { background: var(--accent-light); color: var(--text-primary); }
button.day-review-link::after { content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary); border-radius: 1px; transform: rotate(-45deg); }
.drl-title { font-size: 14.5px; font-weight: 800; }
.drl-sub { color: var(--text-secondary); font-size: 13px; font-weight: 600; }

/* The day review sheet. */
.day-review-sheet .sheet-head { margin-bottom: 6px; }
.day-review-sheet .sheet-head h3 { min-width: 0; overflow-wrap: anywhere; }
.dr-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.dr-sub { margin: 0 0 4px; color: var(--text-secondary); font-size: 13px; font-weight: 700; }
ul.dr-rows { list-style: none; margin: 0; padding: 0; display: grid; }
ul.dr-rows > li.dr-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; padding: 3px 2px; border-top: 1px solid var(--line); font-size: 14.5px; }
ul.dr-rows > li.dr-row:first-child { border-top: 0; }
.dr-mark { text-align: center; font-weight: 800; color: var(--text-secondary); }
.is-logged .dr-mark { color: var(--accent); }
.is-unknown .dr-mark { color: #8A4B0F; }
.dr-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.dr-label { font-weight: 700; }
.dr-status { color: var(--text-secondary); font-size: 13.5px; }
.is-logged .dr-status { color: var(--text-primary); font-weight: 600; }
.is-empty.is-core .dr-status { color: var(--peach-strong); font-weight: 700; }
.is-unknown .dr-status { color: #8A4B0F; font-weight: 700; }
.dr-opt { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
button.dr-go { width: auto; margin: 0; min-height: 36px; padding: 0 12px; border-radius: var(--radius-pill); font-size: 13.5px; white-space: nowrap; }
.is-optional button.dr-go, button.dr-go.dr-reload { background: var(--surface-muted); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--line); }
.dr-foot { display: grid; gap: 6px; margin-top: 8px; }
button.dr-quick { width: 100%; min-height: 44px; margin: 0; }
.dr-note { margin: 0; color: var(--text-secondary); font-size: 12.5px; text-align: center; }

/* The bell's sheet: "Xem lại hôm nay" beside "Reminder settings". */
.bell-foot { flex-wrap: wrap; gap: 4px 16px; }
.bell-review { min-height: 44px; font-size: 14px; }
