:root {
  --ink: #121716;
  --muted: #756f63;
  --line: #ddd2c0;
  --paper: #fffaf0;
  --wash: #f3eee4;
  --green: #0f3d30;
  --green-2: #165947;
  --gold: #c7a461;
  --red: #b8323c;
  --white: #fffdf7;
}

.table-wrap {
  overflow-x: auto;
}

.after-sales-actions {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.after-sales-note {
  width: 100%;
  min-width: 190px;
}

.danger {
  color: #b8323c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.18fr) minmax(420px, 0.82fr);
  background: var(--paper);
}

.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: var(--white);
  background: #0c1512 url("/admin/login-hero.jpg") center / cover no-repeat;
}

.login-visual-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 12, 10, 0.18) 0%, rgba(7, 12, 10, 0.48) 52%, rgba(7, 12, 10, 0.94) 100%);
}

.login-brand,
.login-visual-copy {
  position: absolute;
  z-index: 1;
  right: 7vw;
  left: 7vw;
}

.login-brand {
  top: 46px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 250, 240, 0.34);
  border-radius: 8px;
  background: rgba(9, 18, 15, 0.66);
  font-size: 21px;
  font-weight: 950;
  backdrop-filter: blur(10px);
}

.red-suit {
  margin-left: 2px;
  color: #d24a54;
}

.login-brand-name {
  font-size: 14px;
  font-weight: 900;
}

.login-visual-copy {
  bottom: 70px;
  max-width: 650px;
}

.login-kicker {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
}

.login-visual-copy h1 {
  max-width: 620px;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.06;
}

.login-visual-copy p {
  max-width: 560px;
  margin-top: 20px;
  color: rgba(255, 253, 247, 0.72);
  font-size: 16px;
  line-height: 1.7;
}

.login-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.login-capabilities span {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 250, 240, 0.22);
  border-radius: 999px;
  background: rgba(12, 21, 18, 0.54);
  font-size: 12px;
  font-weight: 800;
  line-height: 30px;
  backdrop-filter: blur(8px);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px;
  border-left: 1px solid rgba(199, 164, 97, 0.25);
  background: var(--paper);
}

.login-form-wrap {
  width: min(390px, 100%);
}

.login-mobile-brand {
  display: none;
}

.login-role {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(15, 61, 48, 0.18);
  border-radius: 6px;
  color: var(--green);
  background: #e8f0eb;
  font-size: 12px;
  font-weight: 900;
}

.login-form-wrap h2 {
  margin-top: 22px;
  font-size: 34px;
  line-height: 1.2;
}

.login-intro {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 36px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form label > span {
  color: #4f554f;
  font-size: 13px;
  font-weight: 900;
}

.login-form input {
  min-height: 50px;
  padding: 0 14px;
  border-color: #d7cbb9;
  background: var(--white);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 66px;
}

.password-field button {
  position: absolute;
  top: 7px;
  right: 7px;
  bottom: 7px;
  width: 52px;
  border: 0;
  border-radius: 6px;
  color: var(--green);
  background: #edf1ec;
  font-size: 12px;
  font-weight: 900;
}

.login-error {
  display: none;
  min-height: 38px;
  margin: -4px 0 -6px;
  padding: 9px 11px;
  border-left: 3px solid var(--red);
  border-radius: 4px;
  color: #8e252d;
  background: #f8e6e6;
  font-size: 12px;
  line-height: 1.55;
}

.login-error.visible {
  display: block;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--green);
  box-shadow: 0 12px 28px rgba(15, 61, 48, 0.18);
  font-weight: 950;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.login-submit:hover {
  background: var(--green-2);
  box-shadow: 0 15px 32px rgba(15, 61, 48, 0.24);
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.login-security {
  display: flex;
  align-items: center;
  margin-top: 24px;
  color: #476158;
  font-size: 12px;
  font-weight: 800;
}

.security-dot {
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #2ea66f;
  box-shadow: 0 0 0 4px rgba(46, 166, 111, 0.12);
}

.login-foot {
  margin-top: 12px;
  color: #9c9485;
  font-size: 11px;
}

.login-filing {
  display: inline-block;
  margin-top: 9px;
  color: #9c9485;
  font-size: 11px;
  text-decoration: none;
}

.login-filing:hover { color: var(--green); text-decoration: underline; }

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  width: 236px;
  height: 100vh;
  flex-direction: column;
  padding: 22px 18px;
  color: var(--white);
  background: #0c1512;
}

.brand {
  display: flex;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 250, 240, 0.16);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-right: 12px;
  border-radius: 8px;
  color: var(--gold);
  background: var(--green);
  font-size: 24px;
  font-weight: 900;
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
}

.brand-sub {
  margin-top: 3px;
  color: rgba(255, 250, 240, 0.62);
  font-size: 12px;
}

.nav {
  flex: 1;
  min-height: 0;
  margin-top: 22px;
  overflow-y: auto;
  padding: 0 2px 8px;
}

.nav-group {
  margin-bottom: 18px;
}

.nav-group + .nav-group {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 250, 240, 0.1);
}

.nav-group-label {
  padding: 0 12px 8px;
  color: rgba(255, 250, 240, 0.42);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.nav-group .nav-item {
  margin-bottom: 3px;
}

.nav-item {
  width: 100%;
  height: 42px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 250, 240, 0.76);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.nav-item.active,
.nav-item:hover {
  color: var(--ink);
  background: var(--gold);
}

.side-note {
  position: static;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin-top: 10px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: rgba(255, 250, 240, 0.72);
  background: rgba(255, 250, 240, 0.08);
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #40c78f;
}

.main {
  flex: 1;
  min-width: 0;
  max-width: 1680px;
  padding: 28px clamp(20px, 3vw, 48px) 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(221, 210, 192, .8);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1300px) and (min-width: 641px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .top-actions { width: 100%; justify-content: flex-end; }
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.order-alert-button {
  position: relative;
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #d9cfbd;
  border-radius: 8px;
  color: #1e352d;
  background: #fffdf8;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.order-alert-button:hover {
  border-color: #b89a5d;
  box-shadow: 0 6px 16px rgba(23, 58, 46, .1);
  transform: translateY(-1px);
}

.order-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2c785e;
  box-shadow: 0 0 0 4px rgba(44, 120, 94, .1);
}

.order-alert-button.has-unread .order-alert-dot {
  background: #b8323c;
  box-shadow: 0 0 0 4px rgba(184, 50, 60, .12);
  animation: alert-pulse 1.4s ease-in-out infinite;
}

.order-alert-button strong {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 10px;
  color: #fff;
  background: #b8323c;
  font-size: 10px;
}

.order-alert-stack {
  position: fixed;
  z-index: 90;
  top: 100px;
  right: 22px;
  display: grid;
  width: min(460px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.order-alert-toast {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 20px;
  border: 2px solid #c9373d;
  border-radius: 8px;
  color: #262626;
  background: #fff;
  box-shadow: 0 18px 42px rgba(4, 22, 17, .26);
  text-align: left;
  pointer-events: auto;
  animation: alert-enter 220ms cubic-bezier(.2, .8, .2, 1) both;
}

.order-alert-toast.is-leaving { animation: alert-leave 180ms ease both; }
.order-alert-icon { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 8px; color: #14372d; background: #d1ad63; font-size: 18px; font-weight: 950; }
.order-alert-copy { min-width: 0; }
.order-alert-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 18px; font-weight: 900; }
.order-alert-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-alert-copy p { margin: 7px 0 0; color: #555; font-size: 14px; overflow-wrap: anywhere; }
.order-alert-amount { color: #b4232a; font-size: 20px; font-weight: 950; }
.order-alert-button.has-unread { background: #b4232a; color: #fff; border-color: #b4232a; }
.order-alert-settings { position: relative; font-size: 13px; }
.order-alert-settings summary { cursor: pointer; padding: 10px 0; }
.order-alert-settings-body { position: absolute; z-index: 100; top: 100%; right: 0; width: min(290px, calc(100vw - 40px)); padding: 16px; background: #fff; color: #252525; border: 1px solid #d8d8d8; border-radius: 8px; box-shadow: 0 6px 24px #0002; display: grid; gap: 12px; }
.order-alert-settings-body label { display: flex; gap: 8px; align-items: center; }
.order-alert-settings-body input[type="checkbox"] { width: auto; }
.order-alert-settings-body input[type="range"] { width: 100%; padding: 0; }
.order-alert-settings-body output { margin-left: auto; }
[data-member-section="redemptions"] td { overflow-wrap: anywhere; }
[data-member-section="redemptions"] .panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0 12px; }
[data-member-section="redemptions"] h2 { margin: 0; font-size: 18px; }
#redemptionFilter { width: 160px; }
[data-member-section="redemptions"] table { min-width: 960px; table-layout: fixed; }
[data-member-section="redemptions"] th:nth-child(1) { width: 14%; }
[data-member-section="redemptions"] th:nth-child(2) { width: 22%; }
[data-member-section="redemptions"] th:nth-child(3) { width: 7%; }
[data-member-section="redemptions"] th:nth-child(4) { width: 8%; }
[data-member-section="redemptions"] th:nth-child(5) { width: 16%; }
[data-member-section="redemptions"] th:nth-child(6) { width: 20%; }
[data-member-section="redemptions"] th:nth-child(7) { width: 13%; }
[data-member-section="redemptions"] td:nth-child(3), [data-member-section="redemptions"] .status, [data-member-section="redemptions"] button { white-space: nowrap; }

@keyframes alert-pulse { 50% { opacity: .48; transform: scale(.86); } }
@keyframes alert-enter { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes alert-leave { to { opacity: 0; transform: translateX(16px); } }

.merchant-picker {
  display: grid;
  gap: 4px;
  margin-right: 14px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.merchant-picker small {
  color: #8f8577;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.25;
}

.merchant-picker select {
  min-width: 170px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font-size: 13px;
}

.role-hidden { display: none !important; }

.merchant-picker.locked select {
  pointer-events: none;
  border-color: #dfd5c4;
  color: #5f594f;
  background: #f2ece1;
  opacity: 1;
}

.merchant-picker.locked small { color: #8a6c3b; }

.account-identity {
  display: grid;
  gap: 2px;
  min-width: 130px;
  text-align: right;
}

.account-identity strong { color: var(--ink); font-size: 14px; }
.account-identity span { color: var(--muted); font-size: 12px; }
.merchant-create-form { margin-bottom: 18px; }

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
  padding: 18px 20px 22px;
  align-items: end;
}

.account-form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.account-form-grid input,
.account-form-grid select { width: 100%; }

.operator-session-card {
  min-width: 220px;
  display: grid;
  gap: 5px;
  padding: 12px 15px;
  border: 1px solid rgba(186, 140, 57, 0.22);
  background: rgba(186, 140, 57, 0.07);
}

.operator-session-card span { color: var(--muted); font-size: 12px; }
.operator-session-card strong { font-size: 14px; }

.recharge-plan-create {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--line);
}

.recharge-plan-create label,
.recharge-plan-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.recharge-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
  padding: 20px;
}

.recharge-plan-card {
  position: relative;
  display: grid;
  gap: 13px;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(186, 140, 57, 0.22);
  background: linear-gradient(150deg, rgba(255,255,255,.98), rgba(246,240,226,.72));
}

.recharge-plan-index {
  position: absolute;
  top: 7px;
  right: 12px;
  color: rgba(22, 57, 46, 0.08);
  font-size: 48px;
  font-weight: 950;
  pointer-events: none;
}

.recharge-plan-card-head,
.recharge-money-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.recharge-money-row label { min-width: 0; flex: 1; }
.recharge-plan-card input,
.recharge-plan-card select { width: 100%; }
.recharge-plan-save { width: 100%; }

.member-create-panel {
  margin-bottom: 18px;
}

.permission-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 20px 0;
}

.permission-overview div {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(19, 62, 49, 0.035);
}

.permission-overview strong { color: var(--green); font-size: 13px; }
.permission-overview span { color: var(--muted); font-size: 12px; line-height: 1.5; }

.member-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 0 20px 20px;
}

.member-create-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.member-create-form input { width: 100%; }

.rule-head-actions,
.rule-edit-actions,
.rule-audit,
.points-rule-safeguards {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.points-rule-safeguards {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(19, 62, 49, 0.035);
}

.points-rule-safeguards span {
  padding: 6px 9px;
  border: 1px solid rgba(19, 62, 49, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.rule-settings textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
}

.rule-settings.read-only input,
.rule-settings.read-only textarea {
  border-color: transparent;
  color: var(--ink);
  background: rgba(19, 62, 49, 0.045);
  opacity: 1;
  cursor: default;
}

.rule-audit {
  grid-column: 1 / -1;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.rule-edit-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.rewards-admin-panel { margin-bottom: 18px; }

.reward-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--line);
}

.reward-form label { display: grid; align-content: start; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.reward-form input,
.reward-form select,
.reward-form textarea { width: 100%; }
.reward-form textarea { min-height: 68px; resize: vertical; }
.reward-form .wide { grid-column: span 3; }
.reward-form small { color: var(--muted); font-size: 11px; }
.reward-form-actions { display: flex; align-items: end; justify-content: flex-end; gap: 10px; }

@media (max-width: 1100px) {
  .permission-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reward-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reward-form .wide { grid-column: span 2; }
  .points-ops-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-search-panel { grid-template-columns: 1fr 1.4fr; }
  .member-search-actions { grid-column: 1 / -1; grid-template-columns: 1fr auto; }
  .member-account-card { grid-template-columns: 44px minmax(160px, 1fr) 100px 92px 92px 174px; gap: 10px; }
  .reward-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.rule-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.check-row input { width: 15px; height: 15px; }

.sync {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(15, 61, 48, .12);
  border-radius: 999px;
  background: rgba(15, 61, 48, .04);
  color: var(--muted);
  font-size: 13px;
}

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

.primary,
.ghost,
.danger,
.chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 900;
}

.primary {
  border: 0;
  color: var(--ink);
  background: var(--gold);
}

.ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
}

.danger {
  border: 0;
  color: var(--white);
  background: var(--red);
}

.chip {
  min-height: 32px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--white);
}

.chip.active {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.payment-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-value.compact {
  font-size: 19px;
}

.plus {
  color: var(--green-2);
  font-weight: 950;
}

.metric {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

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

.metric-value {
  margin-top: 14px;
  font-size: 26px;
  font-weight: 950;
}

.panel {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 4px 14px rgba(33, 45, 38, .035);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head > div h2 {
  margin: 0;
}

.panel-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.campaign-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.campaign-summary-item {
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.campaign-summary-item span,
.campaign-summary-item strong {
  display: block;
}

.campaign-summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.campaign-summary-item strong {
  margin-top: 7px;
  font-size: 24px;
}

.campaign-table td:first-child {
  min-width: 220px;
}

.campaign-table td:nth-child(5) {
  min-width: 170px;
}

.campaign-placements {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.campaign-placements span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--green);
  background: #e7efe9;
  font-size: 11px;
  font-weight: 900;
}

.campaign-placements .off {
  color: var(--muted);
  background: #ece5d9;
}

.campaign-period-state {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.filter-row {
  display: flex;
  gap: 8px;
}

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

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid #eadfce;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #f8f0e1;
  font-size: 12px;
  font-weight: 900;
}

td {
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.price {
  color: var(--red);
  font-weight: 950;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--green);
  background: #e2f0e8;
  font-size: 12px;
  font-weight: 900;
}

.status.warn {
  color: #856115;
  background: #f2e5bd;
}

.status.done {
  color: var(--muted);
  background: #ece4d7;
}

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

.account-role-control {
  display: flex;
  min-width: 184px;
  align-items: center;
  gap: 7px;
}

.account-role-control select {
  width: 108px;
  min-width: 108px;
  height: 36px;
  padding: 0 28px 0 10px;
  font-size: 12px;
}

.account-role-control button {
  min-height: 36px;
  padding: 0 11px;
}

.member-actions {
  min-width: 138px;
}

.points-ops-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.points-ops-card {
  min-height: 96px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.points-ops-card span,
.points-ops-card strong,
.points-ops-card small { display: block; }
.points-ops-card span { color: var(--muted); font-size: 11px; font-weight: 850; }
.points-ops-card strong { margin-top: 8px; font-size: 23px; line-height: 1.2; overflow-wrap: anywhere; }
.points-ops-card small { margin-top: 7px; color: #9b9282; font-size: 10px; }

.points-workspace-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9dfcf;
}

.points-workspace-tabs button {
  min-height: 38px;
  flex: 1;
  border: 0;
  border-radius: 6px;
  color: #756f63;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.points-workspace-tabs button.active {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 3px 10px rgba(10, 34, 27, 0.16);
}

.member-workspace { display: none; }
.member-workspace.active { display: block; }

.member-search-panel {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(360px, 1.3fr) minmax(190px, .7fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: 8px 8px 0 0;
  color: var(--white);
  background: var(--green);
}

.member-search-copy span { color: var(--gold); font-size: 10px; font-weight: 950; }
.member-search-copy h2 { margin: 7px 0 0; color: var(--white); font-size: 20px; }
.member-search-copy p { margin: 7px 0 0; color: rgba(255, 253, 247, .62); font-size: 11px; }

.member-search-box {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto;
  gap: 8px;
}

.member-search-box input { min-height: 44px; border-color: rgba(255,255,255,.25); }
[data-member-section="recovery"] .member-search-box { margin: 12px 0; }
[data-member-section="recovery"] table { min-width: 1050px; }
[data-member-section="recovery"] th,
[data-member-section="recovery"] td { white-space: nowrap; }
.member-search-box button { min-height: 44px; white-space: nowrap; }
.member-search-actions { display: grid; gap: 8px; }
.member-search-actions .ghost { color: var(--white); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }

.operator-session-card {
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 7px;
  background: rgba(255,255,255,.07);
}
.operator-session-card span,
.operator-session-card strong { display: block; }
.operator-session-card span { color: rgba(255,255,255,.58); font-size: 10px; }
.operator-session-card strong { margin-top: 4px; color: var(--white); font-size: 12px; }

.member-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fbf7ee;
}
.member-result-head > div { display: flex; align-items: center; gap: 9px; }
.member-result-head span,
.member-result-head p { color: var(--muted); font-size: 11px; }

.member-card-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: var(--paper);
}

.member-account-card {
  display: grid;
  grid-template-columns: 48px minmax(180px, 1.2fr) minmax(110px, .8fr) minmax(105px, .7fr) minmax(105px, .7fr) 190px;
  gap: 14px;
  align-items: center;
  min-height: 94px;
  padding: 14px 18px;
  border-bottom: 1px solid #eadfce;
}
.member-account-card:last-child { border-bottom: 0; }
.member-account-card:hover { background: #fdf9f1; }
.member-account-avatar { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; color: #e2c77f; background: var(--green); font-size: 17px; font-weight: 950; }
.member-account-info > div { display: flex; align-items: center; gap: 7px; }
.member-account-info span { padding: 2px 6px; border-radius: 4px; color: #77622e; background: #eee1bf; font-size: 9px; font-weight: 900; }
.member-account-info p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.member-asset span,
.member-asset strong { display: block; }
.member-asset span { color: var(--muted); font-size: 10px; }
.member-asset strong { margin-top: 5px; font-size: 15px; }
.member-asset.primary-asset strong { color: var(--red); font-size: 19px; }
.member-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.member-account-actions button { min-height: 36px; padding: 0 9px; }
.member-empty { display: flex; min-height: 260px; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.member-empty strong { color: var(--ink); }
.member-empty span { margin-top: 7px; font-size: 12px; }
.member-empty button { margin-top: 16px; }

.reward-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.reward-config-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf7; }
.reward-config-card.is-disabled { opacity: .64; }
.reward-config-head,
.reward-config-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reward-config-card h3 { margin: 15px 0 0; font-size: 16px; }
.reward-config-card p { min-height: 36px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.reward-config-points { display: flex; align-items: baseline; gap: 5px; margin-top: 16px; color: var(--red); }
.reward-config-points strong { font-size: 26px; }
.reward-config-points span { font-size: 11px; font-weight: 900; }
.reward-config-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; color: #8b8375; font-size: 10px; }
.reward-config-actions { margin-top: 16px; padding-top: 12px; border-top: 1px solid #eadfce; }

.points-rule-panel .panel-head {
  min-height: 72px;
  padding: 0 20px;
  background: #fffdf8;
}

.points-risk-banner {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  margin: 18px 20px 0;
  padding: 15px 16px;
  border: 1px solid #e8d7c4;
  border-radius: 8px;
  background: #f9f3e8;
}

.points-risk-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #fff8e7;
  background: #9a413e;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 900;
}

.points-risk-banner strong { color: #493a2d; font-size: 14px; }
.points-risk-banner p { margin: 5px 0 0; color: #7f7164; font-size: 11px; line-height: 1.6; }
.points-risk-tags { display: flex; gap: 6px; }
.points-risk-tags span { padding: 5px 8px; border: 1px solid #e3d2bd; border-radius: 5px; color: #7a6551; background: rgba(255,255,255,.56); font-size: 10px; font-weight: 850; white-space: nowrap; }

.points-rule-panel .rule-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px;
}

.rule-number-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rule-field-card,
.rule-description-field { min-width: 0; }
.points-rule-panel .rule-settings label > span { margin-bottom: 8px; color: #5f574c; font-size: 12px; }
.rule-field-card { padding: 16px; border: 1px solid #e7ddcc; border-radius: 8px; background: #fbf8f1; }
.rule-input-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.rule-input-wrap input { min-width: 0; border: 0; border-radius: 0; background: transparent; font-size: 20px; font-weight: 900; }
.rule-input-wrap input:focus { box-shadow: none; }
.rule-input-wrap strong { padding: 0 11px; color: #8c8172; font-size: 11px; }
.rule-field-card small,
.rule-description-field small { display: block; margin-top: 8px; color: #9a9082; font-size: 10px; line-height: 1.5; }
.rule-description-field textarea { min-height: 104px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); font: inherit; font-size: 13px; line-height: 1.65; outline: 0; }
.rule-description-field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199, 164, 97, .18); }

.points-rule-panel .rule-settings.read-only .rule-field-card { background: #f8f4ec; }
.points-rule-panel .rule-settings.read-only .rule-input-wrap,
.points-rule-panel .rule-settings.read-only .rule-description-field textarea { border-color: #e7ddcc; background: #f8f4ec; }
.points-rule-panel .rule-settings.read-only input,
.points-rule-panel .rule-settings.read-only textarea { background: transparent; }

.points-rule-panel .rule-audit {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-top: 1px solid #ece3d5;
  color: #8f8577;
}

.points-rule-panel .rule-audit span { margin: 0; font-size: 10px; }
.points-rule-panel .rule-edit-actions { grid-column: 1 / -1; display: flex; padding-top: 2px; }
.compact-dialog { width: min(460px, 100%); }
.compact-form { display: grid; gap: 14px; margin-top: 18px; }
.reward-dialog { display: flex; width: min(760px, 100%); max-height: calc(100vh - 24px); flex-direction: column; overflow: hidden; }
.dialog-reward-form { margin-top: 16px; padding: 0 4px 4px 0; overflow-y: auto; border-bottom: 0; }
.ledger-table { min-width: 980px; }

.danger-text {
  color: var(--red);
  border-color: rgba(184, 50, 60, 0.34);
}

.member-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.7fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8f0e1;
}

.member-search-control {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 8px;
}

.member-search-control button {
  min-height: 42px;
}

.member-toolbar label,
.dialog-field {
  display: grid;
  gap: 7px;
}

.member-toolbar label > span,
.dialog-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.member-toolbar p {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.dialog-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 13, 11, 0.64);
}

.points-dialog {
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(5, 12, 9, 0.3);
}

.campaign-dialog {
  display: flex;
  width: min(720px, 100%);
  max-height: calc(100vh - 16px);
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
}

.campaign-form {
  margin-top: 14px;
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
}

.campaign-dialog-actions {
  flex: 0 0 auto;
  margin: 14px -18px -18px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.campaign-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.campaign-field-wide {
  grid-column: 1 / -1;
}

.campaign-form textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  line-height: 1.55;
  outline: 0;
}

.campaign-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(199, 164, 97, 0.18);
}

.campaign-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.campaign-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.campaign-option input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  margin-top: 2px;
  accent-color: var(--green);
}

.campaign-option span,
.campaign-option strong,
.campaign-option small {
  display: block;
}

.campaign-option strong {
  font-size: 13px;
}

.campaign-option small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.dialog-head,
.dialog-member,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-eyebrow {
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font-size: 22px;
}

.dialog-member {
  min-height: 86px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.dialog-member .muted {
  display: block;
  margin-top: 5px;
}

.dialog-balance {
  text-align: right;
}

.dialog-balance span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.dialog-balance strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
}

.dialog-operator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid #d9cfbd;
  border-radius: 7px;
  color: var(--muted);
  background: #fffaf0;
  font-size: 12px;
}

.dialog-operator strong {
  color: var(--green);
  font-size: 14px;
}

.points-unit-input {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  border: 1px solid #cfc2ad;
  border-radius: 7px;
  background: var(--white);
}

.points-unit-input input {
  border: 0;
  border-radius: 0;
  font-size: 22px;
  font-weight: 900;
}

.points-unit-input strong {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--green);
  background: #edf3ef;
  font-size: 13px;
}

.points-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.points-preview > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #faf5eb;
}

.points-preview span,
.points-preview strong {
  display: block;
}

.points-preview span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.points-preview strong {
  margin-top: 6px;
  overflow: hidden;
  color: var(--green);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-preview strong.is-deduct,
.points-preview strong.is-invalid {
  color: var(--red);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 8px;
  background: #e9dfcf;
}

.mode-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.mode-switch button.active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 2px 8px rgba(8, 17, 13, 0.08);
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 9px 0 16px;
}

.amount-presets button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: var(--white);
  font-weight: 900;
}

.dialog-hint {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.dialog-actions {
  justify-content: flex-end;
  gap: 10px;
}

.toolbar-form {
  display: grid;
  grid-template-columns: 1.4fr 130px 110px 110px 116px;
  gap: 10px;
  margin-bottom: 14px;
}

.settings-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 420px));
  gap: 12px;
  padding: 16px;
}

.settings-body > .primary {
  width: 100%;
  grid-column: 1 / 2;
}

.login-hero-setting { grid-column: 1 / -1; }

.login-hero-editor {
  display: grid;
  grid-template-columns: 230px minmax(260px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf7f0;
}

.login-hero-editor img {
  width: 230px;
  height: 132px;
  object-fit: cover;
  border-radius: 5px;
  background: #0b3026;
}

.login-hero-editor input[type="file"] { width: 100%; }
.login-hero-editor small { display: block; margin-top: 8px; color: var(--muted); }
.login-hero-editor .check-row { margin-top: 12px; }

.settings-body label,
.rule-settings label {
  display: block;
}

.settings-body span,
.rule-settings span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.config-status {
  grid-column: 1 / -1;
  padding: 13px 14px;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: #f6efe2;
}

.config-status strong,
.config-status span,
.config-status small {
  display: block;
}

.config-status strong {
  color: var(--ink);
  font-size: 13px;
}

.config-status span {
  margin: 4px 0 0;
  color: #8b5f22;
  font-size: 12px;
}

.config-status small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.config-status.ready {
  border-left-color: #21815e;
  background: #e9f4ee;
}

.config-status.ready span { color: #176647; }

.rule-settings {
  display: grid;
  grid-template-columns: 150px 150px 150px minmax(280px, 1fr) 116px;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

input,
select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  outline: 0;
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(199, 164, 97, 0.18);
}

.commerce-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.commerce-summary-item {
  position: relative;
  min-height: 100px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.commerce-summary-item::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: #cfc3ae;
  content: "";
}

.commerce-summary-item.is-active::before { background: var(--green-2); }
.commerce-summary-item.is-warning::before { background: var(--red); }

.commerce-summary-item span,
.commerce-summary-item strong,
.commerce-summary-item small { display: block; }

.commerce-summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.commerce-summary-item strong {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.commerce-summary-item small {
  margin-top: 7px;
  color: #99907f;
  font-size: 11px;
}

.commerce-shell {
  display: grid;
  min-height: 590px;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.commerce-categories {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f8f2e8;
}

.commerce-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.commerce-side-head strong,
.commerce-side-head span { display: block; }
.commerce-side-head strong { font-size: 14px; }
.commerce-side-head span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.icon-button.small { width: 32px; height: 32px; font-size: 15px; }

.category-nav {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.category-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  color: #5f5b52;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.category-nav-item strong {
  min-width: 26px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #8b8374;
  background: rgba(18, 23, 22, 0.05);
  font-size: 10px;
  text-align: center;
}

.category-nav-item:hover { background: #eee5d6; }
.category-nav-item.active { color: var(--white); background: var(--green); }
.category-nav-item.active strong { color: var(--green); background: var(--gold); }

.commerce-side-note {
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--line);
  color: #948b7b;
  font-size: 11px;
  line-height: 1.55;
}

.commerce-products { min-width: 0; }

.commerce-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px auto;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.commerce-search { position: relative; }
.commerce-search span {
  position: absolute;
  top: 50%;
  left: 12px;
  color: #8f8778;
  font-size: 20px;
  transform: translateY(-52%);
  pointer-events: none;
}
.commerce-search input { padding-left: 38px; }
.commerce-add-button { white-space: nowrap; }

.commerce-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 16px;
  background: #fcf8f0;
}

.commerce-list-head > div { display: flex; align-items: center; gap: 9px; }
.commerce-list-head p { color: var(--muted); font-size: 11px; }

.product-list { border-top: 1px solid #eee5d7; }

.product-row {
  display: grid;
  grid-template-columns: 52px minmax(200px, 1fr) 78px 72px 62px 132px;
  gap: 10px;
  align-items: center;
  min-height: 102px;
  padding: 14px 16px;
  border-bottom: 1px solid #eee5d7;
  transition: background 150ms ease;
}

.product-row:hover { background: #fdf9f2; }
.product-row.is-offline { opacity: 0.66; }

.product-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 7px;
  color: #e2c77f;
  background: var(--green);
  font-size: 23px;
  font-weight: 950;
}

.product-visual.suit-red { color: #fff4dd; background: #913640; }
.product-info { min-width: 0; }
.product-title-line { display: flex; align-items: center; gap: 8px; }
.product-title-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-title-line span { padding: 2px 6px; border-radius: 4px; color: #7a6331; background: #eee0bd; font-size: 10px; font-weight: 900; white-space: nowrap; }
.product-info p { margin: 6px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-meta { display: flex; gap: 12px; margin-top: 8px; color: #938a7b; font-size: 10px; }

.product-price span,
.product-price strong,
.product-price del,
.product-stock span,
.product-stock strong,
.product-stock small { display: block; }
.product-price span,
.product-stock span { color: var(--muted); font-size: 10px; }
.product-price strong { margin-top: 4px; color: var(--red); font-size: 17px; }
.product-price del { margin-top: 3px; color: #aaa190; font-size: 10px; }
.product-stock strong { margin-top: 4px; font-size: 16px; }
.product-stock small { margin-top: 3px; color: #7d917f; font-size: 9px; }
.product-stock.low strong,
.product-stock.low small { color: var(--red); }
.product-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.product-more { min-height: 32px; padding: 0 5px; border: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 900; }

.commerce-empty {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.commerce-empty strong { color: var(--ink); font-size: 15px; }
.commerce-empty span { margin-top: 8px; font-size: 12px; }

.count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--green);
  background: #e5efe9;
  font-size: 12px;
  font-weight: 900;
}

.category-create {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 80px 96px;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.category-list {
  padding: 4px 16px 12px;
}

.category-row {
  display: grid;
  grid-template-columns: 22px minmax(110px, 1fr) 58px 42px 94px;
  gap: 7px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eadfce;
}

.category-row:last-child { border-bottom: 0; }

.category-grip {
  color: #aea28e;
  font-size: 18px;
  text-align: center;
}

.category-sort { text-align: center; }

.category-product-count {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.category-actions {
  display: grid;
  grid-template-columns: 54px 34px;
  gap: 5px;
  align-items: center;
}

.compact-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.text-danger {
  min-height: 32px;
  padding: 0;
  border: 0;
  color: var(--red);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.text-danger:hover { text-decoration: underline; }

.merchant-close-button,
.merchant-open-button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
}

.merchant-close-button {
  border: 1px solid rgba(184, 50, 60, .28);
  color: #a83b42;
  background: #fff8f5;
}

.merchant-open-button {
  border: 1px solid rgba(24, 112, 80, .28);
  color: #176b4e;
  background: #edf7f1;
}

.product-dialog { display: flex; width: min(760px, 100%); max-height: calc(100vh - 24px); flex-direction: column; overflow: hidden; }
.product-form { margin-top: 16px; padding-right: 4px; overflow-y: auto; }
.product-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.product-field-wide { grid-column: 1 / -1; }
.product-form textarea { width: 100%; min-height: 78px; padding: 10px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); font: inherit; outline: 0; }
.product-form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199, 164, 97, 0.18); }
.product-dialog-actions { flex: 0 0 auto; margin: 0 -22px -22px; padding: 14px 22px 22px; border-top: 1px solid var(--line); background: var(--paper); }
.category-dialog { width: min(660px, 100%); }
.category-dialog-note { margin: 14px 0 0; padding: 10px 12px; border: 1px solid #e5d8c4; border-radius: 7px; color: var(--muted); background: #faf4e8; font-size: 11px; line-height: 1.55; }

.admin-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 2px;
  color: #918878;
  font-size: 12px;
}

.admin-footer a {
  color: inherit;
  text-decoration: none;
}

.admin-footer a:hover { color: var(--green); text-decoration: underline; }
.footer-separator { color: #c3b8a6; }

.table-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.table-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.table-card-title {
  font-size: 20px;
  font-weight: 950;
}

.seat-grid {
  display: block;
}

.table-seat-group {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.table-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.table-group-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.seat-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.seat-card {
  min-height: 156px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.seat-title {
  display: flex;
  justify-content: space-between;
  font-weight: 950;
}

.scene {
  display: block;
  margin: 14px 0;
  padding: 10px;
  border-radius: 8px;
  color: var(--green);
  background: #e9f1eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
}

.seat-actions {
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 8px;
}

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

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 360px;
  }

  .login-brand {
    top: 28px;
  }

  .login-visual-copy {
    bottom: 38px;
  }

  .login-visual-copy h1 {
    font-size: 44px;
  }

  .login-panel {
    min-height: auto;
    padding: 56px 28px;
    border-top: 1px solid rgba(199, 164, 97, 0.25);
    border-left: 0;
  }

  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px;
  }

  .brand { padding-bottom: 12px; }

  .nav {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .nav-item {
    width: auto;
    min-width: max-content;
    height: 36px;
    flex: 0 0 auto;
    margin: 0;
  }

  .side-note { display: none; }

  .main {
    padding: 20px;
  }

  .metric-grid,
  .payment-status-grid,
  .campaign-summary,
  .table-overview,
  .seat-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar-form,
  .settings-body,
  .rule-settings,
  .member-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .points-ops-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-search-panel { grid-template-columns: 1fr; }
  .member-search-actions { grid-column: auto; grid-template-columns: 1fr auto; }
  .member-account-card { grid-template-columns: 46px minmax(170px, 1fr) repeat(3, 90px); }
  .member-account-actions { grid-column: 2 / -1; justify-self: end; width: 190px; }
  .points-rule-panel .rule-settings { grid-template-columns: 1fr; }
  .login-hero-editor { grid-template-columns: 1fr; }
  .login-hero-editor img { width: 100%; height: 180px; }

  .commerce-shell { grid-template-columns: 1fr; }
  .commerce-categories { border-right: 0; border-bottom: 1px solid var(--line); }
  .category-nav { display: flex; overflow-x: auto; }
  .category-nav-item { width: auto; min-width: max-content; gap: 12px; }
  .commerce-side-note { display: none; }
  .commerce-toolbar { grid-template-columns: minmax(220px, 1fr) 140px auto; }
  .product-row { grid-template-columns: 48px minmax(180px, 1fr) 72px 68px 58px 124px; gap: 8px; }
}

@media (max-width: 640px) {
  .reward-form {
    grid-template-columns: 1fr;
  }

  .reward-form .wide {
    grid-column: auto;
  }

  .points-rule-panel .panel-head { min-height: 0; align-items: flex-start; gap: 12px; padding: 16px; }
  .points-risk-banner { grid-template-columns: 34px minmax(0, 1fr); margin: 12px 14px 0; padding: 13px; }
  .points-risk-mark { width: 32px; height: 32px; }
  .points-risk-tags { grid-column: 1 / -1; flex-wrap: wrap; padding-left: 47px; }
  .points-rule-panel .rule-settings { gap: 14px; padding: 14px; }
  .rule-number-grid { grid-template-columns: 1fr; }
  .rule-description-field textarea { min-height: 136px; }
  .points-rule-panel .rule-audit { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; padding: 10px 12px; }

  .account-form-grid {
    grid-template-columns: 1fr;
  }

  .account-identity {
    text-align: left;
  }

  .recharge-plan-create,
  .recharge-plan-grid,
  .member-create-form {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 36px 22px;
    background: linear-gradient(180deg, #0d211a 0, #0d211a 178px, var(--paper) 178px);
  }

  .login-form-wrap {
    width: 100%;
    padding: 28px 22px;
    border: 1px solid rgba(199, 164, 97, 0.3);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 20px 46px rgba(5, 12, 9, 0.2);
  }

  .login-mobile-brand {
    display: block;
    margin-bottom: 26px;
    color: var(--green);
    font-size: 14px;
    font-weight: 950;
  }

  .login-mobile-brand span {
    margin-right: 7px;
    color: var(--gold);
  }

  .login-form-wrap h2 {
    font-size: 30px;
  }

  .sidebar {
    padding: 14px;
  }

  .brand {
    padding-bottom: 12px;
  }

  .nav {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .nav-item {
    width: auto;
    min-width: max-content;
    height: 36px;
    flex: 0 0 auto;
    margin: 0;
  }

  .side-note {
    display: none;
  }

  .main {
    padding: 18px 14px 32px;
  }

  .topbar,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-alert-button { justify-content: center; }
  .order-alert-stack { top: 14px; right: 16px; }

  .merchant-picker,
  .sync {
    margin: 8px 0;
  }

  .metric-grid,
  .payment-status-grid,
  .campaign-summary,
  .commerce-summary,
  .table-overview,
  .seat-list,
  .toolbar-form,
  .settings-body,
  .rule-settings,
  .member-toolbar {
    grid-template-columns: 1fr;
  }

  .points-ops-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .points-workspace-tabs { overflow-x: auto; }
  .points-workspace-tabs button { min-width: 92px; flex: 0 0 auto; }
  .member-search-box { grid-template-columns: 1fr; }
  .member-search-actions { grid-template-columns: 1fr; }
  .member-result-head { align-items: flex-start; flex-direction: column; gap: 6px; padding: 13px 14px; }
  .member-account-card { grid-template-columns: 44px minmax(0, 1fr) 100px; }
  .member-asset { grid-column: 2 / -1; }
  .member-account-actions { grid-column: 1 / -1; width: 100%; }
  .reward-card-grid { grid-template-columns: 1fr; }

  .category-create,
  .product-form-grid {
    grid-template-columns: 1fr;
  }

  .product-field-wide { grid-column: auto; }

  .commerce-shell { grid-template-columns: 1fr; }
  .commerce-categories { border-right: 0; border-bottom: 1px solid var(--line); }
  .category-nav { display: flex; overflow-x: auto; }
  .category-nav-item { width: auto; min-width: max-content; gap: 12px; }
  .commerce-side-note { display: none; }
  .commerce-toolbar { grid-template-columns: 1fr; }
  .commerce-list-head { align-items: flex-start; flex-direction: column; gap: 5px; padding: 12px 14px; }
  .product-row { grid-template-columns: 46px minmax(0, 1fr) 78px; gap: 10px; }
  .product-price { text-align: right; }
  .product-stock,
  .product-status { grid-column: 2 / 3; }
  .product-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px dashed #e5dac9; padding-top: 10px; }

  .category-row {
    grid-template-columns: 18px minmax(80px, 1fr) 48px 34px 86px;
    gap: 5px;
  }

  .category-actions { grid-template-columns: 48px 32px; }

  .admin-footer {
    flex-wrap: wrap;
    line-height: 1.6;
  }

  .campaign-form-grid,
  .campaign-options {
    grid-template-columns: 1fr;
  }

  .campaign-field-wide {
    grid-column: auto;
  }
}

/* Tournament operations */
.tournament-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 26px 30px;
  border-left: 5px solid var(--gold);
  color: #f8f1e5;
  background: #10231c;
}
.tournament-intro > div:first-child > span { color: #d5b46f; font-size: 11px; font-weight: 900; letter-spacing: 2px; }
.tournament-intro h2 { margin: 7px 0 5px; font-size: 26px; }
.tournament-intro p { margin: 0; color: #aab7b0; }
.tournament-safety { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.tournament-safety strong { width: 100%; color: #d5b46f; text-align: right; }
.tournament-safety span { padding: 7px 10px; border: 1px solid #3a5147; color: #d9e0dc; background: #142d24; font-size: 12px; }
.tournament-create { margin-top: 22px; }
.tournament-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tournament-form-grid label { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: #5d564d; font-size: 13px; font-weight: 800; }
.tournament-form-grid input, .tournament-form-grid textarea { width: 100%; border: 1px solid #ded3c1; border-radius: 5px; background: #fbf8f1; }
.tournament-form-grid textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.55; }
.tournament-form-grid small { color: #8d857a; font-weight: 500; }
.tournament-form-grid .tournament-wide { grid-column: 1 / -1; }
.tournament-list { display: grid; gap: 22px; }
.tournament-card { overflow: hidden; border: 1px solid #d9cdb9; border-radius: 7px; background: #fffdf8; box-shadow: 0 14px 34px rgba(37, 29, 18, 0.08); }
.tournament-card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid #e8dfd1; background: #fffdf8; }
.tournament-title-line { display: flex; align-items: center; gap: 12px; }
.activity-mode { padding: 5px 8px; border: 1px solid #29493c; color: #176747; background: #edf7f1; font-size: 11px; font-weight: 900; }
.activity-mode.social { border-color: #d1b36f; color: #74571f; background: #fff8e8; }
.tournament-title-line h2 { margin: 0; font-size: 21px; }
.tournament-card-head p { margin: 6px 0 0; color: #81796e; }
.tournament-head-actions, .tournament-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.tournament-console { display: grid; grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 1fr); background: #0e1d18; }
.tournament-clock-panel { padding: 26px 30px; color: #f7f1e6; border-right: 1px solid #31463d; }
.control-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.control-kicker span { color: #d5b46f; font-size: 11px; font-weight: 900; letter-spacing: 2px; }
.control-kicker i { padding: 5px 8px; border: 1px solid #3a5147; color: #b6c2bc; font-size: 11px; font-style: normal; }
.tournament-clock-panel > strong { display: block; margin: 7px 0; font-size: clamp(54px, 7vw, 90px); line-height: 1; font-variant-numeric: tabular-nums; }
.tournament-clock-panel > strong.is-warning { color: #dc5960; }
.tournament-clock-panel h3 { margin: 5px 0; color: #e0c27f; font-size: 24px; }
.tournament-clock-panel p { margin: 5px 0 20px; color: #8fa199; }
.tournament-field-panel { display: grid; align-content: center; padding: 26px; }
.field-metrics { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.field-metrics div + div { border-left: 1px solid #3a4c44; }
.field-metrics span { display: block; color: #91a098; font-size: 12px; }
.field-metrics strong { display: block; margin-top: 8px; color: #f8f2e8; font-size: 30px; }
.tournament-progress { height: 4px; margin-top: 22px; overflow: hidden; background: #2a3c34; }
.tournament-progress span { display: block; height: 100%; background: #d5b46f; transition: width 300ms ease; }
.tournament-compliance { margin-top: 18px; padding: 14px 16px; border: 1px solid #394e45; background: #142820; }
.tournament-compliance strong, .tournament-compliance span { display: block; }
.tournament-compliance strong { color: #d5b46f; }
.tournament-compliance span { margin-top: 5px; color: #a9b5af; font-size: 12px; }
.tournament-operations-grid { display: grid; grid-template-columns: minmax(360px, .82fr) minmax(520px, 1.18fr); gap: 0; border-bottom: 1px solid #e8dfd1; }
.tournament-module { min-width: 0; padding: 20px 22px; }
.tournament-module + .tournament-module { border-left: 1px solid #e8dfd1; }
.tournament-module-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tournament-module-head > div span, .tournament-module-head > div strong { display: block; }
.tournament-module-head > div span { color: #9b7d42; font-size: 10px; font-weight: 900; letter-spacing: 1.7px; }
.tournament-module-head > div strong { margin-top: 4px; color: #28231d; font-size: 16px; }
.tournament-module-head small { color: #8a8175; }
.tournament-stage-list { max-height: 290px; overflow-y: auto; border: 1px solid #e7ddce; background: #faf7f0; }
.tournament-stage-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 66px 44px; align-items: center; min-height: 42px; gap: 10px; padding: 0 12px; border-bottom: 1px solid #ece4d8; color: #6e665c; font-size: 12px; }
.tournament-stage-row:last-child { border-bottom: 0; }
.tournament-stage-row.current { border-left: 4px solid var(--gold); color: #173d30; background: #eef3ec; }
.tournament-stage-row strong { overflow: hidden; color: #383129; text-overflow: ellipsis; white-space: nowrap; }
.tournament-stage-row em { color: #98762f; font-size: 11px; font-style: normal; font-weight: 900; text-align: right; }
.stage-index { color: #9b7d42; font-weight: 900; }
.broadcast-state { padding: 5px 8px; border: 1px solid #d8cdbc; color: #81796e; font-size: 11px; }
.broadcast-state.online { border-color: #9cbbae; color: #1e654d; background: #edf5f0; }
.broadcast-settings { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr .8fr; gap: 10px; align-items: end; }
.broadcast-settings > label { display: grid; gap: 6px; color: #756d62; font-size: 11px; font-weight: 800; }
.broadcast-settings input, .broadcast-settings select { width: 100%; min-height: 36px; }
.broadcast-settings .toggle-setting { display: flex; align-items: center; min-height: 36px; flex-direction: row; gap: 8px; padding: 0 10px; border: 1px solid #ded4c4; background: #faf7f0; }
.broadcast-settings .toggle-setting input { width: 16px; min-height: 16px; }
.broadcast-checks { grid-column: 1 / -2; display: flex; align-items: center; gap: 14px; min-height: 36px; padding: 0 10px; border: 1px solid #e3d9ca; background: #faf7f0; }
.broadcast-checks label { display: flex; align-items: center; gap: 6px; color: #625a50; font-size: 11px; }
.broadcast-checks input { width: 15px; min-height: 15px; }
.broadcast-live { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e8dfd1; }
.broadcast-live > div:first-child span, .broadcast-live > div:first-child small { display: block; }
.broadcast-live > div:first-child span { color: #2b2722; font-size: 13px; font-weight: 900; }
.broadcast-live > div:first-child small { margin-top: 4px; color: #8b8277; font-size: 10px; line-height: 1.5; }
.broadcast-live > div:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.broadcast-live input { width: 100%; }
.tournament-roster-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px 12px; }
.tournament-roster-head strong, .tournament-roster-head span { display: block; }
.tournament-roster-head span { margin-top: 3px; color: #857d72; font-size: 12px; }
.tournament-add-member { display: flex; gap: 8px; }
.tournament-roster { padding: 0 22px 18px; }
.roster-row { display: grid; grid-template-columns: minmax(190px, 1fr) 116px 108px 150px 58px; align-items: center; gap: 10px; min-height: 62px; border-top: 1px solid #eee6d9; }
.roster-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.roster-person > span { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 50%; color: #10231c; background: #d6b66f; font-weight: 900; }
.roster-person strong, .roster-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-person small { color: #91897d; }
.roster-place { color: #81796e; font-size: 12px; text-align: center; }
.tournament-empty { padding: 30px; color: #887f73; text-align: center; }
.tournament-events { border-top: 1px solid #e9dfd1; padding: 12px 22px 18px; }
.tournament-events summary { cursor: pointer; color: #655e54; font-weight: 800; }

.stage-builder-block { padding: 16px; border: 1px solid #ded3c1; background: #fbf8f1; }
.stage-builder-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.stage-builder-head > div:first-child strong, .stage-builder-head > div:first-child small { display: block; }
.stage-builder-head small { margin-top: 4px; color: #8b8275; font-weight: 500; }
.stage-builder-head > div:last-child { display: flex; gap: 8px; }
.stage-editor { display: grid; gap: 8px; }
.stage-editor-row { display: grid; grid-template-columns: 32px 1.25fr repeat(4, minmax(88px, .8fr)) 108px; align-items: end; gap: 8px; padding: 10px; border: 1px solid #e1d8ca; background: #fffdf8; }
.stage-editor-row.break { grid-template-columns: 32px minmax(180px, 1fr) 150px 108px; border-left: 3px solid #a79a83; background: #f4f1ea; }
.stage-order { display: grid; width: 28px; height: 34px; place-items: center; color: #735f34; background: #efe3c7; font-weight: 900; }
.stage-editor-row label { display: flex; min-width: 0; flex-direction: column; gap: 4px; color: #746b60; font-size: 11px; font-weight: 800; }
.stage-editor-row input { width: 100%; height: 34px; padding: 0 8px; border: 1px solid #dcd2c3; border-radius: 4px; background: #fff; }
.stage-row-actions { display: flex; justify-content: flex-end; gap: 4px; padding-bottom: 1px; }
.stage-row-actions .icon-button { width: 32px; height: 34px; }
.stage-row-actions .danger { color: #a33d40; }
.display-option-row { display: flex; align-items: center; gap: 24px; padding: 11px 14px; border: 1px solid #e0d5c3; background: #fffaf0; }
.display-option-row label { display: flex; flex-direction: row; align-items: center; gap: 8px; color: #514b42; font-weight: 800; }
.display-option-row input { width: auto; }

.event-config-panel { border-top: 1px solid #e5dccf; background: #faf7f0; }
.event-config-panel > summary { display: flex; align-items: center; justify-content: space-between; padding: 17px 22px; cursor: pointer; list-style: none; }
.event-config-panel > summary::-webkit-details-marker { display: none; }
.event-config-panel > summary span strong, .event-config-panel > summary span small { display: block; }
.event-config-panel > summary small { margin-top: 4px; color: #8a8174; font-weight: 500; }
.event-config-panel > summary b { color: #8b6d31; font-size: 12px; }
.event-config-body { display: grid; gap: 16px; padding: 0 22px 22px; }
.event-config-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.event-config-grid label { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: #635b50; font-size: 12px; font-weight: 800; }
.event-config-grid .wide { grid-column: 1 / -1; }
.event-config-grid input, .event-config-grid select { width: 100%; height: 38px; border: 1px solid #dcd2c3; background: #fffdf9; }
.event-config-panel[data-locked] .stage-editor { opacity: .62; pointer-events: none; }
.event-config-save { justify-self: end; min-width: 220px; }
.roster-score { display: flex; align-items: center; gap: 7px; color: #7f7567; font-size: 11px; }
.roster-score input { width: 116px; height: 36px; border: 1px solid #ded3c1; background: #fffdf9; }
.tournament-events p { display: grid; grid-template-columns: 160px 170px 1fr; gap: 12px; margin: 10px 0 0; color: #746d64; font-size: 12px; }
.tournament-events time { color: #938b80; }

@media (max-width: 980px) {
  .tournament-intro, .tournament-card-head, .tournament-roster-head { align-items: flex-start; flex-direction: column; }
  .tournament-safety, .tournament-safety strong { justify-content: flex-start; text-align: left; }
  .tournament-form-grid, .tournament-console, .tournament-operations-grid { grid-template-columns: 1fr; }
  .tournament-form-grid .tournament-wide { grid-column: auto; }
  .tournament-clock-panel { border-right: 0; border-bottom: 1px solid #31463d; }
  .tournament-module + .tournament-module { border-top: 1px solid #e8dfd1; border-left: 0; }
  .broadcast-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .broadcast-checks { grid-column: 1 / -1; }
  .broadcast-live { grid-template-columns: 1fr; }
  .event-config-grid { grid-template-columns: 1fr; }
  .event-config-grid .wide { grid-column: auto; }
  .stage-builder-head { align-items: flex-start; flex-direction: column; }
  .stage-editor-row, .stage-editor-row.break { grid-template-columns: 32px repeat(2, minmax(0, 1fr)); align-items: end; }
  .stage-editor-row label:first-of-type { grid-column: span 2; }
  .stage-row-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .roster-row { grid-template-columns: minmax(180px, 1fr) 110px 100px; padding: 10px 0; }
  .roster-place { display: none; }
}

.daily-report-panel { overflow: hidden; }
.daily-report-panel input[type="date"] { width: 150px; height: 38px; border: 1px solid var(--line); background: #fffdf8; }
.report-brief { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 22px 24px; color: #fff; background: #14372c; }
.report-brief > div { display: grid; align-content: start; gap: 6px; }
.report-brief span { color: #d9c28c; font-size: 12px; font-weight: 700; }
.report-brief strong { font-size: 17px; }
.report-brief ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.report-brief li { position: relative; padding-left: 16px; color: #f4f0e7; font-size: 13px; line-height: 1.55; }
.report-brief li::before { content: ""; position: absolute; top: 8px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: #cfad68; }
.report-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.report-kpis > div { position: relative; display: grid; gap: 7px; min-height: 118px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.report-kpis > div:nth-child(3n) { border-right: 0; }
.report-kpis span, .report-kpis small { color: var(--muted); }
.report-kpis strong { color: var(--green); font-size: 22px; }
.report-trend { justify-self: start; padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.report-trend.up { color: #166347; background: #e0f1e8; }
.report-trend.down { color: #a1333c; background: #f8e3e3; }
.report-trend.neutral { color: var(--muted); background: #eee9df; }
.report-section { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.report-section-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 16px; }
.report-section-head h3 { margin: 0 0 5px; color: #1d2d27; font-size: 16px; }
.report-section-head p, .report-section-head > span { margin: 0; color: var(--muted); font-size: 12px; }
.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th { padding: 9px 10px; color: var(--muted); background: #f5f1e8; font-size: 11px; text-align: left; }
.report-table td { padding: 11px 10px; border-bottom: 1px solid #eee7db; font-size: 12px; }
.report-table td:last-child, .report-table th:last-child { text-align: right; }
.report-table td b { color: var(--gold-deep); }
.report-grid { display: grid; grid-template-columns: 1.15fr .85fr; border-bottom: 1px solid var(--line); }
.report-grid-balanced { grid-template-columns: 1fr 1fr; }
.report-module { min-width: 0; padding: 22px 24px; border-right: 1px solid var(--line); }
.report-module:last-child { border-right: 0; }
.report-progress-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(100px, 1.5fr) 48px; gap: 12px; align-items: center; padding: 9px 0; }
.report-progress-row > div:first-child { display: grid; gap: 3px; }
.report-progress-row span { color: var(--muted); font-size: 11px; }
.report-progress-row > b { color: var(--green); font-size: 12px; text-align: right; }
.report-progress { height: 7px; overflow: hidden; border-radius: 4px; background: #ebe5d8; }
.report-progress i { display: block; height: 100%; border-radius: inherit; background: #c5a45f; }
.report-payment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-payment { display: grid; gap: 4px; padding: 13px; border-left: 3px solid #c5a45f; background: #f8f5ee; }
.report-payment span, .report-payment small { color: var(--muted); font-size: 11px; }
.report-payment strong { color: var(--green); }
.report-hourly { display: flex; gap: 10px; min-height: 166px; overflow-x: auto; align-items: flex-end; padding-top: 6px; }
.report-hour { display: grid; grid-template-rows: 16px 90px 20px 16px; gap: 4px; flex: 1 0 64px; min-width: 64px; text-align: center; }
.report-hour > span, .report-hour small { color: var(--muted); font-size: 10px; }
.report-hour > div { display: flex; align-items: flex-end; justify-content: center; height: 90px; border-bottom: 1px solid #d9d0c0; }
.report-hour i { display: block; width: 24px; max-height: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #d2b16d, #315f4e); }
.report-hour strong { color: var(--green); font-size: 11px; }
.report-product-list p { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; margin: 0; padding: 9px 0; border-bottom: 1px solid #eee7db; }
.report-product-list p > b { color: var(--gold-deep); }
.report-product-list p > span { display: grid; gap: 2px; }
.report-product-list small { color: var(--muted); }
.report-product-list em { color: var(--green); font-style: normal; font-weight: 700; }
.report-actions-section { background: #fbf8f1; }
.report-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.report-actions article { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 13px 0; border-top: 1px solid #e7dece; }
.report-actions article b { color: #b18c47; font-size: 12px; }
.report-actions article p { margin: 0; color: #304039; font-size: 12px; line-height: 1.65; }
.report-empty { padding: 24px 0; color: var(--muted); font-size: 12px; text-align: center; }
.table-config-form { margin-bottom: 18px; }
.table-inline-config { display: grid; grid-template-columns: 120px 150px minmax(160px, 1fr) auto auto; gap: 8px; align-items: center; }
.table-inline-config input, .table-inline-config select { min-height: 36px; }
.dialog-field small { color: var(--muted); font-size: 11px; line-height: 1.5; }
@media (max-width: 980px) {
  .report-kpis, .report-grid, .report-grid-balanced { grid-template-columns: 1fr 1fr; }
  .report-brief { grid-template-columns: 1fr; }
  .table-inline-config { grid-template-columns: 1fr 1fr; width: 100%; }
}
@media (max-width: 680px) {
  .report-kpis, .report-grid, .report-grid-balanced, .report-actions { grid-template-columns: 1fr; }
  .report-kpis > div, .report-module { border-right: 0; }
  .report-progress-row { grid-template-columns: 1fr 70px; }
  .report-progress { grid-row: 2; grid-column: 1 / -1; }
  .report-payment-grid { grid-template-columns: 1fr; }
}

/* Marketing, coupons and table-code operations */
.qr-placeholder { display: grid; place-items: center; min-height: 150px; color: #6c786f; }
.qr-error { display: block; padding: 16px; color: #ad333e; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.seat-actions { flex-wrap: wrap; }
.member-account-actions { flex-wrap: wrap; }
.seat-operations {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  padding: 20px 22px;
  color: #f8f3e8;
  background: #12362b;
}
.seat-operations h2 { margin: 5px 0 4px; color: #fffdf8; font-size: 22px; }
.seat-operations p { margin: 0; color: rgba(255,255,255,.62); font-size: 12px; }
.section-kicker { color: #d3b46f; font-size: 10px; font-weight: 900; letter-spacing: 1.4px; }
.seat-operation-actions { display: flex; align-items: flex-end; gap: 10px; }
.seat-operation-actions label { display: grid; gap: 5px; color: rgba(255,255,255,.65); font-size: 10px; }
.seat-operation-actions select { min-width: 120px; border-color: rgba(255,255,255,.22); background: #fffdf8; }
.seat-operation-actions .ghost { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.seat-code-preview { display: grid; place-items: center; margin: -2px -2px 14px; padding: 12px; border: 1px solid #e5dac6; border-radius: 7px; background: #fff; }
.seat-code-preview img { width: 138px; height: 138px; object-fit: contain; }
.seat-code-preview span { margin-top: 5px; color: #8a8173; font-size: 10px; }
.seat-card { min-width: 0; }
.seat-actions { grid-template-columns: 90px 1fr; }
.seat-actions .button-link { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; min-height: 34px; text-decoration: none; }
.scene { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coupon-operations-panel { margin-top: 18px; }
.coupon-admin-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--line); background: #faf7ef; }
.coupon-admin-summary > div { display: grid; gap: 5px; min-height: 78px; padding: 15px 18px; border-right: 1px solid var(--line); }
.coupon-admin-summary > div:last-child { border-right: 0; }
.coupon-admin-summary span { color: var(--muted); font-size: 11px; }
.coupon-admin-summary strong { color: var(--green); font-size: 22px; }
.coupon-template-table td:first-child { min-width: 220px; }
.coupon-template-table td:nth-child(2) { min-width: 180px; }
.coupon-template-table td:nth-child(3) { min-width: 180px; }
.coupon-template-table b { color: #9d3d42; }
.campaign-linked-coupon { display: inline-block; margin-top: 6px; padding: 3px 6px; border-left: 2px solid #c5a45f; color: #6f5a31; background: #f5eddb; font-size: 10px; }
.coupon-template-dialog { width: min(780px,100%); }
.ops-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.ops-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 12px 20px; border-radius: 0; color: var(--muted); }
.ops-tabs button[aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); font-weight: 700; }
.ops-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.ops-section h2 { font-size: 18px; margin: 0 0 10px; }
.ops-section h3 { font-size: 15px; margin: 22px 0 12px; }
.ops-section p { line-height: 1.6; }
.ops-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0; align-items: end; }
.ops-form label { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; font-size: 13px; }
.ops-form input, .ops-form select { width: 100%; min-width: 0; box-sizing: border-box; }
.ops-form .ops-check { flex-direction: row; align-items: center; min-height: 40px; }
.ops-check input { width: 18px; height: 18px; flex: 0 0 18px; }
.ops-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ops-provider-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.ops-provider { padding: 16px 0; border-bottom: 1px solid var(--line); }
.ops-provider strong { font-size: 18px; margin-right: 16px; }
.ops-provider p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.ops-message:not(:empty) { margin: 12px 0; padding: 12px 14px; border-left: 3px solid #197360; background: #edf6f1; font-size: 13px; line-height: 1.5; }
.ops-message.is-error { border-color: #b33b3b; background: #fff0ee; color: #912e2e; }
.ops-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin: 20px 0; }
.ops-metrics div { padding: 12px 0; border-bottom: 2px solid var(--line); }
.ops-metrics span { display: block; color: var(--muted); font-size: 13px; }
.ops-metrics strong { display: block; margin-top: 8px; font-size: 24px; overflow-wrap: anywhere; }
.ops-settlement { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ops-settlement small { color: var(--muted); }
.ops-section details { margin-top: 20px; }
.ops-section summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
@media (max-width: 800px) { .ops-form { grid-template-columns: repeat(2,minmax(0,1fr)); } .ops-form-actions { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ops-form, .ops-provider-list { grid-template-columns: 1fr; } .ops-metrics { gap: 10px; } .ops-metrics strong { font-size: 19px; } }
.coupon-claimable-option { margin-top: 12px; }

@media (max-width: 980px) {
  .seat-operations { align-items: flex-start; flex-direction: column; }
  .seat-operation-actions { width: 100%; }
  .coupon-admin-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .seat-operation-actions { align-items: stretch; flex-direction: column; }
  .coupon-admin-summary { grid-template-columns: 1fr 1fr; }
  .seat-code-preview img { width: 176px; height: 176px; }
}
.ops-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ops-pagination > span { margin-right: auto; color: var(--muted); font-size: 13px; }
.merchant-code-panel { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: center; padding: 28px 0; margin-bottom: 24px; border-top: 1px solid #d5ded8; border-bottom: 1px solid #d5ded8; }
.merchant-code-copy { min-width: 0; }
.merchant-code-copy h2 { margin: 10px 0; font-size: 24px; overflow-wrap: anywhere; }
.merchant-code-copy p { color: #637268; overflow-wrap: anywhere; }
.merchant-code-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.merchant-code-preview { width: 240px; height: 240px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #d5ded8; color: #637268; }
.merchant-code-preview img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 640px) { .merchant-code-panel { grid-template-columns: minmax(0, 1fr); gap: 24px; } .merchant-code-preview { justify-self: center; width: min(240px, 100%); height: auto; aspect-ratio: 1; } }
.withdrawal-section { padding: 24px 0; margin-bottom: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#settlementsView .withdrawal-section { padding-top: 0; border-top: 0; }
.settlement-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 24px 0; padding: 0; gap: 16px; }
.settlement-progress li { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--muted); }
.settlement-progress li > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; font-size: 13px; }
.settlement-progress strong { font-size: 14px; }
.settlement-progress small { display: block; font-size: 12px; margin-top: 4px; }
.settlement-progress .current { color: #195e49; }
.settlement-progress .current > span { background: #195e49; color: #fff; border-color: #195e49; }
.settlement-progress .done > span { background: #e2eee8; color: #195e49; }
.settlement-next { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: #edf4f1; border-left: 3px solid #27634d; padding: 18px 20px; color: #1b4939; }
.settlement-next strong { font-size: 17px; }
.settlement-next p { margin: 8px 0 0; font-size: 14px; line-height: 1.5; }
.settlement-next button { flex: 0 0 auto; }
.settlement-next [hidden] { display: none; }
.settlement-policy { font-size: 13px; line-height: 1.6; color: var(--muted); padding-bottom: 20px; border-bottom: 1px solid var(--line); }
#settlementBankEditor { margin: 20px 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
#settlementBankEditor summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
#settlementBankFields { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; border: 0; margin: 0; padding: 12px 0; }
.settlement-bank-account { border-block: 1px solid var(--line); padding: 20px 0; margin: 20px 0; }
#settlementBankSummary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#settlementBankError, #settlementBankRevealError { color: #a33434; overflow-wrap: anywhere; }
#settlementBankDialog label { display: grid; gap: 8px; }
#settlementFullCard { width: 100%; min-width: 0; box-sizing: border-box; font-family: monospace; font-size: 16px; }
#settlementOpeningFields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border: 0; border-top: 1px solid var(--line); padding: 16px 0 0; min-width: 0; }
#settlementOpeningFields[hidden] { display: none; }
#settlementOpeningFields legend { padding-right: 12px; font-size: 14px; font-weight: 700; }
#settlementOpeningFields label:last-child { grid-column: 1 / -1; display: flex; align-items: center; }
#settlementOpeningFields input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 18px; }
.settlement-apply-head { margin-top: 28px; }
.settlement-record-head { margin-top: 20px; }
.settlement-record-head label { display: grid; gap: 6px; font-size: 13px; }
.settlement-record-head input { max-width: 230px; }
.settlement-detail { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; font-size: 14px; }
.settlement-detail dt { color: var(--muted); }
.settlement-detail dd { margin: 0; overflow-wrap: anywhere; }
#settlementsView td { overflow-wrap: anywhere; }
#settlementsView td:last-child { position: sticky; right: 0; background: var(--paper); box-shadow: -1px 0 0 var(--line); }
#settlementsView .withdrawal-actions { align-items: stretch; }
#settlementsView .withdrawal-actions button { min-height: 34px; }
#settlementsView button:disabled { background: #e3e5e3; border-color: #d1d5d1; color: #6c746e; cursor: not-allowed; box-shadow: none; }
@media(max-width: 700px) {
  .settlement-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settlement-next { flex-direction: column; align-items: stretch; gap: 12px; }
  #settlementBankFields, #settlementOpeningFields, #settlementBankSummary { grid-template-columns: minmax(0, 1fr); }
  .settlement-record-head input { width: 100%; max-width: none; }
  .settlement-record-head .withdrawal-toolbar { align-items: stretch; }
  .settlement-record-head .withdrawal-toolbar label { flex: 1 1 150px; min-width: 0; }
  #settlementsView .withdrawal-section table { display: block; min-width: 0; width: 100%; }
  #settlementsView thead { display: none; }
  #settlementsView tbody { display: block; }
  #settlementsView tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
  #settlementsView tbody td { width: auto; min-width: 0; border: 0; padding: 10px 8px; font-size: 13px; }
  #settlementsView tbody td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
  #settlementsView tbody td:last-child { position: static; grid-column: 1 / -1; box-shadow: none; }
  #settlementsView tbody .empty { grid-column: 1 / -1; }
}
.withdrawal-section > .panel-head { flex-wrap: wrap; gap: 12px; }
.settlement-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.settlement-breakdown span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.settlement-breakdown p { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.settlement-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); padding: 24px; overflow: auto; }
.settlement-dialog::backdrop { background: rgba(0,0,0,.45); }
.settlement-dialog label { display: grid; gap: 8px; margin: 16px 0; }
.settlement-dialog input { width: 100%; min-width: 0; box-sizing: border-box; }
.settlement-dialog .settlement-check { display: flex; align-items: flex-start; }
.settlement-check input { width: 18px; flex: 0 0 18px; }
#settlementDialogSummary, #withdrawalRecords td { overflow-wrap: anywhere; }
.withdrawal-section table { min-width: 1100px; table-layout: fixed; }
.withdrawal-section th:nth-child(1) { width: 180px; }
.withdrawal-section th:nth-child(2) { width: 110px; }
.withdrawal-section th:nth-child(3) { width: 200px; }
.withdrawal-section th:nth-child(4) { width: 250px; }
.withdrawal-section th:nth-child(5) { width: 130px; }
.withdrawal-section th:nth-child(6) { width: 150px; }
#withdrawalRecords td:nth-child(2) { white-space: nowrap; }
#settlementDialogError { color: #a42f2b; }
#settlementOpeningFields { grid-column: 1 / -1; min-width: 0; border: 0; border-top: 1px solid var(--line); padding: 16px 0; display: grid; gap: 16px; }
#settlementOpeningFields[hidden] { display: none; }
#settlementOpeningFields input[type=checkbox] { width: 18px; }
@media(max-width: 640px) { .settlement-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.withdrawal-toolbar, .withdrawal-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.withdrawal-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 24px 0; }
.withdrawal-summary span, .withdrawal-summary small { display: block; color: var(--muted); font-size: 13px; margin: 6px 0; }
.withdrawal-summary strong { font-size: 24px; overflow-wrap: anywhere; }
.withdrawal-form { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(160px, 2fr) auto; gap: 16px; align-items: end; padding: 12px 0 24px; }
.withdrawal-form label { display: grid; gap: 8px; min-width: 0; }
.withdrawal-form input { width: 100%; box-sizing: border-box; }
#withdrawalNotice { color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.position-section { padding: 0 0 24px; border-bottom: 1px solid var(--line, #deded8); margin-bottom: 24px; }
.position-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line, #deded8); }
.position-row > div:first-child { min-width: 0; }
.position-row strong, .position-row span { display: block; }
.position-row p { margin: 8px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.position-form { padding: 20px 0; }
.position-form > .form-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr); gap: 16px; }
.position-form > .form-grid label { display: grid; gap: 8px; font-size: 14px; }
.position-row button:disabled { opacity: .45; cursor: not-allowed; }
.position-form fieldset { margin: 16px 0; border: 1px solid var(--line, #deded8); }
.position-permissions { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 14px; padding: 12px 0; }
.position-permissions label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.position-permissions input { width: 18px; height: 18px; flex: 0 0 18px; }
.position-account-control { margin-top: 8px; }
.settlement-merchant-field { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.settlement-merchant-field select { max-width: 100%; min-width: 200px; }
.settlement-merchant-field { white-space: nowrap; }
.settlement-merchant-field select { flex: 1; width: 0; min-width: 0; }
[hidden].position-form, [hidden].settlement-merchant-field, [hidden].withdrawal-form { display: none; }
#positionError { color: #a52b2b; }
.settlement-rules { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line, #deded8); }
.settlement-policy-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 12px 0 20px; }
.settlement-policy-summary[hidden] { display: none; }
.settlement-fee-quote { padding: 12px 0 20px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.settlement-fee-quote[hidden] { display: none; }
.settlement-policy-summary dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.settlement-policy-summary dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
#settlementPolicyForm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#settlementPolicyForm .settlement-check { display: flex; align-items: center; font-size: 13px; }
#settlementPolicyForm .settlement-check input { width: 18px; height: 18px; flex: 0 0 18px; }
#settlementPolicyError, #settlementStatementError { color: #a52b2b; font-size: 13px; }
#settlementStatement { padding: 16px 0; border-top: 1px solid var(--line, #deded8); }
#settlementStatement .withdrawal-toolbar { margin: 12px 0; }
#settlementStatement td { font-size: 12px; overflow-wrap: anywhere; }
@media(max-width: 640px) { .settlement-merchant-field select { flex: none; width: 100%; } .settlement-policy-summary { grid-template-columns: minmax(0, 1fr); } #settlementPolicyForm { grid-template-columns: minmax(0, 1fr); } }
@media(max-width: 640px) { .position-form > .form-grid { grid-template-columns: minmax(0, 1fr); } .position-row { align-items: flex-start; flex-direction: column; } .settlement-merchant-field { align-items: stretch; flex-direction: column; } }
@media(max-width: 640px) { .withdrawal-form, .withdrawal-summary { grid-template-columns: minmax(0, 1fr); } .withdrawal-toolbar { width: 100%; } }
.balance-member-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.balance-member-search label, .balance-adjust-form label { display: grid; gap: 7px; min-width: 0; }
.balance-member-results { display: grid; gap: 8px; }
.balance-member-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); background: #fff; color: inherit; text-align: left; cursor: pointer; }
.balance-member-result.selected { border-color: var(--accent); background: #f4f7f1; }
.balance-member-result span, .balance-member-result small { display: block; }
.balance-member-result small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.balance-member-result b { white-space: nowrap; }
.balance-member-detail { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.balance-member-detail-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.balance-member-detail-head h3 { margin: 0; }
.balance-member-detail-head p { margin: 6px 0 0; color: var(--muted); }
.balance-adjust-form { display: grid; grid-template-columns: 140px 180px minmax(180px, 1fr) auto; gap: 12px; align-items: end; margin: 18px 0 24px; }
.balance-member-detail h4 { margin: 18px 0 10px; }
.status-enabled, .status-disabled { color: #24704e; font-size: 13px; }
.status-disabled { color: #a42f2b; }
@media(max-width: 640px) { .balance-member-search, .balance-adjust-form { grid-template-columns: minmax(0, 1fr); } .balance-member-detail-head { flex-direction: column; } }
/* Package configuration uses full-width form rows within the product editor. */
.package-editor { min-width: 0; border-top: 1px solid #d4dcd5; padding-top: 14px; }
.package-editor h3 { margin: 0 0 12px; font-size: 16px; }
.package-category-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.package-category-tools label { flex: 1 1 160px; }
.package-category-tools span { font-size: 12px; padding-bottom: 10px; }
.package-bulk-error { color: #a42c33; font-size: 13px; overflow-wrap: anywhere; }
.package-editor fieldset { min-width: 0; margin: 0 0 16px; padding: 12px 0; border: 0; border-bottom: 1px solid #d4dcd5; }
.package-editor legend { font-size: 13px; font-weight: 600; }
.package-group-head, .package-option-editor { display: grid; grid-template-columns: minmax(0, 2fr) minmax(70px, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.package-option-editor { grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 74px auto; }
.package-editor label { display: grid; gap: 5px; min-width: 0; font-size: 12px; }
.package-editor input, .package-editor select { box-sizing: border-box; min-width: 0; width: 100%; }
.package-editor button { white-space: nowrap; }
@media (max-width: 600px) {
  .package-group-head, .package-option-editor { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .package-option-editor label:first-child { grid-column: 1 / -1; }
}
