:root {
  color-scheme: dark;
  --bg: #030a06;
  --panel: #06120a;
  --text: #b8e9c4;
  --bright: #61ff91;
  --muted: #78aa83;
  --line: #1a5130;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; background: radial-gradient(ellipse at 50% -10%, #0b2613 0, #030a06 52%); font-size: 13px; }
body::after { content: ""; position: fixed; inset: 0; z-index: 4; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(0, 0, 0, .18) 4px); opacity: .42; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; }
.content { width: min(1210px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 48px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 22px; }
.last-reading { margin: 0; color: var(--muted); font-size: 12px; }
.last-reading time { color: var(--bright); }
.search { display: flex; align-items: center; gap: 9px; width: 238px; min-height: 38px; padding: 0 11px; border: 1px solid var(--line); background: #061008; color: var(--bright); }
.search:focus-within { border-color: #4ac979; }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #d3f4d9; font-size: 12px; }
.search input::placeholder { color: #75a57e; opacity: 1; }
.notice { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #4a9d62; background: #0e2413; color: #c6f2ce; font-size: 12px; line-height: 1.5; }
.notice[hidden] { display: none; }
.panel { margin-bottom: 19px; border: 1px solid var(--line); background: rgba(4, 16, 8, .88); }
.panel-heading { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 15px; border-bottom: 1px solid var(--line); background: rgba(13, 43, 21, .55); }
.panel-heading h2 { margin: 0; color: var(--bright); font-size: 14px; font-weight: 700; }
.panel-heading h2::before { content: "> "; color: #70df91; }
.count { color: #81b38b; font-size: 11px; }
.history-date { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.history-date input { max-width: 150px; padding: 5px 7px; border: 1px solid var(--line); background: #061008; color: var(--text); font: inherit; }
.history-subheading { padding: 9px 15px; border-bottom: 1px solid #173c23; background: #081b0e; color: #9fd9ae; font-size: 11px; }
.history-pages { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.history-pages[hidden] { display: none; }
.history-pages button { min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); background: #081b0e; color: var(--text); font-size: 10px; }
.history-pages button:disabled { opacity: .4; cursor: default; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { padding: 10px 15px; border-bottom: 1px solid #173c23; color: #87b98f; font-size: 10px; font-weight: 600; }
td { padding: 11px 15px; border-bottom: 1px solid #14311c; color: #aad4b0; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #0a2010; }
.product-cell { min-width: 210px; color: #d2f3d8; font-weight: 600; }
.product-icon { display: inline-block; width: 17px; color: #53e784; font-weight: 700; }
.product-extra { display: block; margin: 4px 0 0 17px; color: #91be99; font-size: 10px; font-weight: 400; }
.wait { display: inline-block; margin-left: 9px; color: #7dda99; font-size: 11px; font-weight: 500; white-space: nowrap; }
.wait.wait-closed { color: #9eb6a2; }
.alert-button { display: inline-block; margin-left: 9px; padding: 4px 6px; border: 1px solid #28683b; background: #0a2110; color: #9affb7; font-size: 10px; font-weight: 600; white-space: nowrap; }
.alert-button:hover { border-color: #70e896; }
.alert-button:disabled { opacity: .55; cursor: wait; }
.alerts-list { padding: 3px 15px; }
.alert-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #14311c; font-size: 11px; }
.alert-item:last-child { border-bottom: 0; }
.ascii-ornaments { display: flex; justify-content: space-between; margin: 24px 4px 0; color: #6dcf88; opacity: .45; pointer-events: none; }
.ascii-ornaments pre { margin: 0; font: 11px/1.1 ui-monospace, Consolas, monospace; }
.stock { display: inline-block; min-width: 37px; padding: 3px 6px; border: 1px solid #24683a; color: #8cffab; text-align: center; font-weight: 700; }
.stock.low { border-color: #64d886; color: #c5ffd0; }
.stock.empty { padding: 3px 6px; border-color: #36523c; color: #8da895; }
.stock.unknown { border-color: #304a36; color: #8da895; }
.event-time, .estimate-time { color: #c5ebcd; font-weight: 600; }
.estimate-time { color: #a2f8b8; }
.estimate-time.overdue { color: #91ac97; }
.delta { display: inline-block; margin-left: 5px; color: var(--bright); font-size: 11px; font-weight: 700; }
.muted { color: #6f9878; }
.sale { color: #a8cfb1; }
.sale.future { color: #a3e6b4; }
.sale.expired { color: #8ca993; }
.empty { padding: 25px 15px; color: #83a98b; text-align: center; }
.note { margin: 20px 0 0; color: #85aa8d; font-size: 10px; line-height: 1.6; }
@media (max-width: 760px) {
  .content { width: calc(100% - 28px); padding: 20px 0 35px; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 16px; margin-bottom: 18px; }
  .search { width: 100%; }
  .panel { margin-bottom: 14px; }
  .panel-heading { min-height: 43px; padding: 0 12px; }
  .ascii-ornaments { margin-top: 16px; }
  .ascii-ornaments pre { font-size: 9px; }
  .table-wrap { overflow: visible; }
  .table-wrap table { display: block; min-width: 0; white-space: normal; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .table-wrap tbody { display: block; }
  .table-wrap tbody tr { display: grid; grid-template-columns: minmax(0, .68fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px 8px; padding: 13px 12px; border-bottom: 1px solid #17371f; }
  .table-wrap tbody tr:last-child { border-bottom: 0; }
  .table-wrap tbody td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; line-height: 1.35; }
  .table-wrap tbody td[data-label]::before { display: block; margin-bottom: 5px; color: #83ae8d; font-size: 9px; font-weight: 500; content: attr(data-label); }
  .table-wrap tbody td.empty { grid-column: 1 / -1; padding: 9px 0; text-align: center; }
  #units-body .product-cell, #bundles-body .product-cell { grid-column: 1 / -1; min-width: 0; line-height: 1.6; }
  #bundles-body tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
  #history-body tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #history-body td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; color: #d2f3d8; font-weight: 600; }
  #history-body td:first-child { grid-column: 1; grid-row: 2; }
  #history-body td:nth-child(3) { grid-column: 2; grid-row: 2; }
  #history-body td.empty { grid-column: 1 / -1; grid-row: auto; }
  #formula-history-body tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  #formula-history-body td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; color: #d2f3d8; font-weight: 600; }
  #formula-history-body td:first-child { grid-column: 1; grid-row: 2; }
  #formula-history-body td:nth-child(3) { grid-column: 2; grid-row: 2; }
  #formula-history-body td:nth-child(4) { grid-column: 3; grid-row: 2; }
  #formula-history-body td.empty { grid-column: 1 / -1; grid-row: auto; }
}
