:root {
  --green-900: #074b34;
  --green-800: #075b3d;
  --green-700: #087451;
  --green-100: #e2f1e7;
  --green-050: #f1f8f3;
  --ink: #15221c;
  --muted: #68756e;
  --line: #dde4df;
  --canvas: #f4f6f3;
  --card: #fff;
  --orange: #c87812;
  --orange-soft: #fff1dc;
  --blue: #216b91;
  --blue-soft: #e4f0f7;
  --red: #a94039;
}

* { box-sizing: border-box; }
html { background: #dfe8e1; }
body {
  width: min(100%, 430px);
  min-width: 320px;
  min-height: 100vh;
  margin: 0 auto;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  letter-spacing: 0;
}
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, canvas:focus-visible { outline: 3px solid rgba(200, 120, 18, .35); outline-offset: 2px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 58px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(12px);
}
.topbar-inner { height: 100%; padding: 7px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { min-width: 0; display: inline-flex; align-items: center; }
.brand img { width: 156px; height: 42px; object-fit: contain; object-position: left center; display: block; }
.topbar-branch { min-height: 34px; padding: 0 11px; border: 1px solid #cdd9d1; border-radius: 17px; background: #fff; color: var(--green-800); font-size: 12px; font-weight: 800; }

.h5-page { min-height: calc(100vh - 58px); padding-bottom: 80px; }
.h5-header { padding: 20px 16px 18px; color: #fff; background: var(--green-900); }
.h5-header h1 { margin: 0; font-size: 22px; line-height: 1.25; }
.h5-header p { margin: 5px 0 0; color: #cfe5d7; font-size: 12px; line-height: 1.45; }
.h5-context { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.h5-context span { min-height: 24px; padding: 4px 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 5px; background: rgba(255,255,255,.08); color: #eaf5ed; font-size: 10px; font-weight: 700; }
.h5-content { padding: 12px 12px 0; }

.kyb-strip, .attention-card, .info-banner, .success-panel {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.kyb-strip > div, .success-panel > div { min-width: 0; flex: 1; }
.kyb-strip strong, .success-panel strong { display: block; font-size: 13px; }
.kyb-strip small, .success-panel small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.kyb-strip button { border: 0; background: transparent; color: var(--green-700); font-size: 11px; font-weight: 800; }
.status-check, .success-panel > span { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green-100); color: var(--green-700); font-weight: 900; }

.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.metric-card { min-height: 102px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.metric-card span { display: block; color: var(--muted); font-size: 11px; }
.metric-card strong { display: block; margin-top: 8px; color: var(--green-900); font-size: 21px; line-height: 1.1; }
.metric-card small { display: block; margin-top: 7px; color: var(--green-700); font-size: 10px; line-height: 1.4; }

.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; margin-top: 8px; }
.quick-grid button { min-height: 70px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 10px; font-weight: 800; }
.quick-grid button span { display: block; margin-bottom: 6px; color: var(--green-700); font-size: 19px; line-height: 1; }

.attention-card { margin-top: 8px; align-items: stretch; border-color: #edcd9f; background: #fffaf2; }
.attention-card > div { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; }
.attention-card strong, .attention-card small { display: block; }
.attention-card strong { font-size: 12px; }
.attention-card small { margin-top: 3px; color: #765e3b; font-size: 10px; line-height: 1.4; }
.attention-card > button { align-self: center; min-height: 34px; padding: 0 10px; border: 0; border-radius: 5px; background: var(--orange); color: white; font-size: 10px; font-weight: 800; }
.attention-icon { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: var(--orange-soft); color: var(--orange); font-weight: 900; }

.priority-task { padding: 16px; border: 1px solid #e7c88e; border-radius: 8px; background: #fff8ea; }
.priority-copy > span { color: var(--orange); font-size: 10px; font-weight: 800; }
.priority-copy h2 { margin: 6px 0 0; color: #5d411d; font-size: 18px; line-height: 1.3; }
.priority-copy p { margin: 5px 0 0; color: #7d6542; font-size: 10px; line-height: 1.5; }
.priority-copy > strong { display: block; margin-top: 14px; color: var(--ink); font-size: 24px; }
.priority-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 7px; margin-top: 14px; }
.priority-actions button { min-height: 39px; }
.complete-task { border-color: #b7d7c0; background: var(--green-050); }
.complete-task .priority-copy h2 { color: var(--green-900); }
.complete-task .priority-copy p { color: var(--muted); }
.complete-task > .primary-action { width: 100%; margin-top: 14px; }

.funds-overview { display: grid; grid-template-columns: 1.25fr .9fr; overflow: hidden; border: 1px solid var(--green-800); border-radius: 8px; background: var(--green-900); color: #fff; }
.funds-overview > div { min-height: 118px; padding: 15px; }
.funds-overview > div + div { border-left: 1px solid rgba(255,255,255,.18); }
.funds-overview span, .funds-overview strong, .funds-overview small { display: block; }
.funds-overview span { color: #cfe4d6; font-size: 10px; }
.funds-overview strong { margin-top: 9px; font-size: 24px; line-height: 1.15; }
.funds-overview small { margin-top: 8px; color: #e3f0e7; font-size: 9px; line-height: 1.4; }
.funds-secondary strong { font-size: 22px; }

.command-list { margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.command-list button { width: 100%; min-height: 56px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.command-list button:last-child { border-bottom: 0; }
.command-list strong { font-size: 12px; }
.command-list span { color: var(--muted); font-size: 9px; }

.service-feature { position: relative; width: 100%; min-height: 154px; overflow: hidden; padding: 0; border: 0; border-radius: 8px; background: #173d2c; text-align: left; }
.service-feature img { width: 100%; height: 154px; display: block; object-fit: cover; opacity: .5; }
.service-feature > span { position: absolute; inset: 0; padding: 17px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; color: #fff; }
.service-feature small { font-size: 9px; opacity: .82; }
.service-feature strong { max-width: 250px; margin-top: 4px; font-size: 16px; line-height: 1.35; }
.service-feature em { margin-top: 10px; padding: 5px 9px; border: 1px solid rgba(255,255,255,.45); border-radius: 4px; color: #fff; font-size: 9px; font-style: normal; font-weight: 800; }

.section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 20px 2px 8px; }
.section-title h2 { margin: 0; font-size: 14px; line-height: 1.3; }
.section-title span { color: var(--muted); font-size: 10px; }

.list-card { margin-bottom: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.order-button { width: 100%; padding: 13px; border: 0; background: #fff; text-align: left; }
.order-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-heading > div { min-width: 0; }
.order-heading strong { display: block; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.order-heading small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.order-summary { margin: 10px 0 0; padding: 9px; border-radius: 6px; background: #f4f6f3; color: #4f5d55; font-size: 10px; line-height: 1.45; }
.order-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.order-footer span { color: var(--muted); font-size: 10px; }
.order-footer strong { color: var(--green-700); font-size: 15px; }
.status-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 4px; background: #eef1ef; color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-pill.green { background: var(--green-100); color: var(--green-700); }
.status-pill.orange { background: var(--orange-soft); color: #8a5510; }
.status-pill.blue { background: var(--blue-soft); color: var(--blue); }
.status-pill.muted { background: #eef1ef; color: var(--muted); }

.service-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 170px; gap: 8px; margin: 0 -12px; padding: 0 12px 4px; overflow-x: auto; scroll-snap-type: x mandatory; }
.service-card { padding: 0 0 10px; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.service-card img { width: 100%; height: 92px; display: block; object-fit: cover; }
.service-card span, .service-card strong, .service-card small { display: block; margin-left: 10px; margin-right: 10px; }
.service-card span { margin-top: 9px; color: var(--green-700); font-size: 9px; font-weight: 800; }
.service-card strong { margin-top: 3px; font-size: 12px; line-height: 1.4; }
.service-card small { margin-top: 5px; color: var(--muted); font-size: 9px; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 7px; background: #e9eeea; }
.segmented button { min-height: 34px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.segmented button.active { background: #fff; color: var(--green-700); box-shadow: 0 1px 3px rgba(20,50,34,.08); }
.info-banner { margin-top: 8px; align-items: flex-start; background: var(--green-050); }
.info-banner > span { color: var(--green-700); font-size: 16px; }
.info-banner p { margin: 0; color: #536259; font-size: 10px; line-height: 1.5; }

.split-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 7px; padding: 0 13px 13px; }
.split-actions button, .wide-primary, .wide-secondary, .accent-action, .secondary-action, .primary-action { min-height: 42px; border-radius: 6px; font-size: 11px; font-weight: 800; }
.secondary-action, .wide-secondary { border: 1px solid #c7d1ca; background: #fff; color: var(--ink); }
.primary-action, .wide-primary { border: 1px solid var(--green-700); background: var(--green-700); color: #fff; }
.accent-action { border: 1px solid var(--orange); background: var(--orange); color: #fff; }
.wide-primary, .wide-secondary { width: 100%; margin-top: 10px; }
.wide-primary:disabled { opacity: .45; }

.money-panel { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 8px; background: var(--green-900); color: #fff; }
.money-panel > div { min-height: 108px; padding: 15px; }
.money-panel > div + div { border-left: 1px solid rgba(255,255,255,.18); }
.money-panel span, .money-panel strong, .money-panel small { display: block; }
.money-panel span { color: #cfe4d6; font-size: 10px; }
.money-panel strong { margin-top: 8px; font-size: 20px; }
.money-panel small { margin-top: 7px; color: #e1efe6; font-size: 9px; line-height: 1.4; }
.receive-list { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.receive-row { padding: 13px; border-bottom: 1px solid var(--line); }
.receive-row:last-child { border-bottom: 0; }
.receive-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.receive-head strong, .receive-head small { display: block; }
.receive-head strong { font-size: 12px; }
.receive-head small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.receive-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; }
.stepper { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 3px 7px; border: 1px solid #cbd5ce; border-radius: 6px; background: #fff; }
.stepper button { width: 25px; height: 25px; border: 0; background: transparent; color: var(--green-700); font-size: 17px; line-height: 1; }
.stepper strong { min-width: 20px; text-align: center; font-size: 12px; }
.photo-action { min-height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: #edf1ee; color: #546159; font-size: 10px; font-weight: 800; }
.success-panel { border-color: #acd1b6; background: var(--green-050); }

.plain-list, .role-list { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.plain-list > div, .plain-list > button, .role-list > button { width: 100%; min-height: 58px; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.plain-list > div:last-child, .plain-list > button:last-child, .role-list > button:last-child { border-bottom: 0; }
.plain-list strong, .plain-list span, .role-list strong, .role-list small { display: block; }
.plain-list strong, .role-list strong { font-size: 11px; }
.plain-list span, .role-list small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.role-list > button > div { min-width: 0; }
.role-list > button > span { color: var(--green-700); font-size: 20px; }

.finance-total { padding: 16px; border-radius: 8px; background: var(--green-900); color: #fff; }
.finance-total span, .finance-total strong, .finance-total small { display: block; }
.finance-total span { color: #cfe4d6; font-size: 10px; }
.finance-total strong { margin-top: 6px; font-size: 25px; }
.finance-total small { margin-top: 8px; color: #deeee3; font-size: 9px; }
.finance-actions { padding: 8px 0 0; grid-template-columns: 1fr 1fr; }
.chart-card { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.bars { height: 112px; display: flex; align-items: stretch; gap: 8px; border-bottom: 1px solid var(--line); }
.bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; }
.bars i { width: 100%; display: block; border-radius: 3px 3px 0 0; background: var(--green-700); }
.bars span { padding-bottom: 4px; color: var(--muted); font-size: 8px; }
.chart-card p { margin: 10px 0 0; color: var(--green-700); font-size: 9px; }
.accounting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.accounting-grid button { min-height: 58px; padding: 11px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.accounting-grid strong { font-size: 11px; }
.accounting-grid span { color: var(--green-700); font-size: 9px; }

.credit-card { width: 100%; min-height: 124px; padding: 16px; display: block; border: 0; border-radius: 8px; background: var(--green-900); color: #fff; text-align: left; }
.credit-card span, .credit-card strong, .credit-card small { display: block; }
.credit-card span { color: #cfe4d6; font-size: 10px; }
.credit-card strong { margin-top: 22px; font-size: 18px; }
.credit-card small { margin-top: 9px; color: #dbece1; font-size: 9px; }

.bottom-nav { position: fixed; left: 50%; bottom: 0; z-index: 45; width: min(100%, 430px); min-height: 68px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #d5ddd7; background: rgba(255,255,255,.98); box-shadow: 0 -4px 12px rgba(12,57,37,.06); }
.bottom-nav button { min-height: 66px; border: 0; border-top: 2px solid transparent; background: transparent; color: #758078; font-size: 10px; font-weight: 800; }
.bottom-nav button.active { color: var(--green-700); }
.bottom-nav button.active { border-top-color: var(--green-700); }

.h5-sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(9,29,19,.52); }
.h5-sheet { position: fixed; left: 50%; bottom: 0; z-index: 90; width: min(100%, 430px); max-height: 90vh; overflow-y: auto; transform: translateX(-50%); padding: 10px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; background: var(--canvas); box-shadow: 0 -16px 40px rgba(10,45,28,.18); }
.sheet-handle { width: 40px; height: 4px; margin: 0 auto 13px; border-radius: 4px; background: #c9d2cb; }
.sheet-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-top > div { min-width: 0; }
.sheet-top h2 { margin: 0; font-size: 17px; line-height: 1.3; }
.sheet-top p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.sheet-close { width: 32px; height: 32px; flex: 0 0 32px; border: 0; border-radius: 50%; background: #e4e9e5; color: var(--ink); font-size: 18px; }
.sheet-segmented { margin-top: 14px; }
.sheet-list { margin-top: 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.quantity-row { min-height: 62px; padding: 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.quantity-row:last-child { border-bottom: 0; }
.quantity-row > div:first-child { min-width: 0; }
.quantity-row strong, .quantity-row small { display: block; }
.quantity-row strong { font-size: 11px; }
.quantity-row small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sheet-summary { margin-top: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sheet-summary > div, .detail-amount > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 0; }
.sheet-summary span, .detail-amount span { color: var(--muted); font-size: 10px; }
.sheet-summary strong, .detail-amount strong { font-size: 12px; }
.sheet-summary p { margin: 8px 0 0; color: var(--green-700); font-size: 9px; line-height: 1.45; }
.detail-amount { margin-top: 14px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sheet-section-title { margin: 18px 2px 8px; font-size: 12px; }
.timeline { position: relative; margin: 0; padding: 13px 13px 13px 28px; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.timeline::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: 16px; width: 1px; background: #d0d9d2; }
.timeline li { position: relative; padding: 0 0 14px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -16px; top: 4px; width: 7px; height: 7px; border: 2px solid #c0cac3; border-radius: 50%; background: #fff; }
.timeline li.done::before { border-color: var(--green-700); background: var(--green-700); }
.timeline strong, .timeline span { display: block; }
.timeline strong { font-size: 10px; }
.timeline span { margin-top: 3px; color: var(--muted); font-size: 9px; }

.sheet-search { height: 40px; margin-top: 14px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.sheet-search span { color: var(--green-700); }
.sheet-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); font-size: 11px; }
.market-categories { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; }
.market-categories button { min-height: 32px; padding: 0 10px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--muted); font-size: 9px; font-weight: 800; }
.market-categories button.active { border-color: var(--green-700); background: var(--green-700); color: #fff; }
.market-list { margin-top: 10px; display: grid; gap: 8px; }
.market-list article { min-height: 98px; display: grid; grid-template-columns: 112px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.market-list img { width: 112px; height: 100%; min-height: 98px; object-fit: cover; }
.market-list article > div { min-width: 0; padding: 10px; }
.market-list span, .market-list strong, .market-list small { display: block; }
.market-list span { color: var(--green-700); font-size: 8px; font-weight: 800; }
.market-list strong { margin-top: 2px; font-size: 11px; line-height: 1.35; }
.market-list small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.market-list button { min-height: 27px; margin-top: 7px; padding: 0 9px; border: 0; border-radius: 4px; background: var(--green-700); color: #fff; font-size: 8px; font-weight: 800; }
.quote-bar { position: sticky; bottom: -18px; width: 100%; min-height: 44px; margin-top: 10px; border: 0; border-radius: 6px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; }
.service-hero { width: calc(100% + 28px); height: 190px; margin: 14px -14px 0; display: block; object-fit: cover; }
.service-detail { padding: 14px 0 2px; }
.service-detail > span { color: var(--green-700); font-size: 13px; font-weight: 800; }
.service-detail h3 { margin: 14px 0 5px; font-size: 12px; }
.service-detail p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.signature-label { display: block; margin: 14px 2px 6px; font-size: 10px; font-weight: 800; }
.signature-pad { width: 100%; height: 120px; display: block; border: 1px dashed #aebdb3; border-radius: 8px; background: #fff; touch-action: none; }
.clear-signature { min-height: 30px; margin-top: 6px; padding: 0 10px; border: 0; background: transparent; color: var(--green-700); font-size: 9px; font-weight: 800; }
.h5-toast { position: fixed; top: 70px; left: 50%; z-index: 110; width: calc(100% - 24px); max-width: 406px; transform: translateX(-50%); padding: 11px 13px; border: 1px solid #acd4b7; border-radius: 7px; background: #ebf8ef; color: var(--green-800); box-shadow: 0 8px 22px rgba(14,56,36,.14); font-size: 10px; font-weight: 800; }

@media (max-width: 350px) {
  .brand img { width: 142px; }
  .quick-grid button { font-size: 9px; }
  .market-list article { grid-template-columns: 96px 1fr; }
  .market-list img { width: 96px; }
}

/* Product Design alternate direction: warm editorial operations surface. */
:root {
  --green-900: #123b2d;
  --green-800: #18553e;
  --green-700: #197052;
  --green-100: #e5eee6;
  --green-050: #f2f5ec;
  --ink: #17231d;
  --muted: #6d776f;
  --line: #deded3;
  --canvas: #f4f0e7;
  --orange: #d26e2d;
  --orange-soft: #f9e8da;
  --blue: #3c7084;
  --blue-soft: #e3eff0;
}
body { background: var(--canvas); }
.topbar { height: 68px; border-bottom: 0; background: #f4f0e7; }
.topbar-inner { padding: 9px 18px; }
.brand img { width: 184px; height: 48px; }
.topbar-branch { min-height: 38px; padding: 0 14px; border: 1px solid #bfc7bc; border-radius: 20px; background: transparent; font-size: 12px; }
.h5-page { min-height: calc(100vh - 68px); }
.h5-header { padding: 27px 18px 28px; background: var(--green-900); border-radius: 0 0 28px 28px; }
.h5-header h1 { font-size: 30px; letter-spacing: .2px; }
.h5-header p { margin-top: 8px; color: #d9e7da; font-size: 13px; }
.h5-context { gap: 7px; margin-top: 17px; }
.h5-context span { min-height: 29px; padding: 6px 10px; border: 0; border-radius: 15px; background: rgba(255,255,255,.12); font-size: 10px; }
.h5-content { padding: 19px 16px 0; }
.section-title { margin: 27px 1px 11px; }
.section-title h2 { font-size: 17px; }
.section-title span { font-size: 11px; }
.priority-task { padding: 20px; border: 0; border-radius: 22px; background: #fae6d5; box-shadow: 0 10px 22px rgba(76,48,28,.07); }
.priority-copy > span { font-size: 11px; letter-spacing: .4px; }
.priority-copy h2 { margin-top: 9px; color: #3f2a1e; font-size: 23px; }
.priority-copy p { margin-top: 8px; color: #7a5c47; font-size: 12px; }
.priority-copy > strong { margin-top: 20px; font-size: 32px; letter-spacing: .4px; }
.priority-actions { gap: 9px; margin-top: 18px; }
.priority-actions button { min-height: 46px; border-radius: 13px; font-size: 12px; }
.priority-task .secondary-action { border-color: #d8b8a2; background: transparent; }
.priority-task .primary-action { border-color: #c85e23; background: #c85e23; }
.funds-overview { border: 0; border-radius: 22px; box-shadow: 0 10px 22px rgba(13,60,42,.08); }
.funds-overview > div { min-height: 136px; padding: 19px; }
.funds-overview span { font-size: 11px; }
.funds-overview strong { margin-top: 12px; font-size: 28px; }
.funds-overview small { margin-top: 10px; font-size: 10px; }
.funds-secondary strong { font-size: 26px; }
.command-list { border: 0; border-radius: 18px; box-shadow: 0 8px 18px rgba(25,44,31,.06); }
.command-list button { min-height: 70px; padding: 14px 17px; }
.command-list button:first-child { background: #fffdf8; }
.command-list strong { font-size: 14px; }
.command-list span { font-size: 11px; }
.service-feature { min-height: 190px; border-radius: 22px; box-shadow: 0 10px 22px rgba(24,53,37,.12); }
.service-feature img { height: 190px; opacity: .54; }
.service-feature > span { padding: 20px; }
.service-feature small { font-size: 11px; }
.service-feature strong { font-size: 20px; }
.service-feature em { padding: 7px 11px; border-radius: 13px; font-size: 10px; }
.list-card { margin-bottom: 10px; border: 0; border-left: 5px solid #a9b7ac; border-radius: 0 18px 18px 0; box-shadow: 0 7px 16px rgba(31,47,35,.05); }
.list-card:has(.status-pill.orange) { border-left-color: var(--orange); }
.list-card:has(.status-pill.blue) { border-left-color: var(--blue); }
.order-button { padding: 17px 16px; }
.order-heading strong { font-size: 15px; }
.order-heading small { margin-top: 6px; font-size: 11px; }
.order-summary { margin-top: 13px; padding: 11px; border-radius: 10px; font-size: 11px; }
.order-footer { margin-top: 14px; }
.order-footer span { font-size: 11px; }
.order-footer strong { font-size: 19px; }
.status-pill { min-height: 27px; padding: 5px 9px; border-radius: 14px; font-size: 10px; }
.bottom-nav { min-height: 76px; padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); border-top: 0; background: var(--green-900); box-shadow: 0 -8px 20px rgba(18,59,45,.18); }
.bottom-nav button { min-height: 58px; border: 0; border-radius: 17px; color: #c9d8cd; font-size: 10px; }
.bottom-nav button.active { border: 0; background: #f4f0e7; color: var(--green-900); }
.h5-sheet { padding: 12px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #f8f5ed; }
.sheet-top h2 { font-size: 23px; }
.sheet-top p { font-size: 12px; }
.sheet-close { width: 42px; height: 42px; flex-basis: 42px; background: #e7e7dd; font-size: 24px; }
.detail-amount, .timeline, .sheet-list, .sheet-summary, .receive-list, .plain-list, .role-list { border: 0; border-radius: 17px; box-shadow: 0 8px 16px rgba(26,44,34,.05); }
.detail-amount { padding: 16px; }
.timeline { padding: 17px 17px 17px 33px; }
.h5-toast { top: 80px; border: 0; border-radius: 16px; background: var(--green-900); color: #fff; font-size: 11px; }

/* V2 direction: charcoal ledger with coral action states. */
:root {
  --green-900: #202623;
  --green-800: #2d3933;
  --green-700: #26745a;
  --green-100: #dcefe5;
  --green-050: #f0f5f0;
  --ink: #1e2522;
  --muted: #707773;
  --line: #d6d9d4;
  --canvas: #f2f0ea;
  --orange: #e0673f;
  --orange-soft: #fbe4dc;
  --blue: #315f77;
  --blue-soft: #e3edf1;
}
body { background: var(--canvas); }
.topbar { height: 64px; background: #202623; }
.topbar-inner { padding: 8px 16px; }
.brand { padding: 5px 10px; border-radius: 6px; background: #f5f1e8; }
.brand img { width: 168px; height: 40px; }
.topbar-branch { border: 1px solid #65716a; background: transparent; color: #f5f1e8; }
.h5-page { min-height: calc(100vh - 64px); }
.h5-header { padding: 24px 17px 26px; background: #202623; border-radius: 0; border-top: 1px solid #3a4540; }
.h5-header h1 { color: #f5f1e8; font-size: 28px; font-weight: 800; }
.h5-header p { color: #cbd2cb; font-size: 12px; }
.h5-context span { border-radius: 4px; background: #364039; color: #e7eee8; }
.h5-content { padding: 17px 15px 0; }
.section-title { margin: 24px 0 9px; }
.section-title h2 { color: #202623; font-size: 16px; }
.section-title span { color: #8a918c; }
.priority-task { border: 1px solid #e7b19e; border-radius: 6px; background: #fff; box-shadow: 5px 5px 0 #e9b5a3; }
.priority-copy > span { color: var(--orange); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.priority-copy h2 { color: #202623; font-size: 21px; }
.priority-copy p { color: #6d756f; font-size: 11px; }
.priority-copy > strong { color: #202623; font-size: 30px; }
.priority-actions button { border-radius: 4px; }
.priority-task .secondary-action { border-color: #b7bfba; background: #f6f6f2; color: #202623; }
.priority-task .primary-action { border-color: #e0673f; background: #e0673f; }
.funds-overview { border-radius: 6px; background: #202623; box-shadow: none; }
.funds-overview > div { min-height: 124px; padding: 17px; }
.funds-overview > div + div { border-left: 1px solid #4a554f; }
.funds-overview strong { color: #fff; font-size: 26px; }
.funds-overview small, .funds-overview span { color: #cbd2cb; }
.command-list { border: 1px solid #c8cdc8; border-radius: 6px; box-shadow: none; }
.command-list button { min-height: 62px; background: #fff; }
.command-list button:first-child { background: #fff; }
.command-list button + button { border-top: 1px solid #e0e2dd; }
.command-list strong { color: #202623; font-size: 13px; }
.command-list span { font-size: 10px; }
.service-feature { border-radius: 6px; box-shadow: none; background: #26312b; }
.service-feature img { filter: grayscale(.25) contrast(1.05); opacity: .45; }
.service-feature > span { padding: 18px; }
.service-feature strong { font-size: 19px; }
.service-feature em { border-radius: 4px; background: #e0673f; border: 0; }
.list-card { border: 1px solid #d5d8d3; border-left: 6px solid #bbc5bd; border-radius: 4px; box-shadow: none; }
.list-card:has(.status-pill.orange) { border-left-color: #e0673f; }
.list-card:has(.status-pill.blue) { border-left-color: #5d8796; }
.order-button { padding: 16px 14px; }
.order-heading strong { font-size: 14px; }
.order-heading small { color: #7b837d; font-size: 10px; }
.order-summary { border-radius: 4px; background: #f0f1ed; color: #606a63; }
.order-footer strong { color: #202623; }
.status-pill { min-height: 24px; border-radius: 4px; }
.status-pill.orange { background: #fbe4dc; color: #ad4222; }
.status-pill.blue { background: #e3edf1; color: #315f77; }
.status-pill.green { background: #dcefe5; color: #1d6b4d; }
.bottom-nav { min-height: 72px; padding: 6px 9px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid #3a4540; background: #202623; box-shadow: none; }
.bottom-nav button { min-height: 56px; border-radius: 4px; color: #bfc8c1; }
.bottom-nav button.active { background: #e0673f; color: #fff; }
.h5-sheet { padding: 12px 16px calc(22px + env(safe-area-inset-bottom)); border-radius: 6px 6px 0 0; background: #f7f4ed; }
.sheet-top h2 { color: #202623; font-size: 22px; }
.sheet-top p { color: #6d756f; font-size: 11px; }
.sheet-close { border-radius: 4px; background: #e1e3de; }
.detail-amount, .timeline, .sheet-list, .sheet-summary, .receive-list, .plain-list, .role-list { border: 1px solid #d5d8d3; border-radius: 5px; box-shadow: none; }
.h5-toast { top: 76px; border-radius: 4px; background: #202623; color: #fff; }

/* Client signature: iFoodPulse green leads the brand; charcoal, paper and coral support it. */
:root {
  --green-900: #0d5138;
  --green-800: #176b45;
  --green-700: #4f9a46;
  --green-100: #e2f0d7;
  --green-050: #f2f6ea;
  --ink: #202623;
  --muted: #6d756f;
  --line: #d9ddd2;
  --canvas: #f5f1e8;
  --card: #fffdf8;
  --orange: #e0673f;
  --orange-soft: #fbe4dc;
}
body { background: var(--canvas); }
.topbar { background: #202623; }
.brand { background: #f5f1e8; }
.topbar-branch { border-color: #6e8174; color: #f5f1e8; }
.h5-header { background: var(--green-900); border-top-color: #2a7956; border-bottom: 7px solid #202623; }
.h5-header h1 { color: #fffdf8; }
.h5-context span { background: rgba(255,255,255,.13); color: #f0f6e9; }
.h5-content { background: var(--canvas); }

.brand-hero {
  position: relative;
  min-height: 198px;
  margin: -17px -15px 4px;
  overflow: hidden;
  background: #dfead1;
  border-bottom: 7px solid var(--green-700);
}
.brand-hero img {
  width: 100%;
  height: 218px;
  display: block;
  object-fit: cover;
  object-position: 55% 26%;
}
.brand-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58px;
  background: rgba(13,81,56,.86);
}
.brand-hero-caption {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #fffdf8;
}
.brand-hero-caption strong { font-size: 18px; }
.brand-hero-caption span { font-size: 10px; opacity: .9; }

.priority-task { border-color: #efb59f; background: var(--card); box-shadow: 5px 5px 0 #efc1ad; }
.priority-copy > span { color: var(--orange); }
.priority-task .primary-action { background: var(--orange); border-color: var(--orange); }
.funds-overview, .money-panel, .finance-total, .credit-card { background: var(--green-900); }
.service-feature { background: var(--green-900); border-bottom: 7px solid var(--green-700); }
.service-feature img { filter: saturate(1.08) contrast(1.02); opacity: .62; }
.service-feature em { background: var(--orange); }
.status-pill.green { background: var(--green-100); color: var(--green-800); }
.status-pill.orange { background: var(--orange-soft); color: #ad4222; }
.wide-primary, .primary-action { background: var(--green-800); border-color: var(--green-800); }
.accent-action, .quote-bar { background: var(--orange); border-color: var(--orange); }
.bottom-nav { background: #202623; }
.bottom-nav button.active { background: var(--green-700); color: #fff; }
.h5-toast { background: var(--green-900); }

@media (max-width: 350px) {
  .brand-hero-caption span { max-width: 150px; text-align: right; }
}

/* V3: compact, product-led mobile operations home. */
:root {
  --green-900: #075538;
  --green-800: #0a6b45;
  --green-700: #4f9a46;
  --green-100: #e5f1dc;
  --green-050: #f3f7ec;
  --ink: #202623;
  --muted: #69756d;
  --line: #dfe4dc;
  --canvas: #f7f7f2;
  --card: #ffffff;
  --orange: #e0673f;
  --orange-soft: #fbe5dd;
}
html { background: #dfe8dd; }
body { background: var(--canvas); }
.topbar { height: 58px; border-bottom: 1px solid #e2e8e0; background: #fff; }
.topbar-inner { padding: 7px 14px; }
.brand { padding: 0; background: transparent; }
.brand img { width: 150px; height: 36px; }
.topbar-branch { min-height: 34px; border-color: #a7c1ad; background: #f7fbf4; color: var(--green-900); }
.h5-page { min-height: calc(100vh - 58px); padding-bottom: 78px; }
.h5-header { padding: 19px 16px 17px; border-bottom: 0; background: var(--green-900); }
.h5-header h1 { font-size: 24px; line-height: 1.2; }
.h5-header p { margin-top: 5px; color: #d9eadb; font-size: 11px; }
.h5-context { gap: 6px; margin-top: 11px; }
.h5-context span { min-height: 25px; padding: 5px 8px; border-radius: 13px; background: rgba(255,255,255,.13); font-size: 9px; }
.h5-content { padding: 12px 12px 0; }
.brand-hero { min-height: 116px; margin: -12px -12px 8px; border-bottom: 4px solid var(--green-700); }
.brand-hero img { height: 120px; object-position: 58% 15%; }
.brand-hero::after { height: 35px; background: rgba(7,85,56,.8); }
.brand-hero-caption { left: 12px; right: 12px; bottom: 7px; }
.brand-hero-caption strong { font-size: 14px; }
.brand-hero-caption span { font-size: 9px; }
.section-title { margin: 18px 1px 8px; }
.section-title h2 { font-size: 14px; }
.section-title span { font-size: 10px; }
.priority-task { padding: 15px; border: 1px solid #efb59f; border-left: 4px solid var(--orange); border-radius: 10px; background: #fff; box-shadow: none; }
.priority-copy > span { font-size: 10px; letter-spacing: .4px; }
.priority-copy h2 { margin-top: 5px; font-size: 18px; }
.priority-copy p { margin-top: 4px; font-size: 10px; }
.priority-copy > strong { margin-top: 12px; font-size: 25px; }
.priority-actions { gap: 7px; margin-top: 12px; }
.priority-actions button { min-height: 38px; border-radius: 7px; font-size: 10px; }
.priority-task .secondary-action { border-color: #c8d2ca; background: #f8faf7; }
.funds-overview { grid-template-columns: 1.2fr .8fr; border: 0; border-radius: 10px; }
.funds-overview > div { min-height: 104px; padding: 14px; }
.funds-overview span { font-size: 9px; }
.funds-overview strong { margin-top: 7px; font-size: 23px; }
.funds-overview small { margin-top: 7px; font-size: 9px; }
.funds-secondary strong { font-size: 21px; }
.command-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; overflow: visible; border: 0; background: transparent; }
.command-list button { min-height: 74px; padding: 10px 6px; display: block; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: center; }
.command-list button + button { border-top: 1px solid var(--line); }
.command-list strong { display: block; font-size: 11px; }
.command-list span { display: block; margin-top: 5px; font-size: 9px; }
.command-list button::before { display: block; margin-bottom: 6px; color: var(--green-700); font-size: 21px; line-height: 1; }
.command-list button:nth-child(1)::before { content: "+"; }
.command-list button:nth-child(2)::before { content: "✓"; }
.command-list button:nth-child(3)::before { content: "$"; }
.service-feature { min-height: 134px; border-radius: 10px; border-bottom-width: 4px; }
.service-feature img { height: 134px; opacity: .58; }
.service-feature > span { padding: 14px; }
.service-feature small { font-size: 9px; }
.service-feature strong { max-width: 240px; font-size: 15px; }
.service-feature em { margin-top: 7px; padding: 5px 9px; border-radius: 5px; font-size: 9px; }
.list-card { margin-bottom: 7px; border: 1px solid var(--line); border-left: 3px solid #b5c8b7; border-radius: 9px; box-shadow: none; }
.list-card:has(.status-pill.orange) { border-left-color: var(--orange); }
.order-button { padding: 12px; }
.order-heading strong { font-size: 12px; }
.order-heading small { margin-top: 4px; font-size: 9px; }
.order-summary { margin-top: 8px; padding: 8px; border-radius: 6px; font-size: 9px; }
.order-footer { margin-top: 8px; }
.order-footer span { font-size: 9px; }
.order-footer strong { font-size: 15px; }
.status-pill { min-height: 22px; padding: 4px 7px; border-radius: 11px; font-size: 9px; }
.bottom-nav { min-height: 70px; padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid #dce4dc; background: rgba(255,255,255,.98); box-shadow: 0 -6px 18px rgba(8,55,35,.08); }
.bottom-nav button { min-height: 58px; border-radius: 10px; color: #7b877f; font-size: 9px; }
.bottom-nav button::before { display: block; height: 20px; margin-bottom: 3px; color: currentColor; font-size: 19px; line-height: 1; }
.bottom-nav button[data-screen="home"]::before { content: "⌂"; }
.bottom-nav button[data-screen="orders"]::before { content: "▤"; }
.bottom-nav button[data-screen="receive"]::before { content: "✓"; }
.bottom-nav button[data-screen="finance"]::before { content: "▥"; }
.bottom-nav button[data-screen="settings"]::before { content: "⚙"; }
.bottom-nav button.active { background: var(--green-100); color: var(--green-900); }
.h5-sheet { border-radius: 18px 18px 0 0; background: #fff; }
.h5-toast { top: 68px; border-radius: 10px; background: var(--green-900); }

/* V3 interaction fixes: the menu is anchored to the top bar, feedback stays above the nav. */
button:focus-visible, input:focus-visible, canvas:focus-visible {
  outline: 3px solid rgba(79, 154, 70, .62);
  outline-offset: 3px;
}
.topbar { position: sticky; z-index: 60; }
.topbar-branch { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 126px; padding: 0 12px; }
.topbar-branch small { color: #6c7e70; font-size: 9px; font-weight: 800; }
.topbar-branch span { white-space: nowrap; }
.topbar-branch b { color: var(--green-800); font-size: 14px; font-weight: 800; line-height: 1; }
.branch-menu {
  position: fixed;
  top: 64px;
  right: max(12px, calc((100vw - 430px) / 2 + 12px));
  z-index: 75;
  width: min(220px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid #cfe0d0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(8, 56, 35, .18);
}
.branch-menu[hidden] { display: none; }
.branch-menu-label { padding: 5px 9px 7px; color: #738078; font-size: 10px; font-weight: 800; }
.branch-menu button {
  width: 100%;
  min-height: 48px;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.branch-menu button:hover, .branch-menu button[aria-selected="true"] { background: var(--green-100); }
.branch-menu button span { display: block; font-size: 12px; font-weight: 800; }
.branch-menu button small { display: block; margin-top: 2px; color: #77847b; font-size: 9px; }
.branch-menu button[aria-selected="true"] span::after { content: "  ✓"; color: var(--green-800); }
.h5-toast { top: auto; bottom: calc(78px + env(safe-area-inset-bottom)); pointer-events: none; }

/* Order detail gets a calmer, taller reading layout than action sheets. */
.detail-sheet {
  min-height: min(520px, 72vh);
  max-height: 88vh;
  padding-top: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 24px;
}
.detail-sheet .sheet-handle { margin-bottom: 20px; }
.detail-sheet .sheet-top { padding: 0 2px; }
.detail-sheet .detail-amount {
  margin-top: 20px;
  padding: 15px 16px;
  border-color: #dce5dc;
  background: #f7faf6;
}
.detail-sheet .detail-amount > div { min-height: 28px; }
.detail-sheet .detail-amount strong { font-size: 15px; }
.detail-sheet .sheet-section-title {
  margin: 27px 2px 12px;
  color: var(--green-800);
  font-size: 11px;
}
.detail-sheet .timeline {
  padding: 6px 3px 4px 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.detail-sheet .timeline::before { top: 17px; bottom: 17px; left: 15px; background: #c9d8cc; }
.detail-sheet .timeline li { min-height: 55px; padding: 0 0 22px; }
.detail-sheet .timeline li::before { left: -21px; top: 2px; width: 8px; height: 8px; }
.detail-sheet .timeline strong { font-size: 12px; }
.detail-sheet .timeline span { margin-top: 5px; font-size: 10px; line-height: 1.45; }
