:root {
  color-scheme: light;
  --ink: #25372e;
  --muted: #65756b;
  --line: #e3e8dc;
  --paper: #f6f7ef;
  --surface: #fffefa;
  --green: #527a58;
  --green-dark: #354f40;
  --green-soft: #edf1df;
  --teal: #527c78;
  --blue: #e6eff6;
  --amber: #f8efcc;
  --yellow: #e4bd4a;
  --red: #a4382b;
  --red-soft: #fff0ed;
  --shadow: 0 18px 45px rgba(28, 57, 48, .07);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; background: var(--paper); }
body[data-theme="market"] {
  --ink: #25372e; --muted: #65756b; --line: #e3e8dc; --paper: #f6f7ef; --surface: #fffefa;
  --green: #527a58; --green-dark: #354f40; --green-soft: #edf1df; --teal: #527c78; --blue: #e6eff6; --amber: #f8efcc; --yellow: #e4bd4a;
}
body[data-theme="river"] {
  --ink: #263944; --muted: #647780; --line: #dde7e9; --paper: #f2f7f8; --surface: #fffefe;
  --green: #42778a; --green-dark: #2d5362; --green-soft: #e2eef0; --teal: #478395; --blue: #e5f0f5; --amber: #f8edc7; --yellow: #dfb94d;
}
body[data-theme="sunshine"] {
  --ink: #343b2c; --muted: #6d7560; --line: #e8e6d8; --paper: #faf8ef; --surface: #fffefa;
  --green: #687d4f; --green-dark: #495f3d; --green-soft: #eef0df; --teal: #557d79; --blue: #e6eff4; --amber: #fff0b8; --yellow: #dfb742;
}
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; min-height: 100vh; }
.app-shell-public { display: block; }
.sidebar {
  position: sticky; top: 0; align-self: start; display: flex; flex-direction: column;
  width: 100%; height: 100vh; height: 100dvh; overflow-x: hidden; overflow-y: auto;
  padding: 26px 17px 17px; color: #eaf4ef; background: var(--green-dark); z-index: 20;
  scrollbar-color: #9ab1a3 #ffffff18; scrollbar-width: auto;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { border-radius: 8px; background: #9ab1a3; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; min-width: 0; }
.brand-mark { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: #dcefe6; color: var(--green-dark); font: 800 20px Manrope, sans-serif; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-copy strong { font: 700 13px Manrope, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy small { margin-top: 4px; color: #b5cbc2; font-size: 11px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 17px 9px; margin: 26px 0 17px; border-block: 1px solid rgba(255,255,255,.13); }
.avatar { flex: 0 0 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #dce9d5; color: var(--green-dark); font-weight: 700; }
.user-chip > span:last-child { display: flex; flex-direction: column; overflow: hidden; }
.user-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.user-chip small { margin-top: 3px; color: #b8cdc5; font-size: 11px; }
.main-nav { display: flex; flex: 0 0 auto; flex-direction: column; gap: 4px; min-height: auto; overflow: visible; }
.nav-label { margin: 0 9px 9px; color: #9fb9b0; font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.nav-label-spaced { margin-top: 23px; }
.main-nav > a, .nav-link-button { min-height: 43px; padding: 0 10px; border: 0; border-radius: 10px; display: flex; align-items: center; gap: 11px; width: 100%; background: transparent; color: #d8e8e1; font-size: 12px; font-weight: 600; cursor: pointer; text-align: left; transition: background .18s, color .18s, transform .18s; }
.main-nav > a:hover, .nav-link-button:hover { color: #fff; background: rgba(255,255,255,.1); }
.main-nav > a.active { color: var(--green-dark); background: var(--green-soft); box-shadow: 0 3px 9px #082e2933; }
.nav-icon { width: 20px; text-align: center; color: #b4d3c4; font-size: 16px; line-height: 1; }
.active .nav-icon { color: var(--green); }
.sidebar-bottom { margin-top: auto; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.13); }
.connection { display: flex; align-items: center; gap: 7px; padding: 4px 7px 13px; color: #c7ddd4; font-size: 10px; }
.connection i { width: 7px; height: 7px; background: #74ce9b; border-radius: 50%; }
.connection.offline { color: #ffe0a5; }
.connection.offline i { background: #f4bc53; }
.logout-form { margin: 0; }

.main-content { grid-column: 2; width: 100%; min-width: 0; max-width: 1600px; min-height: 100vh; margin-left: 0; padding: 0 42px 50px; }
.topbar { min-height: 105px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.topbar-title h1 { margin: 3px 0 0; font: 700 23px Manrope, sans-serif; letter-spacing: -.04em; }
.eyebrow { color: #72817c; font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.topbar-right { display: flex; align-items: center; gap: 10px; color: #697872; font-size: 11px; }
.date-chip { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.mobile-user { display: none; }
.auth-main { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(ellipse at 75% 10%, #deede5 0, transparent 36%), var(--paper); }
.auth-card { width: min(100%, 430px); padding: 36px 36px 32px; border: 1px solid #e5ece8; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.auth-brand { margin-bottom: 39px; color: var(--ink); }
.auth-brand .brand-copy small { color: var(--muted); }
.auth-card h1 { margin: 9px 0 9px; font: 800 27px Manrope, sans-serif; letter-spacing: -.045em; }
.muted { color: var(--muted); line-height: 1.65; font-size: 13px; }
.tiny { font-size: 11px; line-height: 1.55; }
.auth-card > .tiny { margin: 20px 0 0; }
.form-stack { display: flex; flex-direction: column; gap: 15px; margin-top: 22px; }
label { display: flex; flex-direction: column; gap: 7px; color: #34443f; font-size: 11px; font-weight: 700; }
label small { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.45; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  min-width: 0; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #dce5e0; border-radius: 9px;
  outline: none; color: var(--ink); background: #fff; font-size: 13px; font-weight: 500; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: #4b9987 !important; box-shadow: 0 0 0 3px #3b917b1c; }
input::placeholder { color: #98a59f; }
.button { min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; text-align: center; transition: transform .15s, background .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 5px 12px #12463e1c; }
.button-primary:hover { background: var(--green-dark); box-shadow: 0 7px 17px #12463e2c; }
.button-secondary { border-color: var(--line); color: var(--green-dark); background: var(--green-soft); }
.button-secondary:hover { background: var(--blue); }
.button-quiet { border-color: #e5ebe8; color: #586960; background: transparent; }
.button-light { min-height: 40px; color: var(--green-dark); background: var(--green-soft); }
.button-full { width: 100%; }
.button-large { min-height: 55px; margin-top: 4px; font-size: 14px; }
.button-disabled { opacity: .45; pointer-events: none; }
.notice { display: flex; align-items: flex-start; gap: 9px; margin: 17px 0; padding: 12px 14px; border-radius: 10px; font-size: 12px; line-height: 1.5; }
.notice-success { color: var(--green-dark); border: 1px solid var(--green); background: var(--green-soft); }
.notice-error { color: #873b31; border: 1px solid #f0d2cd; background: #fff4f1; }
.notice-error > span, .notice-success > span { font-weight: 800; }
.setup-card { width: min(100%, 520px); }
.setup-card h1 { margin-top: 11px; }
.setup-steps { padding-left: 22px; color: #34443f; font-size: 12px; line-height: 1.8; }
.setup-steps li { padding-left: 4px; margin: 8px 0; }
code { padding: 2px 4px; border-radius: 4px; background: #f1f4f1; font-size: 10px; }

.welcome-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 166px; margin: 25px 0 20px; padding: 25px 30px; border-radius: 15px; background: linear-gradient(112deg, var(--green-dark) 0%, var(--green) 100%); color: #f3faf5; box-shadow: 0 12px 27px #12463e1a; }
.welcome-panel .eyebrow { color: #acd1c0; }
.welcome-panel h2 { margin: 8px 0 5px; font: 700 21px Manrope, sans-serif; letter-spacing: -.035em; }
.welcome-panel p { margin: 0; color: #d1e5da; font-size: 12px; }
.welcome-panel .button-light { flex: 0 0 auto; }
.attendant-welcome { align-items: center; background: linear-gradient(110deg, var(--green-dark), var(--teal)); }
.welcome-total { min-width: 176px; padding: 15px 18px; border: 1px solid #ffffff30; border-radius: 11px; background: #ffffff13; display: flex; flex-direction: column; }
.welcome-total span, .welcome-total small { color: #d1e5da; font-size: 10px; }
.welcome-total strong { margin: 4px 0; font: 700 21px Manrope, sans-serif; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 21px 0 32px; }
.quick-action { position: relative; min-height: 121px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; display: flex; flex-direction: column; align-items: flex-start; transition: transform .18s, box-shadow .18s; }
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-icon { display: grid; place-items: center; width: 33px; height: 33px; margin-bottom: 11px; border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: 17px; }
.action-provisions .quick-icon { color: #80631b; background: var(--amber); }
.quick-action strong { font: 700 14px Manrope, sans-serif; }
.quick-action small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.action-arrow { position: absolute; right: 18px; top: 18px; color: #71847b; font-size: 17px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 24px 0 28px; }
.metric-card { min-height: 120px; position: relative; padding: 18px 19px 15px 21px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.tone-blue.metric-card { background: var(--blue); }
.tone-amber.metric-card { background: var(--amber); }
.metric-card p { margin: 0 0 9px; color: #65766f; font-size: 10px; font-weight: 700; }
.metric-card strong { display: block; font: 700 21px Manrope, sans-serif; letter-spacing: -.04em; }
.metric-card small { display: block; margin-top: 5px; color: #83928c; font-size: 10px; }
.metric-dot { position: absolute; right: 17px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: #73ae91; box-shadow: 0 0 0 5px #73ae9116; }
.tone-blue .metric-dot { background: #6d9ac3; box-shadow: 0 0 0 5px #6d9ac31a; }
.tone-amber .metric-dot { background: #dda940; box-shadow: 0 0 0 5px #dda9401b; }
.tone-violet .metric-dot { background: #9083bd; box-shadow: 0 0 0 5px #9083bd1b; }
.tone-red .metric-dot { background: #c15e53; box-shadow: 0 0 0 5px #c15e531b; }
.tone-teal .metric-dot { background: #43a59a; box-shadow: 0 0 0 5px #43a59a1b; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .95fr); gap: 18px; }
.section-block { margin: 26px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.section-heading h2, .panel h2 { margin: 4px 0 0; font: 700 17px Manrope, sans-serif; letter-spacing: -.035em; }
.text-link { color: var(--teal); font-size: 11px; font-weight: 700; }
.text-link:hover { color: var(--green-dark); text-decoration: underline; }
.section-heading-first { margin: 26px 0 16px; align-items: center; }
.section-heading-first h2 { font-size: 24px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
.data-table th { padding: 12px 14px; color: #77847f; background: #f8faf8; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-top: 1px solid #edf1ee; vertical-align: middle; color: #43524d; }
.data-table tbody tr:hover { background: #fbfcfb; }
.data-table td strong { color: #21342f; }
.data-table .align-right { text-align: right; }
.table-link { color: #236c60; font-weight: 700; }
.table-link:hover { text-decoration: underline; }
.subline { display: block; margin-top: 4px; color: #87948f; font-size: 10px; }
.product-names { min-width: 145px; max-width: 260px; color: #53625c; line-height: 1.5; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 20px; color: #65716c; background: #f0f3f1; font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge-success { color: var(--green-dark); background: var(--green-soft); }
.badge-warning { color: #805d11; background: #fff4d9; }
.badge-danger { color: #993e33; background: #fff0ed; }
.low-stock-row { display: flex; align-items: center; gap: 10px; min-height: 60px; border-bottom: 1px solid #edf1ee; }
.low-stock-row:last-child { border-bottom: 0; }
.small-product-image { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 9px; object-fit: cover; }
.low-stock-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.low-stock-copy strong { overflow: hidden; color: #34443e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.low-stock-copy small { color: #89968f; font-size: 9px; }
.low-stock-value { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.low-stock-value small { font-weight: 400; }
.low-stock-value .badge { font-size: 8px; }
.dashboard-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 23px 0 10px; }
.mini-summary { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.mini-summary strong { font: 700 20px Manrope, sans-serif; }
.mini-summary small { max-width: 390px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.activity-row { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid #edf1ee; }
.activity-row:last-child { border-bottom: 0; }
.activity-mark { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--green-dark); background: var(--green-soft); font-size: 11px; font-weight: 700; }
.activity-row > div { display: flex; flex-direction: column; gap: 4px; }
.activity-row strong { font-size: 10px; font-weight: 600; line-height: 1.4; }
.activity-row small { color: #83918a; font-size: 9px; }

.empty-state { min-height: 230px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 30px; border: 1px dashed #d5e0d9; border-radius: 13px; background: #fbfcfb; text-align: center; }
.empty-state.compact { min-height: 130px; padding: 23px; border: 0; background: #fff; }
.empty-icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 11px; border-radius: 14px; color: var(--teal); background: var(--green-soft); font-size: 18px; }
.empty-state h2 { margin: 2px 0 4px; font: 700 16px Manrope, sans-serif; }
.empty-state strong { font: 700 13px Manrope, sans-serif; }
.empty-state p { margin: 5px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.segmented a { padding: 8px 12px; border-radius: 6px; color: #61726b; font-size: 10px; font-weight: 700; }
.segmented a.selected { color: var(--green-dark); background: var(--green-soft); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.product-tile { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; transition: transform .18s, box-shadow .18s; }
.product-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-image-wrap { height: 148px; overflow: hidden; background: #edf3ef; }
.product-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-copy { padding: 13px; }
.product-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; min-height: 45px; }
.product-category { color: #788680; font-size: 9px; font-weight: 600; }
.product-copy h3 { margin: 3px 0 0; font: 700 13px Manrope, sans-serif; line-height: 1.35; }
.product-price { display: block; margin-top: 9px; color: var(--green-dark); font: 700 16px Manrope, sans-serif; }
.product-price span { color: #87948e; font: 500 10px "DM Sans", sans-serif; }
.product-stock { display: flex; justify-content: space-between; gap: 7px; margin: 7px 0 12px; color: #74817b; font-size: 10px; }
.product-stock b { color: #364b41; text-align: right; }
.product-tile .button { min-height: 42px; }
.back-link { display: inline-flex; align-items: center; min-height: 36px; margin: 16px 0; color: #47776b; font-size: 11px; font-weight: 700; }
.checkout-layout { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(360px, 1.1fr); gap: 20px; max-width: 870px; margin: 10px auto; }
.checkout-product, .checkout-form { padding: 23px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.checkout-product > img { width: 100%; height: 200px; margin-bottom: 17px; border-radius: 10px; background: #eef4f0; object-fit: cover; }
.checkout-product h2, .checkout-form h2 { margin: 4px 0 8px; font: 700 20px Manrope, sans-serif; }
.checkout-price { color: var(--green-dark); font: 700 19px Manrope, sans-serif; }
.checkout-price span { color: #829087; font: 500 11px "DM Sans", sans-serif; }
.checkout-product p { color: var(--muted); font-size: 12px; }
.checkout-form { display: flex; flex-direction: column; gap: 12px; }
.checkout-form h2 { margin-bottom: 0; }
.checkout-form .tiny { margin: -4px 0 0; }
.quantity-control { display: grid; grid-template-columns: 55px 1fr 55px; gap: 10px; }
.quantity-control button { min-height: 58px; border: 1px solid var(--line); border-radius: 10px; color: var(--green-dark); background: var(--green-soft); font-size: 25px; cursor: pointer; }
.quantity-control input { min-height: 58px !important; text-align: center; font: 700 20px Manrope, sans-serif !important; }
.sale-total { display: flex; align-items: center; justify-content: space-between; margin: 4px 0; padding: 14px 0; border-block: 1px solid var(--line); color: #57655f; font-size: 12px; }
.sale-total strong { color: #133f36; font: 700 21px Manrope, sans-serif; }
.payment-options { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.payment-options legend { margin-bottom: 7px; color: #374741; font-size: 11px; font-weight: 700; }
.payment-options label { display: flex; align-items: center; justify-content: center; min-height: 39px; flex: 1 1 80px; padding: 0 10px; border: 1px solid #e0e8e3; border-radius: 8px; color: #53635b; background: #fff; cursor: pointer; }
.payment-options input { accent-color: var(--green); }
.payment-options label:has(input:checked) { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }
.mobile-money-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mobile-money-fields[hidden] { display: none; }

.owner-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .75fr); gap: 15px; margin: 24px 0; align-items: start; }
.panel { padding: 19px 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.panel .section-heading { align-items: center; margin-bottom: 15px; }
.panel .section-heading h2 { font-size: 16px; }
.panel .form-stack { margin-top: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.category-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.category-tag { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e5ece8; border-radius: 8px; color: #344a41; background: #f8faf8; font-size: 10px; font-weight: 700; }
.category-tag small { color: #829087; font-size: 8px; font-weight: 500; }
.category-form { margin-top: 17px !important; padding-top: 16px; border-top: 1px solid var(--line); }
.category-panel > .tiny { margin: 13px 0 0; }
.table-product { display: flex; align-items: center; gap: 9px; min-width: 130px; }
.table-product img { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; }
.table-product strong { font-size: 10px; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.table-actions a, .table-actions button { padding: 5px 6px; border: 0; color: var(--teal); background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.table-actions form { margin: 0; }
.table-actions button:hover, .table-actions a:hover { text-decoration: underline; }
.row-inactive { opacity: .65; }
.stock-adjust-panel { margin: 24px 0; }
.stock-form { display: grid; grid-template-columns: 1.4fr 1.2fr .8fr 1fr auto; gap: 10px; align-items: end; }
.stock-form .direction-field { display: none; }
.stock-form:has(select[name="movement_type"] option[value="adjustment"]:checked) .direction-field { display: flex; }
.stock-grid { margin: 18px 0; }
.stock-tile .product-image-wrap { height: 110px; }
.stock-quantity-large { margin: 10px 0 7px; color: #174b40; font: 700 19px Manrope, sans-serif; }
.stock-tile .product-copy > p:last-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; }
.stock-tile .product-copy > p:last-child small { color: var(--muted); font-size: 9px; }
.filter-bar { display: flex; align-items: flex-end; gap: 9px; }
.filter-bar label { min-width: 135px; }
.filter-bar input { min-height: 39px !important; }
.filter-bar .button { min-height: 39px; }
.report-total { color: var(--green-dark); font: 700 18px Manrope, sans-serif; }
.receipt-page { max-width: 740px; margin: 0 auto; }
.receipt-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.receipt-actions .back-link { margin: 13px 0; }
.receipt-card { max-width: 510px; margin: 7px auto 40px; padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.receipt-brand, .report-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 25px; }
.receipt-brand > div, .report-brand > div { display: flex; flex-direction: column; gap: 4px; }
.receipt-brand strong, .report-brand strong { font: 700 14px Manrope, sans-serif; }
.receipt-brand small, .report-brand small { color: var(--muted); font-size: 10px; }
.receipt-card h2 { margin: 5px 0 3px; font: 700 23px Manrope, sans-serif; letter-spacing: .015em; }
.receipt-card > .muted { margin: 0 0 19px; font-size: 11px; }
.receipt-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 11px 0; border-bottom: 1px solid #edf1ee; color: #58675f; font-size: 11px; }
.receipt-line > span { display: flex; flex-direction: column; gap: 5px; }
.receipt-line small { color: #89958f; font-size: 9px; }
.receipt-line strong { color: #273d35; text-align: right; }
.receipt-total { margin-top: 3px; border-bottom: 0; font-size: 13px; }
.receipt-total strong { color: var(--green-dark); font: 700 19px Manrope, sans-serif; }
.receipt-footer { margin: 22px 0 0; padding-top: 16px; border-top: 1px dashed #dbe4de; color: #7a8981; font-size: 11px; text-align: center; }
.report-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin: 25px 0 17px; }
.report-toolbar h2 { margin: 4px 0 0; font: 700 21px Manrope, sans-serif; }
.report-actions { display: flex; align-items: flex-end; gap: 9px; }
.report-sheet { max-width: 850px; margin: 0 auto 40px; padding: 31px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.report-brand { margin: 0 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.report-date { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.report-date strong { color: #42554c; font-size: 11px; }
.report-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.report-metrics > div { min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; border: 1px solid #e5ece8; border-radius: 9px; background: #f9fbf9; }
.report-metrics span, .report-details span { color: #73817a; font-size: 10px; }
.report-metrics strong { color: #184b3f; font: 700 16px Manrope, sans-serif; }
.report-details { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 18px; }
.report-details > div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 2px; border-bottom: 1px solid #edf1ee; }
.report-details strong { color: #354941; font-size: 11px; }
.report-net { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 16px; padding: 14px; border-radius: 9px; background: var(--green-soft); color: var(--green-dark); font-size: 11px; }
.report-net strong { font: 700 15px Manrope, sans-serif; }
.report-net small { flex-basis: 100%; color: #6d8277; font-size: 9px; line-height: 1.45; }
.report-download { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.report-footnote { margin: 19px 0 0; color: #8a9790; font-size: 9px; }
.inline-form { display: flex; align-items: center; gap: 4px; }
.inline-form input { width: 110px !important; min-height: 31px !important; padding: 4px 6px !important; font-size: 9px !important; }
.text-positive { color: #2f7651 !important; font-weight: 700; }
.text-negative { color: #ab4d3d !important; font-weight: 700; }
.settings-panel { max-width: 800px; margin-top: 24px; }
.settings-form { max-width: 620px; }
.settings-note { max-width: 800px; margin-top: 13px; }
.settings-note p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 224px minmax(0, 1fr); }
  .main-content { padding-inline: 27px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-form .button { grid-column: span 2; }
}
@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; inset: 0 0 auto; width: auto; height: auto; max-height: none; overflow: visible; padding: 11px 14px 9px; }
  .sidebar .brand { display: none; }
  .user-chip { position: absolute; right: 14px; top: 8px; padding: 0; margin: 0; border: 0; }
  .user-chip .avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .user-chip > span:last-child { max-width: 130px; }
  .user-chip strong { font-size: 10px; }
  .user-chip small { font-size: 9px; }
  .main-nav { display: flex; flex: 0 0 auto; flex-flow: row nowrap; gap: 4px; width: 100%; padding: 39px 0 5px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-color: #98ad9d #ffffff18; scrollbar-width: thin; }
  .main-nav::-webkit-scrollbar { display: block; height: 5px; }
  .main-nav::-webkit-scrollbar-thumb { border-radius: 5px; background: #98ad9d; }
  .main-nav .nav-label { display: none; }
  .main-nav > a { min-height: 44px; flex: 0 0 auto; padding: 0 11px; gap: 7px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
  .nav-icon { width: auto; font-size: 14px; }
  .sidebar-bottom { position: static; right: auto; top: auto; display: flex; justify-content: space-between; align-items: center; margin: 4px 0 0; padding: 0; border: 0; }
  .connection { display: flex; padding: 4px 6px; font-size: 11px; }
  .connection i { width: 8px; height: 8px; }
  .logout-form { position: static; display: block; }
  .nav-link-button { width: auto; min-height: 36px; padding: 0 9px; border-radius: 7px; background: #ffffff15; font-size: 11px; }
  .main-content { margin-left: 0; padding: 0 19px 35px; }
  .topbar { min-height: 77px; }
  .topbar-title h1 { font-size: 20px; }
  .dashboard-columns { grid-template-columns: 1fr; gap: 3px; }
  .owner-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkout-layout { max-width: 570px; grid-template-columns: 1fr; }
  .checkout-product { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; align-items: center; }
  .checkout-product > img { grid-row: span 4; height: 130px; margin: 0; }
  .checkout-product h2 { margin: 0; }
  .checkout-product > p { margin: 4px 0; }
  .report-toolbar { align-items: flex-start; flex-direction: column; }
  .report-actions { width: 100%; flex-wrap: wrap; }
  .report-actions .filter-bar { flex: 1 1 auto; }
}
@media (max-width: 520px) {
  .sidebar { padding-inline: 8px; }
  .main-content { padding-inline: 12px; }
  .main-nav > a { min-height: 44px; padding-inline: 9px; font-size: 12px; }
  .user-chip { right: 10px; }
  .user-chip > span:last-child { max-width: 100px; }
  .topbar-right { gap: 5px; }
  .date-chip { padding: 7px 8px; font-size: 9px; }
  .welcome-panel { min-height: 135px; align-items: flex-start; flex-direction: column; padding: 19px; }
  .welcome-panel h2 { font-size: 18px; }
  .welcome-total { width: 100%; min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 9px 12px; }
  .welcome-total strong { grid-column: 2; grid-row: 1 / span 2; }
  .welcome-total small { grid-column: 1; }
  .metric-grid { gap: 9px; margin: 18px 0 24px; }
  .metric-card { min-height: 104px; padding: 14px 12px; }
  .metric-card strong { font-size: 17px; }
  .metric-card p { font-size: 9px; }
  .quick-actions { gap: 9px; margin-top: 14px; }
  .quick-action { min-height: 110px; padding: 14px; }
  .quick-action strong { font-size: 12px; }
  .dashboard-bottom { grid-template-columns: 1fr; }
  .section-heading-first { align-items: flex-end; }
  .section-heading-first h2 { font-size: 21px; }
  .segmented a { padding: 7px 8px; font-size: 9px; }
  .product-grid { grid-template-columns: 1fr; gap: 11px; }
  .product-tile { display: grid; grid-template-columns: 112px 1fr; }
  .product-image-wrap { height: 100%; min-height: 170px; }
  .product-copy { display: flex; flex-direction: column; justify-content: center; padding: 12px; }
  .product-title-row { min-height: auto; }
  .product-title-row .badge { display: none; }
  .product-copy h3 { font-size: 12px; }
  .product-price { margin-top: 7px; font-size: 14px; }
  .product-stock { margin: 5px 0 9px; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 9px; }
  .product-stock b { text-align: left; }
  .product-tile .button { min-height: 38px; font-size: 10px; }
  .owner-grid { gap: 11px; margin: 16px 0; }
  .panel { padding: 15px; }
  .form-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stock-form { grid-template-columns: 1fr 1fr; }
  .stock-form .button { grid-column: span 2; }
  .stock-grid .product-tile { min-height: 140px; }
  .stock-grid .product-image-wrap { min-height: 140px; }
  .filter-bar { width: 100%; flex-wrap: wrap; }
  .filter-bar label { flex: 1 1 115px; min-width: 0; }
  .filter-bar .button { flex: 1 1 auto; }
  .report-actions .filter-bar { flex-wrap: wrap; }
  .report-sheet { padding: 18px 14px; }
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-metrics strong { font-size: 14px; }
  .report-date { align-items: flex-start; flex-direction: column; gap: 6px; }
  .report-details { grid-template-columns: 1fr; }
  .report-download .button { flex: 1 1 100%; }
  .receipt-card { padding: 20px 15px; }
  .receipt-actions { align-items: flex-start; }
  .receipt-actions .button { min-height: 36px; padding-inline: 9px; font-size: 10px; }
  .checkout-product, .checkout-form { padding: 16px; }
  .checkout-product { grid-template-columns: 95px 1fr; gap: 6px 12px; }
  .checkout-product > img { height: 105px; }
  .checkout-product h2 { font-size: 16px; }
  .checkout-price { font-size: 16px; }
  .mobile-money-fields { grid-template-columns: 1fr; }
  .data-table th { padding: 10px 9px; }
  .data-table td { padding: 10px 9px; }
  .table-actions { flex-direction: column; align-items: flex-start; }
}

/* Dashboard graph and per-user settings */
.sales-chart-panel { margin: 22px 0 18px; padding: 20px 22px; }
.sales-chart-panel .section-heading { align-items: flex-start; margin-bottom: 8px; }
.chart-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.chart-period-chip { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--paper); font-size: 12px; white-space: nowrap; }
.sales-chart-wrap { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; margin-top: 14px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; padding: 5px 0 27px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.sales-chart { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(3px, 1vw, 11px); min-width: 0; height: 160px; }
.sales-chart::before { position: absolute; z-index: 0; inset: 5px 0 28px; background: linear-gradient(to bottom, transparent 24.7%, var(--line) 25%, transparent 25.3%, transparent 49.7%, var(--line) 50%, transparent 50.3%, transparent 74.7%, var(--line) 75%, transparent 75.3%); content: ""; pointer-events: none; }
.sales-chart-column { position: relative; z-index: 1; display: flex; min-width: 0; height: 160px; flex-direction: column; justify-content: flex-end; align-items: center; cursor: help; }
.sales-chart-column:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 5px; }
.sales-bar-track { display: flex; width: min(25px, 72%); height: 130px; flex: 0 0 130px; align-items: flex-end; justify-content: center; }
.sales-bar { display: block; width: 100%; height: var(--bar-height); min-height: 0; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, var(--teal), var(--green)); transition: height .2s ease, filter .2s ease; }
.sales-bar.is-current { background: linear-gradient(180deg, var(--yellow), var(--green)); }
.sales-chart-column:hover .sales-bar, .sales-chart-column:focus-visible .sales-bar { filter: brightness(.9); }
.sales-chart-month { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.2; }
.chart-empty { padding: 25px 14px; border-radius: 10px; color: var(--muted); background: var(--paper); font-size: 14px; text-align: center; }
.chart-details { margin-top: 13px; border-top: 1px solid var(--line); padding-top: 10px; }
.chart-details summary { width: fit-content; color: var(--teal); font-size: 13px; font-weight: 700; cursor: pointer; }
.chart-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; padding-top: 12px; }
.chart-totals > div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.chart-totals > div span { color: var(--muted); }
.chart-totals > div strong { white-space: nowrap; }

.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 1180px; margin: 24px 0; align-items: start; }
.profile-panel { padding: 22px; }
.profile-intro { margin: -4px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.profile-form { margin-top: 18px; }
.theme-picker { min-width: 0; margin: 4px 0 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); }
.theme-picker legend { padding: 0; color: var(--ink); font-size: 14px; font-weight: 700; }
.theme-picker > .tiny { margin: 4px 0 10px; }
.theme-options { display: grid; gap: 8px; }
.theme-option { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 11px; min-height: 62px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.theme-option:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.theme-option input[type="radio"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; accent-color: var(--green); }
.theme-option input[type="radio"]:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.theme-option > span:first-of-type { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.theme-option strong { color: var(--ink); font-size: 13px; }
.theme-option small { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.4; }
.theme-swatches { display: flex; flex: 0 0 auto; gap: 4px; }
.theme-swatches i { width: 16px; height: 16px; border: 1px solid #00000012; border-radius: 50%; }
.theme-market i:nth-child(1) { background: #527a58; }
.theme-market i:nth-child(2) { background: #e4bd4a; }
.theme-market i:nth-child(3) { background: #8aaac1; }
.theme-river i:nth-child(1) { background: #42778a; }
.theme-river i:nth-child(2) { background: #dfb94d; }
.theme-river i:nth-child(3) { background: #83a98b; }
.theme-sunshine i:nth-child(1) { background: #687d4f; }
.theme-sunshine i:nth-child(2) { background: #dfb742; }
.theme-sunshine i:nth-child(3) { background: #84a9bc; }

/* Slightly larger type and controls for everyday use on phones and tablets. */
body { font-size: 16px; }
.brand-copy strong { font-size: 14px; }
.brand-copy small, .user-chip small { font-size: 12px; }
.user-chip strong { font-size: 14px; }
.main-nav > a, .nav-link-button { font-size: 14px; }
.nav-label { font-size: 10px; }
.connection { font-size: 12px; }
.topbar-title h1 { font-size: 25px; }
.eyebrow { font-size: 11px; }
.topbar-right, .date-chip { font-size: 13px; }
.muted { font-size: 14px; }
.tiny { font-size: 12px; }
label { font-size: 13px; }
label small { font-size: 12px; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea { font-size: 15px; }
.button { font-size: 14px; }
.notice { font-size: 14px; }
.setup-steps { font-size: 14px; }
code { font-size: 11px; }
.welcome-panel p { font-size: 14px; }
.welcome-total span, .welcome-total small { font-size: 12px; }
.quick-action strong { font-size: 16px; }
.quick-action small { font-size: 13px; }
.metric-card p { font-size: 12px; }
.metric-card small { font-size: 12px; }
.section-heading h2, .panel h2 { font-size: 19px; }
.text-link { font-size: 13px; }
.data-table { font-size: 13px; }
.data-table th { font-size: 11px; }
.subline { font-size: 12px; }
.badge { font-size: 11px; }
.low-stock-copy strong { font-size: 13px; }
.low-stock-copy small, .activity-row small { font-size: 11px; }
.low-stock-value { font-size: 12px; }
.low-stock-value .badge { font-size: 10px; }
.mini-summary small { font-size: 12px; }
.activity-row strong { font-size: 12px; }
.empty-state p { font-size: 13px; }
.segmented a { font-size: 12px; }
.product-category { font-size: 11px; }
.product-copy h3 { font-size: 15px; }
.product-price span { font-size: 12px; }
.product-stock { font-size: 12px; }
.back-link { font-size: 13px; }
.checkout-price span, .payment-options legend { font-size: 13px; }
.category-tag { font-size: 12px; }
.category-tag small { font-size: 10px; }
.table-product strong { font-size: 12px; }
.table-actions a, .table-actions button { font-size: 12px; }
.stock-tile .product-copy > p:last-child small { font-size: 11px; }
.receipt-brand small, .report-brand small { font-size: 12px; }
.receipt-card > .muted, .receipt-line { font-size: 13px; }
.receipt-line small, .report-metrics span, .report-details span { font-size: 11px; }
.report-date strong { font-size: 13px; }
.settings-note p { font-size: 13px; }

@media (max-width: 1120px) {
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .user-chip strong { font-size: 12px; }
  .user-chip small { font-size: 11px; }
  .main-nav > a { font-size: 13px; }
  .nav-link-button { font-size: 12px; }
  .chart-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .sales-chart-panel { padding: 16px 12px; }
  .sales-chart-wrap { grid-template-columns: 48px minmax(0, 1fr); gap: 5px; }
  .chart-axis { font-size: 10px; }
  .sales-chart { gap: 2px; }
  .sales-bar-track { width: min(18px, 78%); }
  .sales-chart-month { font-size: 11px; }
  .chart-period-chip { font-size: 11px; }
  .chart-totals { grid-template-columns: 1fr; }
  .user-chip strong { font-size: 12px; }
  .date-chip { font-size: 12px; }
  .metric-card p { font-size: 11px; }
  .metric-card strong { font-size: 18px; }
  .quick-action strong { font-size: 14px; }
  .quick-action small { font-size: 12px; }
  .product-copy h3 { font-size: 14px; }
  .product-price { font-size: 16px; }
  .product-stock { font-size: 11px; }
}

@media print {
  @page { margin: 15mm; }
  .app-shell { display: block; }
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .receipt-actions, .notice { display: none !important; }
  .main-content, .auth-main { grid-column: auto; max-width: none; min-height: auto; margin: 0; padding: 0; }
  .report-sheet, .receipt-card { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .report-metrics > div { background: #fff; }
  .report-net { border: 1px solid #dce5e0; }
}

.guide-hero { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin: 24px 0 14px; padding: 24px 27px; border-radius: 15px; color: #f3faf5; background: linear-gradient(112deg, var(--green-dark), var(--green)); box-shadow: var(--shadow); }
.guide-hero h2 { margin: 7px 0 5px; font: 700 23px Manrope, sans-serif; letter-spacing: -.035em; }
.guide-hero p { max-width: 760px; margin: 0; color: #d1e5da; font-size: 13px; line-height: 1.55; }
.guide-hero .eyebrow { color: #c6dfd3; }
.guide-hero .button { flex: 0 0 auto; }
.guide-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 25px; }
.guide-jump a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--green-dark); background: var(--surface); font-size: 13px; font-weight: 700; }
.guide-jump a:hover, .guide-jump a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.guide-section { margin: 27px 0; scroll-margin-top: 18px; }
.guide-section > .section-heading { margin-bottom: 14px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide-card { min-height: 110px; display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: transform .16s, box-shadow .16s; }
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.guide-card:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.guide-card strong { color: var(--green-dark); font: 700 15px Manrope, sans-serif; }
.guide-card span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.guide-procedure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.guide-procedure { padding: 19px 20px; }
.guide-procedure h3 { margin: 0; color: var(--ink); font: 700 15px Manrope, sans-serif; }
.guide-steps { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.guide-steps li { padding-left: 3px; margin: 7px 0; }
.guide-steps a { color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.guide-callout { padding: 16px 20px; border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 11px; color: var(--ink); background: var(--green-soft); }
.guide-callout ul { margin: 0; padding-left: 19px; font-size: 13px; line-height: 1.7; }
.guide-callout li { padding-left: 3px; margin: 6px 0; }
.guide-callout strong { color: var(--green-dark); }

@media (max-width: 780px) {
  .guide-hero { align-items: flex-start; flex-direction: column; }
  .guide-hero .button { width: 100%; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-procedure-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .guide-hero { padding: 19px; }
  .guide-hero h2 { font-size: 19px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 90px; }
  .guide-jump a { min-height: 42px; }
  .guide-procedure { padding: 16px; }
  .guide-callout { padding: 14px; }
}

.sale-type-options { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.sale-type-options legend { margin-bottom: 7px; color: #374741; font-size: 12px; font-weight: 700; }
.sale-type-options label { display: flex; align-items: center; justify-content: center; min-height: 40px; flex: 1 1 120px; padding: 0 12px; border: 1px solid #e0e8e3; border-radius: 8px; color: #53635b; background: #fff; cursor: pointer; }
.sale-type-options input { accent-color: var(--green); }
.sale-type-options label:has(input:checked) { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }
.credit-fields { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbf8; }
.credit-fields[hidden] { display: none; }
.sale-cart { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f8fbf8; }
.sale-cart:empty { display: none; }
.sale-cart-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #e6eee8; color: var(--ink); font-size: 12px; }
.sale-cart-row:last-child { border-bottom: 0; }
.sale-cart-row strong { white-space: nowrap; }
.sale-cart-remove { padding: 5px 7px; border: 0; color: #a13b34; background: transparent; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.sale-cart-remove:hover, .sale-cart-remove:focus-visible { text-decoration: underline; }
.repayment-form { display: grid; min-width: 190px; gap: 7px; }
.repayment-form label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.repayment-form input, .repayment-form select { min-height: 36px; padding: 7px 9px; }
.repayment-form .mobile-money-fields { display: block; }
.credit-welcome, .jars-welcome { margin-top: 22px; }
.jar-variant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.jar-variant-card { min-width: 0; padding: 18px; }
.jar-variant-card h3 { margin: 4px 0; color: var(--ink); font: 700 17px Manrope, sans-serif; }
.jar-stock-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.jar-stock-pair > div { display: grid; justify-items: start; gap: 5px; padding: 12px; border-radius: 9px; background: var(--green-soft); }
.jar-stock-pair small { color: var(--muted); font-size: 12px; }
.jar-stock-pair strong { color: var(--green-dark); font: 700 24px Manrope, sans-serif; }
.jar-checkout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jar-checkout-form { display: grid; gap: 11px; }
.water-opening-panel { margin: 20px 0; }
.report-subsection { margin-top: 22px; }
.report-subsection h3 { margin: 0 0 10px; color: var(--ink); font: 700 15px Manrope, sans-serif; }

@media (max-width: 780px) {
  .jar-variant-grid, .jar-checkout-grid { grid-template-columns: 1fr; }
  .repayment-form { min-width: 170px; }
}
@media (max-width: 520px) {
  .jar-variant-card { padding: 14px; }
  .jar-stock-pair strong { font-size: 21px; }
  .repayment-form { min-width: 150px; }
  .credit-fields { padding: 11px; }
}