:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", sans-serif;
  color: #202c26;
  background: #f5f3eb;
  --surface: #fffef9;
  --ink: #202c26;
  --green: #192621;
  --accent: #f2ba52;
  --line: #e4e4d9;
  --muted: #5e6b60;
  --round: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 300px; margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #8b5d10; outline-offset: 3px; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

.site-header { background: var(--green); color: #fffdf6; }
.topbar {
  min-height: 70px;
  max-width: 1152px;
  margin: auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 760; white-space: nowrap; }
.brand strong { color: var(--accent); }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px 12px 12px 4px;
  background: var(--accent); color: var(--green); font-size: 22px; font-weight: 850;
}
.account { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.text-light { min-height: 44px; border: 0; background: transparent; color: #fffdf6; font-weight: 650; padding: 0 3px; }
.text-light:focus-visible, .navigation button:focus-visible { outline-color: #ffcf71; }
.shell { max-width: 1152px; margin: auto; padding: 30px 28px calc(105px + env(safe-area-inset-bottom)); }
.loading { color: var(--muted); padding: 30px 0; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 24px; }
.eyebrow { color: #536254; font-size: .82rem; font-weight: 720; margin: 0 0 7px; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1; font-weight: 800; letter-spacing: -.055em; }
h2 { font-size: 1.23rem; line-height: 1.2; letter-spacing: -.025em; }
h3 { font-size: 1.11rem; letter-spacing: -.025em; overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: .83rem; }
.panel, .strip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--round);
  min-width: 0; padding: 20px; box-shadow: 0 2px 3px #19262106;
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 10px; margin-bottom: 9px; }
.strip { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; padding: 9px 16px; }
.strip > div { display: flex; flex-wrap: wrap; gap: 6px 9px; align-items: center; font-size: .9rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 100%; background: #a2a59a; }
.dot.online { background: #36845f; }
.sale-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.recent, .breakdown { margin-top: 16px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(135px, 100%), 1fr)); gap: 9px; }
.product {
  display: grid; grid-template-rows: auto 1fr auto; gap: 5px; min-width: 0; min-height: 115px;
  padding: 12px; background: #f4f4e9; border: 1px solid #e9e9da; border-radius: 13px; text-align: left;
}
.product:hover:not(:disabled) { background: #f1efdb; border-color: #d7c990; }
.product strong { overflow-wrap: anywhere; line-height: 1.22; }
.product-category { color: #596858; font-size: .74rem; line-height: 1.2; overflow-wrap: anywhere; }
.product-foot { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: .95rem; }
.plus-mark {
  display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #e6e9d8;
  color: #284c38; font-size: 1.1rem; font-weight: 750;
}
.pills, .payment-options { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 13px; }
.pill, .secondary {
  min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid #d8ded2;
  background: #f7f8ef; font-size: .86rem; font-weight: 680;
}
.pill:hover:not(:disabled), .secondary:hover:not(:disabled) { border-color: #7e927d; }
.pill[aria-pressed="true"] { background: #dce9dc; border-color: #9db4a0; color: #21462e; }
.primary { min-height: 51px; padding: 11px 14px; border: 1px solid transparent; background: var(--accent); border-radius: 12px; font-weight: 800; }
.primary:hover:not(:disabled) { background: #ebaf40; }
.secondary.small { padding: 8px 10px; white-space: nowrap; }
.wide { width: 100%; }
.text-button { min-height: 44px; padding: 0 3px; background: none; border: 0; color: #355844; font-size: .84rem; font-weight: 720; }
.text-button:hover { text-decoration: underline; }
.empty { border-radius: 14px; background: #f5f5ed; color: #5a645a; padding: 18px; font-size: .93rem; line-height: 1.45; }
.cart-empty { text-align: center; }
.line-items li, .list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--line); min-height: 51px;
}
.line-items li:last-child, .list li:last-child { border-bottom: none; }
.line-items strong, .list strong { display: block; overflow-wrap: anywhere; font-size: .93rem; }
.line-items small, .list small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; overflow-wrap: anywhere; }
.list b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.quantity { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 110px; }
.quantity button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #f2f4e9; font-size: 1.2rem; }
.quantity span { min-width: 16px; text-align: center; }
.total { border-top: 1px solid var(--line); padding: 13px 0 10px; margin-top: 12px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.total span, .payment-label { font-size: .85rem; color: var(--muted); }
.total strong { font-size: 1.48rem; letter-spacing: -.045em; }
.payment-label { margin: 0 0 7px; font-weight: 700; }
.payment-options { gap: 5px; }
.payment-options .pill { flex: 1 1 auto; padding-inline: 8px; }
.notice, .error { padding: 13px; border-radius: 11px; font-size: .92rem; line-height: 1.4; margin: 0 0 13px; overflow-wrap: anywhere; }
.notice { color: #6a511c; background: #fff1c9; }
.error { color: #862b22; background: #ffece7; border: 1px solid #f1cdc1; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: .85rem; font-weight: 690; min-width: 0; }
input:not([type=checkbox]), select {
  display: block; width: 100%; min-height: 45px; min-width: 0; border-radius: 10px;
  border: 1px solid #c9d0c5; padding: 9px 11px; color: var(--ink); background: #fffefa; font-size: 16px;
}
.check { display: flex; align-items: center; min-height: 44px; gap: 8px; }
.check input { width: 19px; height: 19px; accent-color: #36634a; }
.select-label { min-width: min(42%, 175px); }
.filters { margin-bottom: 15px; padding-block: 14px; }
.filters form { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.report-pills { margin-bottom: 0; }
.date-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 9px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric {
  display: flex; flex-direction: column; gap: 7px; border: 1px solid var(--line); border-radius: var(--round);
  padding: 16px; background: var(--surface); min-width: 0; min-height: 114px;
}
.metric span { font-size: .87rem; font-weight: 720; }
.metric strong { font-size: clamp(1.35rem, 3.4vw, 2.55rem); letter-spacing: -.055em; line-height: 1.1; overflow-wrap: anywhere; }
.metric small { color: #526056; font-size: .75rem; line-height: 1.2; }
.metric.profit { background: #dfeadd; border-color: #cfdecf; color: #1e432d; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 224px), 1fr)); gap: 12px; }
.report-card { border: 1px solid #e0e5db; background: #fafbf5; padding: 14px; border-radius: 13px; }
.report-card dl { margin-top: 11px; }
.report-card dl > div { display: flex; justify-content: space-between; gap: 8px; margin: 5px 0; font-size: .86rem; }
.report-card dt { color: #526056; }
.report-card dd { font-weight: 740; text-align: right; }
.report-card .report-profit { border-top: 1px solid var(--line); font-weight: 740; padding-top: 8px; margin-top: 8px; }
.report-profit dd { color: #1e432d; }
.login {
  width: min(100%, 850px); margin: clamp(10px,6vh,62px) auto 0;
  background: var(--surface); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 25px;
  border: 1px solid #e3e2d4; box-shadow: 0 18px 38px #17292012;
}
.login-side { isolation: isolate; position: relative; overflow: hidden; background: #253c30; color: #fffdf3; padding: clamp(24px, 5vw, 55px); }
.login-side h1 { font-size: clamp(2.9rem, 7vw, 5.5rem); margin: 20px 0 12px; }
.login-side h1 span { color: var(--accent); }
.login-side p { color: #ecedde; }
.pattern { position: absolute; z-index: -1; right: -70px; bottom: -100px; width: 250px; height: 250px; border-radius: 32px; background: repeating-linear-gradient(0deg,#a3be9a25 0 8px,transparent 8px 22px); transform: rotate(-32deg); }
.login-form { padding: clamp(24px, 5vw, 46px); display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { margin-bottom: 16px; }
.login-form form { gap: 15px; }
.login-form button { margin-top: 4px; }
.navigation {
  position: fixed; z-index: 2; inset: auto 0 0; display: flex; justify-content: center; gap: 5px;
  background: var(--green); padding: 6px 10px calc(7px + env(safe-area-inset-bottom));
  box-shadow: 0 -3px 12px #19262116;
}
.navigation button {
  display: grid; place-items: center; gap: 1px; width: min(24%, 116px); min-height: 54px;
  border: 0; border-radius: 11px; background: transparent; color: #f1f2e6; font-size: .77rem; font-weight: 680;
}
.navigation button span { font-size: 1.13rem; line-height: 1.1; }
.navigation button[aria-current="page"] { background: #35453a; color: #ffcb67; }
.toast { position: fixed; left: 50%; bottom: calc(81px + env(safe-area-inset-bottom)); z-index: 3; transform: translateX(-50%);
  max-width: calc(100% - 22px); background: #214833; color: #fff; border-radius: 11px; box-shadow: 0 4px 20px #0003;
  padding: 12px 16px; font-size: .92rem; font-weight: 650; text-align: center;
}

@media (max-width: 680px) {
  .topbar { padding: 9px 14px; min-height: 60px; }
  .brand { font-size: 15px; gap: 7px; }
  .brand-mark { width: 33px; height: 33px; font-size: 19px; }
  .account span { max-width: 100px; font-size: .75rem; }
  .account { gap: 7px; }
  .shell { padding: 21px 12px calc(96px + env(safe-area-inset-bottom)); }
  .page-heading { margin-bottom: 15px; }
  .sale-grid, .login { grid-template-columns: 1fr; }
  .sale-grid { gap: 10px; }
  .recent, .breakdown { margin-top: 10px; }
  .panel { padding: 12px; border-radius: 16px; }
  .strip { padding: 6px 10px; margin-bottom: 10px; border-radius: 15px; }
  .panel-heading { margin-bottom: 6px; }
  .metrics { gap: 7px; }
  .metric { min-height: 88px; padding: 10px 7px; border-radius: 11px; }
  .metric strong { font-size: clamp(.99rem, 4.2vw, 1.45rem); }
  .metric small { font-size: .66rem; }
  .metric span { font-size: .74rem; }
  .filters form { display: grid; }
  .date-range { gap: 5px; }
  .date-range input, .date-range button { padding-inline: 5px; }
  .login { max-width: 435px; margin: 0 auto; border-radius: 19px; }
  .login-side { padding: 23px; }
  .login-side h1 { margin: 12px 0 7px; }
  .login-side h1 br { display: none; }
  .login-side h1 br::after { content: " "; }
  .login-form { padding: 20px 23px; }
}

@media (max-width: 360px) {
  .account span { display: none; }
  .date-range { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-range button { grid-column: 1/-1; }
}
