
  :root {
    font: 16px system-ui, sans-serif;
    color: #f6f5f3;
    background: #171717;
    --panel: #222222;
    --border: #44403c;
    --muted: #c2bbb5;
    --orange: #f97316;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body { margin: 0; }
  header { background: #1d1b19; border-bottom: 1px solid var(--border); }
  .wrap { max-width: 1050px; margin: auto; padding: 1.25rem clamp(1rem, 4vw, 2.5rem); }
  .bar, .tools, .totals { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
  .bar { justify-content: space-between; }
  .brand { color: var(--orange); font-weight: 800; letter-spacing: .06em; }
  h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: .1rem 0; }
  h2 { margin: 0 0 1rem; }
  .notice { color: #ffbf99; margin: .8rem 0 0; font-size: .9rem; }
  button, input {
    font: inherit; min-height: 46px; border: 1px solid var(--border); border-radius: .65rem;
    padding: .55rem .9rem; background: var(--panel); color: inherit;
  }
  button { cursor: pointer; font-weight: 650; touch-action: manipulation; }
  button:disabled { opacity: .48; cursor: default; }
  button:focus-visible, input:focus-visible { outline: 3px solid #ffc39b; outline-offset: 2px; }
  .primary, nav [aria-current="page"] { background: var(--orange); color: #19110b; border-color: var(--orange); }
  .totals { justify-content: space-between; background: var(--panel); border: 1px solid var(--border); border-radius: .85rem; padding: .85rem 1rem; margin-bottom: 1rem; }
  .totals strong { display: block; font-size: 1.85rem; }
  .muted, small { color: var(--muted); }
  #tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .85rem; }
  .tile {
    text-align: left; display: flex; align-items: start; justify-content: space-between; gap: .5rem;
    min-height: 112px; padding: 1rem; overflow-wrap: anywhere; font-size: 1.12rem;
    border-top: 3px solid var(--orange);
  }
  .tile span { display: block; }
  .tile small { white-space: nowrap; }
  .tile .price { margin-top: .5rem; color: #ffad79; font-weight: 550; }
  .tile:active { background: #4a3020; }
  .panel { background: var(--panel); border: 1px solid var(--border); border-radius: .85rem; padding: 1rem; }
  .table-scroll { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; }
  th, td { text-align: left; border-bottom: 1px solid var(--border); padding: .8rem .55rem; }
  td:first-child { overflow-wrap: anywhere; }
  .numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  tfoot { font-weight: 800; }
  form { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.1rem; }
  form label { display: grid; gap: .35rem; }
  form label:first-child { flex: 1 1 220px; }
  #price { width: 8.5rem; }
  #status { min-height: 1.5rem; margin: .75rem 0; }
  #status[data-error="true"] { color: #ffac95; }
  #print-title { display: none; }
  .report-tools { justify-content: space-between; margin-bottom: 1rem; }
  @media print {
    :root, body { color-scheme: light; background: white; color: black; }
    header, #status, #sales, #catalog, .report-tools { display: none !important; }
    #print-title { display: block; }
    .wrap { max-width: none; padding: 0; }
    .panel { border: 0; padding: 0; background: white; }
    .muted, small { color: #333; }
    th, td { border-color: #bbb; }
    thead { display: table-header-group; }
    tfoot { display: table-row-group; }
    tr { break-inside: avoid; }
  }
main { padding-bottom: 2rem !important; }
.tile-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: .35rem; }
.tile-block .tile { width: 100%; }
.minus { min-width: 46px; align-self: stretch; font-size: 1.25rem; }
form input, form select { min-width: 0; width: 100%; }
select { color: inherit; background: var(--panel); font: inherit; min-height: 46px; border: 1px solid var(--border); border-radius: .65rem; padding: .55rem; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grid-form .tools, .grid-form .full { grid-column: 1 / -1; }
footer { margin-top: 1rem; }
a { color: #ffad79; }
#connection { min-height: 1.4rem; }
#status { position: sticky; top: 0; z-index: 1; padding: .35rem .5rem; background: #171717; }
#report-caption { margin: .2rem 0 1rem; }
#cash-result { margin-block: .8rem; }
#cash-result dl { display: grid; grid-template-columns: 1fr auto; gap: .45rem 1rem; }
#cash-result dd { margin: 0; text-align: right; }
@media print {
  #login, #mail, #cash-form, #report-actions, #connection { display: none !important; }
  main { padding-bottom: 0 !important; }
}
