:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", sans-serif;
  color: #202420;
  background: #f4f5f1;
  --muted: #586059;
  --border: #dfe3da;
  --dark: #171d19;
  --accent: #dbfa85;
  --radius: 15px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a, button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button, input, textarea { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #618a28; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2, .metric strong { overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 3.05rem); line-height: 1.06; letter-spacing: -.065em; }
h2 { font-size: 1.12rem; letter-spacing: -.025em; }
small, .muted { color: var(--muted); }
.sr-only, .skip { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { z-index: 2; top: 8px; left: 8px; width: auto; height: auto; padding: 12px; clip-path: none; background: #fff; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 235px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; min-height: 390px; background: var(--dark); color: #f7fbef; display: flex; flex-direction: column; gap: 48px; padding: 32px 19px 22px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand strong { font-size: 1.14rem; letter-spacing: .115em; display: block; line-height: 1.05; }
.brand small { display: block; font-size: .79rem; margin-top: 4px; }
.sidebar .brand { padding-left: 8px; }
.sidebar small { color: #b7c1b5; }
.monogram { color: #192213; background: var(--accent); width: 39px; height: 39px; display: grid; place-content: center; font-size: 1.55rem; font-weight: 850; letter-spacing: -.12em; border-radius: 10px; position: relative; padding-right: 5px; }
.monogram span { position: absolute; right: 7px; bottom: 5px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; padding: 11px 12px; gap: 11px; border: 1px solid transparent; border-radius: 10px; color: #d5ddd4; font-weight: 600; font-size: .9rem; }
.sidebar nav a:hover { background: #252f27; }
.sidebar nav a[aria-current] { color: #e5ffae; background: #2a3829; border-color: #3c4c36; }
.symbol { display: inline-grid; place-items: center; font-size: 1rem; width: 25px; height: 25px; flex: none; }
.profile { margin-top: auto; border-top: 1px solid #39443c; padding: 16px 0 0; display: flex; align-items: center; gap: 9px; min-width: 0; }
.profile strong, .profile small { display: block; font-size: .78rem; }
.profile small { margin-top: 3px; }
.profile form { margin-left: auto; }
.avatar { width: 31px; height: 31px; border-radius: 50%; background: #394538; display: grid; place-items: center; font-weight: 700; flex: none; }
.logout { color: #dbe5d9; font-size: 1.25rem; background: transparent; border: 0; padding: 5px 8px; }
.logout:hover { color: var(--accent); }
.workspace { background: #fbfcf8; min-height: 65px; border-bottom: 1px solid var(--border); padding: 14px clamp(16px, 4vw, 44px); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; font-weight: 720; letter-spacing: .055em; }
.workspace > div { display: flex; gap: 6px; }
.workspace-tag { color: #3d4a3b; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; letter-spacing: 0; }
.content { max-width: 1400px; margin: auto; padding: 43px clamp(16px, 4vw, 44px) 50px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.page-head p { margin-top: 9px; color: var(--muted); line-height: 1.45; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: end; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; padding: 10px 15px; min-height: 41px; border-radius: 9px; font-weight: 700; font-size: .88rem; }
.primary { background: var(--accent); color: #192411; border-color: #b8da65; }
.primary:hover { background: #ccf16c; }
.secondary { background: #fff; border-color: #cfd6c9; }
.secondary:hover { background: #eff2eb; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.metric { min-width: 0; display: grid; align-content: start; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.metric-head { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #465044; font-size: .82rem; font-weight: 700; }
.metric .symbol { background: #eff3ea; border-radius: 7px; color: #394f34; }
.metric strong { font-size: clamp(1.18rem, 2.1vw, 1.88rem); line-height: 1.02; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.metric small { font-size: .75rem; line-height: 1.35; }
.accent-card { border-color: #cae391; background: #edf8d8; }
.accent-card .symbol { background: #dcecb9; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; min-width: 0; }
.panel-head { min-height: 61px; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 13px 17px; }
.panel-link, .back { color: #42641d; font-size: .86rem; font-weight: 720; }
.panel-link:hover, .back:hover, .item-link:hover { text-decoration: underline; }
.back { display: inline-block; margin-bottom: 17px; }
.table-scroll { position: relative; overflow: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; text-align: left; }
td, th { padding: 12px 13px; border-bottom: 1px solid #e9ece5; vertical-align: middle; }
td:first-child, th:first-child { padding-left: 17px; }
th { background: #f5f7f1; color: #535e51; white-space: nowrap; font-size: .75rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faf5; }
td small { display: block; margin-top: 4px; }
td { overflow-wrap: anywhere; }
.item-link { font-weight: 720; display: inline-block; min-width: 115px; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.pill { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 99px; white-space: nowrap; font-size: .74rem; color: #4f554b; background: #eff1ec; font-weight: 700; }
.pill::before { content: ''; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.pill.partial { color: #76500b; background: #fbefce; }
.pill.done { color: #325a32; background: #e3f2dd; }
.arrow { font-size: 1.16rem; display: inline-block; padding: 4px; color: #4d6247; }
.empty { text-align: center; padding: 24px 16px 32px; color: var(--muted); border-top: 1px solid var(--border); }
.inline-note { padding: 0 17px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { border: 1px solid #c9e2ab; background: #edf8df; border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; }
.notice.error { border-color: #ecc8c5; background: #fff0ed; }
.search { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-bottom: 17px; }
.search label { width: min(320px, 100%); }
.search a { padding: 12px 5px; }
label { display: grid; gap: 5px; font-size: .88rem; font-weight: 650; }
input, textarea { background: #fff; border: 1px solid #c9d0c4; border-radius: 8px; padding: 9px 10px; min-width: 0; width: 100%; min-height: 40px; font-size: .95rem; }
textarea { resize: vertical; }
.entry { display: grid; gap: 13px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
dialog { width: min(500px, calc(100% - 28px)); max-height: calc(100% - 28px); border: 1px solid var(--border); border-radius: var(--radius); padding: 19px; color: inherit; }
dialog::backdrop { background: #18231cb0; }
.dialog-title, .dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.dialog-title { margin-bottom: 15px; }
.dialog-actions { justify-content: end; margin-top: 4px; }
.close, .text-button { background: none; border: 0; }
.close { font-size: 1.55rem; line-height: 1; padding: 4px; }
.danger { color: #962c25; text-decoration: underline; padding: 5px; }
.void-sale { display: flex; justify-content: end; }
.login-body { background: var(--dark); }
.login-wrap { min-height: 100svh; padding: 18px; display: grid; place-items: center; }
.login-panel { background: #fff; border-radius: 18px; padding: clamp(18px, 5vw, 36px); display: grid; gap: 14px; width: min(100%, 430px); }
.login-panel h1 { font-size: 2rem; margin-top: 13px; }
.login-panel .brand small { color: var(--muted); }
.login-button { margin-top: 4px; }
.demo-help { background: #f2f5ec; border-radius: 9px; padding: 10px; font-size: .82rem; line-height: 1.6; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { height: auto; min-height: 0; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 13px; }
  .sidebar .brand { padding: 0; }
  .sidebar nav { order: 3; display: flex; flex-wrap: wrap; width: 100%; }
  .sidebar nav a { gap: 4px; padding: 4px 6px; font-size: .8rem; }
  .sidebar nav .symbol { width: 17px; }
  .profile { border: 0; padding: 0; margin: 0 0 0 auto; }
  .content { padding-top: 24px; }
  .page-head { align-items: start; flex-direction: column; }
  .workspace { min-height: 45px; padding-top: 8px; padding-bottom: 8px; letter-spacing: 0; }
  .page-actions { justify-content: start; }
}
@media (max-width: 360px) {
  .avatar { display: none; }
  .metric { padding: 9px; }
  .metrics { gap: 7px; }
  .field-grid { grid-template-columns: 1fr; }
}

.quick-payment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 10px; padding: 0 17px 15px; }
.quick-payment select, .entry select { font: inherit; color: inherit; background: #fff; border: 1px solid #c9d0c4; border-radius: 8px; padding: 8px; min-width: 0; width: 100%; min-height: 40px; }
select:focus-visible, summary:focus-visible { outline: 3px solid #618a28; outline-offset: 3px; }
.optional-note { font-size: .86rem; color: #42641d; grid-column: 1 / -1; }
.optional-note summary { cursor: pointer; width: fit-content; }
.optional-note label { margin-top: 8px; color: #202420; }
.quick-delivery { margin-top: 6px; border: 1px solid #c6dbad; border-radius: 7px; color: #33531e; background: #edf8df; padding: 5px 9px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.quick-delivery:hover { background: #dcefc8; }
@media (max-width: 700px) {
  .quick-payment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
