:root {
  color-scheme: light;
  --ink: #17202a;
  --ink-strong: #0b1117;
  --muted: #637083;
  --line: #d8e0e5;
  --canvas: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #f0f5f4;
  --green: #176b50;
  --green-dark: #0d4639;
  --green-soft: #e4f3ed;
  --blue: #235f92;
  --blue-soft: #e7f0f8;
  --gold: #a86612;
  --gold-soft: #fff2d9;
  --red: #ba4a43;
  --red-soft: #fde9e7;
  --shadow: 0 16px 34px rgba(23, 32, 42, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: linear-gradient(180deg, #f8faf9 0%, #eef3f4 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang TC",
    "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  margin-bottom: 0;
  letter-spacing: 0;
}

.workspace {
  width: min(1480px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 12px 0 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(216, 224, 229, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 9px 10px;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.06);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink-strong);
  color: #fff;
  font-weight: 950;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.view-switch,
.entry-tabs,
.category-tabs,
.choice-list,
.payment-list,
.module-tabs,
.status-rail {
  display: flex;
  gap: 6px;
}

.view-switch {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-switch button,
.module-tabs button,
.category-tabs button,
.choice-list button,
.payment-list button,
.entry-tabs button,
.quantity button,
.app-status button,
.status-rail button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.view-switch button,
.module-tabs button {
  padding: 0 12px;
}

.view-switch button.active,
.module-tabs button.active,
.category-tabs button.active,
.choice-list button.active,
.payment-list button.active,
.entry-tabs button.active,
.status-rail button.active {
  border-color: transparent;
  background: var(--green);
  color: #fff;
}

.overview-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.overview-strip article,
.customer-console,
.merchant-console,
.mobile-app,
.checkout-panel,
.ops-board,
.metric-card,
.cart-item,
.item-card,
.control-block,
.total-card,
.work-card,
.list-row,
.ops-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.overview-strip article {
  padding: 10px 12px;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.04);
}

.overview-strip span,
.ops-summary span,
.list-row span,
.metric-card span,
.cart-item p,
.item-meta span,
.item-card small,
.control-title span,
.total-card span,
.work-card p,
.route-note span,
.brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.overview-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(620px, 1.06fr) minmax(540px, 0.94fr);
  gap: 10px;
  align-items: start;
}

.customer-console,
.merchant-console {
  padding: 10px;
  box-shadow: var(--shadow);
}

.customer-console {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8f6 100%);
}

.merchant-console {
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fa 100%);
}

.section-head,
.panel-head,
.control-title,
.app-status,
.item-price,
.cart-item,
.list-row,
.route-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-head {
  margin-bottom: 9px;
  padding: 2px 2px 9px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-head h1 {
  font-size: 20px;
  line-height: 1.05;
}

.section-head > span,
.panel-head > span,
.control-title > span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.entry-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 9px;
}

.entry-tabs button {
  display: grid;
  min-height: 54px;
  align-content: center;
  padding: 8px 10px;
  text-align: left;
}

.entry-tabs span,
.entry-tabs small {
  display: block;
}

.entry-tabs small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.entry-tabs button.active small {
  color: rgba(255, 255, 255, 0.76);
}

.customer-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(280px, 0.72fr);
  gap: 8px;
  align-items: start;
}

.mobile-app,
.checkout-panel,
.ops-board {
  padding: 10px;
  box-shadow: none;
}

.app-status {
  min-height: 42px;
  margin-bottom: 8px;
  padding: 8px 9px;
  background: var(--ink-strong);
  color: #fff;
  border-radius: 8px;
}

.app-status span {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 850;
}

.app-status strong {
  display: block;
  overflow: hidden;
  max-width: 320px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.app-status button {
  width: 34px;
  padding: 0;
  color: var(--green);
}

.hero-banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--green-soft);
}

.hero-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
}

.hero-banner div {
  position: absolute;
  left: 9px;
  bottom: 9px;
  width: min(78%, 390px);
  border-radius: 8px;
  background: rgba(11, 17, 23, 0.82);
  color: #fff;
  padding: 9px 10px;
}

.hero-banner span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
}

.hero-banner strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.25;
}

.search-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-bottom: 8px;
}

.search-line span {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.search-line button,
.primary-action {
  border: 0;
  border-radius: 8px;
  background: var(--ink-strong);
  color: #fff;
  font-weight: 920;
}

.search-line button {
  min-width: 64px;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 8px;
}

.category-tabs button,
.choice-list button,
.payment-list button {
  min-width: 0;
  padding: 0 8px;
  font-size: 12px;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.item-card {
  overflow: hidden;
}

.item-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 2.05;
  object-fit: cover;
}

.item-card-body {
  padding: 8px;
}

.item-card h3 {
  min-height: 32px;
  font-size: 13px;
  line-height: 1.22;
}

.item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0;
}

.item-price strong {
  color: var(--red);
  font-size: 16px;
}

.item-price button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 19px;
  font-weight: 950;
}

.panel-head {
  margin-bottom: 8px;
}

.panel-head h2 {
  font-size: 16px;
}

.cart-list {
  display: grid;
  gap: 7px;
  min-height: 120px;
}

.cart-item {
  padding: 8px;
}

.cart-item h3 {
  margin-bottom: 3px;
  font-size: 13px;
  line-height: 1.2;
}

.cart-item p {
  margin-bottom: 0;
}

.quantity {
  display: grid;
  grid-template-columns: 28px 30px 28px;
  align-items: center;
  text-align: center;
  font-weight: 900;
}

.quantity button {
  min-height: 28px;
  padding: 0;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px dashed #b7c6c8;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 12px;
  text-align: center;
  font-size: 13px;
}

.control-block,
.total-card {
  margin-top: 9px;
  padding: 9px;
}

.control-title {
  margin-bottom: 7px;
}

.control-title h3 {
  font-size: 13px;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.total-card {
  display: grid;
  gap: 7px;
}

.total-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.total-card .grand {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 17px;
  font-weight: 930;
}

.primary-action {
  width: 100%;
  min-height: 42px;
  margin-top: 9px;
  background: var(--green);
  box-shadow: 0 12px 24px rgba(23, 107, 80, 0.2);
}

.ops-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 8px;
}

.ops-summary article {
  padding: 9px;
}

.ops-summary strong {
  display: block;
  margin: 3px 0 2px;
  font-size: 19px;
}

.ops-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.module-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 8px;
}

.module-tabs button {
  min-width: 0;
  padding: 0 6px;
  font-size: 12px;
}

.ops-board {
  min-height: 540px;
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.work-card {
  padding: 10px;
}

.work-card h2 {
  font-size: 16px;
}

.work-card p {
  margin: 5px 0 0;
  line-height: 1.45;
}

.list-stack {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.list-row {
  min-height: 58px;
  padding: 8px;
}

.list-row strong {
  display: block;
  font-size: 13px;
}

.list-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.status-pill.good {
  border-color: transparent;
  background: var(--green-soft);
  color: var(--green-dark);
}

.status-pill.warn {
  border-color: transparent;
  background: var(--gold-soft);
  color: var(--gold);
}

.status-pill.info {
  border-color: transparent;
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.danger {
  border-color: transparent;
  background: var(--red-soft);
  color: var(--red);
}

.status-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 9px;
}

.status-rail button {
  padding: 0 6px;
  font-size: 12px;
}

.route-note {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px;
}

.route-note strong {
  display: block;
  margin-top: 3px;
}

.progress {
  width: 124px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebee;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.settlement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.metric-card {
  padding: 9px;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

@media (max-width: 1320px) {
  .demo-grid,
  .customer-layout,
  .board-grid {
    grid-template-columns: 1fr;
  }

  .ops-board {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .workspace {
    width: min(100% - 14px, 1480px);
    padding-top: 7px;
  }

  .topbar,
  .section-head,
  .route-note {
    align-items: stretch;
    flex-direction: column;
  }

  .view-switch,
  .overview-strip,
  .ops-summary,
  .module-tabs,
  .category-tabs,
  .settlement-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overview-strip {
    display: grid;
  }

  .item-grid,
  .payment-list,
  .choice-list {
    grid-template-columns: 1fr;
  }
}
