:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #152e34;
  background: #f1f6f5;
  --ink: #152e34;
  --muted: #47636a;
  --line: #d3e0df;
  --accent: #076951;
  --paper: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.bar { background: #102d34; color: #fff; }
.bar-inner, main, footer { width: min(1100px, calc(100% - 40px)); margin-inline: auto; }
.bar-inner, .brand, .identity { display: flex; align-items: center; gap: 12px; }
.bar-inner { min-height: 68px; justify-content: space-between; flex-wrap: wrap; padding-block: 10px; }
.brand { font-size: 1.12rem; letter-spacing: -.02em; font-weight: 750; }
.brand strong { color: #b2e9d5; }
.brand-mark { display: grid; place-items: center; border-radius: 12px; color: #b2e9d5; background: #24484a; width: 40px; height: 40px; }
.identity { font-size: .88rem; flex-wrap: wrap; overflow-wrap: anywhere; }
main { flex: 1; padding-block: clamp(24px, 6vw, 72px); }
footer { border-top: 1px solid var(--line); padding-block: 20px; font-size: .82rem; color: var(--muted); }
footer span { padding-inline: 6px; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -.055em; }
h2 { font-size: 1.35rem; letter-spacing: -.025em; }
h3 { font-size: 1.05rem; }
p { line-height: 1.55; color: var(--muted); }
.welcome { display: grid; grid-template-columns: 1fr minmax(280px, 380px); gap: clamp(24px, 7vw, 88px); align-items: center; }
.intro p:last-child { margin-top: 16px; max-width: 45ch; }
.eyebrow { color: var(--accent); text-transform: uppercase; font-size: .76rem; font-weight: 800; letter-spacing: .12em; margin-bottom: 9px; }
.panel, .card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.login-panel { padding: clamp(20px, 4vw, 34px); box-shadow: 0 10px 35px #102d340a; }
.login-panel h2, .password-panel p { margin-bottom: 20px; }
.password-panel { max-width: 480px; }
.password-panel h1 { margin-bottom: 10px; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 650; }
input, select, button { font: inherit; }
input, select { min-width: 0; min-height: 45px; width: 100%; padding: 9px 10px; border: 1px solid #8da8a8; border-radius: 8px; background: #fff; color: var(--ink); font-size: 1rem; }
form > label, .fields, fieldset { margin-bottom: 16px; }
button { min-height: 42px; border-radius: 8px; border: 1px solid var(--line); padding: 8px 13px; font-weight: 680; font-size: .89rem; color: var(--ink); background: #fff; cursor: pointer; }
button:hover { border-color: var(--accent); background: #eef8f3; }
button:disabled { opacity: .6; cursor: wait; }
button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
button.primary:hover { background: #07543f; }
button.quiet { color: #fff; border-color: #557477; background: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #d17b20; outline-offset: 3px; }
.login-panel button { width: 100%; }
.heading, .section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-title { margin-block: 20px 12px; }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-top: 22px; }
.tabs button[aria-pressed=true] { background: #d7efe5; border-color: #9bcbbb; color: #064b3d; }
.cards, .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.card p { font-size: .9rem; margin-top: 5px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.badge { display: inline-block; color: #154d40; background: #def2e9; font-size: .73rem; font-weight: 750; border-radius: 100px; padding: 3px 8px; margin-bottom: 7px; }
.editor { margin-bottom: 14px; }
.editor h3 { margin-bottom: 15px; }
.editor > button, #password-form > button { margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
legend { font-weight: 680; padding-inline: 5px; }
.checklist { display: flex; gap: 10px 18px; flex-wrap: wrap; }
.checklist label { display: flex; align-items: center; overflow-wrap: anywhere; }
.checklist input { accent-color: var(--accent); width: 18px; min-height: 22px; }
.notice { background: #dbf3e8; color: #064b3d; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.notice.error { background: #ffe8e1; color: #8a2a1c; }
@media (max-width: 650px) {
  .bar-inner, main, footer { width: calc(100% - 32px); }
  .welcome { grid-template-columns: 1fr; gap: 24px; }
  .identity { font-size: .8rem; gap: 7px; }
}
.tabs { flex-wrap: wrap; }
.sale-price { font-weight: 750; margin-bottom: 12px; color: var(--accent); }
#sale-pending button, #more-sales { margin-top: 12px; }
.receipt { border-left: 4px solid var(--accent); }
.receipt dt { font-weight: 700; }
.receipt dd { margin: 2px 0 12px; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.receipt button { margin: 10px 4px 0 0; }
@media print {
  body:has(.receipt:not([hidden])) > :not(main),
  body:has(.receipt:not([hidden])) main > :not(#workspace),
  body:has(.receipt:not([hidden])) #workspace > :not(#sales-view),
  #sales-view:has(.receipt:not([hidden])) > :not(.receipt),
  .receipt button { display: none; }
  body:has(.receipt:not([hidden])) { background: #fff; }
  body:has(.receipt:not([hidden])) main { width: auto; padding: 0; }
  .receipt { border: 0; color: #000; }
}

.report-table { overflow-x: auto; }
.report-table table { width: 100%; border-collapse: collapse; }
.report-table th, .report-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.report-table th:nth-child(n + 2), .report-table td:nth-child(n + 2) { text-align: right; }
.report-table tbody tr:last-child td { border-bottom: 0; }
