/* Sections, burn card, tally, reports, settings. Loaded after the inline styles in index.html. */
.view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }

.nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.nav button { border: 0; background: none; border-radius: 9px; padding: 9px 2px; font-weight: 600; font-size: 14px; color: var(--muted); }
.nav button[aria-selected="true"] { background: var(--stamp); color: #fff; }

input[type="date"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 46px; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.card h2 { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 105%; font-size: 18px; }
.muted { color: var(--muted); font-size: 12px; }

/* Burn card on Today */
.burn { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.burnhead { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.burnhead b { font-family: var(--mono); font-size: 17px; letter-spacing: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.seg { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); background: var(--field); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; border-radius: 8px; padding: 8px 4px; font-weight: 500; font-size: 14px; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.net { font-size: 14px; color: var(--muted); }
.net b { font-family: var(--mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.net.good { color: var(--carb); }
.net.bad { color: var(--stamp); }

/* Tally */
.pernav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pernav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 16px; }
.pernav button:disabled { opacity: .35; }
.pernav .plabel { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; text-align: center; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.stat .lbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat .val { font-family: var(--display); font-weight: 800; font-stretch: 90%; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); }
.stat.wide { grid-column: 1 / -1; }
.stat.good .val { color: var(--carb); }
.stat.bad .val { color: var(--stamp); }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--mono); font-size: 9px; fill: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
table.days { width: 100%; border-collapse: collapse; font-size: 13px; }
table.days th { text-align: right; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 0 0 6px; }
table.days th:first-child, table.days td:first-child { text-align: left; }
table.days td { text-align: right; padding: 8px 0; border-top: 1px solid var(--line); font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.days td:first-child { font-family: var(--body); }
table.days tr.dim td { color: var(--muted); }
.d-good { color: var(--carb); font-weight: 600; }
.d-bad { color: var(--stamp); font-weight: 600; }

/* Reports and settings forms */
.checks { display: grid; gap: 8px; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 11px 16px; font-weight: 600; }
.btn.primary { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.ok { color: var(--carb); font-size: 13px; min-height: 1.2em; }

.report { background: #fff; color: #15202A; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 14px; min-width: 0; }
.report h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 20px; }
.report h3 { margin: 6px 0 0; font-size: 15px; }
.report .meta { font-size: 13px; color: #5A6878; line-height: 1.5; }
.report table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #5A6878; font-weight: 600; padding: 4px 6px 4px 0; border-bottom: 2px solid #D2D9E1; }
.report td { padding: 5px 6px 5px 0; border-bottom: 1px solid #E5EAEF; font-variant-numeric: tabular-nums; }
.report .sumgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-size: 13px; }
.report .sumgrid div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid #E5EAEF; padding: 3px 0; }
.report .fine { font-size: 11px; color: #5A6878; }

@media print {
  body { background: #fff; padding: 0; }
  header, .nav, .fab, .foot, .noprint, .login, .scrim, .sheet { display: none !important; }
  .wrap { max-width: none; }
  .report { border: 0; padding: 0; }
  .report tr { break-inside: avoid; }
}
