/* Roastery additions on top of the Yellow Bird stock look (style.css). */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
        color: var(--text); text-decoration: none; display: block; }
a.stat:hover { border-color: var(--accent-strong); }
.stat .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .val { font-family: var(--font-heading); font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .sub { font-size: 13px; color: var(--muted); }
.stat.ready { background: var(--ok-soft); border-color: transparent; }
.stat.resting { background: var(--accent-soft); border-color: transparent; }
.stat.warn { background: var(--warn-soft); border-color: transparent; }

.section { margin-bottom: 26px; }
.section > h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section > h2 .muted { font-family: var(--font-body); font-weight: 500; font-size: 14px; }
.wide { flex: 1 1 560px; }
.full { flex: 1 1 100%; }
.panel + .panel { margin-top: 0; }
.notice.flash { display: block; margin: 0 0 16px; }
.notice.last-login { display: block; margin: 0 0 16px; }
.notice.bad-notice { display: block; }
.whoami { white-space: nowrap; }
.whoami .badge { margin-left: 4px; }
.inline-form { display: inline; }
.inline-form .btn { vertical-align: middle; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.unit-select { flex: 0 0 auto; width: auto; }
.amount-row { display: flex; gap: 8px; }
.amount-row input { flex: 1 1 auto; min-width: 0; }
.amount-row select { flex: 0 0 70px; }
td .amount-row input { width: 90px; }
.table td.actions-cell { white-space: nowrap; text-align: right; }
.table tr.low td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent); color: var(--accent-ink); }
.comp-rows { display: flex; flex-direction: column; gap: 6px; }
.comp-row { display: grid; grid-template-columns: 1fr 110px 34px; gap: 6px; align-items: center; }
.comp-row .rm { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.comp-row .rm:hover { color: var(--bad); }
.blend { margin: 2px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.profile { white-space: pre-wrap; font-size: 14px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; margin: 8px 0 0; }
.progress { position: relative; height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; min-width: 90px; }
.progress i { position: absolute; inset: 0 auto 0 0; background: var(--accent-strong); border-radius: 5px; }
.progress.done i { background: var(--ok); }
.remove-form { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.remove-form input { width: 80px; }
.remove-form select { width: auto; }

/* Degassing chart (server-rendered SVG). */
.chart-wrap { overflow-x: auto; }
.degas-chart { width: 100%; min-width: 620px; height: auto; display: block; font-family: var(--font-body); }
.degas-chart .grid { stroke: var(--line); stroke-width: 1; }
.degas-chart .axis { fill: var(--muted); font-size: 12px; }
.degas-chart .label { fill: var(--text); font-size: 14px; font-weight: 600; }
.degas-chart a:hover .label { text-decoration: underline; }
.degas-chart .track { fill: var(--surface-2); stroke: var(--line); }
.degas-chart .fill { fill: var(--accent); }
.degas-chart .pct { fill: var(--accent-ink); font-size: 11.5px; font-weight: 700; }
.degas-chart .ready-dot { fill: var(--ok); }
.degas-chart .left { fill: var(--muted); font-size: 13px; font-weight: 600; }
.degas-chart .today { stroke: var(--bad); stroke-width: 2; stroke-dasharray: 4 3; }
.degas-chart .today-label { fill: var(--bad); font-size: 11.5px; font-weight: 700; }
@media (prefers-color-scheme: dark) { .degas-chart .pct { fill: var(--text); } .degas-chart .fill { fill: #8a6d1d; } }

@media (max-width: 720px) {
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .table.responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 4px; text-align: right; }
  .table.responsive td::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; text-align: left; }
  .table.responsive td.actions-cell { justify-content: flex-end; }
  .stat .val { font-size: 24px; }
}

/* Roasting list */
.roastlist tr.urg-late td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.roastlist tr.urg-today td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.roastlist tr.urg-soon td:first-child { box-shadow: inset 3px 0 0 var(--accent-strong); }

/* Shop, invoicing */
.filters.panel { flex-wrap: wrap; }
.invoice-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.invoice-to { text-align: right; }
.pre { white-space: pre-line; }
.invoice tfoot td { border-bottom: 0; }
@media print {
  .top, .no-print, .flash, .last-login { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { box-shadow: none; border: 0; padding: 0; }
  main { padding: 0; max-width: none; }
}
.bean-row { display: grid; grid-template-columns: 1fr 110px 70px; gap: 6px; align-items: center; }
