:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", Arial, sans-serif;
  background: #f4f6f5;
  color: #182824;
  --ui-canvas: #f4f6f5;
  --ui-surface: #ffffff;
  --ui-subtle: #f8faf9;
  --ui-ink: #182824;
  --ui-muted: #64736f;
  --ui-line: #dbe3e0;
  --ui-line-strong: #c9d5d1;
  --ui-deep: #103c38;
  --ui-primary: #176b63;
  --ui-primary-hover: #10564f;
  --ui-gold: #b58b45;
  --ui-gold-soft: #e4d7ba;
  --ui-blue: #3c6f9e;
  --ui-warning: #a46f1d;
  --ui-danger: #b5453f;
  --ui-shadow: 0 10px 28px rgba(18, 42, 38, .055);
  --lux-ink: var(--ui-ink);
  --lux-deep: var(--ui-deep);
  --lux-green: var(--ui-primary);
  --lux-gold: var(--ui-gold);
  --lux-gold-soft: var(--ui-gold-soft);
  --lux-paper: var(--ui-surface);
  --lux-mist: var(--ui-canvas);
  --lux-line: var(--ui-line);
  --lux-muted: var(--ui-muted);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
}

body.auth-checking {
  overflow: hidden;
  background: #f1f5f8;
}

body.auth-checking .shell,
body.auth-checking .toast-region,
body.auth-checking dialog {
  display: none;
}

body.auth-checking::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -30px 0 0 -15px;
  border: 3px solid #d7e3e7;
  border-top-color: #1f9d8a;
  border-radius: 50%;
  animation: auth-checking-spin .7s linear infinite;
}

body.auth-checking::after {
  content: "正在验证登录状态";
  position: fixed;
  top: calc(50% + 16px);
  left: 50%;
  color: #6d7d87;
  font-size: 13px;
  transform: translateX(-50%);
}

@keyframes auth-checking-spin {
  to { transform: rotate(360deg); }
}

body.login-only {
  background: var(--ui-canvas);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid #cbd7e2;
  background: #ffffff;
  color: #17202a;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

button:hover {
  border-color: #1f7a7a;
  color: #0c5d5d;
  box-shadow: 0 8px 18px rgba(24, 74, 80, .1);
}

.shell {
  display: grid;
  grid-template-columns: 334px minmax(0, 1fr);
  min-height: 100vh;
}

body.login-only .shell {
  grid-template-columns: minmax(320px, 420px);
  place-content: center;
  padding: 24px;
}

.sidebar {
  position: relative;
  background: #0b2d31;
  color: #edf5f5;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
}

body.login-only .sidebar {
  min-height: auto;
  border: 1px solid rgba(16, 32, 39, .08);
  border-radius: 10px;
  box-shadow: 0 22px 60px rgba(15, 31, 38, .22);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

body.login-only .brand {
  position: static;
  width: auto;
  min-height: 48px;
  padding: 0;
  padding-bottom: 10px;
}

body.login-only .brand-mark {
  width: 48px;
  height: 48px;
}

.brand {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 152px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 17px 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #1b766d;
  color: #ffffff;
  font-weight: 800;
  box-shadow: none;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #abc0c4;
  font-size: 12px;
  margin-top: 2px;
}

.section-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 0;
}

body.login-only .section-nav,
body.login-only .workspace,
body.login-only .top-actions,
body.authenticated .login-panel {
  display: none;
}

.menu-layout {
  display: grid;
  flex: 1;
  grid-template-columns: 152px 182px;
  min-height: 100vh;
}

.primary-menu {
  padding: 84px 0 16px;
  background: #0b2d31;
}

.secondary-menu {
  min-height: 100vh;
  padding: 22px 20px;
  color: #1f2933;
  background: #ffffff;
  border-left: 1px solid rgba(255, 255, 255, .08);
  border-top-left-radius: 0;
  box-shadow: none;
}

.primary-nav-item,
.secondary-list button {
  width: 100%;
  border: 0;
  border-radius: 0;
  text-align: left;
  box-shadow: none;
}

.primary-nav-item {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  color: #f1f7fb;
  background: transparent;
  font-weight: 700;
}

.primary-nav-item:hover,
.primary-nav-item.active {
  background: #155d59;
  color: #ffffff;
  box-shadow: inset 3px 0 var(--ui-gold);
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
}

.secondary-block {
  display: grid;
  gap: 16px;
}

.secondary-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  color: #111827;
  font-weight: 800;
}

.secondary-title span {
  color: #7c8793;
  font-size: 13px;
}

.secondary-list {
  display: grid;
  gap: 6px;
}

.secondary-list button {
  min-height: 34px;
  padding: 6px 0;
  color: #3d4a55;
  background: transparent;
  font-weight: 500;
  border-radius: 0;
}

.secondary-list button:hover,
.secondary-list button.active {
  color: var(--ui-primary);
  background: transparent;
  box-shadow: inset 2px 0 var(--ui-gold);
  font-weight: 800;
  padding-left: 9px;
}

.section-nav {
  padding-top: 0;
}

.login-panel {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

body.login-only .login-panel {
  padding-top: 18px;
}

.login-panel label {
  font-size: 13px;
  color: #b7c9cc;
}

.login-panel input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: #0b151a;
  color: #ffffff;
  border-radius: 6px;
  padding: 11px 12px;
}

.geetest-box {
  display: grid;
  gap: 7px;
}

.captcha-button {
  width: 100%;
  min-height: 42px;
  color: #d7f4f0;
  background: rgba(31, 157, 138, .12);
  border-color: rgba(45, 212, 191, .34);
}

.captcha-button.verified {
  color: #05201d;
  background: #5eead4;
  border-color: #5eead4;
}

.geetest-box span {
  color: #f0c46f;
  font-size: 12px;
}

.image-captcha-box {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 8px;
}

.image-captcha-box button {
  width: 148px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border-color: rgba(255, 255, 255, .2);
}

.image-captcha-box img {
  display: block;
  width: 148px;
  height: 48px;
}

.image-captcha-box input {
  min-width: 0;
}

.login-panel p {
  min-height: 20px;
  margin: 0;
  color: #f0c46f;
  font-size: 13px;
}

.primary {
  background: var(--ui-primary);
  border-color: var(--ui-primary);
  color: #ffffff;
  font-weight: 700;
}

.workspace {
  min-width: 0;
  padding: 26px;
  background: var(--ui-canvas);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ui-line);
}

.topbar h1 {
  font-size: 25px;
  line-height: 1.2;
  margin: 0 0 6px;
  color: var(--ui-ink);
}

.topbar p {
  margin: 0;
  color: var(--ui-muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: 6px;
  padding: 16px;
  min-height: 94px;
  box-shadow: var(--ui-shadow);
}

.metric span {
  display: block;
  color: var(--ui-muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 27px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.dashboard-grid,
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.content-grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.system-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.monitor-list {
  display: grid;
  gap: 22px;
}

.monitor-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-size: 14px;
}

.monitor-row span {
  color: #667783;
}

.monitor-track {
  height: 9px;
  overflow: hidden;
  border-radius: 5px;
  background: #e8eef2;
}

.monitor-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2486d1;
  transition: width .25s ease;
}

.monitor-track i.success {
  background: #1f9d8a;
}

.panel {
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: 6px;
  min-width: 0;
  box-shadow: var(--ui-shadow);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-surface);
}

.panel h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.panel-body {
  padding: 16px;
}

.table-wrap {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f6;
  white-space: nowrap;
  font-size: 14px;
}

th {
  color: #52635f;
  font-weight: 700;
  background: var(--ui-subtle);
}

tbody tr:hover td {
  background: #fbfefd;
}

.toolbar {
  padding: 11px 13px;
  margin-bottom: 14px;
  border: 1px solid #d3e3df;
  background: #f2f8f6;
  color: #35635d;
  border-radius: 6px;
  font-size: 14px;
}

.action-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.compact-form {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto auto;
}

.payment-method-form {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.4fr 100px 110px auto auto minmax(90px, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.panel-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.form-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 24px));
  max-height: min(760px, calc(100dvh - 24px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(181, 139, 69, .48);
  border-radius: 7px;
  color: var(--ui-ink);
  background: var(--ui-surface);
  box-shadow: 0 30px 84px rgba(8, 35, 32, .28);
}

.form-dialog[open] {
  display: flex;
  flex-direction: column;
}

.form-dialog::backdrop {
  background: rgba(8, 29, 28, .58);
  backdrop-filter: blur(3px);
}

.dialog-head {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-top: 2px solid var(--ui-gold);
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-surface);
}

.dialog-head h2 {
  margin: 0;
  font-size: 18px;
}

.dialog-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--ui-muted);
}

.dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  background: var(--ui-surface);
}

.dialog-body::-webkit-scrollbar { width: 9px; }
.dialog-body::-webkit-scrollbar-track { background: #f1f5f7; }
.dialog-body::-webkit-scrollbar-thumb { border: 2px solid #f1f5f7; border-radius: 8px; background: #aebdc6; }
.dialog-body::-webkit-scrollbar-thumb:hover { background: #82949f; }

.form-dialog .action-form,
.form-dialog .payment-method-form,
.modal-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	align-items: start;
	margin: 0;
}

.modal-form-grid > label {
	display: grid;
	min-width: 0;
	gap: 7px;
}

.modal-form-grid > label > input,
.modal-form-grid > label > select,
.modal-form-grid > label > textarea {
	width: 100%;
}

.modal-form-grid > .form-field-wide {
	grid-column: 1 / -1;
}

.form-dialog .key-form {
  grid-template-columns: 1fr;
}

.modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

.form-msg {
  grid-column: 1 / -1;
}

.payment-method-form input,
.payment-method-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd8e2;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}

.payment-method-table code {
  color: #176c8c;
  font-weight: 700;
}

.amount-cell {
  color: #087f75;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.enabled {
  color: #11705f;
  background: #e3f5f0;
}

.status-badge.disabled {
  color: #7a5151;
  background: #f3e8e8;
}

.proxy-test-results {
  display: grid;
  gap: 7px;
  min-width: 240px;
}

.proxy-test-line {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.proxy-test-line small {
  max-width: 260px;
  overflow: hidden;
  color: #60727d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger-button {
  color: #b42318;
  border-color: #efc7c3;
  background: #fff8f7;
}

.key-form {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
}

.action-form input,
.action-form select,
.action-form textarea {
  width: 100%;
  border: 1px solid #cfd8e2;
  background: #ffffff;
  color: #17202a;
  border-radius: 6px;
  padding: 10px 11px;
  min-height: 42px;
}

.action-form textarea {
  resize: vertical;
  min-height: 150px;
  grid-column: 1 / -1;
}

.form-msg {
  align-self: center;
  color: #1f7a7a;
  font-size: 13px;
}

.settings-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-page.single {
  grid-template-columns: minmax(0, 720px);
}

.settings-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dce6ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(22, 48, 62, .07);
}

.settings-card-head {
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid #edf2f6;
}

.settings-card-head h2 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
  color: #0f1f2b;
}

.settings-card-head p {
  margin: 0;
  color: #667783;
  font-size: 13px;
  line-height: 1.6;
}

.setting-item {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f4f7;
}

.setting-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.setting-item label {
  display: grid;
  gap: 3px;
}

.setting-item label span {
  font-weight: 700;
  color: #17202a;
}

.setting-item label small {
  color: #72808b;
  font-size: 12px;
  line-height: 1.5;
}

.setting-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.setting-summary strong {
  overflow: hidden;
  color: #42545f;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-modal-form {
  display: grid;
  gap: 16px;
}

.setting-modal-form input,
.setting-modal-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd8e2;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
}

.proxy-server-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.proxy-server-form label {
  display: grid;
  gap: 7px;
  color: #334650;
  font-size: 13px;
  font-weight: 700;
}

.proxy-server-form input,
.proxy-server-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd8e2;
  border-radius: 6px;
  padding: 10px 11px;
  color: #17202a;
  background: #fff;
  font-weight: 400;
}

.ip-toolbar {
  gap: 8px;
}

.ip-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ip-candidate {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce6ee;
  border-radius: 7px;
  background: #fbfdfe;
}

.ip-candidate.selected {
  border-color: #52ad9e;
  box-shadow: inset 3px 0 0 #1f9d8a;
  background: #f3fbf9;
}

.ip-candidate > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #61717c;
  font-size: 13px;
}

.ip-candidate em {
  color: #11705f;
  font-style: normal;
  font-weight: 700;
}

.ip-candidate strong {
  display: block;
  margin: 10px 0 6px;
  color: #163b4b;
  font-size: 18px;
}

.ip-candidate p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #667783;
  font-size: 13px;
}

.ip-help {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #dbe7ec;
  border-radius: 7px;
  color: #52646f;
  background: #f7fafc;
}

.ip-help p {
  margin: 7px 0 0;
  line-height: 1.6;
}

.ip-method-form,
.ip-lookup-form {
  display: grid;
  gap: 16px;
}

.ip-method-form label,
.ip-lookup-form label {
  display: grid;
  gap: 8px;
  color: #334650;
  font-weight: 700;
}

.ip-method-form select,
.ip-lookup-form input,
.ip-lookup-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd8e2;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
}

.ip-security-note,
.ip-lookup-result {
  padding: 12px 14px;
  border: 1px solid #d9e5ea;
  border-radius: 6px;
  color: #52646f;
  background: #f7fafc;
  line-height: 1.6;
}

.ip-lookup-result strong,
.ip-lookup-result span,
.ip-lookup-result small {
  display: block;
}

.ip-lookup-result span {
  margin-top: 5px;
  color: #17202a;
  font-size: 16px;
}

.setting-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 120px);
  gap: 8px;
  align-items: center;
}

.setting-control input,
.setting-control select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cfd8e2;
  border-radius: 6px;
  padding: 9px 10px;
  background: #ffffff;
  color: #17202a;
}

.setting-control button {
  min-height: 40px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-actions button {
  min-height: 32px;
  padding: 6px 9px;
  white-space: nowrap;
}

.row-actions .primary-outline {
  border-color: #4eb3a6;
  color: #147462;
  background: #f0faf8;
}

.row-action-menu {
  position: relative;
}

.row-action-menu summary {
  display: grid;
  place-items: center;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #d5dfe6;
  border-radius: 5px;
  color: #314651;
  background: #fff;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.row-action-menu summary::-webkit-details-marker { display: none; }

.row-action-menu > div {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  min-width: 124px;
  padding: 5px;
  border: 1px solid #dce5eb;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(26, 44, 56, .14);
}

.row-action-menu > div button {
  width: 100%;
  border: 0;
  text-align: left;
  background: transparent;
}

.row-action-menu > div button:hover { background: #f3f7f8; }
.row-action-menu > div .danger-text { color: #b42318; }

.status-list {
  display: grid;
  gap: 10px;
}

.status-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #e3eaf0;
  border-radius: 8px;
  background: #fbfcfd;
}

.status-list span {
  color: #667783;
  font-size: 13px;
}

.status-list strong {
  font-size: 15px;
  overflow-wrap: anywhere;
  text-align: right;
}

.api-doc-grid {
	display: grid;
	gap: 24px;
}

.api-example {
	border-top: 1px solid var(--line);
	padding-top: 20px;
}

.api-example pre {
	max-height: 460px;
	margin: 14px 0 0;
	overflow: auto;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #101b24;
	color: #dbe8ee;
	padding: 18px;
	font: 13px/1.7 Consolas, "Courier New", monospace;
	white-space: pre-wrap;
	word-break: break-word;
}

.generated-key-result {
	display: grid;
	gap: 18px;
}

.copy-field {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.key-copy-field {
	align-items: start;
}

.generated-key-result textarea {
	font: 13px/1.65 Consolas, "Courier New", monospace;
	word-break: break-all;
}

.platform-key-box {
	display: grid;
	gap: 12px;
	margin: 18px 0;
	padding: 18px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.platform-key-box textarea {
	width: 100%;
	resize: vertical;
	font: 13px/1.65 Consolas, "Courier New", monospace;
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: #70808b;
  border: 1px dashed #cfd9e2;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 18px;
  text-align: center;
}

@media (max-width: 1100px) {
	.capability-grid,
	.channel-plugin-grid,
	.region-cascade { grid-template-columns: 1fr; }

  .metrics,
  .dashboard-grid,
  .content-grid,
  .content-grid.two,
  .system-status-grid,
  .settings-page {
    grid-template-columns: 1fr;
  }

  .ip-candidate-list {
    grid-template-columns: 1fr;
  }

  .action-form,
  .compact-form,
  .payment-method-form,
  .key-form,
  .setting-control {
    grid-template-columns: 1fr;
  }

  .form-dialog .action-form,
  .form-dialog .payment-method-form,
  .modal-form-grid,
  .proxy-server-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  body.login-only .shell {
    min-height: 100vh;
    padding: 18px;
  }

  .sidebar {
    min-height: auto;
  }

  .brand {
    position: static;
    width: auto;
    padding: 16px 18px;
    background: #0b2d31;
  }

  .section-nav,
  .secondary-menu,
  .menu-layout {
    min-height: auto;
  }

  .menu-layout {
    grid-template-columns: 142px minmax(0, 1fr);
  }

  .primary-menu {
    padding-top: 8px;
  }

  .secondary-menu {
    border-top-left-radius: 0;
    padding: 14px;
  }

  .workspace {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions button {
    flex: 1;
  }
}

.home-page {
  min-height: 100vh;
  background: var(--ui-surface);
  color: #ffffff;
}

.home-nav {
  width: min(1160px, calc(100vw - 40px));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.home-brand,
.home-nav a {
  color: #ffffff;
  text-decoration: none;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.home-brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #22b39e;
  font-weight: 800;
}

.home-nav nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-nav nav a {
  padding: 9px 12px;
  border-radius: 6px;
  color: rgba(255, 255, 255, .84);
}

.home-nav nav a:hover {
  background: rgba(255, 255, 255, .12);
}

.home-hero {
  width: min(1160px, calc(100vw - 40px));
  min-height: calc(100vh - 210px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  align-items: center;
  gap: 48px;
  padding: 36px 0 54px;
}

.home-kicker {
  margin: 0 0 14px;
  color: #9ef0e2;
  font-weight: 700;
}

.home-copy h1 {
  margin: 0;
  font-size: 72px;
  line-height: .95;
  letter-spacing: 0;
}

.home-lead {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 18px;
  line-height: 1.75;
}

.home-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.home-primary,
.home-secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
}

.home-primary {
  background: #2fd1b7;
  color: #082024;
}

.home-secondary {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .35);
}

/* 管理端内容区：统一数据、表单与反馈体验，侧栏样式保持独立。 */
.workspace {
  padding: 28px 30px 36px;
  background: var(--ui-canvas);
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  padding: 17px 18px 18px;
  box-shadow: var(--ui-shadow);
}

.metric > i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--ui-primary);
}

.metric-2 > i { background: var(--ui-blue); }
.metric-3 > i { background: var(--ui-gold); }
.metric-4 > i { background: var(--ui-danger); }
.metric-5 > i { background: #6e7f8c; }
.metric strong { margin-top: 10px; color: var(--ui-ink); font-size: 25px; }

.panel { box-shadow: var(--ui-shadow); }
.panel-head { min-height: 64px; padding: 14px 18px; }
.panel h2 { color: #122b39; }
.panel-subtitle { display: block; margin-top: 4px; color: #82909a; font-size: 12px; }
.panel-body { padding: 18px; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--ui-line);
  border-radius: 6px;
}

th, td { padding: 12px 14px; }
th { position: sticky; top: 0; z-index: 1; background: var(--ui-subtle); font-size: 13px; }
tbody tr:hover td { background: #f4f8f6; }
tbody tr:last-child td { border-bottom: 0; }

.data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  margin-bottom: 12px;
}

.data-count { color: #6c7c87; font-size: 13px; }
.data-count strong { color: #173747; font-size: 15px; }

.table-search {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #63747f;
  font-size: 13px;
}

.table-search input {
  width: 230px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #cfdae2;
  border-radius: 6px;
  background: #fff;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  color: #63747f;
  font-size: 13px;
}

.table-pagination button {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ui-ink);
}

.table-pagination button:disabled {
  cursor: default;
  opacity: .45;
}

.cell-code {
  padding: 3px 6px;
  border-radius: 4px;
  color: #315f72;
  background: #edf4f5;
  font-size: 12px;
}

.money-value { color: #087f75; }
.cell-note { margin-left: 5px; color: #89959d; font-weight: 400; }
.cell-actions { width: 1%; }

.cell-text {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-payment-summary {
  min-width: 260px;
  max-width: 420px;
  overflow: visible;
  white-space: normal;
  line-height: 1.65;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.success { color: #147462; background: #e5f5f0; }
.status-pill.warning { color: #946415; background: #fff3d8; }
.status-pill.danger { color: #a13a36; background: #fae9e8; }
.status-pill.neutral { color: #5e6f7a; background: #edf1f4; }

.dialog-head { background: var(--ui-surface); }
.dialog-close { border-radius: 5px; }
.dialog-close:hover { color: #17202a; background: #eef3f6; }
.modal-actions { padding-top: 12px; border-top: 1px solid #edf1f4; }
.dialog-body .modal-actions {
  position: sticky;
  z-index: 4;
  bottom: -20px;
  margin: 12px -20px -20px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -8px 18px rgba(18, 42, 38, .045);
  backdrop-filter: blur(8px);
}
.button-icon { flex: 0 0 auto; width: 16px; height: 16px; pointer-events: none; }
button:has(.button-icon) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.dialog-close .button-icon { width: 18px; height: 18px; }
.status-list strong, .cell-text, .cell-code { overflow-wrap: anywhere; word-break: break-word; }
.form-field input:focus:invalid, .form-field textarea:focus:invalid, .form-field select:focus:invalid {
  border-color: #c9514b;
  box-shadow: 0 0 0 3px rgba(201, 81, 75, .12);
}
.form-msg { min-height: 18px; padding: 0 2px; }
.form-msg.is-pending { color: #756127; }
.form-msg.is-success { color: #147462; }
.form-msg.is-error { color: #b42318; }

.form-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  color: #314651;
  font-size: 13px;
  font-weight: 700;
}

.form-field > small {
  color: #82909a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 5px;
  color: var(--ui-ink);
  background: #fff;
  font: inherit;
  font-weight: 400;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.form-field textarea { min-height: 140px; resize: vertical; }
.form-field-wide { grid-column: 1 / -1; }

#merchantGroupDialog { width: min(980px, calc(100vw - 32px)); }
.merchant-group-form { grid-template-columns: 1fr; }
.merchant-group-form-section {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px solid #dce5eb;
  border-radius: 7px;
  background: #f8fafb;
}

.merchant-group-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e9ed;
}

.merchant-group-section-title strong { color: #17313b; font-size: 14px; }
.merchant-group-section-title small { color: #72848d; font-size: 12px; text-align: right; }
.merchant-group-basic-grid,
.merchant-group-settlement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rate-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.rate-input input { min-width: 0; border-radius: 6px 0 0 6px; }
.rate-input small {
  display: grid;
  place-items: center;
  min-width: 52px;
  padding: 0 10px;
  border: 1px solid #cbd7df;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  color: #60747e;
  background: #eef3f5;
  font-size: 12px;
  font-weight: 700;
}

.merchant-group-payment-list { display: grid; gap: 8px; }
.merchant-group-payment-row {
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(140px, .5fr) minmax(240px, 1fr);
  align-items: end;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #d6e1e7;
  border-radius: 6px;
  background: #fff;
}

.merchant-group-payment-row > label:not(.merchant-group-payment-switch) {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #536873;
  font-size: 12px;
  font-weight: 600;
}

.merchant-group-payment-row select { width: 100%; min-height: 42px; }
.merchant-group-payment-row.is-disabled { background: #f5f7f8; }
.merchant-group-payment-row.is-disabled > label:not(.merchant-group-payment-switch) { opacity: .55; }
.merchant-group-payment-switch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
  min-height: 42px;
  cursor: pointer;
}

.merchant-group-payment-switch input { grid-row: 1 / 3; width: 18px; height: 18px; accent-color: #168f82; }
.merchant-group-payment-switch span { color: #17313b; font-weight: 700; }
.merchant-group-payment-switch small { color: #778992; font-size: 11px; }
.merchant-group-methods { grid-column: 1 / -1; }
.merchant-group-methods > div { display: flex; flex-wrap: wrap; gap: 8px; }
.merchant-group-method {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #ccd9df;
  border-radius: 6px;
  color: #29434e;
  background: #fff;
  cursor: pointer;
}

.merchant-group-method:has(input:checked) { border-color: #2aa598; color: #106f66; background: #edf9f7; }
.merchant-group-method input { width: 16px; height: 16px; accent-color: #168f82; }

.channel-plugin-section {
  padding: 14px;
  border: 1px solid #dce5eb;
  border-radius: 7px;
  background: #f8fafb;
}

.channel-plugin-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.channel-plugin-title strong { color: #17202a; font-size: 14px; }
.channel-plugin-title small,
.channel-plugin-empty { color: #788892; font-size: 12px; }
.channel-plugin-subtitle { margin-top: 18px; }

.channel-payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.channel-payment-summary-group {
  min-width: 0;
}

.channel-payment-summary-group > span {
  display: block;
  margin-bottom: 8px;
  color: #657680;
  font-size: 12px;
}

.payment-mode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
}

.payment-mode-list em {
  color: #88959d;
  font-size: 12px;
  font-style: normal;
}

.payment-mode-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #d4dee4;
  border-radius: 5px;
  color: #425762;
  background: #fff;
  font-size: 12px;
}

.payment-mode-tag.is-active {
  border-color: #9fd1c8;
  color: #14695f;
  background: #eef9f7;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.capability-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d7e1e7;
  border-radius: 6px;
  color: #314651;
  background: #fff;
  cursor: pointer;
}

.capability-option:has(input:checked) {
  border-color: #1f9d8a;
  color: #147462;
  background: #f0faf8;
}

.capability-option input { width: 16px; height: 16px; margin: 0; accent-color: #1f9d8a; }
.channel-capability-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.channel-capability-option {
  width: auto;
  min-width: 132px;
  min-height: 34px;
  padding: 6px 10px;
}
.action-form .channel-capability-option input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  box-shadow: none;
}
.channel-capability-option span { white-space: nowrap; }
.channel-plugin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.channel-plugin-grid > div:has(textarea) { grid-column: 1 / -1; }
.wechat-oauth-fields.is-single { grid-template-columns: 1fr; }

.channel-config-summary,
.channel-orders-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce5eb;
  border-radius: 7px;
  background: #f8fafb;
}

.channel-config-summary div,
.channel-orders-summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #788892;
  font-size: 12px;
}

.channel-config-summary strong,
.channel-orders-summary strong {
  overflow-wrap: anywhere;
  color: #17202a;
  font-size: 14px;
}

.channel-orders-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.segmented-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid #cbd7df;
  border-radius: 6px;
  background: #eef3f6;
}

.segmented-field label { position: relative; cursor: pointer; }
.segmented-field input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-field span { display: grid; place-items: center; min-height: 36px; border-radius: 4px; font-weight: 500; }
.segmented-field input:checked + span { color: #fff; background: #147f75; }

.risk-rule-page { display:grid; min-width:0; gap:16px; }
.risk-rule-page > section { min-width:0; }
.risk-rule-tabs { display:flex; width:100%; max-width:100%; padding:4px; overflow:auto; border:1px solid #d9dfdc; border-radius:6px; background:#fff; box-shadow:0 8px 24px rgba(13,49,46,.05); }
.risk-rule-tabs button { min-height:36px; padding:0 16px; border:0; border-radius:4px; color:#52625e; background:transparent; white-space:nowrap; }
.risk-rule-tabs button.active { color:#fff; background:#147f75; }

.notification-center { display:grid; min-width:0; gap:16px; }
.notification-tabs { position:sticky; z-index:3; top:0; }
.notification-channel-grid,.notification-wechat-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.notification-channel-card,.notification-template-panel,.notification-delivery-panel { min-width:0; border:1px solid #d9dfdc; border-top:2px solid #b29355; border-radius:6px; background:#fff; box-shadow:0 12px 30px rgba(13,49,46,.055); }
.notification-channel-card.is-wide { grid-column:1/-1; }
.notification-channel-card>header,.notification-template-panel>header,.notification-delivery-panel>header { display:flex; align-items:center; gap:13px; min-height:82px; padding:18px 20px; border-bottom:1px solid #e7ebe8; }
.notification-channel-card header>div,.notification-template-panel header>div,.notification-delivery-panel header>div { min-width:0; flex:1; }
.notification-channel-card h2,.notification-template-panel h2,.notification-delivery-panel h2 { margin:0 0 5px; color:#123d39; font-size:18px; }
.notification-channel-card header p,.notification-template-panel header p,.notification-delivery-panel header p { margin:0; color:#667570; font-size:13px; line-height:1.55; }
.notification-channel-icon { display:grid; width:36px; height:36px; flex:0 0 36px; place-items:center; border:1px solid #cfe0dc; border-radius:6px; color:#147f75; background:#eef8f6; }
.notification-channel-icon.is-email { border-color:#cddcf4; color:#2f6fd7; background:#f1f6ff; }
.notification-channel-icon.is-sms { border-color:#d9d7ef; color:#6658bd; background:#f6f4ff; }
.notification-channel-icon.is-wechat { border-color:#c9e5d1; color:#168245; background:#effaf2; }
.notification-channel-icon.is-wecom { border-color:#c9deec; color:#257aa5; background:#f0f8fc; }
.notification-channel-icon svg { width:18px; height:18px; }
.notification-channel-form,.notification-wechat-form { display:grid; gap:14px; padding:18px 20px 20px; }
.notification-channel-form>label,.notification-wechat-form>label,.notification-form-grid>label { display:grid; gap:7px; color:#253d39; font-size:13px; font-weight:650; }
.notification-channel-form small,.notification-wechat-form small,.notification-form-grid small { color:#74817d; font-weight:400; line-height:1.5; }
.notification-channel-form input,.notification-channel-form select,.notification-channel-form textarea,.notification-wechat-form input,.notification-wechat-form select,.notification-wechat-form textarea,.notification-template-form input,.notification-template-form select,.notification-template-form textarea { width:100%; min-height:40px; border:1px solid #cdd7d3; border-radius:5px; background:#fff; }
.notification-channel-form textarea,.notification-template-form textarea { padding:10px 11px; resize:vertical; }
.merchant-notification-row { display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:12px; align-items:center; padding:14px 0; border-bottom:1px solid var(--ui-line); }
.merchant-notification-row:first-child { padding-top:0; }
.merchant-notification-row>div { min-width:0; }
.merchant-notification-row strong { font-size:13px; }
.merchant-notification-row small { display:block; margin-top:5px; color:var(--ui-muted); overflow-wrap:anywhere; }
.merchant-notification-icon { display:grid; place-items:center; width:32px; height:32px; color:#396ad1; background:#eef4ff; border-radius:6px; }
.merchant-notification-icon svg { width:18px; height:18px; }
.merchant-notification-row .setting-switch { width:92px; flex-shrink:0; }
.notification-binding-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding-top:16px; }
.notification-binding-footer>div:first-child { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.notification-callback-form { max-width:640px; }
.notification-callback-form .form-field { display:grid; gap:8px; }
.notification-callback-summary { margin:20px 0; font-size:13px; line-height:1.6; }
.notification-callback-summary>div { display:grid; grid-template-columns:80px minmax(0,1fr); gap:12px; padding:10px 0; border-bottom:1px solid var(--ui-line); }
.notification-callback-summary dt { color:var(--ui-muted); }
.notification-callback-summary dd { min-width:0; margin:0; white-space:normal; overflow-wrap:anywhere; }
.notification-switch { position:relative; display:flex; align-items:center; gap:8px; flex:0 0 auto; cursor:pointer; }
.notification-switch input { position:absolute; inset:0; width:100%; height:100%; min-height:0; margin:0; padding:0; opacity:0; cursor:pointer; }
.notification-switch span { position:relative; width:38px; height:22px; border:1px solid #c6d0cc; border-radius:12px; background:#e7ece9; transition:.16s; }
.notification-switch span::after { content:""; position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.2); transition:.16s; }
.notification-switch input:checked+span { border-color:#147f75; background:#147f75; }
.notification-switch input:checked+span::after { transform:translateX(16px); }
.notification-switch strong { min-width:42px; color:#52625e; font-size:12px; }
.notification-card-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:9px; padding-top:4px; }
.channel-warning { margin:0; padding:10px 12px; border-left:3px solid #b29355; color:#765b28; background:#faf7ef; font-size:13px; }
.notification-template-panel .table-wrap,.notification-delivery-panel .table-wrap { padding:0 18px 18px; }
.notification-template-panel td small { display:block; margin-top:4px; color:#7b8984; }
.template-variables { max-width:360px; color:#52625e; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:12px; white-space:normal; }
.notification-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.notification-inline-switch { display:flex !important; align-items:center; grid-column:1/-1; min-height:42px; padding:10px 12px; border:1px solid #dae2de; border-radius:5px; background:#f7f9f8; }
.notification-wechat-basics { padding-bottom:2px; }
.wechat-template-config { display:grid; min-width:0; border-top:1px solid #e4e9e7; }
.wechat-template-intro { padding:15px 0 12px; }
.wechat-template-intro strong { color:#253d39; font-size:14px; }
.wechat-template-intro p { margin:4px 0 0; color:#74817d; font-size:12px; line-height:1.55; }
.wechat-template-list { display:grid; min-width:0; overflow:hidden; border:1px solid #dfe5eb; border-radius:6px; background:#fff; }
.wechat-template-item { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:14px; min-width:0; padding:11px 13px; }
.wechat-template-item+.wechat-template-item { border-top:1px solid #e8ecf0; }
.wechat-template-copy { display:grid; min-width:0; gap:3px; }
.wechat-template-copy strong { color:#1e3348; font-size:13px; }
.wechat-template-copy span { overflow:hidden; color:#748294; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.wechat-template-action { display:flex; align-items:center; gap:9px; }
.wechat-template-action button { min-width:78px; min-height:34px; padding:0 10px; }
.wechat-template-state { padding:3px 7px; border-radius:4px; color:#8b6725; background:#fbf3df; font-size:11px; white-space:nowrap; }
.wechat-template-state.is-ready { color:#11685f; background:#e8f5f2; }
.wechat-template-controls { display:grid; grid-template-columns:minmax(260px,520px) max-content; align-items:end; justify-content:start; gap:8px; max-width:920px; }
.wechat-template-controls label { display:grid; gap:6px; color:#253d39; font-size:12px; font-weight:650; }
.wechat-template-controls button { width:auto; min-width:104px; min-height:36px; padding:0 10px; }
.wechat-param-table { max-width:920px; overflow:hidden; border:1px solid #dfe5eb; border-radius:5px; background:#fff; }
.wechat-param-columns,.wechat-param-row { display:grid; grid-template-columns:minmax(180px,.8fr) minmax(240px,1.2fr) 34px; align-items:center; gap:8px; min-width:0; }
.wechat-param-columns { padding:7px 10px; color:#6f7d8c; background:#f4f7fa; font-size:11px; font-weight:650; }
.wechat-param-list { display:grid; min-width:0; }
.wechat-param-empty { margin:0; padding:16px 10px; color:#7a8783; background:#fafbfc; font-size:12px; text-align:center; }
.wechat-param-row { padding:7px 10px; border-top:1px solid #e8ecf0; }
.wechat-param-row:first-child { border-top:0; }
.wechat-param-row input,.wechat-param-row select { min-width:0; min-height:36px; }
.wechat-param-remove { width:34px; min-height:36px; padding:0; color:#a64242; }
.notification-wechat-form.is-disabled { opacity:.72; }
#wechatTemplateConfigDialog { width:min(720px,calc(100vw - 32px)); }
.wechat-template-dialog-form { display:grid; min-width:0; gap:14px; }
.wechat-template-dialog-form input,.wechat-template-dialog-form select { width:100%; min-height:40px; border:1px solid #cdd7d3; border-radius:5px; background:#fff; }
.wechat-template-dialog-form .wechat-template-controls,.wechat-template-dialog-form .wechat-param-table { width:100%; max-width:none; }
#notificationTemplateDialog { width:min(860px,calc(100vw - 32px)); }
.notification-variable-box,.notification-preview { padding:12px; border:1px solid #dfe5e2; border-radius:5px; background:#f8faf9; }
.notification-variable-box>div { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.notification-variable-box button { min-height:30px; padding:0 9px; color:#0f665e; border-color:#bad3cd; background:#eef7f5; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:11px; }
.notification-variable-box p { margin:9px 0 0; color:#74817d; font-size:12px; }
.notification-sms-variable-box { padding:14px; border:1px solid #dfe5e2; border-radius:5px; background:#f8faf9; }
.notification-sms-variable-guide { margin-bottom:12px; }
.notification-sms-variable-box p { margin:5px 0 0; color:#66746f; font-size:12px; }
.notification-sms-variable-columns { display:grid; grid-template-columns:minmax(0,1fr) 72px 68px; gap:10px; padding:0 8px 7px; color:#84908c; font-size:11px; }
.notification-sms-variable-columns span:nth-child(n+2) { text-align:center; }
.notification-sms-variable-row { display:grid; grid-template-columns:minmax(0,1fr) 72px auto; align-items:center; gap:10px; min-height:44px; padding:6px 8px; border-top:1px solid #e3e8e5; color:#7a8581; }
.notification-sms-variable-row:first-child { border-top:0; }
.notification-sms-variable-row.is-selected { color:#173b36; background:#f0f7f5; }
.notification-sms-variable-row label { display:flex; align-items:center; gap:9px; min-width:0; margin:0; }
.notification-sms-variable-row label>input[type="checkbox"] { appearance:auto; width:16px !important; min-width:16px; height:16px !important; min-height:16px !important; flex:0 0 16px; margin:0; padding:0 !important; accent-color:#376fdb; }
.notification-sms-variable-row label>span { display:grid; min-width:0; gap:2px; }
.notification-sms-variable-row label strong { color:#27384e; font-size:12px; font-weight:650; }
.notification-sms-variable-row code { color:#708079; font-size:11px; }
.notification-sms-variable-row>span { font-size:12px; text-align:center; }
.notification-sms-variable-row>div { display:flex; gap:4px; }
.notification-sms-variable-row button { width:30px; min-height:30px; padding:0; }
.notification-sms-variable-row button:disabled { visibility:hidden; }
.notification-preview pre { min-height:74px; margin:9px 0 0; color:#344944; white-space:pre-wrap; overflow-wrap:anywhere; font-family:"Microsoft YaHei",sans-serif; line-height:1.65; }
.sms-login-code { display:grid; gap:6px; }
.sms-login-code>div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.sms-login-code button { min-width:102px; }
.reset-password-box { display:grid; gap:6px; }
.login-assist-actions { display:flex; align-items:center; justify-content:center; min-height:34px; margin-top:1px; }
.login-mode-button { width:auto; min-height:32px; margin:0; padding:5px 14px; border:0; border-radius:0; color:#3769c9; background:transparent; font-size:12px; line-height:20px; box-shadow:none; }
.login-mode-button:hover { color:#214f9f; border-color:transparent; background:#f2f6fd; box-shadow:none; transform:none; }
.login-mode-button:not([hidden]) + .login-mode-button { border-left:1px solid #d8dfe9; }
.oauth-login { display:grid; gap:10px; margin-top:8px; }
.oauth-login-divider { display:flex; align-items:center; gap:10px; color:#7a8783; font-size:11px; }
.oauth-login-divider::before,.oauth-login-divider::after { content:""; height:1px; flex:1; background:#dde3df; }
.oauth-login-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.oauth-login-actions button { display:flex; align-items:center; justify-content:center; gap:6px; min-width:0; padding:7px 6px; border-color:#cbd5d1; color:#31433f; background:#fff; font-size:12px; }
.oauth-login-actions button span { display:grid; place-items:center; width:20px; height:20px; flex:0 0 20px; border-radius:50%; color:#fff; background:#3478d4; font-size:10px; font-weight:800; }
.oauth-login-actions button[data-oauth-login="douyin"] span { background:#25282d; }
.oauth-login-actions button[data-oauth-login="alipay"] span { background:#1677ff; }
.oauth-login>small { color:#7a8783; font-size:10px; line-height:1.5; text-align:center; }
.oauth-binding-list { display:grid; }
.oauth-binding-row { display:grid; grid-template-columns:38px minmax(0,1fr) auto auto; align-items:center; gap:12px; min-height:68px; padding:10px 2px; border-bottom:1px solid #e7ece9; }
.oauth-binding-row:last-child { border-bottom:0; }
.oauth-provider-mark { display:grid; place-items:center; width:36px; height:36px; border-radius:6px; color:#fff; background:#3478d4; font-weight:800; }
.oauth-provider-mark.oauth-douyin { background:#25282d; }
.oauth-provider-mark.oauth-alipay { background:#1677ff; }
.oauth-binding-row>div { display:grid; gap:3px; }
.oauth-binding-row>div small { color:#788580; font-size:11px; }
.oauth-binding-row>button { min-width:86px; }
.oauth-callback-setting { grid-column:1/-1; }
.oauth-callback-list { display:grid; gap:6px; }
.oauth-callback-list>div { display:grid; grid-template-columns:54px minmax(0,1fr); align-items:center; gap:8px; }
.oauth-callback-list strong { color:#56645f; font-size:11px; }
.oauth-callback-list code { overflow:auto; padding:8px 10px; border:1px solid #e2e7e4; border-radius:4px; color:#455752; background:#f7f9f8; font-size:11px; white-space:nowrap; }
.quick-login-card { width:100%; padding:0; overflow:visible; border-color:#d9e1eb; box-shadow:0 8px 24px rgba(33,52,76,.045); }
.quick-login-card>.settings-card-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0; padding:18px 20px; border-bottom:1px solid #e3e8ef; }
.quick-login-card>.settings-card-head h2 { margin:0 0 4px; font-size:18px; }
.quick-login-card>.settings-card-head p { margin:0; font-size:12px; }
.quick-login-summary { flex:0 0 auto; padding:5px 9px; border:1px solid #cbd9ef; border-radius:4px; color:#315fbb; background:#f3f7ff; font-size:11px; font-weight:700; }
.quick-login-list { display:grid; padding:0 20px; }
.quick-login-row { display:grid; grid-template-columns:40px minmax(220px,1fr) 84px minmax(210px,auto); align-items:center; gap:14px; min-height:78px; padding:13px 0; border-bottom:1px solid #e8ecf1; }
.quick-login-row-session { border-bottom:0; }
.quick-login-icon { display:grid; place-items:center; width:36px; height:36px; border:1px solid #d4deed; border-radius:6px; color:#356fdb; background:#f4f7fc; }
.quick-login-icon svg { width:17px; height:17px; }
.quick-login-copy { min-width:0; }
.quick-login-copy strong { display:block; color:#172536; font-size:14px; }
.quick-login-copy p { margin:4px 0 0; color:#758292; font-size:11px; line-height:1.5; }
.quick-login-status { display:inline-flex; align-items:center; justify-self:start; gap:6px; color:#7a8795; font-size:11px; font-weight:700; white-space:nowrap; }
.quick-login-status i { width:7px; height:7px; border-radius:50%; background:#aab4c0; }
.quick-login-status.is-ready { color:#2f66c8; }
.quick-login-status.is-ready i { background:#3d75de; box-shadow:0 0 0 3px #e8f0ff; }
.quick-login-status.is-pending { color:#9a6b22; }
.quick-login-status.is-pending i { background:#c28a35; box-shadow:0 0 0 3px #fbf3e5; }
.quick-login-controls { display:flex; align-items:center; justify-content:flex-end; gap:9px; min-width:0; }
.quick-login-controls>button:not(.setting-switch) { min-height:36px; padding:7px 10px; white-space:nowrap; }
.quick-login-card .setting-switch.is-on { border-color:#b7cbed; color:#2f64c5; background:#edf3ff; }
.quick-login-card .setting-switch.is-on i { background:#356fdb; }
.quick-login-card .setting-switch:disabled { cursor:not-allowed; opacity:.55; box-shadow:none; }
.quick-login-channel-control { display:grid; grid-template-columns:minmax(240px,330px) auto; align-items:end; gap:8px; min-width:0; }
.quick-login-channel-control label { display:grid; gap:4px; min-width:0; }
.quick-login-channel-control label>span { color:#354456; font-size:11px; font-weight:700; }
.quick-login-channel-control label>small { max-width:420px; overflow:hidden; color:#778493; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.quick-login-channel-control select { width:100%; min-width:0; min-height:36px; padding:7px 32px 7px 10px; border:1px solid #cad5e3; border-radius:5px; color:#243448; background:#fff; }
.quick-login-channel-control select:disabled { color:#8994a0; background:#f4f6f8; }
.quick-login-channel-link { width:38px; min-width:38px; height:36px; padding:0; }
.quick-login-callbacks { margin:0 20px 18px; border:1px solid #dce4ef; border-radius:6px; background:#f8fafc; }
.quick-login-callbacks summary { display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:10px; padding:12px 14px; cursor:pointer; list-style:none; }
.quick-login-callbacks summary::-webkit-details-marker { display:none; }
.quick-login-callbacks summary>span { color:#4777cf; }
.quick-login-callbacks summary strong,.quick-login-callbacks summary small { display:block; }
.quick-login-callbacks summary strong { color:#25364a; font-size:12px; }
.quick-login-callbacks summary small { margin-top:3px; color:#7a8794; font-size:10px; }
.quick-login-callbacks summary b { color:#3568c9; font-size:11px; }
.quick-login-callbacks[open] summary { border-bottom:1px solid #e0e6ee; }
.quick-login-callbacks>.oauth-callback-list { padding:12px 14px 14px; }
.quick-login-modal-state { padding:11px 12px; border:1px solid #e0e6ee; border-radius:5px; background:#f8fafc; }
@media (max-width:1100px) { .quick-login-row { grid-template-columns:40px minmax(0,1fr) auto; }.quick-login-controls { grid-column:2/4; justify-content:flex-start; }.quick-login-row-alipay .quick-login-controls { align-items:flex-end; }.quick-login-channel-control { flex:1; grid-template-columns:minmax(220px,1fr) auto; }.quick-login-channel-control label { min-width:220px; } }
@media (max-width:650px) { .quick-login-card>.settings-card-head { align-items:flex-start; padding:16px; }.quick-login-list { padding:0 16px; }.quick-login-row { grid-template-columns:34px minmax(0,1fr) auto; gap:10px; }.quick-login-icon { width:32px; height:32px; }.quick-login-controls { grid-column:1/-1; justify-content:space-between; padding-left:44px; }.quick-login-row-alipay .quick-login-controls { display:grid; padding-left:0; }.quick-login-channel-control { grid-template-columns:minmax(0,1fr) auto; width:100%; }.quick-login-channel-control label { min-width:0; }.quick-login-channel-control label>small { white-space:normal; }.quick-login-row-alipay .setting-switch { justify-self:end; }.quick-login-callbacks { margin:0 16px 16px; }.oauth-callback-list>div { grid-template-columns:1fr; }.oauth-callback-list code { white-space:normal; overflow-wrap:anywhere; } }
@media (max-width:600px) { .oauth-binding-row { grid-template-columns:38px minmax(0,1fr) auto; }.oauth-binding-row>.status-badge { grid-column:2; justify-self:start; }.oauth-binding-row>button { grid-column:3; grid-row:1/3; }.oauth-login-actions { grid-template-columns:1fr; } }
@media (max-width:900px) { .notification-channel-grid,.notification-wechat-grid,.notification-form-grid { grid-template-columns:1fr; }.notification-channel-card.is-wide { grid-column:1; } }
@media (max-width:600px) { .notification-channel-card>header { align-items:flex-start; flex-wrap:wrap; }.notification-switch { width:auto; margin-left:auto; }.notification-card-actions { justify-content:stretch; }.notification-card-actions button { flex:1; }.wechat-template-item { align-items:start; padding:11px 12px; }.wechat-template-action { align-items:flex-end; flex-direction:column; gap:5px; }.wechat-template-copy span { white-space:normal; }.wechat-template-controls { grid-template-columns:minmax(0,1fr) auto; }.wechat-param-columns { display:none; }.wechat-param-table { overflow:visible; border:0; background:transparent; }.wechat-param-list { gap:8px; }.wechat-param-row { grid-template-columns:minmax(0,1fr) 34px; padding:9px; border:1px solid #dfe5eb; border-radius:5px; background:#fff; }.wechat-param-row input::placeholder { color:#84909c; }.wechat-param-row select { grid-column:1; }.wechat-param-remove { grid-column:2; grid-row:1/3; align-self:stretch; height:auto; }.notification-sms-variable-columns { display:none; }.notification-sms-variable-row { grid-template-columns:minmax(0,1fr) auto; }.notification-sms-variable-row>span { grid-column:1; padding-left:25px; text-align:left; }.notification-sms-variable-row>div { grid-column:2; grid-row:1/3; } }
.risk-rule-page [hidden] { display:none !important; }
.risk-rule-page .panel-toolbar p { margin:0; color:#64736f; }

#riskRuleDialog { width:min(720px,calc(100vw - 32px)); }
#riskWordDialog { width:min(720px,calc(100vw - 32px)); }
#riskListDialog,#riskWordBatchDialog,#riskListBatchDialog { width:min(780px,calc(100vw - 32px)); }
.panel-toolbar-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.risk-config-form { gap:0 16px; }
.form-dialog .risk-config-form>.risk-form-intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:0 0 4px;
  padding:13px 14px;
  border:1px solid #d7e2dd;
  border-left:3px solid #a98a4a;
  border-radius:6px;
  background:#f3f7f5;
}
.risk-form-intro strong { flex:0 0 auto; color:#103c38; font-size:14px; }
.risk-form-intro span { color:#64736f; font-size:12px; line-height:1.55; text-align:right; }
.form-dialog .risk-config-form>.risk-form-section-title {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:14px;
  margin:16px 0 11px;
  padding:0 0 8px;
  border-bottom:1px solid #dfe5e1;
}
.risk-form-section-title strong { color:#1d3633; font-size:13px; }
.risk-form-section-title small { color:#82908b; font-size:11px; text-align:right; }
.form-dialog .risk-config-form>label.form-field {
  margin:0 0 12px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.risk-config-form .form-field>span { color:#344b47; font-size:12px; }
.risk-config-form .form-field input,
.risk-config-form .form-field select,
.risk-config-form .form-field textarea { border-color:#cbd6d1; background:#fff; }
.risk-config-form .form-field textarea { min-height:96px; line-height:1.6; }
.risk-config-form .form-field>small { color:#7a8984; }
.risk-config-form .risk-file-field { padding:10px 12px!important; border:1px dashed #bccbc5!important; border-radius:6px!important; background:#f8faf9!important; }
.risk-config-form .risk-file-field input { min-height:38px; padding:7px 9px; }
.risk-config-form .modal-actions { margin-top:5px; }

@media (max-width:640px) {
  .risk-config-form { grid-template-columns:1fr; gap:0; }
  .risk-config-form>.form-field-wide,
  .risk-config-form>.modal-actions,
  .risk-config-form>.form-msg { grid-column:1; }
  .form-dialog .risk-config-form>.risk-form-intro { align-items:flex-start; flex-direction:column; gap:4px; }
  .risk-form-intro span,.risk-form-section-title small { text-align:left; }
}

@media (max-width: 640px) {
	.risk-rule-tabs button { flex:0 0 auto; padding:0 13px; }
	.risk-rule-page .panel-toolbar { align-items:stretch; flex-direction:column; gap:10px; }
	.risk-rule-page .panel-toolbar-actions { display:grid; grid-template-columns:1fr; }
	.risk-rule-page .panel-toolbar button { width:100%; }
	.risk-rule-page .panel-body { padding:14px; }
}

.registration-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(820px, calc(100dvh - 28px)); border-color: var(--mg-line-strong); color: var(--mg-ink); box-shadow: 0 24px 64px rgba(31,42,55,.2); }
.registration-dialog::backdrop { background: rgba(31,42,55,.46); backdrop-filter: blur(2px); }
.registration-dialog .dialog-head { padding: 18px 20px; border-top: 0; border-bottom-color: var(--mg-line); }
.registration-dialog .dialog-head h2 { font-size: 18px; }
.registration-dialog .dialog-head > div { min-width: 0; }
.registration-dialog .dialog-head p { margin: 5px 0 0; color: var(--mg-muted); font-size: 12px; font-weight: 400; }
.registration-dialog .dialog-close { flex: 0 0 32px; width: 32px; height: 32px; color: var(--mg-muted); background: transparent; }
.registration-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; margin: 0; }
.registration-form .dialog-body { gap: 14px 16px; padding: 20px; scrollbar-gutter: auto; }
.registration-form .modal-form-grid > label > span,
.registration-verification > label { color: #344155; font-size: 12px; font-weight: 600; }
.registration-form input { width: 100%; min-width: 0; height: 40px; padding: 9px 11px; border: 1px solid var(--mg-line-strong); border-radius: 5px; color: var(--mg-ink); background: #fff; font: inherit; font-size: 13px; line-height: 20px; }
.registration-form input::placeholder { color: #8a94a4; }
.registration-form input:focus-visible { outline: 0; border-color: var(--mg-primary); box-shadow: 0 0 0 3px rgba(59,110,220,.12); }
.registration-form button { min-height: 40px; color: #344155; border-color: var(--mg-line-strong); }
.registration-form small { color: var(--mg-muted); font-size: 11px; line-height: 1.5; }
.registration-form small.success { color: #18745f; }
.registration-form small.error,
.registration-form .form-msg { color: #a9413c; }
.registration-verification { display: grid; gap: 7px; min-width: 0; }
.registration-captcha,
.registration-sms { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 10px; }
.registration-captcha button { width: 128px; height: 40px; padding: 0; overflow: hidden; background: #f5f8fc; }
.registration-captcha img { display: block; width: 100%; height: 100%; object-fit: contain; }
.registration-sms button { white-space: nowrap; color: var(--mg-primary); background: #f7f9ff; font-size: 12px; }
.registration-note { margin: 0; color: var(--mg-muted); font-size: 11px; line-height: 1.7; }
.registration-footer { flex: 0 0 auto; padding: 14px 20px; border-top: 1px solid var(--mg-line); background: #fff; }
.registration-footer .form-msg { display: block; margin: 0 0 10px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.registration-footer .form-msg:empty { display: none; }
.registration-footer .modal-actions { margin: 0; padding: 0; border: 0; }
.merchant-invite-box { display: grid; gap: 14px; }
.invite-link-field { display: grid; gap: 6px; }
.invite-link-field > span { color: #657184; font-size: 12px; font-weight: 650; }
.invite-link-field > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.invite-link-field input { min-width: 0; font-family: Consolas, monospace; font-size: 12px; }
.merchant-invite-hint { margin: 0; color: #748093; font-size: 12px; }

@media (max-width: 640px) {
  .registration-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .registration-dialog .dialog-head { padding: 16px; }
  .registration-form .dialog-body { padding: 16px; }
  .registration-footer { padding: 12px 16px; }
  .registration-form .modal-form-grid { grid-template-columns: minmax(0, 1fr); }
  .registration-footer .modal-actions button { flex: 1; }
  .invite-link-field > div { grid-template-columns: 1fr; }
}

.channel-region-section {
  padding: 14px;
  border: 1px solid #dce5eb;
  border-radius: 7px;
  background: #f8fafb;
}

.region-select-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  border: 1px solid #cbd7df;
  border-radius: 6px;
  color: #17202a;
  background: #fff;
  text-align: left;
}

.region-select-trigger:hover { border-color: #16978a; background: #f7fcfb; }
.region-select-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-select-trigger small { flex: 0 0 auto; color: #657782; }

.home-region-picker { display: grid; gap: 14px; }
.home-region-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.home-region-tools input { min-height: 42px; }
.home-region-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.home-region-columns section {
  min-width: 0;
  border: 1px solid #dce5eb;
  border-radius: 7px;
  overflow: hidden;
  background: #f8fafb;
}
.home-region-columns section > strong {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid #dce5eb;
  background: #eef3f6;
  font-size: 13px;
}
.home-region-columns section > div {
  height: 290px;
  overflow-y: auto;
  padding: 6px;
}
.home-region-columns button,
.home-region-search-results button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  color: #263640;
  background: transparent;
  text-align: left;
}
.home-region-columns button:hover,
.home-region-search-results button:hover { background: #eaf6f4; }
.home-region-columns button.is-selected { color: #fff; background: #168f83; }
.home-region-columns button small,
.home-region-search-results button small { color: #7c8d96; }
.home-region-columns button.is-selected small { color: #d8f4ef; }
.home-region-columns p,
.home-region-search-results p { margin: 0; padding: 14px 10px; color: #7c8d96; font-size: 13px; }
.home-region-search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dce5eb;
  border-radius: 7px;
}
.home-region-columns[hidden],
.home-region-search-results[hidden] { display: none; }
.home-region-selection {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #b9dcd6;
  border-radius: 6px;
  background: #eef9f7;
}
.home-region-selection span { color: #647680; font-size: 13px; }
.home-region-selection strong { color: #14695f; }

.region-cascade {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(120px, .7fr) auto;
  gap: 8px;
}

.region-cascade select,
.region-cascade button {
  min-height: 42px;
  border: 1px solid #cbd7df;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}

.selected-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  margin-top: 12px;
  color: #788892;
}

.region-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 10px;
  border: 1px solid #b9dcd6;
  border-radius: 5px;
  color: #14695f;
  background: #eef9f7;
  font-size: 12px;
}

.region-chip button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  color: #63767f;
  background: transparent;
  font-size: 17px;
  line-height: 1;
}

.region-chip.is-deny {
  border-color: #e3c3c3;
  color: #8b3f3f;
  background: #fff4f4;
}

.strategy-channel-section,
.region-policy-section {
  padding: 14px;
  border: 1px solid #dce5eb;
  border-radius: 7px;
  background: #f8fafb;
}

.strategy-channel-list,
.region-policy-steps {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.region-policy-section .channel-plugin-title > div {
  display: grid;
  gap: 4px;
}

.region-policy-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #cde3df;
  border-radius: 6px;
  background: #eef8f6;
}

.region-policy-preview > small {
  color: #527069;
  font-size: 12px;
  font-weight: 700;
}

.region-policy-preview [data-policy-preview] {
  display: grid;
  gap: 8px;
  color: #667983;
  font-size: 13px;
}

.region-policy-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.region-policy-flow strong { color: #173741; }
.region-policy-flow i { color: #168f82; font-style: normal; font-weight: 800; }
.region-policy-flow span {
  padding: 5px 8px;
  border: 1px solid #bcdad5;
  border-radius: 5px;
  color: #176c63;
  background: #fff;
}

.region-policy-steps { gap: 12px; }

.strategy-channel-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 100px 100px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d6e0e6;
  border-radius: 6px;
  background: #fff;
}

.strategy-channel-item > span,
.strategy-channel-item > label {
  display: grid;
  gap: 4px;
}

.strategy-channel-item > .strategy-channel-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #172b36;
  font-size: inherit;
}

.strategy-channel-choice span {
  display: grid;
  gap: 4px;
}

.strategy-channel-item small,
.strategy-channel-item > label {
  color: #687b86;
  font-size: 12px;
}

.strategy-channel-item input[type="number"] {
  width: 100%;
  min-height: 34px;
}

.region-policy-step {
  overflow: hidden;
  border: 1px solid #d6e1e7;
  border-radius: 7px;
  background: #fff;
}

.region-policy-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid #e4ebef;
  background: #f5f8f9;
}

.region-policy-step-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.region-policy-step-head strong { color: #18333d; font-size: 13px; }
.region-policy-step-head small { color: #7a8a93; font-size: 12px; }
.region-policy-step-tools { display: flex; gap: 5px; }
.region-policy-step-tools button {
  width: 30px;
  height: 30px;
  padding: 0;
  border-color: #d2dde3;
  color: #536973;
  background: #fff;
  line-height: 1;
}

.region-policy-step-tools button:hover:not(:disabled) { border-color: #179489; color: #11766d; }
.region-policy-step-tools [data-step-remove] { color: #a44747; }

.region-policy-route {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 112px minmax(180px, 1fr) 120px;
  align-items: end;
  gap: 12px;
  padding: 14px 12px;
}

.region-policy-region,
.region-policy-tier {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #536873;
  font-size: 12px;
  font-weight: 600;
}

.region-policy-tier select { width: 100%; min-height: 42px; }
.region-policy-arrow {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 42px;
  color: #71838c;
  text-align: center;
}

.region-policy-arrow small { font-size: 11px; }
.region-policy-arrow b { color: #168f82; font-size: 18px; line-height: 1; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.table-search input:focus {
  outline: 0;
  border-color: #1f9d8a;
  box-shadow: 0 0 0 3px rgba(31, 157, 138, .12);
}

.setting-summary strong.is-configured { color: #147462; }
button:disabled, .is-loading { cursor: wait; opacity: .68; }

.empty-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  color: #7b8993;
  text-align: center;
  background: #fbfcfd;
  border: 1px dashed #d6e0e7;
  border-radius: 7px;
}

.toast-region {
  position: fixed;
  z-index: 1200;
  top: 20px;
  right: 22px;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #d7e2e8;
  border-left: 4px solid #1f9d8a;
  border-radius: 7px;
  color: #24404e;
  background: #fff;
  box-shadow: 0 16px 42px rgba(0, 30, 48, .17);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-left-color: #c94d46; }

.toast > span {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: #1f9d8a;
  font-size: 13px;
  font-weight: 800;
}

.toast.error > span { background: #c94d46; }
.confirm-dialog { width: min(440px, calc(100vw - 32px)); }
.confirm-message { margin: 0; color: #40535f; line-height: 1.75; }
.confirm-dialog .modal-actions { margin-top: 18px; }

@media (max-width: 760px) {
	.merchant-group-basic-grid,
	.merchant-group-settlement-grid,
	.merchant-group-payment-row { grid-template-columns: 1fr; }
	.merchant-group-section-title { align-items: flex-start; flex-direction: column; }
	.merchant-group-section-title small { text-align: left; }
	.strategy-channel-item { grid-template-columns: 1fr; }
	.strategy-channel-item > label { grid-column: auto; }
	.region-policy-section .channel-plugin-title { align-items: stretch; flex-direction: column; }
	.region-policy-section .channel-plugin-title > button { width: 100%; }
	.region-policy-route { grid-template-columns: 1fr; }
	.region-policy-arrow { grid-template-columns: 1fr auto 1fr; min-height: auto; }
	.region-policy-arrow::before,
	.region-policy-arrow::after { content: ""; height: 1px; background: #d9e5e8; }
	.region-policy-step-head small { display: none; }
	.workspace { padding: 20px 16px 28px; }
  .form-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
  .dialog-head { padding: 14px 16px; }
  .dialog-body { padding: 16px; }
  .data-toolbar { align-items: stretch; flex-direction: column; }
  .table-search, .table-search input { width: 100%; }
  .form-dialog .action-form,
	.form-dialog .payment-method-form,
	.modal-form-grid,
	.proxy-server-form,
	.channel-payment-summary-grid,
	.channel-plugin-grid { grid-template-columns: 1fr; }
	.channel-config-summary,
	.channel-orders-summary { grid-template-columns: 1fr 1fr; }
	#channelConfigDialog .modal-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	#channelConfigDialog .modal-actions > button { width: 100%; }
	#channelConfigDialog .modal-actions > .primary { grid-column: 1 / -1; }
  .home-region-columns { grid-template-columns: 1fr; }
  .home-region-columns section > div { height: 160px; }
}

.log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #e3eaf0;
  border-radius: 8px;
  background: #fbfcfd;
}

.log-toolbar > button {
  margin-left: auto;
}

.log-toolbar > div {
  display: grid;
  gap: 3px;
}

.log-toolbar strong {
  font-size: 14px;
}

.log-toolbar span {
  color: #687984;
  font-size: 12px;
}

.order-detail-section + .order-detail-section {
  margin-top: 20px;
}

.order-detail-section h3 {
  margin: 0 0 9px;
  font-size: 15px;
}

#consoleOrderDetailDialog { width:min(980px,calc(100vw - 32px)); min-width:0; max-width:calc(100vw - 32px); box-sizing:border-box; }
#consoleOrderDetailDialog .dialog-body { min-width:0; }
.trace-timeline { display:grid; min-width:0; gap:10px; }
.trace-event { min-width:0; border:1px solid #dce4e1; border-radius:7px; background:#fff; overflow:hidden; }
.trace-event > summary { display:flex; align-items:center; gap:11px; min-height:58px; padding:10px 13px; cursor:pointer; list-style:none; background:#fafbf9; }
.trace-event > summary::-webkit-details-marker { display:none; }
.trace-event[open] > summary { border-bottom:1px solid #e2e7e4; background:#f5f8f6; }
.trace-dot { width:9px; height:9px; flex:0 0 9px; border-radius:50%; background:#a4afb0; box-shadow:0 0 0 4px #edf0ef; }
.trace-dot.success { background:#168578; box-shadow:0 0 0 4px #e2f2ef; }
.trace-dot.failed { background:#c84b45; box-shadow:0 0 0 4px #fae9e7; }
.trace-dot.processing { background:#ba8a31; box-shadow:0 0 0 4px #f8efdc; }
.trace-main { display:grid; gap:3px; min-width:0; flex:1; }
.trace-main strong { font-size:14px; }
.trace-main small { color:#708079; overflow-wrap:anywhere; }
.trace-event-body { display:grid; min-width:0; gap:12px; padding:13px; }
.trace-event-body .status-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
.trace-event-body .status-list,
.trace-event-body .status-list > div,
.trace-event-body .status-list strong { min-width:0; }
.trace-event-body .status-list strong { max-width:70%; }
.trace-raw { min-width:0; border:1px solid #e0e6e3; border-radius:6px; overflow:hidden; }
.trace-raw > div { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; background:#f6f8f7; border-bottom:1px solid #e0e6e3; }
.trace-raw button { min-height:30px; padding:4px 9px; }
.trace-raw pre { min-width:0; max-width:100%; max-height:260px; margin:0; padding:11px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; color:#203431; background:#fff; }
@media (max-width:700px) {
  .trace-event-body .status-list { grid-template-columns:1fr; }
  .trace-event > summary { align-items:flex-start; }
}

/* 商业后台主题；导航结构与页面分类保持不变。 */
body:not(.home-page) { color:var(--ui-ink); background:var(--ui-canvas); }
button.primary { border-color:var(--ui-primary); background:var(--ui-primary); }
button.primary:hover { border-color:var(--ui-primary-hover); background:var(--ui-primary-hover); }
input:focus,select:focus,textarea:focus { border-color:#7fa39b!important; box-shadow:0 0 0 3px rgba(23,107,99,.1)!important; }
.form-msg:not(:empty) { display:block; margin:10px 0; padding:9px 11px; border-left:2px solid var(--ui-danger); color:#934444; background:#fbf2f0; }

/* Home: no fixed illustration or device mockup; all visual elements are responsive HTML. */
.home-page { min-height:100vh; color:var(--lux-ink); background:var(--lux-paper); }
.home-nav { width:min(1240px,calc(100vw - 48px)); min-height:88px; border-bottom:1px solid rgba(18,42,42,.15); }
.home-brand,.home-nav a { color:var(--lux-ink); }
.home-brand span { width:40px; height:40px; border-radius:4px; color:#fff; background:var(--lux-deep); }
.home-brand strong { font-size:18px; }
.home-nav nav { gap:2px; }
.home-nav nav a { color:#53635f; border-radius:3px; }
.home-nav nav a:hover { color:var(--lux-deep); background:#eef2ef; }
.home-hero { position:relative; width:min(1240px,calc(100vw - 48px)); min-height:calc(100vh - 150px); grid-template-columns:minmax(0,1.08fr) minmax(360px,.82fr); gap:8vw; padding:72px 0 100px; }
.home-hero::before { content:""; position:absolute; top:7%; bottom:10%; left:54%; width:1px; background:var(--lux-gold-soft); }
.home-kicker { display:flex; align-items:center; gap:12px; color:var(--lux-muted); font-size:11px; font-weight:700; }
.home-kicker span { padding-right:12px; border-right:1px solid var(--lux-gold); color:var(--lux-gold); }
.home-copy h1 { margin-top:24px; color:var(--lux-deep); font-family:Georgia,"Times New Roman","Microsoft YaHei",serif; font-size:80px; font-weight:500; line-height:.9; }
.home-statement { margin:26px 0 0; color:var(--lux-green); font-family:Georgia,"Times New Roman","Microsoft YaHei",serif; font-size:32px; }
.home-lead { max-width:640px; margin-top:18px; color:#5b6965; font-size:16px; line-height:1.9; }
.home-actions { margin-top:32px; }
.home-primary,.home-secondary { min-width:132px; border-radius:3px; }
.home-primary { color:#fff; background:var(--lux-deep); }
.home-primary:hover { background:var(--lux-green); }
.home-secondary { color:var(--lux-deep); border-color:#9eaaa6; }
.home-assurance { display:flex; flex-wrap:wrap; gap:20px; margin-top:30px; color:#6a7773; font-size:12px; }
.home-assurance span::before { content:""; display:inline-block; width:14px; height:1px; margin-right:8px; background:var(--lux-gold); vertical-align:middle; }
.payment-rail { padding:10px 0; }
.rail-head,.rail-foot { display:flex; align-items:center; justify-content:space-between; color:var(--lux-muted); font-size:10px; }
.rail-head { padding-bottom:18px; border-bottom:1px solid var(--lux-line); }
.rail-head strong { color:var(--lux-green); font-size:12px; }
.payment-rail ol { list-style:none; margin:0; padding:0; }
.payment-rail li { position:relative; display:grid; grid-template-columns:36px 1fr auto; align-items:center; gap:14px; min-height:92px; border-bottom:1px solid var(--lux-line); }
.payment-rail li>span { color:#8a9692; font-family:Georgia,serif; }
.payment-rail li>span::after { content:""; position:absolute; left:31px; top:0; bottom:0; width:1px; background:#dfe4e1; }
.payment-rail li div { display:grid; gap:5px; }
.payment-rail li strong { color:var(--lux-ink); font-size:15px; }.payment-rail li small { color:#7a8682; }.payment-rail li b { color:#89948f; font-size:10px; }
.payment-rail li.complete>span,.payment-rail li.complete>b { color:var(--lux-green); }.payment-rail li.active { background:rgba(181,139,69,.07); }.payment-rail li.active b { color:var(--lux-gold); }
.rail-foot { padding-top:18px; }.rail-foot i { display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; background:#3b8e71; box-shadow:0 0 0 4px rgba(59,142,113,.1); }
.home-capabilities { width:min(1240px,calc(100vw - 48px)); margin:0 auto; padding:80px 0; border-top:1px solid var(--lux-line); display:grid; grid-template-columns:.85fr 1.4fr; gap:9vw; }
.home-capabilities header p { color:var(--lux-gold); font-size:10px; font-weight:800; }.home-capabilities header h2 { max-width:420px; margin:16px 0 0; font-family:Georgia,"Times New Roman","Microsoft YaHei",serif; font-size:40px; font-weight:500; line-height:1.3; }
.capability-list article { display:grid; grid-template-columns:42px 1fr; gap:20px; padding:23px 0; border-bottom:1px solid var(--lux-line); }.capability-list article>span { color:var(--lux-gold); font-family:Georgia,serif; }.capability-list h3 { margin:0 0 8px; font-size:17px; }.capability-list p { margin:0; color:var(--lux-muted); line-height:1.7; }
.home-principles { display:grid; grid-template-columns:repeat(3,1fr); background:var(--lux-deep); color:#fff; }.home-principles div { min-height:220px; padding:48px max(4vw,36px); border-right:1px solid rgba(255,255,255,.14); }.home-principles small { color:var(--lux-gold-soft); }.home-principles strong { display:block; margin:20px 0 10px; font-family:Georgia,"Times New Roman","Microsoft YaHei",serif; font-size:22px; font-weight:500; }.home-principles p { max-width:330px; margin:0; color:rgba(255,255,255,.64); line-height:1.7; }

@media (max-width:900px) {
  .home-nav { width:calc(100vw - 32px); align-items:center; flex-direction:row; padding:0; }.home-nav nav a:nth-child(2) { display:none; }
  .home-hero { width:calc(100vw - 32px); min-height:auto; grid-template-columns:1fr; gap:58px; padding:64px 0 76px; }.home-hero::before { display:none; }.home-copy h1 { font-size:54px; }.home-statement { font-size:25px; }.home-lead { font-size:15px; }.payment-rail { width:100%; }
  .home-capabilities { width:calc(100vw - 32px); grid-template-columns:1fr; gap:28px; padding:60px 0; }.home-capabilities header h2 { font-size:30px; }.home-principles { grid-template-columns:1fr; }.home-principles div { min-height:auto; padding:36px 24px; border-right:0; border-bottom:1px solid rgba(255,255,255,.14); }
}

/* Branded authentication state shared by console, operations, and merchant portals. */
body.login-only { position:relative; background:var(--lux-mist); }
body.login-only::before { content:"ACGEPAY"; position:fixed; left:4vw; bottom:1vh; color:rgba(11,53,50,.035); font-family:Georgia,"Times New Roman",serif; font-size:180px; line-height:.8; pointer-events:none; }
body.login-only .shell { grid-template-columns:minmax(340px,440px); padding:32px 20px; }
body.login-only .sidebar { position:relative; overflow:hidden; gap:22px; padding:30px; border:1px solid rgba(181,150,90,.42); border-radius:7px; color:var(--lux-ink); background:rgba(251,250,247,.98); box-shadow:0 28px 80px rgba(18,42,42,.14); }
body.login-only .sidebar::before { content:""; position:absolute; inset:0 0 auto; height:2px; background:var(--lux-gold); }
body.login-only .brand { min-height:58px; padding-bottom:18px; border-bottom:1px solid var(--lux-line); background:transparent; }
body.login-only .brand-mark { width:46px; height:46px; border-radius:4px; background:var(--lux-deep); box-shadow:none; }
body.login-only .brand strong { color:var(--lux-deep); font-family:Georgia,"Times New Roman","Microsoft YaHei",serif; font-size:19px; font-weight:600; }
body.login-only .brand span { color:var(--lux-gold); font-size:10px; font-weight:700; }
body.login-only .login-panel { gap:9px; padding-top:0; border-top:0; }
body.login-only .login-panel label { color:#586762; font-size:12px; font-weight:700; }
body.login-only .login-panel input { min-height:46px; border-color:#ccd5d1; border-radius:4px; color:var(--lux-ink); background:#fff; }
body.login-only .login-panel input::placeholder { color:#98a29f; }
body.login-only .captcha-button { min-height:44px; border-color:#9eb7b1; border-radius:4px; color:var(--lux-green); background:#f1f6f3; }
body.login-only .image-captcha-box button { border-color:#ccd5d1; border-radius:4px; }
body.login-only #loginBtn { min-height:46px; margin-top:6px; border-radius:4px; background:var(--lux-deep); }
body.login-only #loginBtn:hover { background:var(--lux-green); }
body.login-only .login-panel p { color:#9a7432; }
@media (max-width:520px) {
  body.login-only .shell { grid-template-columns:1fr; padding:16px; }
  body.login-only .sidebar { padding:24px 20px; }
  body.login-only::before { display:none; }
}

.distribution-list { display:grid; gap:18px; }
.distribution-row { display:grid; grid-template-columns:minmax(130px,.8fr) minmax(160px,1.5fr) 64px; align-items:center; gap:16px; }
.distribution-row>div:first-child { display:flex; justify-content:space-between; gap:12px; }
.distribution-row span,.distribution-row small { color:var(--lux-muted); }
.distribution-row>div:nth-child(2) { height:5px; overflow:hidden; background:#e7ebe8; }
.distribution-row i { display:block; height:100%; background:var(--lux-green); }
.distribution-row small { text-align:right; }
.luxury-note { min-height:180px; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; padding:8px 2px; }
.luxury-note::before { content:"ACGEPAY RISK"; margin-bottom:22px; color:var(--lux-gold); font-size:10px; font-weight:800; }
.luxury-note strong { font-family:Georgia,"Times New Roman","Microsoft YaHei",serif; font-size:22px; font-weight:500; }
.luxury-note p { max-width:620px; color:var(--lux-muted); line-height:1.8; }
.luxury-note button { margin-top:8px; border-color:#9eaaa6; color:var(--lux-deep); border-radius:3px; }
.risk-complaint-summary { display:grid; gap:14px; }
.risk-complaint-summary .status-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
.risk-complaint-summary>button { justify-self:start; border-color:#9eaaa6; color:var(--lux-deep); border-radius:3px; }
@media (max-width:720px) {
  .distribution-row { grid-template-columns:1fr 54px; gap:9px; }
  .distribution-row>div:first-child { grid-column:1 / -1; }
}

/* Merchant workspace: operational hierarchy without changing the navigation model. */
.merchant-identity,.merchant-access-hero,.merchant-account-banner { display:flex; align-items:center; gap:18px; margin-bottom:18px; padding:22px 24px; border:1px solid var(--lux-line); border-top-color:var(--lux-gold-soft); border-radius:6px; background:#fff; box-shadow:0 12px 32px rgba(18,42,42,.05); }
.merchant-avatar { flex:0 0 48px; width:48px; height:48px; display:grid; place-items:center; border-radius:4px; color:#fff; background:var(--lux-deep); font-family:Georgia,"Microsoft YaHei",serif; font-size:20px; }
.merchant-identity-main { min-width:0; display:grid; gap:4px; }
.merchant-identity-main>small,.merchant-access-hero small,.merchant-account-banner small,.settlement-balance-strip small { color:var(--lux-gold); font-size:10px; font-weight:800; }
.merchant-identity-main>strong { font-size:20px; }
.merchant-identity-main p { display:flex; align-items:center; gap:9px; margin:0; color:var(--lux-muted); font-size:12px; }
.merchant-identity-main p i { width:1px; height:12px; background:var(--lux-line); }
.merchant-identity-tags { margin-left:auto; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.merchant-identity-tags span { padding:7px 9px; border:1px solid #d9dfdc; border-radius:3px; color:#65716e; background:#f7f8f6; font-size:11px; }
.merchant-identity-tags span.ready { border-color:#bad7cf; color:var(--lux-green); background:#eef7f3; }
.merchant-overview-grid { grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr); }
.section-lead { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 0 16px; }
.section-lead small { color:var(--lux-gold); font-weight:800; }.section-lead p { margin:5px 0 0; color:var(--lux-muted); font-size:12px; }
.merchant-fact-grid { display:grid; grid-template-columns:1fr 1fr; gap:1px; overflow:hidden; border:1px solid var(--lux-line); background:var(--lux-line); }
.merchant-fact { min-height:116px; padding:17px; background:#fff; }.merchant-fact small { color:var(--lux-muted); }.merchant-fact strong { display:block; margin:9px 0 7px; color:var(--lux-ink); font-size:19px; }.merchant-fact p { margin:0; color:#89938f; font-size:11px; line-height:1.5; }.merchant-fact.success strong { color:var(--lux-green); }.merchant-fact.warning strong { color:#9a7432; }
.merchant-quick-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }.merchant-quick-actions button { display:flex; align-items:center; justify-content:space-between; gap:18px; min-width:126px; color:var(--lux-deep); background:#fafbf9; }.merchant-quick-actions button span { color:var(--lux-gold); font-size:18px; line-height:1; }
.merchant-access-hero,.merchant-account-banner { justify-content:space-between; padding:28px 30px; background:#fff; }.merchant-access-hero>div,.merchant-account-banner>div { max-width:720px; }.merchant-access-hero strong,.merchant-account-banner strong { display:block; margin:8px 0; font-family:inherit; font-size:24px; font-weight:700; }.merchant-access-hero p,.merchant-account-banner p { margin:0; color:var(--lux-muted); line-height:1.7; }
.merchant-readiness { flex:0 0 76px; width:76px; height:76px; display:grid; place-items:center; border:1px solid #d7d0be; border-radius:50%; color:#9a7432; font-family:Georgia,serif; font-size:25px; box-shadow:inset 0 0 0 7px #f5f1e8; }.merchant-readiness.ready { color:var(--lux-green); border-color:#a9c9c0; box-shadow:inset 0 0 0 7px #eaf4f0; }.merchant-readiness i { margin-left:28px; margin-top:-38px; font-size:10px; font-style:normal; }
.access-steps { display:grid; }.access-steps article { display:grid; grid-template-columns:38px 1fr auto; align-items:center; gap:14px; padding:16px 0; border-bottom:1px solid var(--lux-line); }.access-steps article>span { color:#9aa4a0; font-family:Georgia,serif; }.access-steps article strong { font-size:14px; }.access-steps article p { margin:4px 0 0; color:var(--lux-muted); font-size:11px; }.access-steps article b { color:#9a7432; font-size:10px; }.access-steps article.done>span,.access-steps article.done>b { color:var(--lux-green); }
.endpoint-list { display:grid; }.endpoint-list>div { display:grid; gap:7px; padding:16px 0; border-bottom:1px solid var(--lux-line); }.endpoint-list small { color:var(--lux-muted); font-size:11px; }.endpoint-list strong,.endpoint-list code { overflow-wrap:anywhere; color:var(--lux-ink); font-size:13px; }
.settlement-balance-strip { display:grid; grid-template-columns:repeat(3,1fr); margin-bottom:18px; border:1px solid var(--lux-line); background:#fff; box-shadow:0 10px 28px rgba(18,42,42,.045); }.settlement-balance-strip article { min-height:130px; padding:24px; border-right:1px solid var(--lux-line); }.settlement-balance-strip article:last-child { border:0; }.settlement-balance-strip strong { display:block; margin:12px 0 7px; font-family:Georgia,"Microsoft YaHei",serif; font-size:25px; font-weight:500; }.settlement-balance-strip p { margin:0; color:var(--lux-muted); font-size:11px; }.settlement-balance-strip article.primary { color:#fff; background:var(--lux-deep); }.settlement-balance-strip article.primary small { color:var(--lux-gold-soft); }.settlement-balance-strip article.primary p { color:rgba(255,255,255,.62); }
.merchant-account-banner>span { padding:8px 11px; border:1px solid #bad7cf; border-radius:3px; color:var(--lux-green); background:#eef7f3; font-size:11px; }

/* Settlement methods: capability overview plus the existing modal editors. */
.settings-page.single { width:100%; grid-template-columns:minmax(0,1fr); }
.settings-card.config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:0; border:0; background:transparent; box-shadow:none; }
.settings-card.config-grid>.settings-card-head { grid-column:1/-1; display:flex; align-items:flex-end; justify-content:space-between; min-height:92px; margin:0 0 6px; padding:0 0 22px; border-bottom:1px solid var(--lux-line); }
.settings-card.config-grid>.settings-card-head::after { content:none; }
.settings-card.config-grid>.settings-card-head h2 { margin-bottom:8px; color:var(--lux-ink); font-family:inherit; font-size:21px; font-weight:700; }
.settings-card.config-grid>.settings-card-head p { max-width:720px; color:var(--lux-muted); }
.settings-card.config-grid>.setting-item { align-content:space-between; min-height:126px; margin:0; padding:17px 18px; border:1px solid var(--lux-line); border-top:2px solid #d2d8d4; border-radius:4px; background:#fff; transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease; }
.settings-card.config-grid>.setting-item:last-child { padding-bottom:17px; border-bottom:1px solid var(--lux-line); }
.settings-card.config-grid>.setting-item:hover { border-top-color:var(--lux-gold); box-shadow:0 8px 20px rgba(18,42,42,.045); }
.settings-card.config-grid>.setting-item label span { color:var(--lux-ink); font-size:14px; }
.settings-card.config-grid>.setting-item label small { max-width:520px; color:var(--lux-muted); }
.settings-card.config-grid>.setting-item .setting-summary { margin-top:16px; padding-top:13px; border-top:1px solid #edf0ed; }
.settings-card.config-grid>.setting-item .setting-summary strong { color:#42534f; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:12px; }
.settings-card.config-grid>.setting-item .setting-summary button { min-width:76px; border-color:#cbd4d0; color:var(--lux-deep); background:#fafbf9; }
.settings-card.config-grid>.setting-toggle-item { grid-template-columns:minmax(0,1fr) auto; align-items:center; }
.settings-card.config-grid>.setting-toggle-item>.setting-switch { align-self:center; margin:0 0 0 18px; }
.settings-card.config-grid:has(>.setting-item:nth-child(2):last-child)>.setting-item { grid-column:1/-1; }
.settings-card.config-grid>.setting-item:last-child:nth-child(even) { grid-column:1/-1; }
.fixed-endpoint-note { display:grid; gap:6px; padding:13px 14px; border:1px solid #dce3df; border-left:2px solid var(--lux-gold); border-radius:4px; background:#f7f9f7; }
.fixed-endpoint-note small { color:var(--lux-muted); font-size:10px; }.fixed-endpoint-note code { overflow-wrap:anywhere; color:var(--lux-deep); font-size:12px; }.fixed-endpoint-note span { color:var(--lux-muted); font-size:11px; }
.proxy-overview-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:18px; border:1px solid var(--lux-line); background:#fff; }
.proxy-overview-strip article { min-height:112px; padding:18px; border-right:1px solid var(--lux-line); }.proxy-overview-strip article:last-child { border:0; }
.proxy-overview-strip small,.ip-active-route small { color:var(--lux-gold); font-size:10px; font-weight:800; }.proxy-overview-strip strong,.ip-active-route strong { display:block; margin:9px 0 6px; color:var(--lux-ink); font-size:17px; }.proxy-overview-strip p,.ip-active-route p { margin:0; color:var(--lux-muted); font-size:11px; line-height:1.5; }
.ip-active-route { display:grid; grid-template-columns:1fr 1fr; margin-bottom:18px; border:1px solid var(--lux-line); border-top:2px solid var(--lux-gold); background:#fff; }
.ip-active-route>div { min-height:116px; padding:20px; border-right:1px solid var(--lux-line); }.ip-active-route>div:last-child { border:0; }.ip-active-route strong { font-family:Georgia,ui-monospace,monospace; font-size:22px; font-weight:500; overflow-wrap:anywhere; }
.settings-page.single:has(.settlement-methods-card) { width:100%; max-width:none; grid-template-columns:minmax(0,1fr); }
.settlement-methods-card { width:100%; }
.settlement-settings-head { display:flex; align-items:flex-end; justify-content:space-between; gap:30px; padding-bottom:24px; }
.settlement-settings-head>div:first-child>small { color:var(--lux-gold); font-size:9px; font-weight:800; }.settlement-settings-head h2 { margin-top:7px; }.settlement-settings-summary { display:grid; grid-template-columns:repeat(3,minmax(110px,1fr)); min-width:min(520px,48vw); border:1px solid var(--lux-line); }.settlement-settings-summary span { padding:13px 16px; border-right:1px solid var(--lux-line); }.settlement-settings-summary span:last-child { border:0; }.settlement-settings-summary small,.settlement-default-row small,.settlement-review-row small { display:block; color:var(--lux-muted); font-size:10px; }.settlement-settings-summary strong { display:block; margin-top:6px; font-size:14px; }
.settlement-default-row,.settlement-review-row { display:flex; align-items:center; justify-content:space-between; gap:28px; margin:20px 0; padding:20px; border:1px solid var(--lux-line); background:#fafbf9; }.settlement-default-row strong,.settlement-review-row strong { display:block; margin:6px 0; font-size:17px; }.settlement-default-row p,.settlement-review-row p { margin:0; color:var(--lux-muted); font-size:11px; }.settlement-default-row>.setting-item,.settlement-review-row>.setting-item { flex:0 0 160px; padding:0; border:0; }.settlement-default-row>.setting-item>label,.settlement-review-row>.setting-item>label { display:none; }
.settlement-method-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.settlement-method-tile { position:relative; display:grid; grid-template-columns:42px 1fr; gap:15px; min-height:170px; padding:20px; border:1px solid var(--lux-line); border-top:2px solid #c8ceca; background:#fff; }.settlement-method-tile.enabled { border-top-color:var(--lux-gold); box-shadow:0 9px 24px rgba(18,42,42,.05); }.settlement-method-mark { width:42px; height:42px; display:grid; place-items:center; border:1px solid #cad4d0; border-radius:4px; color:var(--lux-green); background:#f2f6f4; font-weight:800; }.settlement-method-tile>div:nth-child(2)>small { color:var(--lux-muted); font-size:10px; }.settlement-method-tile.enabled>div:nth-child(2)>small { color:var(--lux-green); }.settlement-method-tile>div:nth-child(2)>strong { display:block; margin:7px 0; font-size:17px; }.settlement-method-tile>div:nth-child(2)>p { margin:0; color:var(--lux-muted); font-size:11px; line-height:1.6; }.settlement-method-tile>.setting-item { position:absolute; right:18px; bottom:16px; padding:0; border:0; }.settlement-method-tile>.setting-item>label,.settlement-method-tile .setting-summary>strong { display:none; }
.settlement-review-row { margin-bottom:0; border-left:2px solid var(--lux-gold); }
.setting-switch { min-width:94px; display:inline-flex; align-items:center; justify-content:flex-end; gap:9px; padding:7px 9px; border-color:#ccd5d1; border-radius:18px; color:#6e7a76; background:#f5f7f5; }
.setting-switch i { position:relative; width:30px; height:16px; flex:0 0 30px; border-radius:10px; background:#b8c0bd; transition:background .18s ease; }
.setting-switch i::after { content:""; position:absolute; top:2px; left:2px; width:12px; height:12px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.18); transition:transform .18s ease; }
.setting-switch strong { min-width:32px; color:inherit; font-size:11px; font-weight:700; text-align:left; }
.setting-switch.is-on { border-color:#9fc5bb; color:var(--lux-green); background:#edf7f3; }
.setting-switch.is-on i { background:var(--lux-green); }.setting-switch.is-on i::after { transform:translateX(14px); }
.setting-switch.is-saving { cursor:wait; opacity:.72; }.setting-switch:disabled { color:#79837f; }
.setting-toggle-item>.setting-switch { margin-left:auto; }
.settlement-method-tile>.setting-toggle-item { position:absolute; right:18px; bottom:16px; width:auto; }
.settlement-method-tile>.setting-toggle-item>.setting-switch { margin:0; }
.settlement-default-row>.setting-toggle-item,.settlement-review-row>.setting-toggle-item { flex-basis:auto; }
@media (max-width:900px) { .merchant-overview-grid,.settlement-method-grid,.settings-card.config-grid { grid-template-columns:1fr; }.settings-card.config-grid>.settings-card-head,.settings-card.config-grid>.setting-item { grid-column:1; }.proxy-overview-strip { grid-template-columns:1fr 1fr; }.proxy-overview-strip article:nth-child(2) { border-right:0; }.proxy-overview-strip article { border-bottom:1px solid var(--lux-line); }.proxy-overview-strip article:nth-last-child(-n+2) { border-bottom:0; }.settlement-settings-head { align-items:stretch; flex-direction:column; }.settlement-settings-summary { min-width:0; width:100%; }.settlement-balance-strip { grid-template-columns:1fr; }.settlement-balance-strip article { border-right:0; border-bottom:1px solid var(--lux-line); } }
@media (max-width:600px) { .merchant-identity,.merchant-access-hero,.merchant-account-banner { align-items:flex-start; flex-wrap:wrap; padding:18px; }.merchant-identity-tags { width:100%; margin-left:66px; justify-content:flex-start; }.merchant-readiness { width:64px; height:64px; flex-basis:64px; }.merchant-fact-grid,.settlement-settings-summary,.proxy-overview-strip,.ip-active-route { grid-template-columns:1fr; }.proxy-overview-strip article,.proxy-overview-strip article:nth-child(2),.proxy-overview-strip article:nth-last-child(-n+2),.ip-active-route>div { border-right:0; border-bottom:1px solid var(--lux-line); }.proxy-overview-strip article:last-child,.ip-active-route>div:last-child { border-bottom:0; }.settlement-settings-summary span { border-right:0; border-bottom:1px solid var(--lux-line); }.settlement-default-row,.settlement-review-row { align-items:stretch; flex-direction:column; }.settlement-default-row>.setting-item,.settlement-review-row>.setting-item { width:100%; flex-basis:auto; }.access-steps article { grid-template-columns:30px 1fr; }.access-steps article b { grid-column:2; }.settings-card.config-grid { padding:0; }.settings-card.config-grid>.settings-card-head { align-items:flex-start; flex-direction:column; min-height:0; }.settings-card.config-grid>.setting-item { min-height:114px; }.settings-card.config-grid>.setting-toggle-item { grid-template-columns:1fr; }.settings-card.config-grid>.setting-toggle-item>.setting-switch { width:94px; justify-self:start; margin:16px 0 0; } }

.settings-card-badge { align-self:center; padding:5px 9px; border:1px solid #bad7cc; border-radius:4px; color:#116f63; background:#eef8f4; font-size:12px; font-weight:700; }
.settings-card-badge.is-admin { border-color:#e2c995; color:#8b6112; background:#fff9ea; }
.setting-group-span { grid-column:1/-1; display:flex; align-items:baseline; gap:10px; padding:14px 18px 8px; border-top:1px solid var(--lux-line); }
.setting-group-span strong { font-size:13px; }
.setting-group-span small { color:var(--muted); font-size:11px; }
.transfer-capability-strip,.merchant-transfer-policy { display:flex; align-items:center; gap:12px; margin:0 0 14px; padding:11px 12px; border:1px solid var(--lux-line); border-radius:5px; background:#f8faf9; }
.transfer-capability-strip span { min-width:0; flex:1; color:var(--muted); font-size:12px; line-height:1.6; }
.merchant-transfer-policy strong { flex:1; font-size:13px; }
.merchant-transfer-policy>small { color:var(--muted); font-size:11px; }
.transfer-create-form .form-field-wide { grid-column:1/-1; }

.red-packet-body { min-height:100vh; margin:0; color:#172521; background:#f3f5f4; font-family:Inter,"Microsoft YaHei",Arial,sans-serif; }
.red-packet-shell { width:min(430px,calc(100% - 28px)); margin:0 auto; padding:34px 0 max(26px,env(safe-area-inset-bottom)); }
.red-packet-brand { display:flex; align-items:center; gap:10px; margin:0 0 18px; }
.red-packet-brand>span { display:grid; width:38px; height:38px; place-items:center; border-radius:6px; color:#fff; background:#c7443e; font-size:21px; font-weight:800; }
.red-packet-brand div { display:flex; flex-direction:column; }
.red-packet-brand strong { font-family:Georgia,"Songti SC",serif; font-size:17px; }
.red-packet-brand small { margin-top:2px; color:#73807b; font-size:10px; }
.red-packet-card { position:relative; overflow:hidden; padding:28px; border:1px solid #dfe5e2; border-top:3px solid #c7443e; border-radius:7px; background:#fff; box-shadow:0 18px 45px rgba(20,39,32,.09); }
.red-packet-mark { position:absolute; top:22px; right:24px; display:grid; width:42px; height:42px; place-items:center; border:1px solid #efd3d0; border-radius:50%; color:#c7443e; background:#fff7f6; font-size:22px; font-weight:800; }
.red-packet-copy { padding-right:54px; }
.red-packet-copy>small { color:#a33732; font-size:11px; font-weight:700; }
.red-packet-copy h1 { margin:6px 0; font-size:21px; line-height:1.35; letter-spacing:0; }
.red-packet-copy p { margin:0; color:#697671; font-size:13px; line-height:1.55; }
.red-packet-amount { margin:26px 0 22px; padding:18px 0; border-top:1px solid #edf0ee; border-bottom:1px solid #edf0ee; }
.red-packet-amount small { display:block; color:#77837e; font-size:11px; }
.red-packet-amount strong { display:block; margin-top:5px; font-size:38px; line-height:1; letter-spacing:0; }
.red-packet-amount i { margin-right:5px; font-size:18px; font-style:normal; }
.red-packet-facts { display:grid; gap:8px; margin:0 0 20px; }
.red-packet-facts div { display:grid; grid-template-columns:72px minmax(0,1fr); gap:8px; font-size:12px; }
.red-packet-facts dt { color:#7b8782; }
.red-packet-facts dd { min-width:0; margin:0; overflow-wrap:anywhere; text-align:right; }
.red-packet-state { display:flex; gap:11px; padding:13px; border:1px solid #dfe8e4; border-radius:5px; background:#f5f9f7; }
.red-packet-state>span { width:9px; height:9px; flex:0 0 9px; margin-top:5px; border-radius:50%; background:#1b8a79; box-shadow:0 0 0 4px #dcefea; }
.red-packet-state strong { font-size:13px; }
.red-packet-state p { margin:3px 0 0; color:#64716c; font-size:11px; line-height:1.55; }
.red-packet-card.status-failed .red-packet-state>span,.red-packet-card.status-expired .red-packet-state>span,.red-packet-card.status-cancelled .red-packet-state>span { background:#b94943; box-shadow:0 0 0 4px #f4dfdd; }
.red-packet-card.status-success .red-packet-state>span { background:#168068; box-shadow:0 0 0 4px #dcefe8; }
.red-packet-notice { margin:12px 0 0; padding:9px 11px; border-left:3px solid #c28b2c; color:#765417; background:#fff9eb; font-size:11px; line-height:1.55; }
.red-packet-primary,.red-packet-secondary { width:100%; min-height:44px; margin-top:16px; border-radius:5px; font-weight:700; }
.red-packet-primary { border-color:#b93b36; color:#fff; background:#c7443e; }
.red-packet-primary:hover { background:#ae3732; }
.red-packet-secondary { color:#31544a; background:#fff; }
.red-packet-shell footer { display:flex; flex-direction:column; align-items:center; gap:4px; margin-top:16px; color:#75817d; font-size:11px; }
.red-packet-shell footer small { font-size:10px; }
@media (max-width:600px) { .setting-group-span { align-items:flex-start; flex-direction:column; gap:3px; }.transfer-capability-strip,.merchant-transfer-policy { align-items:flex-start; flex-direction:column; }.red-packet-shell { padding-top:20px; }.red-packet-card { padding:22px; }.red-packet-amount strong { font-size:34px; } }

#cashierEndpointsDialog { width:min(760px,calc(100vw - 32px)); }
.cashier-endpoints-form { width:100%; min-width:0; box-sizing:border-box; overflow:hidden; }
.cashier-endpoint-guide { display:grid; grid-template-columns:auto 1fr; gap:12px; align-items:start; margin-bottom:14px; padding:13px 15px; border-left:3px solid var(--lux-gold); background:#f7f8f5; color:#66746f; font-size:12px; line-height:1.65; }
.cashier-endpoint-guide strong { color:var(--lux-ink); white-space:nowrap; }
.cashier-endpoint-list { display:grid; min-width:0; gap:10px; }
.cashier-endpoint-row { display:grid; width:100%; min-width:0; box-sizing:border-box; grid-template-columns:minmax(0,1fr) 112px 42px; gap:10px; align-items:end; padding:14px; border:1px solid var(--lux-line); border-radius:5px; background:#fff; }
.cashier-endpoint-row .form-field { width:100%; min-width:0; }
.cashier-endpoint-row .form-field input { width:100%; min-width:0; box-sizing:border-box; }
.cashier-endpoint-row .cashier-weight-field input { text-align:center; font-variant-numeric:tabular-nums; }
.cashier-endpoint-remove { width:42px; height:42px; min-width:42px; padding:0; color:#a44742; }
.cashier-endpoint-remove .button-icon { margin:0; }
.cashier-endpoint-add { justify-self:start; margin-top:12px; }
.cashier-endpoints-form>.modal-actions,.cashier-endpoints-form>.form-msg { width:100%; min-width:0; box-sizing:border-box; }
@media (max-width:700px) {
  #cashierEndpointsDialog { width:calc(100vw - 16px); }
  .cashier-endpoint-guide { grid-template-columns:1fr; }
  .cashier-endpoint-row { grid-template-columns:minmax(0,1fr) 90px; }
  .cashier-endpoint-row>.form-field:first-child { grid-column:1/-1; }
  .cashier-endpoint-remove { grid-column:2; grid-row:2; justify-self:end; }
}

.mail-plugin-setting { grid-column:1/-1; display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:16px; padding:20px; border:1px solid var(--lux-line); border-left:3px solid var(--lux-gold); border-radius:5px; background:#fff; }
.mail-plugin-setting .mail-plugin-mark { display:grid; width:48px; height:48px; place-items:center; border-radius:4px; color:#fff; background:var(--lux-deep); font:600 22px Georgia,serif; }
.mail-plugin-setting strong { display:block; margin-bottom:5px; color:var(--lux-ink); font-size:15px; }
.mail-plugin-setting p,.mail-plugin-setting small { display:block; margin:0; color:var(--lux-muted); line-height:1.7; }
.mail-plugin-setting small { margin-top:2px; font-size:11px; }
.mail-plugin-loading { padding:56px 20px; color:var(--lux-muted); text-align:center; }
.mail-plugin-form { display:grid; gap:16px; }
.mail-plugin-form-intro { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 18px; border:1px solid var(--lux-line); border-left:3px solid var(--lux-gold); background:#fff; }
.mail-plugin-form-intro small { color:var(--lux-gold); font-size:9px; font-weight:800; }
.mail-plugin-form-intro strong { display:block; margin:4px 0; color:var(--lux-ink); font:550 20px Georgia,"Microsoft YaHei",serif; }
.mail-plugin-form-intro p { margin:0; color:var(--lux-muted); }
@media (max-width:760px) { .mail-plugin-setting { grid-template-columns:44px 1fr; }.mail-plugin-setting button { grid-column:1/-1; width:100%; }.notification-sms-variable-row { grid-template-columns:minmax(0,1fr) auto; }.notification-sms-variable-row>span { display:none; } }

/* Complaint center: compact operational workspace with channel-level controls. */
.complaint-page-tools { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:16px; }
.complaint-page-tools .risk-rule-tabs { flex:1 1 auto; }
.complaint-page-tools>button { flex:0 0 auto; }
#channelComplaintDialog { width:min(820px,calc(100vw - 32px)); }
.channel-plugin-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:14px; }
.channel-plugin-heading strong { display:block; color:var(--lux-ink); font-size:14px; }
.channel-plugin-heading small { display:block; margin-top:4px; color:var(--lux-muted); font-size:11px; line-height:1.5; }
.channel-complaint-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); overflow:hidden; border:1px solid var(--lux-line); border-top:2px solid var(--lux-gold); background:#fff; }
.channel-complaint-overview>div { min-width:0; min-height:92px; padding:15px; border-right:1px solid var(--lux-line); }
.channel-complaint-overview>div:last-child { border-right:0; }
.channel-complaint-overview span { display:block; margin-bottom:8px; color:var(--lux-muted); font-size:10px; font-weight:700; }
.channel-complaint-overview strong { display:block; overflow-wrap:anywhere; color:var(--lux-ink); font-size:12px; line-height:1.55; }
.channel-complaint-overview strong.success { color:var(--lux-green); }
.channel-complaint-overview strong.warning { color:#936d2b; }
.channel-complaint-overview strong.danger { color:#a24642; }
.channel-complaint-loading { grid-column:1/-1; display:grid; min-height:88px; place-items:center; color:var(--lux-muted); }
.channel-complaint-sources { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.channel-complaint-source { display:grid; grid-template-columns:18px minmax(0,1fr); align-items:start; gap:10px; min-width:0; padding:13px; border:1px solid #d8e0dc; border-radius:4px; color:var(--lux-ink); background:#fff; cursor:pointer; }
.channel-complaint-source:has(input:checked) { border-color:#83b5aa; box-shadow:inset 3px 0 var(--lux-green); }
.channel-complaint-source input { width:16px; height:16px; margin-top:2px; accent-color:var(--lux-green); }
.channel-complaint-source strong,.channel-complaint-source small { display:block; overflow-wrap:anywhere; }
.channel-complaint-source strong { font-size:13px; }
.channel-complaint-source small { margin-top:5px; color:var(--lux-muted); font-size:10px; line-height:1.6; }
.channel-complaint-callback .copy-field input { min-width:0; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:12px; }

#complaintDetailDialog { width:min(1120px,calc(100vw - 32px)); max-height:min(860px,calc(100dvh - 24px)); }
.complaint-detail-loading { display:grid; min-height:260px; place-items:center; color:var(--lux-muted); }
.complaint-detail-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(280px,.72fr); gap:22px; min-width:0; }
.complaint-detail-main { min-width:0; }
.complaint-detail-section { min-width:0; padding:0 0 22px; margin-bottom:22px; border-bottom:1px solid var(--lux-line); }
.complaint-detail-section:last-child { margin-bottom:0; border-bottom:0; }
.complaint-detail-section>h3 { margin:0 0 14px; color:var(--lux-ink); font-size:15px; }
.complaint-detail-section .status-list { grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; overflow:hidden; border:1px solid var(--lux-line); background:var(--lux-line); }
.complaint-detail-section .status-list>div { min-width:0; min-height:74px; padding:12px 13px; border:0; background:#fff; }
.complaint-detail-section .status-list span { color:var(--lux-muted); font-size:10px; }
.complaint-detail-section .status-list strong { display:block; margin-top:7px; overflow-wrap:anywhere; color:var(--lux-ink); font-size:12px; }
.complaint-copy { padding:16px 18px; border-left:3px solid var(--lux-gold); background:#f8f9f6; }
.complaint-copy strong { color:var(--lux-ink); font-size:15px; }
.complaint-copy p { margin:7px 0; color:#7f632e; font-size:12px; }
.complaint-copy pre { margin:10px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; color:#4f5d59; font:12px/1.75 inherit; }
.complaint-action-pane { position:sticky; top:0; align-self:start; display:grid; gap:13px; min-width:0; padding:18px; border:1px solid var(--lux-line); border-top:2px solid var(--lux-gold); border-radius:5px; background:#fafbf9; }
.complaint-action-head { padding-bottom:13px; border-bottom:1px solid var(--lux-line); }
.complaint-action-head strong,.complaint-action-head small { display:block; }
.complaint-action-head strong { color:var(--lux-ink); font-size:16px; }
.complaint-action-head small { margin-top:5px; color:var(--lux-muted); font-size:10px; line-height:1.5; }
.complaint-action-pane form { display:grid; gap:10px; padding-bottom:13px; border-bottom:1px solid var(--lux-line); }
.complaint-action-pane form>label { display:grid; gap:6px; min-width:0; color:#52615d; font-size:11px; }
.complaint-action-pane input,.complaint-action-pane select,.complaint-action-pane textarea { width:100%; min-width:0; box-sizing:border-box; }
.complaint-action-pane fieldset { display:grid; gap:7px; margin:0; padding:10px; border:1px solid var(--lux-line); }
.complaint-action-pane legend { padding:0 5px; color:var(--lux-muted); font-size:10px; }
.complaint-file-choice { display:flex!important; align-items:center; grid-template-columns:none!important; gap:7px!important; }
.complaint-file-choice input { width:15px; height:15px; }
.complaint-timeline { position:relative; display:grid; gap:0; }
.complaint-timeline article { display:grid; grid-template-columns:18px minmax(0,1fr); gap:11px; min-width:0; }
.complaint-timeline article>i { position:relative; width:9px; height:9px; margin-top:17px; border:2px solid #fff; border-radius:50%; background:var(--lux-gold); box-shadow:0 0 0 1px var(--lux-gold); }
.complaint-timeline article>i::after { content:""; position:absolute; top:10px; left:3px; width:1px; height:calc(100% + 72px); background:#d8dfdb; }
.complaint-timeline article:last-child>i::after { display:none; }
.complaint-timeline article>div { min-width:0; padding:13px 15px; border-bottom:1px solid var(--lux-line); }
.complaint-timeline header,.complaint-timeline footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.complaint-timeline header strong { font-size:13px; }.complaint-timeline header span,.complaint-timeline footer>span { color:var(--lux-muted); font-size:10px; }
.complaint-timeline p { margin:8px 0; overflow-wrap:anywhere; color:#53615d; font-size:12px; line-height:1.65; }
.complaint-files { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.complaint-files a { display:grid; grid-template-columns:24px minmax(0,1fr); gap:2px 9px; min-width:0; padding:12px; border:1px solid var(--lux-line); color:var(--lux-ink); background:#fff; text-decoration:none; }
.complaint-files a:hover { border-color:#9ebdb5; }
.complaint-files a>span { grid-row:1/3; color:var(--lux-green); }.complaint-files strong,.complaint-files small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.complaint-files strong { font-size:12px; }.complaint-files small { color:var(--lux-muted); font-size:10px; }
.complaint-closed-note { margin:0; padding:12px; color:#6c7773; background:#eef2ef; font-size:11px; line-height:1.6; }

@media (max-width:900px) {
  .channel-complaint-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .channel-complaint-overview>div:nth-child(2) { border-right:0; }
  .channel-complaint-overview>div:nth-child(-n+2) { border-bottom:1px solid var(--lux-line); }
  .complaint-detail-grid { grid-template-columns:1fr; }
  .complaint-action-pane { position:static; }
}
@media (max-width:620px) {
  .complaint-page-tools { align-items:stretch; flex-direction:column; }
  .complaint-page-tools>button { width:100%; }
  .channel-plugin-heading { align-items:flex-start; flex-direction:column; }
  .channel-plugin-heading .notification-switch { width:auto; margin:0; }
  .channel-complaint-sources,.complaint-files { grid-template-columns:1fr; }
  .channel-complaint-callback .copy-field { grid-template-columns:minmax(0,1fr); }
  .channel-complaint-callback .copy-field button { width:100%; }
  .complaint-detail-section .status-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #channelComplaintDialog .modal-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  #channelComplaintDialog .modal-actions button { width:100%; min-width:0; padding-inline:8px; white-space:nowrap; }
}
:root .registration-agreement{display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.7}
:root .registration-agreement input[type="checkbox"]{flex:0 0 17px;width:17px;height:17px;min-height:17px;margin:3px 0;accent-color:#2860d9}
:root .registration-agreement span{font-weight:400}
.login-agreement{font-size:12px;color:#64748b;text-align:center;display:block;margin-top:12px}
