:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #17211d;
  --muted: #66736e;
  --line: #dfe5df;
  --green: #217a54;
  --green-strong: #145c3e;
  --amber: #b46b16;
  --red: #ad3636;
  --blue: #236a97;
  --shadow: 0 12px 30px rgba(23, 33, 29, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #17211d;
  color: #f5faf4;
  padding: 22px 18px;
}

.brand {
  display: grid;
  gap: 4px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand strong {
  font-size: 20px;
}

.brand span,
.sidebar small {
  color: #b8c7c0;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.nav a {
  color: #e8f0ec;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 6px;
}

.nav a.active,
.nav a:hover {
  background: #25342e;
}

.main {
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

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

h1 {
  margin-bottom: 4px;
  font-size: 28px;
}

.muted {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
  text-decoration: none;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.button:hover {
  box-shadow: var(--shadow);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: underline;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.panel,
.product-tile,
.cart,
.paybox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 14px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.panel {
  padding: 18px;
}

.panel h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf5ef;
  color: var(--green-strong);
  font-size: 12px;
}

.status.warn {
  background: #fff5df;
  color: var(--amber);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf8;
  color: var(--muted);
  font-size: 12px;
  margin: 0 6px 6px 0;
}

.chip.warn {
  border-color: #f1d298;
  background: #fff8e9;
  color: var(--amber);
}

.sync-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 8px;
}

.sync-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.proof-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.proof-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.proof-header > div {
  flex: 1 1 320px;
}

.proof-header h3,
.proof-summary h3 {
  margin-bottom: 4px;
  font-size: 15px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.proof-score {
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf8;
}

.proof-score.warn {
  border-color: #f1d298;
  background: #fff8e9;
}

.proof-score span {
  display: block;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
}

.proof-score strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.proof-tasks {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.research-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.metric.compact {
  min-height: 82px;
  box-shadow: none;
}

.metric.compact strong {
  font-size: 20px;
}

.sync-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.detail-panel:not(:empty) {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  padding: 12px;
  margin: 8px 0 12px;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.detail-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.production-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.production-grid h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.compact-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.compact-row strong {
  margin-right: 8px;
}

.compact-row p {
  margin: 6px 0 0;
  font-size: 13px;
}

.detail-grid h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.pos-shell {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 100vh;
}

.pos-main {
  padding: 18px;
}

.pos-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.scanbar {
  display: grid;
  grid-template-columns: 1fr 120px 120px;
  gap: 10px;
}

.scanbar input,
.scanbar select,
.member-search input,
.inline-input,
.inline-select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  min-width: 0;
}

.inline-input {
  width: 82px;
  min-height: 38px;
  padding: 8px;
  margin-right: 6px;
}

.inline-input.wide {
  width: 160px;
}

.inline-select {
  width: 118px;
  min-height: 38px;
  padding: 8px;
  margin-right: 6px;
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.toolbar-row textarea {
  flex: 1 1 360px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  resize: vertical;
}

.refund-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 360px;
}

.refund-box .muted {
  font-size: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.product-tile {
  min-height: 132px;
  padding: 14px;
  cursor: pointer;
}

.product-tile:hover {
  border-color: var(--green);
}

.product-tile strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.cart {
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line small {
  color: var(--muted);
}

.totals {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.total-row {
  display: flex;
  justify-content: space-between;
}

.total-row.final {
  font-size: 24px;
  font-weight: 700;
}

.paybox {
  box-shadow: none;
  padding: 12px;
}

.pay-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pay-methods button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  min-height: 42px;
  cursor: pointer;
}

.pay-methods button.active {
  border-color: var(--green);
  color: var(--green-strong);
  background: #edf5ef;
}

.settle {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.notice {
  padding: 10px 12px;
  border-left: 4px solid var(--blue);
  background: #eef6fa;
  color: #21495d;
}

@media (max-width: 980px) {
  .app-shell,
  .pos-shell,
  .grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .metrics,
  .product-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .cart {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .main,
  .pos-main {
    padding: 14px;
  }

  .topbar,
  .pos-header,
  .scanbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .metrics,
  .product-grid,
  .research-metrics {
    grid-template-columns: 1fr;
  }

  .refund-box {
    min-width: 0;
  }

  .sync-item {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .production-grid {
    grid-template-columns: 1fr;
  }

  .proof-grid,
  .proof-tasks {
    grid-template-columns: 1fr;
  }
}

/* Green-gold cyber brand layer */
:root {
  --bg: #07110d;
  --panel: rgba(11, 30, 22, 0.88);
  --panel-strong: rgba(14, 39, 28, 0.96);
  --ink: #edf7ec;
  --muted: #9bb7a9;
  --line: rgba(119, 255, 190, 0.18);
  --green: #20e49f;
  --green-strong: #7dffc8;
  --amber: #f4c869;
  --red: #ff6a6a;
  --blue: #55d7ff;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.34), 0 0 28px rgba(32, 228, 159, 0.08);
  --gold-glow: 0 0 18px rgba(244, 200, 105, 0.28);
  --green-glow: 0 0 22px rgba(32, 228, 159, 0.22);
}

body {
  background:
    linear-gradient(rgba(119, 255, 190, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 255, 190, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 12% 8%, rgba(32, 228, 159, 0.14), transparent 32%),
    radial-gradient(circle at 84% 12%, rgba(244, 200, 105, 0.11), transparent 30%),
    linear-gradient(145deg, #06100c 0%, #0b1611 48%, #040806 100%);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(32, 228, 159, 0.08) 43%, transparent 44% 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 5px);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.3));
}

.app-shell {
  grid-template-columns: 258px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(7, 23, 16, 0.98), rgba(6, 14, 11, 0.98)),
    linear-gradient(120deg, rgba(244, 200, 105, 0.08), transparent);
  border-right: 1px solid rgba(244, 200, 105, 0.26);
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.32);
}

.brand {
  position: relative;
  min-height: 92px;
  padding: 10px 0 22px 64px;
  border-bottom-color: rgba(244, 200, 105, 0.28);
}

.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(244, 200, 105, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(244, 200, 105, 0.22), rgba(32, 228, 159, 0.12)),
    url("/assets/icons/shop.png") center / 28px 28px no-repeat;
  box-shadow: var(--gold-glow), inset 0 0 18px rgba(32, 228, 159, 0.14);
}

.brand strong {
  color: #fff7d7;
  font-size: 23px;
  text-shadow: 0 0 18px rgba(244, 200, 105, 0.32);
}

.brand span {
  color: #8ff7c8;
  font-size: 12px;
}

.brand::after {
  content: "ONLINE";
  position: absolute;
  left: 64px;
  bottom: 20px;
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #d9f7e8;
  border: 1px solid transparent;
  border-radius: 8px;
}

.nav a::before {
  content: "";
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  background: center / contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(32, 228, 159, 0.28));
}

.nav a:nth-child(1)::before { background-image: url("/assets/icons/home.png"); }
.nav a:nth-child(2)::before { background-image: url("/assets/icons/wallet.png"); }
.nav a:nth-child(3)::before { background-image: url("/assets/icons/inventory.png"); }
.nav a:nth-child(4)::before { background-image: url("/assets/icons/members.png"); }
.nav a:nth-child(5)::before { background-image: url("/assets/icons/sync.png"); }

.nav a.active,
.nav a:hover {
  color: #fff7d7;
  border-color: rgba(244, 200, 105, 0.36);
  background: linear-gradient(90deg, rgba(32, 228, 159, 0.16), rgba(244, 200, 105, 0.08));
  box-shadow: inset 3px 0 0 var(--amber), var(--green-glow);
}

.main {
  padding: 26px;
}

.topbar,
.pos-header {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(119, 255, 190, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(11, 32, 23, 0.86), rgba(7, 18, 13, 0.72));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar::after,
.pos-header::after,
.panel::after,
.cart::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 0 68%, rgba(244, 200, 105, 0.08) 69%, transparent 71%);
}

h1 {
  color: #fff7d7;
  font-size: 30px;
  letter-spacing: 0;
  text-shadow: 0 0 20px rgba(244, 200, 105, 0.28);
}

h2,
h3 {
  color: #f6ffe8;
}

.button,
.scanbar input,
.scanbar select,
.member-search input,
.inline-input,
.inline-select,
.toolbar-row textarea {
  border-color: rgba(119, 255, 190, 0.22);
  background: rgba(5, 17, 12, 0.82);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.button {
  min-height: 38px;
  border-radius: 8px;
  color: #dff8ec;
}

.button.primary,
.settle {
  border-color: rgba(244, 200, 105, 0.55);
  background: linear-gradient(135deg, #f5cb69 0%, #c99a35 42%, #20e49f 100%);
  color: #06110c;
  box-shadow: var(--gold-glow);
}

.button:hover,
.pay-methods button:hover,
.product-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 200, 105, 0.56);
  box-shadow: var(--green-glow), var(--gold-glow);
}

.button:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.metrics {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
}

.metric,
.panel,
.product-tile,
.cart,
.paybox,
.detail-panel:not(:empty),
.proof-score {
  position: relative;
  border-color: rgba(119, 255, 190, 0.18);
  background: linear-gradient(180deg, rgba(12, 34, 25, 0.92), rgba(7, 18, 13, 0.94));
  color: var(--ink);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 108px;
  padding: 14px 14px 14px 48px;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 24px;
  height: 24px;
  background: center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(244, 200, 105, 0.3));
}

.metric:nth-child(1)::before { background-image: url("/assets/icons/shop.png"); }
.metric:nth-child(2)::before { background-image: url("/assets/icons/inventory.png"); }
.metric:nth-child(3)::before { background-image: url("/assets/icons/members.png"); }
.metric:nth-child(4)::before { background-image: url("/assets/icons/money.png"); }
.metric:nth-child(5)::before { background-image: url("/assets/icons/inventory.png"); }
.metric:nth-child(6)::before { background-image: url("/assets/icons/sync.png"); }
.metric:nth-child(7)::before { background-image: url("/assets/icons/activity.png"); }

.metric span,
th {
  color: #9fd7bd;
}

.metric strong {
  color: #fff7d7;
  font-size: 26px;
}

.panel {
  border-radius: 8px;
  overflow: hidden;
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff7d7;
}

.panel h2::before {
  content: "";
  width: 8px;
  height: 20px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--amber), var(--green));
  box-shadow: var(--gold-glow);
}

table {
  overflow: hidden;
  border-radius: 8px;
}

th,
td {
  border-bottom-color: rgba(119, 255, 190, 0.12);
}

tbody tr:hover {
  background: rgba(32, 228, 159, 0.055);
}

.status,
.chip {
  border: 1px solid rgba(119, 255, 190, 0.25);
  background: rgba(32, 228, 159, 0.12);
  color: #9affd0;
}

.status.warn,
.chip.warn,
.proof-score.warn {
  border-color: rgba(244, 200, 105, 0.42);
  background: rgba(244, 200, 105, 0.12);
  color: #ffd889;
}

.notice {
  border-left-color: var(--amber);
  background: rgba(244, 200, 105, 0.12);
  color: #ffe1a0;
}

.sync-item,
.compact-row,
.cart-line {
  border-bottom-color: rgba(119, 255, 190, 0.13);
}

.pos-shell {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
}

.pos-main {
  padding: 22px;
}

.pos-header {
  margin-bottom: 16px;
}

.scanbar {
  position: sticky;
  top: 12px;
  z-index: 4;
  grid-template-columns: minmax(220px, 1fr) 132px 132px;
  padding: 12px;
  border: 1px solid rgba(244, 200, 105, 0.28);
  border-radius: 8px;
  background: rgba(5, 17, 12, 0.88);
  box-shadow: var(--shadow);
}

.scanbar input {
  min-height: 50px;
  font-size: 18px;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.product-tile {
  min-height: 154px;
  border-radius: 8px;
  text-align: left;
  overflow: hidden;
}

.product-tile::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
  background: url("/assets/icons/inventory.png") center / contain no-repeat;
  opacity: 0.82;
  filter: drop-shadow(0 0 10px rgba(32, 228, 159, 0.28));
}

.product-tile strong {
  color: #fff7d7;
  padding-right: 34px;
}

.product-tile p {
  color: #7dffc8;
  font-size: 22px;
  font-weight: 800;
}

.cart {
  position: sticky;
  top: 0;
  min-height: 100vh;
  border-left-color: rgba(244, 200, 105, 0.32);
  background:
    linear-gradient(180deg, rgba(11, 30, 22, 0.98), rgba(4, 12, 9, 0.98));
  box-shadow: -16px 0 42px rgba(0, 0, 0, 0.34);
}

.cart h2 {
  color: #fff7d7;
}

.total-row.final {
  padding: 12px;
  border: 1px solid rgba(244, 200, 105, 0.3);
  border-radius: 8px;
  background: rgba(244, 200, 105, 0.1);
  color: #fff7d7;
}

.total-row.final strong {
  color: var(--green-strong);
  text-shadow: var(--green-glow);
}

.paybox {
  border-color: rgba(244, 200, 105, 0.28);
}

.pay-methods button {
  min-height: 46px;
  border-color: rgba(119, 255, 190, 0.2);
  background: rgba(5, 17, 12, 0.86);
  color: #dff8ec;
}

.pay-methods button.active {
  border-color: rgba(244, 200, 105, 0.58);
  background: rgba(244, 200, 105, 0.14);
  color: #fff7d7;
  box-shadow: var(--gold-glow);
}

.settle {
  margin-top: 12px;
  min-height: 62px;
  font-size: 22px;
}

::placeholder {
  color: rgba(196, 226, 210, 0.56);
}

@media (max-width: 1180px) {
  .metrics,
  .research-metrics {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

/* Premium emerald-gold brand recalibration */
:root {
  --bg: #020806;
  --panel: rgba(4, 39, 27, 0.94);
  --panel-strong: #063c29;
  --ink: #f7f5e6;
  --muted: #bdd1bf;
  --line: rgba(215, 177, 89, 0.34);
  --green: #006f49;
  --green-strong: #00b879;
  --amber: #d7b159;
  --gold-hi: #fff0b7;
  --gold-mid: #d7b159;
  --gold-deep: #8f6424;
  --emerald-hi: #00b879;
  --emerald-mid: #006f49;
  --emerald-deep: #022319;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(215, 177, 89, 0.08);
  --gold-glow: 0 0 0 1px rgba(215, 177, 89, 0.36), 0 0 28px rgba(215, 177, 89, 0.2);
  --green-glow: 0 0 0 1px rgba(0, 184, 121, 0.28), 0 0 26px rgba(0, 184, 121, 0.2);
  --metal-gold: linear-gradient(135deg, #fff0b7 0%, #d7b159 28%, #a9782b 58%, #fff0b7 100%);
  --metal-green: linear-gradient(145deg, #064932 0%, #006f49 42%, #023525 100%);
}

body {
  background:
    linear-gradient(115deg, rgba(215, 177, 89, 0.08) 0 1px, transparent 1px 24%),
    linear-gradient(90deg, rgba(255, 240, 183, 0.04) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 18% 0%, rgba(0, 111, 73, 0.62), transparent 35%),
    radial-gradient(circle at 100% 8%, rgba(215, 177, 89, 0.28), transparent 33%),
    linear-gradient(150deg, #020806 0%, #04130e 38%, #020806 100%);
  background-size: auto, 72px 72px, auto, auto, auto;
}

body::before {
  background:
    linear-gradient(90deg, transparent 0%, rgba(215, 177, 89, 0.08) 49%, rgba(255, 240, 183, 0.16) 50%, rgba(215, 177, 89, 0.08) 51%, transparent 100%),
    repeating-linear-gradient(0deg, rgba(255, 240, 183, 0.028) 0 1px, transparent 1px 7px);
  opacity: 0.62;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(2, 35, 25, 0.99), rgba(2, 10, 7, 0.99)),
    var(--metal-green);
  border-right: 1px solid rgba(215, 177, 89, 0.55);
  box-shadow: 14px 0 42px rgba(0, 0, 0, 0.52);
}

.brand {
  min-height: 118px;
  padding: 14px 0 26px 76px;
  border-bottom-color: rgba(215, 177, 89, 0.48);
}

.brand::before {
  top: 10px;
  width: 58px;
  height: 58px;
  border-color: rgba(255, 240, 183, 0.72);
  border-radius: 12px;
  background:
    var(--metal-gold),
    url("/assets/icons/shop.png") center / 32px 32px no-repeat;
  background-blend-mode: soft-light, normal;
  box-shadow: var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.brand strong {
  color: var(--gold-hi);
  font-size: 25px;
  font-weight: 900;
  text-shadow: 0 1px 0 #5b3e12, 0 0 22px rgba(215, 177, 89, 0.36);
}

.brand span {
  color: #d6f5df;
  font-weight: 600;
}

.brand::after {
  left: 76px;
  bottom: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(215, 177, 89, 0.48);
  border-radius: 999px;
  background: rgba(215, 177, 89, 0.14);
  color: var(--gold-hi);
}

.nav {
  gap: 10px;
}

.nav a {
  min-height: 48px;
  padding: 11px 12px;
  color: #e8f5e8;
  border-color: rgba(215, 177, 89, 0.12);
  background: rgba(255, 240, 183, 0.025);
  font-weight: 700;
}

.nav a::before {
  width: 24px;
  height: 24px;
  filter: sepia(1) saturate(2.2) hue-rotate(355deg) brightness(1.34) drop-shadow(0 0 10px rgba(215, 177, 89, 0.34));
}

.nav a.active,
.nav a:hover {
  color: var(--gold-hi);
  border-color: rgba(255, 240, 183, 0.62);
  background: linear-gradient(90deg, rgba(215, 177, 89, 0.2), rgba(0, 111, 73, 0.24));
  box-shadow: inset 4px 0 0 var(--gold-mid), 0 0 22px rgba(215, 177, 89, 0.16);
}

.topbar,
.pos-header {
  border-color: rgba(215, 177, 89, 0.42);
  background:
    linear-gradient(135deg, rgba(2, 63, 42, 0.94), rgba(2, 20, 14, 0.96)),
    linear-gradient(90deg, rgba(215, 177, 89, 0.16), transparent);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 240, 183, 0.14);
}

.topbar::after,
.pos-header::after,
.panel::after,
.cart::after {
  background:
    linear-gradient(90deg, rgba(255, 240, 183, 0.24), transparent 18%, transparent 82%, rgba(215, 177, 89, 0.18)),
    linear-gradient(120deg, transparent 0 70%, rgba(215, 177, 89, 0.12) 71%, transparent 73%);
}

h1 {
  color: var(--gold-hi);
  font-size: 32px;
  font-weight: 900;
  text-shadow: 0 1px 0 #563b12, 0 0 24px rgba(215, 177, 89, 0.28);
}

h2,
h3 {
  color: #fff6cf;
  font-weight: 800;
}

.panel,
.metric,
.product-tile,
.cart,
.paybox,
.detail-panel:not(:empty),
.proof-score {
  border-color: rgba(215, 177, 89, 0.34);
  background:
    linear-gradient(180deg, rgba(4, 57, 39, 0.94), rgba(2, 28, 20, 0.96)),
    linear-gradient(120deg, rgba(255, 240, 183, 0.06), transparent);
  box-shadow: var(--shadow);
}

.panel {
  border-top: 1px solid rgba(255, 240, 183, 0.46);
}

.panel h2::before {
  width: 10px;
  height: 24px;
  background: var(--metal-gold);
}

.metric {
  min-height: 116px;
  border-top-color: rgba(255, 240, 183, 0.62);
  background:
    linear-gradient(180deg, rgba(6, 76, 51, 0.94), rgba(2, 35, 25, 0.98)),
    var(--metal-green);
}

.metric::before {
  width: 28px;
  height: 28px;
  filter: sepia(1) saturate(2.1) hue-rotate(355deg) brightness(1.38) drop-shadow(0 0 12px rgba(215, 177, 89, 0.44));
}

.metric span,
th {
  color: #d6e8d2;
}

.metric strong {
  color: var(--gold-hi);
  font-size: 28px;
  text-shadow: 0 0 18px rgba(215, 177, 89, 0.3);
}

.button {
  border-color: rgba(215, 177, 89, 0.36);
  background: rgba(2, 35, 25, 0.86);
  color: #f3f5e8;
  font-weight: 700;
}

.button.primary,
.settle {
  border-color: rgba(255, 240, 183, 0.8);
  background: var(--metal-gold);
  color: #082017;
  font-weight: 900;
  box-shadow: var(--gold-glow);
}

.button:hover,
.pay-methods button:hover,
.product-tile:hover {
  border-color: rgba(255, 240, 183, 0.78);
  box-shadow: var(--gold-glow), 0 20px 36px rgba(0, 0, 0, 0.34);
}

.status,
.chip {
  border-color: rgba(0, 184, 121, 0.42);
  background: rgba(0, 111, 73, 0.35);
  color: #c7ffdd;
}

.status.warn,
.chip.warn,
.proof-score.warn {
  border-color: rgba(215, 177, 89, 0.58);
  background: rgba(215, 177, 89, 0.16);
  color: var(--gold-hi);
}

table {
  background: rgba(1, 14, 10, 0.26);
}

th,
td {
  border-bottom-color: rgba(215, 177, 89, 0.16);
}

tbody tr:hover {
  background: rgba(215, 177, 89, 0.07);
}

.scanbar {
  border-color: rgba(255, 240, 183, 0.55);
  background:
    linear-gradient(180deg, rgba(2, 42, 29, 0.96), rgba(1, 18, 13, 0.96));
  box-shadow: var(--gold-glow), 0 18px 44px rgba(0, 0, 0, 0.34);
}

.scanbar input,
.scanbar select,
.member-search input,
.inline-input,
.inline-select,
.toolbar-row textarea {
  border-color: rgba(215, 177, 89, 0.32);
  background: rgba(1, 17, 12, 0.9);
  color: #fff9df;
}

.scanbar input:focus,
.member-search input:focus,
.inline-input:focus,
.inline-select:focus,
.toolbar-row textarea:focus {
  outline: 2px solid rgba(215, 177, 89, 0.45);
  border-color: rgba(255, 240, 183, 0.78);
}

.product-tile {
  border-top-color: rgba(255, 240, 183, 0.58);
  background:
    linear-gradient(160deg, rgba(5, 85, 56, 0.96), rgba(2, 30, 21, 0.98) 68%),
    linear-gradient(90deg, rgba(215, 177, 89, 0.12), transparent);
}

.product-tile::before {
  filter: sepia(1) saturate(2.1) hue-rotate(355deg) brightness(1.42) drop-shadow(0 0 12px rgba(215, 177, 89, 0.42));
}

.product-tile strong {
  color: #fff4c7;
}

.product-tile p {
  color: #f6d778;
  text-shadow: 0 0 18px rgba(215, 177, 89, 0.22);
}

.cart {
  border-left-color: rgba(255, 240, 183, 0.58);
  background:
    linear-gradient(180deg, rgba(3, 53, 36, 0.99), rgba(1, 12, 9, 0.99)),
    linear-gradient(90deg, rgba(215, 177, 89, 0.16), transparent);
  box-shadow: -18px 0 46px rgba(0, 0, 0, 0.46);
}

.cart h2 {
  color: var(--gold-hi);
}

.total-row.final {
  border-color: rgba(255, 240, 183, 0.68);
  background:
    linear-gradient(135deg, rgba(215, 177, 89, 0.2), rgba(0, 111, 73, 0.18));
}

.total-row.final strong {
  color: var(--gold-hi);
  text-shadow: 0 0 18px rgba(215, 177, 89, 0.36);
}

.paybox {
  border-color: rgba(255, 240, 183, 0.46);
  background: rgba(1, 18, 13, 0.78);
}

.pay-methods button {
  border-color: rgba(215, 177, 89, 0.28);
  background: rgba(2, 35, 25, 0.86);
  color: #edf4df;
  font-weight: 800;
}

.pay-methods button.active {
  border-color: rgba(255, 240, 183, 0.72);
  background: linear-gradient(135deg, rgba(215, 177, 89, 0.24), rgba(0, 111, 73, 0.28));
  color: var(--gold-hi);
}

.settle {
  min-height: 68px;
  font-size: 24px;
  letter-spacing: 0;
}

.notice {
  border-left-color: var(--gold-mid);
  background: rgba(215, 177, 89, 0.14);
  color: #fff0b7;
}
