:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #667085;
  --border: #e3e6ec;
  --accent: #0f6e5c;
  --accent-text: #ffffff;
  --ok: #0f7a4f;     --ok-bg: #e6f4ec;
  --warn: #9a5b00;   --warn-bg: #fdf1dc;
  --bad: #b42318;    --bad-bg: #fdecea;
  --info: #475467;   --info-bg: #eef0f3;
  --row-hover: #f2f5f8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --surface: #1a2028;
    --text: #e6e9ee;
    --muted: #98a2b3;
    --border: #2b333e;
    --accent: #3fb59c;
    --accent-text: #0b1512;
    --ok: #5fd39c;     --ok-bg: #133024;
    --warn: #f2b65a;   --warn-bg: #352712;
    --bad: #ff8a80;    --bad-bg: #3a1a18;
    --info: #c0c7d2;   --info-bg: #252c36;
    --row-hover: #212833;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "IBM Plex Sans Thai", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  padding: 0 24px 40px;
}
.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }

.top {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: flex-end; justify-content: space-between;
  padding: 24px 0 16px;
}
h1 { margin: 0; font-size: 22px; font-weight: 600; }
.meta { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn:disabled { opacity: .6; cursor: progress; }

.banner {
  margin-bottom: 12px; padding: 10px 14px; border-radius: 8px;
  background: var(--warn-bg); color: var(--warn);
}
.banner.error { background: var(--bad-bg); color: var(--bad); }

.cards {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-bottom: 16px;
}
.card {
  text-align: left; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font: inherit; cursor: pointer;
}
.card:hover { border-color: var(--muted); }
.card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card .label { color: var(--muted); font-size: 13px; }
.card .value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card.ok .value { color: var(--ok); }
.card.warn .value { color: var(--warn); }
.card.bad .value { color: var(--bad); }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 10px;
}
.toolbar input[type=search], .toolbar select {
  height: 36px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit;
}
.toolbar input[type=search] { flex: 1 1 260px; min-width: 0; }
.check { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.count { margin-left: auto; color: var(--muted); }

.table-wrap {
  overflow-x: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface); text-align: left;
  font-weight: 600; font-size: 13px; white-space: nowrap;
  cursor: pointer; user-select: none;
}
th small { color: var(--muted); font-weight: 400; }
th.sorted-asc::after { content: " ▲"; font-size: 10px; }
th.sorted-desc::after { content: " ▼"; font-size: 10px; }
tbody tr:hover { background: var(--row-hover); }
td.sku { font-family: ui-monospace, Consolas, monospace; font-size: 13px; white-space: nowrap; }
td.name { min-width: 280px; }
.neg { color: var(--bad); font-weight: 600; }
.plus { color: var(--ok); }
.dim { color: var(--muted); }
.price-bad { background: var(--warn-bg); color: var(--warn); font-weight: 600; }

.tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.tag.in_stock { background: var(--ok-bg); color: var(--ok); }
.tag.out_of_stock { background: var(--warn-bg); color: var(--warn); }
.tag.negative, .tag.not_found, .tag.no_sku { background: var(--bad-bg); color: var(--bad); }
.tag.pending { background: var(--info-bg); color: var(--info); }

.empty { padding: 40px; text-align: center; color: var(--muted); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.pager button {
  min-width: 36px; height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.pager button[aria-current=page] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pager button:disabled { opacity: .4; cursor: default; }

@media (max-width: 640px) {
  body { padding: 0 16px 32px; }
  .top { padding-top: 16px; }
  h1 { font-size: 19px; }
  .actions { width: 100%; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .count { margin-left: 0; width: 100%; }
}

/* ---------- แถวคลิกได้ + รูปย่อ ---------- */
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.name-cell { display: flex; align-items: center; gap: 10px; }
.thumb {
  flex: none; width: 40px; height: 40px; border-radius: 8px;
  background: var(--img-bg); border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.6; }

:root { --img-bg: #f3f4f6; --overlay: rgba(16, 24, 40, .45); --shadow: 0 24px 60px rgba(16, 24, 40, .22); }
@media (prefers-color-scheme: dark) {
  :root { --img-bg: #222a35; --overlay: rgba(0, 0, 0, .6); --shadow: 0 24px 60px rgba(0, 0, 0, .5); }
}

/* ---------- หน้ารายละเอียดสินค้า ---------- */
.detail {
  width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 0; border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  overflow: hidden;
}
.detail::backdrop { background: var(--overlay); backdrop-filter: blur(2px); }
.detail[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.detail-card { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }

.detail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--info-bg); color: var(--info); font-size: 12px; font-weight: 500;
}
.detail-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.detail-pos { color: var(--muted); font-size: 12px; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: var(--row-hover); border-color: var(--border); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.detail-body {
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px;
  padding: 24px; overflow-y: auto;
}

.gallery { position: sticky; top: 0; align-self: start; }
.hero {
  position: relative;
  aspect-ratio: 1 / 1; border-radius: 14px; background: var(--img-bg);
  display: grid; place-items: center; overflow: hidden;
}
/* วางรูปแบบ absolute เพื่อไม่ให้ขนาดจริงของรูปดันความกว้างของ layout */
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 20px; transition: transform .25s ease; }
.hero:hover img { transform: scale(1.04); }
.hero .noimg { display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.hero .noimg svg { width: 56px; height: 56px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button {
  width: 60px; height: 60px; padding: 4px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; background: var(--img-bg);
}
.thumbs button[aria-current=true] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }

.info { min-width: 0; }
.d-sku { margin: 0; font-family: ui-monospace, Consolas, monospace; color: var(--muted); font-size: 13px; }
.info h2 { margin: 4px 0 18px; font-size: 22px; line-height: 1.35; font-weight: 600; }

.stock-hero {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px;
  padding: 16px 18px; border-radius: 12px; background: var(--ok-bg); color: var(--ok);
}
.stock-hero.warn { background: var(--warn-bg); color: var(--warn); }
.stock-hero.bad { background: var(--bad-bg); color: var(--bad); }
.stock-hero .big { font-size: 36px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.stock-hero .lbl { font-size: 14px; font-weight: 500; }
.stock-hero .sub { margin-left: auto; font-size: 13px; opacity: .85; }

.price-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
  margin-top: 12px;
}
.price {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
}
.price .lbl { color: var(--muted); font-size: 12px; }
.price .val { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.price .hint { font-size: 12px; color: var(--muted); }
.price.primary { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.price.primary .val { color: var(--accent); font-size: 24px; }

.d-section { margin-top: 22px; }
.d-section h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.wh-table { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.wh-table th, .wh-table td { padding: 8px 12px; cursor: default; position: static; }
.wh-table tr:last-child td { border-bottom: 0; }

.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.variant {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; text-align: left;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text);
  font: inherit; cursor: pointer;
}
.variant:hover { border-color: var(--muted); }
.variant[aria-current=true] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); cursor: default; }
.variant .thumb { width: 34px; height: 34px; }
.variant .v-name { font-size: 13px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.variant .v-stock { font-size: 12px; color: var(--muted); }
.variant .v-stock.zero { color: var(--warn); }
.variant .v-stock.neg { color: var(--bad); }

.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; overflow-wrap: anywhere; }
.d-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.d-note:empty { display: none; }

@media (max-width: 760px) {
  .detail { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .detail-card { max-height: 100dvh; height: 100%; }
  .detail-body { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 16px; }
  .price { padding: 10px 12px; }
  .price .val { font-size: 18px; }
  .price.primary .val { font-size: 20px; }
  .gallery { position: static; }
  .hero { aspect-ratio: 4 / 3; }
  .info h2 { font-size: 19px; }
  .detail-pos { display: none; }
}

/* ---------- LINE / เลือกสินค้า ---------- */
:root { --line: #06C755; --line-hover: #05B34C; --line-text: #ffffff; --sel-row: #e9f7ef; }
@media (prefers-color-scheme: dark) { :root { --sel-row: #17301f; } }

.btn.line { background: var(--line); border-color: var(--line); color: var(--line-text); }
.btn.line:hover:not(:disabled) { background: var(--line-hover); border-color: var(--line-hover); }
.btn.line svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.block { width: 100%; justify-content: center; }
a.btn { text-decoration: none; }
.link-btn { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }

/* แถบผู้ใช้ */
.userbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; font-size: 13px; color: var(--muted); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; overflow: hidden; flex: none;
  display: grid; place-items: center; background: var(--line); color: #fff; font-weight: 600; font-size: 12px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { color: var(--text); font-weight: 500; }

/* ตาราง: ช่องราคาแรก + ช่องเลือก */
td.price-col { font-weight: 600; white-space: nowrap; }
th.sel-col, td.sel-col { width: 64px; text-align: center; cursor: default; }
.sel-box { display: inline-grid; place-items: center; width: 40px; height: 40px; margin: -10px 0; cursor: pointer; border-radius: 8px; }
.sel-box:hover { background: var(--row-hover); }
.sel-box input { width: 20px; height: 20px; accent-color: var(--line); cursor: pointer; }
tbody tr.selected { background: var(--sel-row); }
tbody tr.selected:hover { background: var(--sel-row); }

/* แถบสรุปด้านล่าง */
.selbar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20;
  width: min(760px, calc(100vw - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px 10px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.selbar-info { font-size: 14px; }
.selbar-info strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.selbar-total { margin-left: 8px; color: var(--accent); font-weight: 600; }
.selbar-actions { display: flex; gap: 8px; }
body.has-selbar { padding-bottom: 100px; }

/* ปุ่มเลือกในหน้ารายละเอียด */
.d-select { margin-top: 12px; }
.d-select-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--sel-row); }
.d-selected { color: var(--ok); font-weight: 600; margin-right: auto; }
.qty-field { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
/* ช่องจำนวน − [ n ] + */
.qty-stepper {
  display: inline-flex; align-items: stretch; height: 40px; flex: none;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface);
}
.qty-btn {
  width: 40px; border: 0; background: var(--img-bg); color: var(--text);
  font: inherit; font-size: 20px; font-weight: 600; line-height: 1; cursor: pointer; touch-action: manipulation;
}
.qty-btn:hover:not(:disabled) { background: var(--row-hover); }
.qty-btn:active:not(:disabled) { background: var(--border); }
.qty-btn:disabled { color: var(--muted); opacity: .45; cursor: default; }
.qty-input {
  width: 52px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-align: center;
  font: inherit; font-size: 16px; font-weight: 600; /* 16px กัน iOS ซูมตอนแตะ */
  -moz-appearance: textfield; appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

/* หน้าต่างยืนยัน */
.cart { width: min(720px, calc(100vw - 32px)); }
.cart-title { margin: 0; font-size: 17px; font-weight: 600; }
.cart-body { padding: 16px 20px; overflow-y: auto; }
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cart-item {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px;
  padding: 8px 6px 8px 8px; border: 1px solid var(--border); border-radius: 12px;
}
.ci-name { font-weight: 500; line-height: 1.35; }
.ci-meta { font-size: 12px; color: var(--muted); }
.ci-warn { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.ci-total { min-width: 84px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-note { display: grid; gap: 4px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.cart-note textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; resize: vertical;
}
.cart-summary { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--img-bg); display: grid; gap: 4px; }
.cart-summary > div { display: flex; justify-content: space-between; }
.cart-summary span { color: var(--muted); }
.cart-summary .grand strong { color: var(--accent); font-size: 18px; }
.cart-summary p { margin: 4px 0 0; font-size: 12px; }
.cart-to { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.cart-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--border); }

.cart-result { text-align: center; padding: 28px 20px; }
.res-icon {
  width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); font-size: 28px; font-weight: 700;
}
.res-doc { font-size: 15px; }
.res-ok { color: var(--ok); }
.res-warn { color: var(--warn); }
.res-err { text-align: left; margin: 10px auto; max-width: 520px; padding: 10px 14px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); }
.res-err ul { margin: 6px 0; padding-left: 18px; }
.res-err a { color: inherit; font-weight: 600; }
.res-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* หน้า login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: min(400px, 100%); padding: 32px 28px; border-radius: 18px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.login-brand { color: var(--accent); font-weight: 700; font-size: 26px; }
.login-card h1 { margin: 4px 0 6px; font-size: 20px; }
.login-sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.login-card .banner { text-align: left; }
.btn-line {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; border-radius: 10px; background: var(--line); color: #fff;
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.btn-line:hover { background: var(--line-hover); }
.btn-line svg { width: 24px; height: 24px; fill: currentColor; }
.uid-box { margin-top: 18px; padding: 12px; border-radius: 10px; background: var(--img-bg); font-size: 13px; }
.uid-box p { margin: 0 0 6px; color: var(--muted); }
.uid-box code { display: block; margin-bottom: 8px; font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .selbar { bottom: 8px; padding: 10px 12px; }
  .selbar-actions { width: 100%; }
  .selbar-actions .btn { flex: 1 1 auto; justify-content: center; }
  .selbar-total { display: block; margin-left: 0; }
  body.has-selbar { padding-bottom: 150px; }
  .cart-item { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .cart-item .ci-total { grid-column: 2; text-align: left; }
  .cart-item .icon-btn { grid-column: 3; grid-row: 1; }
  .cart-item .qty-stepper { grid-column: 3; grid-row: 2; justify-self: end; }
}

#table tbody td { vertical-align: middle; }
.res-hint { color: var(--muted); max-width: 460px; margin: 8px auto; font-size: 14px; }

/* ---------- แก้ราคามาตรฐานในตาราง (แอดมิน) ---------- */
.price-btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end;
  min-width: 84px; padding: 4px 6px; margin: -4px -6px -4px 0;
  border: 1px dashed transparent; border-radius: 6px; background: none;
  color: inherit; font: inherit; font-weight: 600; cursor: text;
}
.price-btn { position: relative; }
/* ดินสอลอยอยู่ซ้ายของตัวเลข ไม่กินพื้นที่ ตัวเลขทุกแถวจึงตรงแนวกัน */
.price-btn svg { position: absolute; left: -14px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .15s; }
.price-btn:hover, .price-btn:focus-visible { border-color: var(--border); background: var(--surface); }
.price-btn:hover svg, .price-btn:focus-visible svg { opacity: 1; }
.edited-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
td.price-col.editing { padding-top: 4px; padding-bottom: 4px; }
.price-edit { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.price-input {
  width: 110px; height: 34px; padding: 0 8px; text-align: right;
  border: 2px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600;
}
.price-reset {
  border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline;
}

.toast {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 50;
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-weight: 500;
}
.toast.error { background: var(--bad); color: #fff; }
.userbar .user-name { border: 0; background: none; padding: 0; font: inherit; cursor: copy; }
.userbar .user-name:hover { text-decoration: underline; }
