/* ── Charting (section-specific; link after app.css) ─────────────── */

/* Back pill, as the prototype's routine page (app.css may carry the same rule). */
.back{display:inline-flex;align-items:center;gap:4px;margin-bottom:8px;padding:4px 10px 4px 8px;border-radius:14px;border:1px solid var(--rule);background:var(--surface);color:var(--ink-2);font-size:13px;font-weight:600}
.back:hover{border-color:var(--accent);color:var(--accent)}

/* Day strip: a third dot state for a part of today that has not happened yet. */
.day .dc i.none{opacity:.15}

/* Photos in the entry drawer. */
.ch-photos{display:flex;flex-wrap:wrap;gap:8px}
.ch-photo{width:120px;height:90px;object-fit:cover;border-radius:8px;border:1px solid var(--rule);cursor:zoom-in}
.ch-photo:hover{border-color:var(--accent)}

/* Sparks that carry an "empty" note. */
.spark>.muted{margin:auto}

/* The custom date range, beside the 7/30/90 chips. It stays on the same line as
   the chips on a desktop and wraps under them on a narrow window, rather than
   pushing the export buttons off the row. */
.range{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.range .in{width:146px;height:32px;padding:0 8px}
@media (max-width:860px){.range{width:100%}.range .in{flex:1;min-width:130px}}

/* The drawer's big number inputs should not spill on a narrow drawer. */
.drawer-b .big-in .in{max-width:100%}
.drawer-b .fgrid{grid-template-columns:1fr 1fr}
@media (max-width:640px){.drawer-b .fgrid{grid-template-columns:1fr}}

/* ── Day sheet (/charting/print) ─────────────────────────────────── */
.print-page{min-height:100vh;background:var(--ground);color:var(--ink);padding:16px 24px 48px}
.print-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;max-width:900px;margin:0 auto 16px}
.sheet{max-width:900px;margin:0 auto 16px;padding:28px 32px;background:#fff;color:#111;border:1px solid var(--rule);border-radius:6px;box-shadow:var(--shadow);font-size:13px;line-height:1.5}
.sheet:last-child{margin-bottom:0}
.sheet-h{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid #ddd;padding-bottom:8px;margin-bottom:10px}
.sheet-t{font-weight:700;font-size:16px}
.sheet-s{color:#555;font-size:12px}
.sheet-row{margin:2px 0}
.sheet-tbl{width:100%;border-collapse:collapse;margin-top:14px;font-size:12.5px}
.sheet-tbl th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#555;border-bottom:1px solid #999;padding:6px 8px}
.sheet-tbl td{padding:6px 8px;border-bottom:1px solid #e5e5e5;vertical-align:top}
.sheet-tbl tr.flag td{background:#FFF7E6}
.sheet-tbl .num{font-family:var(--f-data);white-space:nowrap}
.sheet-note{color:#444;font-style:italic;margin-top:2px;white-space:pre-wrap}
.sheet-photos{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.sheet-photos img{width:96px;height:72px;object-fit:cover;border-radius:4px;border:1px solid #ddd}
.sheet-foot{margin-top:14px;color:#777;font-size:11px;border-top:1px solid #ddd;padding-top:6px}
@media print{
  .no-print{display:none!important}
  .print-page{padding:0;background:#fff}
  .sheet{max-width:none;margin:0;padding:0;border:0;box-shadow:none;border-radius:0}
  /* A range prints one sheet per day. Each starts a fresh page so nothing runs
     two days together, and the last one does not push out a blank. */
  .sheet{page-break-after:always;break-after:page}
  .sheet:last-child{page-break-after:auto;break-after:auto}
  .sheet-tbl tr{page-break-inside:avoid}
  .toast{display:none!important}
}
