:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-soft: #f8fbfa;
  --line: #e5ebef;
  --line-strong: #d7e2e6;
  --text: #16212e;
  --muted: #738093;
  --subtle: #9aa5b5;
  --teal: #1f7d73;
  --teal-dark: #16665f;
  --teal-soft: #edf8f6;
  --orange: #c77124;
  --orange-soft: #fff4e6;
  --blue: #286aa6;
  --blue-soft: #edf5ff;
  --red: #bd4d3d;
  --red-soft: #fff1ee;
  --gray-soft: #f1f4f6;
  --shadow: 0 12px 28px rgba(23, 36, 48, 0.08);
  --ink: var(--text);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --radius-control: 6px;
  --radius-card: 8px;
  --radius-dialog: 16px;
  --radius: var(--radius-card);
  --radius-small: var(--radius-control);
  --control-small: 32px;
  --control-default: 40px;
  --control-large: 44px;
  --sidebar-width: 248px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1120px;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

.admin-login {
  display: grid;
  min-height: 100vh;
  padding: 48px 24px;
  place-items: center;
  background:
    radial-gradient(circle at 18% 16%, rgba(31, 125, 115, 0.14), transparent 34%),
    radial-gradient(circle at 84% 88%, rgba(199, 113, 36, 0.1), transparent 32%),
    #f4f8f7;
}

.admin-login-card {
  width: min(440px, calc(100vw - 48px));
  padding: 32px;
  background: #ffffff;
  border: 1px solid #dfe9e7;
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(18, 56, 51, 0.12);
}

.admin-login-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.admin-login-brand .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 24px;
}

.admin-login-brand .brand-title {
  color: var(--text);
  font-size: 19px;
}

.admin-login-brand .brand-subtitle {
  color: var(--muted);
}

.admin-auth-form {
  display: grid;
  gap: 18px;
  padding-top: 28px;
}

.admin-auth-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 2px;
}

.admin-auth-heading h1 {
  margin: 0;
  font-size: 25px;
}

.admin-auth-heading p {
  color: var(--muted);
}

.admin-auth-form .field {
  gap: 7px;
}

.admin-auth-form input {
  min-height: 46px;
  padding: 0 13px;
  background: #fbfdfc;
}

.password-input-shell {
  position: relative;
  width: 100%;
}

.password-input-shell input {
  width: 100%;
  padding-right: 48px;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  color: #718093;
  background: transparent;
  border: 0;
  border-radius: var(--radius-small);
  transform: translateY(-50%);
}

.password-visibility-toggle:hover {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.password-visibility-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-visibility-toggle:focus-visible {
  outline: 2px solid rgba(31, 125, 115, 0.62);
  outline-offset: 1px;
}

.admin-auth-error {
  padding: 10px 12px;
  color: #a43f32;
  background: var(--red-soft);
  border: 1px solid #f2cbc4;
  border-radius: var(--radius-small);
}

.admin-auth-submit {
  min-height: 46px;
}

.admin-auth-buttons {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

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

button {
  cursor: pointer;
}

.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: var(--space-6) var(--space-4);
  background: #12211f;
  color: #d8e9e6;
}

.brand {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 6px var(--space-6);
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 10px;
  font-size: 22px;
  font-weight: 800;
}

.brand-title {
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 2px;
  color: #8fb2ad;
  font-size: 12px;
}

.nav-list {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 0;
  margin-top: 8px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-color: rgba(169, 197, 192, 0.28) transparent;
  scrollbar-width: thin;
}

.nav-group {
  display: grid;
  gap: 2px;
  padding: 11px 0;
  border-top: 1px solid rgba(216, 233, 230, 0.08);
}

.nav-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.nav-group[hidden] {
  display: none;
}

.nav-group-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px 6px 12px;
  color: #668983;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--radius-small);
}

.nav-group-toggle:hover {
  color: #9bd1c9;
  background: rgba(255, 255, 255, 0.04);
}

.nav-group-toggle:focus-visible {
  outline: 2px solid rgba(143, 210, 200, 0.72);
  outline-offset: 1px;
}

.nav-group-label {
  color: inherit;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.nav-group.has-active .nav-group-toggle {
  color: #9bd1c9;
}

.nav-group-chevron {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #668983;
  font-size: 20px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 160ms ease, color 160ms ease;
}

.nav-group.has-active .nav-group-chevron,
.nav-group-toggle:hover .nav-group-chevron {
  color: #9bd1c9;
}

.nav-group-items {
  display: grid;
  gap: 2px;
}

.nav-group.is-collapsed .nav-group-items {
  display: none;
}

.nav-group.is-collapsed .nav-group-chevron {
  transform: rotate(0deg);
}

.nav-item {
  position: relative;
  width: 100%;
  padding: 9px 12px 9px 28px;
  color: #c7d9d6;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  font-weight: 650;
}

.nav-item::before {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 5px;
  height: 5px;
  background: #587a75;
  border-radius: 999px;
  content: "";
  transform: translateY(-50%);
}

.nav-item[hidden] {
  display: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.is-active {
  color: #ffffff;
  background: rgba(31, 125, 115, 0.28);
  border-color: rgba(156, 211, 203, 0.24);
  font-weight: 800;
}

.nav-item.is-active::before {
  width: 3px;
  height: 18px;
  background: #8fd2c8;
  border-radius: 2px;
}

.main {
  min-width: 0;
  padding: var(--space-6) var(--space-6) 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.page-kicker {
  color: var(--muted);
  font-size: 13px;
}

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

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

h2 {
  font-size: 18px;
  line-height: 1.3;
}

h3 {
  font-size: 15px;
  line-height: 1.35;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.scope-pill,
.chip,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  white-space: nowrap;
  border-radius: 999px;
}

.scope-pill {
  min-height: 36px;
  padding: 0 14px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #cde8e3;
  font-weight: 700;
}

.button {
  min-height: var(--control-default);
  padding: 0 14px;
  color: #ffffff;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--radius-small);
  font-weight: 800;
}

.button.small {
  min-height: var(--control-small);
  padding: 0 12px;
  font-size: 13px;
}

.button:hover {
  background: var(--teal-dark);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.button.secondary {
  color: var(--teal);
  background: #ffffff;
  border-color: #c8dfda;
}

.button.secondary:hover {
  background: var(--teal-soft);
}

.button.ghost {
  color: var(--text);
  background: #ffffff;
  border-color: var(--line);
}

.button.warning {
  color: var(--orange);
  background: var(--orange-soft);
  border-color: #f0c58e;
}

.button.danger {
  color: #b84c3d;
  background: #fff6f4;
  border-color: #f0c0b8;
}

.button.danger:hover {
  background: #ffece8;
}

.button:focus-visible,
.nav-item:focus-visible,
.tab:focus-visible,
.promotion-tab:focus-visible,
.drawer-close:focus-visible,
.coupon-code-copy:focus-visible,
.user-record-back:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(31, 125, 115, 0.62);
  outline-offset: 2px;
}

.notice {
  margin-bottom: var(--space-4);
  padding: var(--space-3) 14px;
  color: #45605c;
  background: var(--surface-soft);
  border: 1px solid #dcefeb;
  border-radius: var(--radius);
}

.auth-panel {
  max-width: 760px;
}

.auth-actions {
  display: grid;
  gap: 14px;
}

.auth-actions p {
  color: var(--muted);
}

.inline-command {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  overflow: auto;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #d3ebe6;
  border-radius: var(--radius-small);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.content {
  display: grid;
  min-width: 0;
  gap: var(--space-4);
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(20, 28, 38, 0.02);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}

.panel-title {
  display: grid;
  gap: 4px;
}

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

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.panel-body {
  padding: var(--space-5);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.filter-shell {
  display: grid;
  gap: var(--space-3);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: var(--space-3);
  align-items: end;
}

.appointment-filter-row,
.order-filter-row {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.filter-grid.user-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: end;
}

.filter-grid.admin-log-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  align-items: end;
}

.admin-log-table {
  min-width: 1280px;
}

.admin-log-detail {
  min-width: 240px;
  max-width: 420px;
  line-height: 1.55;
  white-space: normal;
}

.settlement-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(132px, 1fr)) auto;
  gap: var(--space-3);
  align-items: end;
}

.settlement-table {
  min-width: 1380px;
}

.settlement-table.store-weekly-settlement-table {
  min-width: 1120px;
}

.settlement-table.store-settlement-record-table {
  min-width: 1580px;
}

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

.operator-fee-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.store-operator-list,
.store-operator-fee-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.store-operator-card,
.store-operator-fee-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dfe9e7;
  border-radius: 14px;
  background: #f8fbfa;
}

.operator-role-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: #237c72;
}

.operator-role-mark.nurse {
  background: #5a78a8;
}

.store-operator-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.store-operator-main strong,
.store-operator-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-operator-main span,
.drawer-section-copy {
  color: #718096;
  font-size: 13px;
}

.operator-fee-amount {
  display: grid;
  grid-template-columns: auto 96px auto;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #176d64;
}

.operator-fee-amount input {
  width: 96px;
  text-align: right;
}

.operator-fee-amount small {
  color: #718096;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .store-operator-fee-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .store-operator-fee-card .operator-fee-amount,
  .store-operator-fee-card .button {
    grid-column: 2;
  }
}

.settlement-metrics .metric-value {
  font-size: 26px;
}

.promotion-summary .metric {
  position: relative;
  overflow: hidden;
}

.promotion-summary .metric::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: var(--teal);
}

.promotion-summary .metric-value {
  font-size: 27px;
}

.promotion-workspace {
  overflow: hidden;
}

.promotion-tabs {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.promotion-tab {
  position: relative;
  min-height: 54px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-weight: 850;
}

.promotion-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  content: "";
  background: transparent;
  border-radius: 999px 999px 0 0;
}

.promotion-tab:hover,
.promotion-tab.is-active {
  color: var(--teal-dark);
}

.promotion-tab.is-active::after {
  background: var(--teal);
}

.promotion-filter-shell {
  padding-bottom: 14px;
  background: #fbfcfc;
  border-bottom: 1px solid var(--line);
}

.promotion-filter-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.6fr) repeat(4, minmax(138px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.promotion-admin-table {
  min-width: 900px;
}

.promotion-withdrawal-table,
.promotion-ledger-table {
  min-width: 1180px;
}

.promotion-ledger-empty {
  display: grid;
  min-height: 260px;
  padding: 48px 24px;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.promotion-ledger-empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  color: var(--teal-dark);
  background: #e8f5f2;
  border: 1px solid #c8e5df;
  border-radius: 50%;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
}

.promotion-ledger-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.promotion-ledger-empty p {
  max-width: 520px;
  margin: 0;
  line-height: 1.7;
}

.promotion-test-search {
  display: grid;
  grid-template-columns: minmax(280px, 520px) auto;
  gap: 12px;
  align-items: end;
}

.promotion-test-search .button {
  min-height: 36px;
}

.promotion-test-error {
  padding: 0 20px 16px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.promotion-test-empty .panel-body {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.promotion-test-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.promotion-test-empty p,
.promotion-test-steps p {
  margin: 0;
  line-height: 1.65;
}

.promotion-test-body {
  display: grid;
  gap: 18px;
}

.promotion-test-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.promotion-test-status {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  background: #fafbfb;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.promotion-test-status.is-ready {
  background: var(--teal-soft);
  border-color: #c7e4de;
}

.promotion-test-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.promotion-test-status strong {
  color: var(--ink);
  line-height: 1.5;
}

.promotion-test-status.is-ready strong {
  color: var(--teal-dark);
}

.promotion-test-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.promotion-test-form input {
  min-height: 42px;
  font: inherit;
  font-size: 18px;
  font-weight: 850;
}

.promotion-test-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
}

.promotion-test-demotion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  background: #fffafa;
  border: 1px solid #f0d1cb;
  border-radius: var(--radius-small);
}

.promotion-test-demotion > div {
  display: grid;
  gap: 5px;
}

.promotion-test-demotion strong {
  color: var(--ink);
}

.promotion-test-demotion span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.promotion-test-demotion .button {
  flex: 0 0 auto;
}

.promotion-test-warning {
  margin: 0;
  padding: 12px 14px;
  color: #7b5526;
  background: #fff8e9;
  border: 1px solid #f0dfb8;
  border-radius: var(--radius-small);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.65;
}

.promotion-test-updated {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.promotion-test-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.promotion-test-steps > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 5px 10px;
  align-items: center;
}

.promotion-test-steps span {
  display: grid;
  width: 30px;
  height: 30px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 50%;
  place-items: center;
  font-weight: 900;
}

.promotion-test-steps strong {
  color: var(--ink);
}

.promotion-test-steps p {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
}

.qualification-progress {
  display: grid;
  gap: 3px;
  min-width: 150px;
}

.qualification-progress strong {
  color: var(--teal-dark);
  font-size: 16px;
}

.qualification-progress span,
.promotion-remark {
  color: var(--muted);
  font-size: 12px;
}

.amount-negative {
  color: var(--red);
  font-weight: 900;
}

.filter-field {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}

.filter-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-width: 0;
  min-height: var(--control-default);
  padding: 0 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  font: inherit;
  font-weight: 700;
}

.filter-actions,
.filter-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-actions {
  white-space: nowrap;
}

.filter-footer {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.filter-meta strong {
  color: var(--teal);
  font-size: 16px;
}

.field {
  display: grid;
  gap: var(--space-1);
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  min-height: var(--control-default);
  padding: 0 10px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
}

.field textarea {
  min-height: 86px;
  padding: 10px;
  resize: vertical;
  line-height: 1.55;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  white-space: nowrap;
}

.service-cover-uploader {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.service-cover-preview {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  overflow: hidden;
  color: var(--teal);
  background: linear-gradient(135deg, #d9efe9 0%, #f7e4d8 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  font-size: 13px;
  font-weight: 800;
}

.service-cover-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-cover-control {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: 4px;
}

.service-cover-control .field-hint {
  flex-basis: 100%;
  margin-top: 0;
}

.service-cover-status {
  color: var(--teal-dark);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.42fr);
  gap: var(--space-4);
}

.metric {
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-label {
  color: var(--muted);
  font-weight: 700;
}

.metric-value {
  margin-top: 8px;
  color: var(--teal);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
}

.metric-note {
  margin-top: 6px;
  color: var(--subtle);
  font-size: 12px;
}

.store-dashboard-panel {
  margin-top: 16px;
}

.store-dashboard-table .number-cell {
  width: 92px;
  text-align: center;
  white-space: nowrap;
}

.store-dashboard-table th:first-child {
  min-width: 180px;
}

.store-dashboard-table th:last-child {
  width: 96px;
}

.store-metric-value {
  display: inline-flex;
  min-width: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  color: var(--text);
  font-weight: 900;
  border-radius: 6px;
}

.store-metric-value.is-zero {
  color: var(--subtle);
  font-weight: 700;
}

.store-metric-value.is-today,
.store-metric-value.is-service {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.store-metric-value.is-pending {
  color: #a65b19;
  background: #fff2df;
}

.store-metric-value.is-waiting {
  color: #28689a;
  background: #eaf4ff;
}

.split-list {
  display: grid;
  gap: 10px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.panel-stack {
  display: grid;
  gap: 16px;
}

.todo-list {
  display: grid;
  gap: 10px;
}

.todo-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px;
  color: var(--text);
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.todo-card:hover {
  border-color: #b9dcd6;
  box-shadow: 0 8px 18px rgba(24, 55, 51, 0.08);
}

.todo-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.todo-title {
  font-weight: 800;
}

.todo-desc {
  color: var(--muted);
  font-size: 13px;
}

.todo-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 30px;
  padding: 0 10px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.table-wrap {
  overflow: auto;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.table-pagination-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-pagination-actions span {
  min-width: 88px;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: var(--space-3);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

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

td {
  color: #2c3847;
}

tbody tr:hover {
  background: #fbfdfd;
}

.cell-title {
  color: var(--text);
  font-weight: 850;
}

.cell-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.amount-primary {
  color: var(--teal-dark);
  font-weight: 900;
}

.store-commission-table {
  min-width: 980px;
}

.team-bonus-history-table {
  min-width: 880px;
}

.referral-reward-config-table {
  min-width: 1180px;
}

.referral-reward-config-table th:first-child,
.referral-reward-config-table td:first-child {
  min-width: 92px;
}

.referral-reward-config-table th:last-child,
.referral-reward-config-table td:last-child {
  min-width: 84px;
}

.referral-reward-config-table .button {
  white-space: nowrap;
}

.referral-reward-config-table th small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.reward-config-rate-control {
  grid-template-columns: minmax(72px, 96px) 32px;
}

.reward-config-history-list {
  display: grid;
  gap: 5px;
  min-width: 310px;
}

.reward-config-history-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.reward-config-history-item strong {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.store-commission-table th:nth-child(4),
.store-commission-table td:nth-child(4) {
  width: 210px;
}

.commission-rate-control {
  display: inline-grid;
  grid-template-columns: minmax(110px, 150px) 34px;
  align-items: center;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #cbdedb;
  border-radius: var(--radius-small);
}

.commission-rate-control:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(28, 122, 111, 0.1);
}

.commission-rate-control input {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  outline: 0;
  font-weight: 800;
}

.commission-rate-control span {
  display: grid;
  min-height: 36px;
  place-items: center;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-weight: 900;
}

.commission-rate-readonly {
  color: var(--teal-dark);
  font-size: 16px;
}

.commission-permission-note {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  color: var(--muted);
  background: #fbfcfd;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.commission-permission-note strong {
  flex: 0 0 auto;
  color: var(--text);
}

.users-table {
  min-width: 1660px;
}

.user-identity-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 180px;
}

.user-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  border-radius: 50%;
  font-weight: 900;
}

.user-id-text {
  max-width: 210px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.service-regular-price,
.service-member-price {
  white-space: nowrap;
}

.service-member-price {
  color: var(--red);
}

.chip {
  min-height: 24px;
  padding: 0 8px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 800;
}

.chip.muted {
  color: #657083;
  background: var(--gray-soft);
}

.chip.orange {
  color: var(--orange);
  background: var(--orange-soft);
}

.chip.green {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.chip.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.chip.red {
  color: var(--red);
  background: var(--red-soft);
}

.chip.danger {
  color: var(--red);
  background: var(--red-soft);
}

.chip.muted {
  color: var(--muted);
  background: var(--gray-soft);
}

.status {
  min-height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.status.confirmed,
.status.active,
.status.enabled,
.status.success {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.status.pending,
.status.waiting {
  color: var(--orange);
  background: var(--orange-soft);
}

.status.arrived,
.status.service {
  color: var(--blue);
  background: var(--blue-soft);
}

.status.danger,
.status.disabled {
  color: var(--red);
  background: var(--red-soft);
}

.status.neutral {
  color: #596579;
  background: var(--gray-soft);
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  background: #edf1f2;
  border-radius: var(--radius);
}

@media (max-width: 1360px) {
  .filter-row,
  .order-filter-row,
  .filter-grid.admin-log-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-grid.user-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settlement-filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-keyword {
    grid-column: span 2;
  }

  .filter-actions,
  .settlement-filter-row .filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .filter-row,
  .order-filter-row,
  .filter-grid.admin-log-filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid.user-filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-keyword,
  .filter-actions {
    grid-column: auto;
  }

  .filter-actions .button {
    flex: 1;
  }
}

.tab {
  min-height: var(--control-default);
  padding: 0 16px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-small);
  font-weight: 800;
}

.tab.is-active {
  color: var(--teal);
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(21, 35, 42, 0.08);
}

.detail-card {
  display: grid;
  gap: 12px;
}

.detail-section {
  display: grid;
  gap: 10px;
}

.detail-section + .detail-section {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.detail-value {
  font-weight: 800;
}

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

.form-grid .field.full {
  grid-column: 1 / -1;
}

.field-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.staff-user-binding-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.staff-user-binding-result {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  min-height: 38px;
  margin-top: 8px;
  padding: 9px 12px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  font-size: 12px;
  font-weight: 700;
}

.staff-user-binding-result.is-found {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: #cce6e1;
}

.staff-user-binding-result strong {
  font-size: 14px;
}

@media (max-width: 640px) {
  .staff-user-binding-control {
    grid-template-columns: 1fr;
  }
}

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

.store-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
}

.store-check input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--teal);
}

.store-check span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.store-check-name {
  color: var(--text);
  font-size: 14px;
}

.store-check-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.check-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
}

.check-field input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--teal);
}

.check-field span {
  display: grid;
  gap: 2px;
}

.check-field strong {
  color: var(--text);
}

.check-field small {
  color: var(--muted);
  line-height: 1.45;
}

.permission-groups {
  display: grid;
  gap: 14px;
}

.permission-group {
  display: grid;
  gap: 8px;
}

.permission-group-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.permission-group-hint {
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

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

.empty-state.compact {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-small);
}

.toast {
  position: fixed;
  right: auto;
  bottom: 32px;
  left: 50%;
  z-index: 2147483647;
  width: max-content;
  max-width: min(420px, calc(100vw - 56px));
  padding: 12px 18px;
  color: #ffffff;
  text-align: center;
  pointer-events: none;
  background: #152b28;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(12, 24, 28, 0.24);
  font-weight: 800;
  transform: translateX(-50%);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(16, 25, 34, 0.28);
}

.confirmation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(15, 28, 31, 0.5);
  backdrop-filter: blur(3px);
}

.confirmation-backdrop[hidden] {
  display: none;
}

.confirmation-modal {
  display: grid;
  width: min(430px, calc(100vw - 48px));
  gap: 14px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-dialog);
  box-shadow: 0 24px 72px rgba(12, 31, 29, 0.26);
  text-align: center;
}

.confirmation-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 2px;
  place-items: center;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 999px;
  font-size: 24px;
  font-weight: 900;
}

.confirmation-modal h2 {
  font-size: 21px;
}

.confirmation-modal > p {
  color: var(--muted);
  line-height: 1.65;
}

.confirmation-summary {
  padding: 13px 14px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  font-weight: 800;
  line-height: 1.55;
}

.confirmation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.confirmation-submit-danger {
  color: #b84c3d;
  background: #fff6f4;
  border-color: #f0c0b8;
}

.confirmation-submit-danger:hover {
  color: #ffffff;
  background: #b84c3d;
  border-color: #b84c3d;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 31;
  width: 440px;
  max-width: calc(100vw - 64px);
  overflow: auto;
  background: #ffffff;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 36px rgba(18, 33, 31, 0.18);
}

.drawer-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.drawer-title {
  display: grid;
  gap: 6px;
}

.drawer-title h2 {
  font-size: 20px;
}

.drawer-meta {
  color: var(--muted);
  font-size: 13px;
}

.drawer-close {
  display: grid;
  width: var(--control-default);
  height: var(--control-default);
  place-items: center;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
}

.drawer-body {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.promotion-review-user {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.promotion-review-user > div:nth-child(2) {
  display: grid;
  gap: 3px;
}

.promotion-review-user strong {
  color: var(--text);
  font-size: 17px;
}

.promotion-review-user span:not(.status) {
  color: var(--muted);
  font-size: 13px;
}

.promotion-withdrawal-amount {
  position: relative;
  align-items: start;
  background: var(--teal-soft);
  border-color: #cde8e3;
}

.promotion-withdrawal-amount > span:first-child {
  color: var(--muted);
  font-weight: 800;
}

.promotion-withdrawal-amount > strong {
  color: var(--teal-dark);
  font-size: 34px;
  line-height: 1.1;
}

.promotion-withdrawal-amount > .status {
  position: absolute;
  top: 16px;
  right: 16px;
}

.promotion-payout-summary {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-section-heading,
.payout-account-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-section-heading h3 {
  margin: 0;
}

.payout-account-review {
  background: #f4fbf9;
  border-color: #cde8e3;
}

.payout-account-number strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--teal-dark);
  font-size: 16px;
}

.drawer-section {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.drawer-section h3 {
  font-size: 16px;
}

.drawer-readonly-note {
  min-height: 86px;
  padding: 10px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  background: #f4f7f7;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  line-height: 1.55;
  cursor: default;
  user-select: text;
}

.drawer-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.drawer-row:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.drawer-label {
  color: var(--muted);
  font-weight: 800;
}

.drawer-value {
  min-width: 0;
  font-weight: 800;
  word-break: break-word;
}

.drawer-error-text {
  color: var(--muted);
  line-height: 1.65;
}

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

.user-summary-stat {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 12px;
  align-content: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

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

.user-summary-stat strong {
  color: var(--teal-dark);
  font-size: 18px;
}

.user-data-dashboard {
  gap: 14px;
}

.user-record-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 2px;
}

.user-record-dashboard-scoped {
  grid-template-columns: minmax(0, 1fr);
}

.user-record-card {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 13px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.user-record-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-record-card-head span {
  color: var(--text);
  font-weight: 900;
}

.user-record-card-head strong {
  color: var(--teal-dark);
  font-size: 24px;
  line-height: 1;
}

.user-record-card-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.user-record-card-copy span,
.user-record-card-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-record-card .button {
  width: 100%;
}

.user-record-back {
  justify-self: start;
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-weight: 900;
}

.user-record-detail {
  gap: 14px;
}

.user-record-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-record-detail-heading > div {
  display: grid;
  gap: 4px;
}

.user-record-detail-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.user-record-list {
  display: grid;
  gap: 8px;
}

.user-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.user-record-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.user-record-main strong {
  color: var(--text);
}

.user-record-main span,
.user-record-main small {
  color: var(--muted);
  line-height: 1.45;
}

.user-record-main small {
  font-size: 12px;
}

.user-record-status {
  white-space: nowrap;
}

.user-note-compose form {
  display: grid;
  gap: 14px;
}

.user-note-compose-footer {
  display: grid;
  gap: 12px;
}

.user-note-compose-footer .button {
  justify-self: end;
}

.user-note-readonly p {
  color: var(--muted);
  line-height: 1.65;
}

.user-note-history-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.user-note-history-title span {
  max-width: 230px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.user-note-history {
  display: grid;
  gap: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.user-note-entry {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.user-note-entry:first-child {
  border-top: 0;
}

.user-note-entry-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.user-note-entry-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.user-note-entry-head strong {
  color: var(--text);
}

.user-note-entry-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.user-note-entry p {
  color: #3c485b;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.drawer-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.drawer-actions-3 {
  grid-template-columns: 112px 112px 1fr;
}

.coupon-summary-grid .metric {
  background: linear-gradient(145deg, #ffffff 0%, #f4fbf9 100%);
}

.coupon-template-table {
  min-width: 1120px;
}

.coupon-batch-table {
  min-width: 1180px;
}

.coupon-batch-total {
  padding: 7px 11px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.coupon-batch-count {
  color: var(--teal-dark);
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.coupon-batch-count.is-claimed {
  color: var(--blue);
}

.coupon-batch-count.is-used {
  color: var(--teal-dark);
}

.coupon-batch-stats {
  display: grid;
  gap: 4px;
  white-space: nowrap;
}

.coupon-batch-stats strong {
  color: var(--text);
}

.coupon-batch-stats span {
  color: var(--muted);
  font-size: 12px;
}

.coupon-discount-value {
  color: var(--teal-dark);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.coupon-service-names {
  max-width: 260px;
  white-space: normal;
}

.coupon-code-row > div:last-child {
  text-align: left;
}

.coupon-percent-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
}

.coupon-percent-input input {
  border-radius: var(--radius-small) 0 0 var(--radius-small);
}

.coupon-percent-input span {
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  background: #e8f5f2;
  border: 1px solid var(--line-strong);
  border-left: 0;
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  font-weight: 900;
}

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

.coupon-service-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.coupon-service-check span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.coupon-service-check strong,
.coupon-service-check small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coupon-service-check small {
  color: var(--muted);
}

.coupon-drawer-highlight {
  background: linear-gradient(135deg, #eff9f7 0%, #fff9ed 100%);
}

.coupon-drawer-highlight p,
.coupon-generated-head p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.coupon-generated-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.coupon-generated-codes {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.coupon-generated-codes > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.coupon-generated-codes code {
  overflow: hidden;
  color: var(--teal-dark);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  text-overflow: ellipsis;
}

.drawer.drawer-wide {
  width: min(900px, calc(100vw - 64px));
}

.coupon-batch-drawer-body {
  gap: 16px;
}

.coupon-batch-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.coupon-batch-overview > div {
  display: grid;
  min-height: 96px;
  gap: 5px;
  align-content: center;
  padding: 14px 16px;
  background: linear-gradient(145deg, #f5fbfa 0%, #ffffff 100%);
  border: 1px solid #d8ebe7;
  border-radius: var(--radius);
}

.coupon-batch-overview span,
.coupon-batch-overview small,
.coupon-batch-owner span,
.coupon-batch-owner small {
  color: var(--muted);
  font-size: 12px;
}

.coupon-batch-overview strong {
  color: var(--teal-dark);
  font-size: 20px;
  font-weight: 900;
}

.coupon-batch-owner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.coupon-batch-owner > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.coupon-batch-owner strong {
  min-width: 0;
  color: var(--text);
}

.coupon-batch-code-section {
  padding: 0;
  overflow: hidden;
}

.coupon-batch-code-section .drawer-section-heading {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.coupon-batch-code-table-wrap {
  max-height: min(56vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.coupon-batch-code-table {
  min-width: 820px;
}

.coupon-batch-code-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.coupon-batch-code-table td:first-child {
  min-width: 180px;
}

.coupon-code-value {
  color: var(--teal-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 850;
  letter-spacing: 0.25px;
  white-space: nowrap;
}

.coupon-code-copy {
  margin-top: 5px;
  padding: 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
}

.coupon-code-unrecoverable {
  max-width: 240px;
  margin-top: 4px;
  line-height: 1.45;
  white-space: normal;
}

.coupon-batch-drawer-actions {
  grid-template-columns: minmax(160px, 260px);
  justify-content: end;
}

@media (max-width: 1080px) {
  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .table-pagination-actions {
    justify-content: space-between;
  }

  .coupon-batch-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coupon-batch-owner {
    grid-template-columns: 1fr;
  }

  .promotion-test-demotion {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 1200px) {
  body {
    min-width: 960px;
  }

  .admin-shell {
    grid-template-columns: 212px minmax(0, 1fr);
  }

  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .settlement-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settlement-filter-row .filter-actions {
    grid-column: 1 / -1;
  }

  .promotion-filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promotion-filter-row .filter-keyword {
    grid-column: span 2;
  }

  .promotion-filter-row .filter-actions {
    grid-column: 1 / -1;
  }

  .promotion-test-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promotion-test-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1500px) {
  .promotion-filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promotion-filter-row .filter-keyword {
    grid-column: span 2;
  }

  .promotion-filter-row .filter-actions {
    align-self: end;
  }
}
