:root {
  color-scheme: dark;
  --bg: oklch(11% 0.025 245);
  --bg-soft: oklch(16% 0.035 245);
  --panel: oklch(18% 0.045 245 / 0.92);
  --panel-strong: oklch(21% 0.055 245);
  --line: oklch(39% 0.07 235 / 0.55);
  --line-gold: oklch(72% 0.13 82 / 0.62);
  --text: oklch(94% 0.012 86);
  --muted: oklch(73% 0.018 95);
  --gold: oklch(78% 0.16 82);
  --gold-strong: oklch(86% 0.14 86);
  --green: oklch(72% 0.16 156);
  --red: oklch(63% 0.2 28);
  --orange: oklch(75% 0.17 58);
  --blue: oklch(69% 0.13 238);
  --shadow: 0 22px 80px oklch(5% 0.03 245 / 0.45);
  --radius: 18px;
  font-family: "Inter", "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at top left, oklch(24% 0.09 152 / 0.46), transparent 34rem),
    radial-gradient(circle at 85% 10%, oklch(61% 0.12 82 / 0.18), transparent 28rem),
    linear-gradient(135deg, oklch(8% 0.025 240), oklch(14% 0.04 160) 52%, oklch(8% 0.02 250));
  color: var(--text);
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.is-hidden {
  display: none !important;
}

.session-loading-view,
.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.session-loading-view {
  min-height: 100svh;
}

.session-loading-panel {
  width: min(360px, 100%);
  text-align: center;
}

.session-loading-panel img {
  display: block;
  width: min(210px, 100%);
  height: auto;
  margin: 0 auto 14px;
}

.session-loading-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.session-loading-spinner {
  width: 32px;
  height: 32px;
  margin: 32px auto 20px;
  border: 2px solid var(--line-gold);
  border-top-color: var(--gold-strong);
  border-radius: 50%;
  animation: session-loading-spin 0.9s linear infinite;
}

.session-loading-panel h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
}

.session-loading-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@keyframes session-loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .session-loading-spinner {
    animation: none;
  }
}

.login-panel {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid var(--line-gold);
  border-radius: 26px;
  background:
    linear-gradient(160deg, oklch(19% 0.05 155 / 0.95), oklch(12% 0.04 245 / 0.98)),
    repeating-linear-gradient(135deg, transparent 0 18px, oklch(80% 0.12 86 / 0.04) 18px 19px);
  box-shadow: var(--shadow);
}

.brand-lockup,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup img,
.sidebar-brand img {
  width: 170px;
  height: auto;
  display: block;
}

.brand-lockup span,
.sidebar-brand span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.login-panel h1 {
  margin: 28px 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
}

.muted,
.panel p,
.compact-item small,
.promo-card p,
.provider-card p {
  color: var(--muted);
}

.stack-form,
.form-grid,
.toolbar {
  display: grid;
  gap: 14px;
}

.stack-form {
  margin-top: 26px;
}

label span,
.image-upload-field > span {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid oklch(39% 0.07 155 / 0.62);
  border-radius: 12px;
  padding: 0 14px;
  background: oklch(9% 0.025 240 / 0.72);
  color: var(--text);
  outline: none;
}

input[readonly],
select[readonly],
textarea[readonly] {
  background: oklch(14% 0.02 240 / 0.72);
  color: var(--muted);
  cursor: not-allowed;
  border-color: oklch(30% 0.05 155 / 0.4);
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px oklch(78% 0.16 82 / 0.16);
}

.primary-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 900;
  color: oklch(12% 0.02 140);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.primary-btn {
  background: linear-gradient(135deg, oklch(92% 0.12 89), oklch(76% 0.18 73));
  box-shadow: 0 12px 34px oklch(74% 0.17 74 / 0.24);
}

.ghost-btn,
.icon-btn {
  color: var(--gold-strong);
  background: oklch(13% 0.035 155 / 0.75);
  border: 1px solid var(--line-gold);
}

.danger-btn {
  color: oklch(97% 0.01 70);
  background: linear-gradient(135deg, oklch(64% 0.2 28), oklch(48% 0.18 28));
}

.form-message {
  min-height: 20px;
  color: var(--orange);
  font-weight: 800;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 22px 18px;
  background: oklch(10% 0.03 245 / 0.96);
  border-right: 1px solid var(--line);
}

.sidebar-brand {
  padding: 4px 8px 24px;
  border-bottom: 1px solid var(--line);
}

.nav-menu {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px 0;
  overflow-y: auto;
}

.nav-link {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-weight: 850;
}

.nav-link i {
  color: var(--gold);
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--text);
  background: oklch(21% 0.055 155 / 0.76);
  border-color: var(--line-gold);
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-link-parent {
  min-height: 46px;
  grid-template-columns: 24px 1fr 16px;
}

.nav-submenu {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  overflow: hidden;
}

.nav-submenu[hidden] {
  display: none;
}

.nav-chevron {
  justify-self: end;
  font-size: 12px;
  transition: transform 180ms ease-out;
}

.nav-group.is-open .nav-chevron {
  transform: rotate(180deg);
}

.nav-sublink {
  min-height: 38px;
  grid-template-columns: 18px 1fr;
  border-radius: 11px;
  padding: 0 12px;
  font-size: 13px;
}

.nav-sublink i {
  font-size: 12px;
}

.nav-sublink.is-active {
  background: oklch(16% 0.048 155 / 0.9);
}

.sidebar-foot {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.operator-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: oklch(16% 0.04 155 / 0.75);
  border: 1px solid var(--line);
}

.operator-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.operator-card.clickable {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  font-family: inherit;
  font-size: 14px;
  text-decoration: none;
}

.operator-card.clickable strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.operator-card.clickable:hover {
  background: oklch(21% 0.055 155 / 0.95);
  border-color: var(--line-gold);
}

.operator-card.clickable:hover i {
  transform: rotate(30deg);
}

.operator-card.clickable i {
  transition: transform 0.25s ease;
}

.operator-card.clickable.is-active {
  background: oklch(21% 0.055 155 / 0.95);
  border-color: var(--gold);
  box-shadow: 0 0 12px oklch(75% 0.15 135 / 0.2);
}

.main-panel {
  min-width: 0;
  padding: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: -24px -24px 22px;
  padding: 20px 24px;
  background: oklch(10% 0.03 245 / 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar h2,
.panel h3 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.content-section {
  display: none;
  gap: 18px;
  animation: reveal 0.25s ease-out;
}

.content-section.is-active {
  display: grid;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, oklch(18% 0.045 155 / 0.93), oklch(12% 0.035 245 / 0.96)),
    repeating-linear-gradient(135deg, transparent 0 22px, oklch(78% 0.14 82 / 0.035) 22px 23px);
  box-shadow: 0 18px 45px oklch(5% 0.03 245 / 0.25);
}

.metric-card {
  min-height: 140px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  gap: 6px;
}

.metric-card i {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: oklch(75% 0.16 82 / 0.2);
  color: var(--gold);
}

.metric-card span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.metric-card strong {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
}

.metric-sub {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
  opacity: 0.85;
}

.metric-card.good i,
.status-badge.success,
.type-plus {
  color: var(--green);
}

.metric-card.warn i,
.type-minus {
  color: var(--red);
}

.two-column,
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
}

.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1280px) {
  .split-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head p {
  margin: 4px 0 0;
  font-size: 13px;
}

.report-hero-panel {
  display: grid;
  gap: 16px;
}

.report-head {
  align-items: center;
}

.report-today-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.successful-deposit-summary-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.report-range-pill {
  max-width: min(100%, 360px);
  text-align: center;
  white-space: normal;
}

.successful-deposit-filter {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid oklch(45% 0.1 82 / 0.58);
  border-radius: 16px;
  background:
    linear-gradient(135deg, oklch(17% 0.055 82 / 0.28), transparent 42%),
    oklch(8% 0.025 155 / 0.76);
  box-shadow: inset 0 1px 0 oklch(90% 0.08 82 / 0.06);
}

.successful-deposit-filter::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -70px;
  bottom: -105px;
  border-radius: 50%;
  background: oklch(76% 0.16 82 / 0.12);
  filter: blur(1px);
  pointer-events: none;
}

.successful-deposit-filter-head,
.successful-deposit-range-fields {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.successful-deposit-filter-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.filter-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 900;
}

.filter-kicker i {
  color: var(--gold);
}

.successful-deposit-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(98px, 1fr));
  gap: 7px;
}

.successful-deposit-presets .date-preset-btn {
  min-height: 36px;
  padding-inline: 12px;
}

.successful-deposit-range-fields {
  justify-content: flex-start;
}

.successful-deposit-date-field {
  display: grid;
  flex: 1 1 230px;
  max-width: 290px;
  gap: 6px;
}

.successful-deposit-date-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.successful-deposit-date-field input {
  width: 100%;
  min-height: 44px;
  border-color: oklch(43% 0.07 155 / 0.78);
  background: oklch(7% 0.025 155 / 0.9);
  color-scheme: dark;
}

.successful-deposit-date-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px oklch(76% 0.16 82 / 0.12);
}

.date-range-arrow {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border: 1px solid oklch(39% 0.07 155 / 0.65);
  border-radius: 50%;
  color: var(--gold);
  background: oklch(11% 0.03 155 / 0.8);
}

.successful-deposit-apply {
  min-height: 44px;
  margin-left: auto;
  padding-inline: 20px;
  white-space: nowrap;
}

.telegram-summary-hero {
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 92% 10%, oklch(67% 0.13 230 / 0.2), transparent 20rem),
    linear-gradient(145deg, oklch(18% 0.055 155 / 0.96), oklch(11% 0.04 240 / 0.98));
}

.telegram-summary-hero::after {
  content: "";
  position: absolute;
  inset: auto -70px -120px auto;
  width: 260px;
  height: 260px;
  border: 1px solid oklch(73% 0.12 230 / 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 28px oklch(73% 0.12 230 / 0.04), 0 0 0 58px oklch(73% 0.12 230 / 0.025);
  pointer-events: none;
}

.telegram-summary-heading {
  position: relative;
  z-index: 1;
  align-items: center;
}

.telegram-summary-heading h3,
.telegram-summary-layout h3,
.telegram-summary-preview-panel h3 {
  margin: 3px 0 0;
}

.telegram-summary-security-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid oklch(69% 0.12 155 / 0.38);
  border-radius: 13px;
  background: oklch(10% 0.035 155 / 0.72);
}

.telegram-summary-security-note > i {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--green);
  background: oklch(72% 0.16 156 / 0.14);
}

.telegram-summary-security-note strong,
.telegram-summary-security-note span {
  display: block;
}

.telegram-summary-security-note span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.telegram-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
}

.telegram-summary-layout > .panel {
  min-height: 100%;
}

.telegram-step {
  display: inline-flex;
  color: var(--gold);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
}

.telegram-bot-identity {
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid oklch(40% 0.08 230 / 0.65);
  border-radius: 999px;
  color: oklch(82% 0.1 230);
  background: oklch(17% 0.055 230 / 0.58);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.telegram-summary-token-form {
  margin-bottom: 12px;
}

.telegram-summary-token-form small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.telegram-token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.telegram-token-row .ghost-btn {
  min-width: 142px;
}

.telegram-discovery-state {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px dashed oklch(40% 0.07 230 / 0.62);
  border-radius: 12px;
  color: var(--muted);
  background: oklch(9% 0.025 240 / 0.55);
  font-size: 12px;
}

.telegram-discovery-state strong,
.telegram-discovery-state span {
  display: block;
}

.telegram-discovery-state.is-loading {
  color: oklch(82% 0.1 230);
}

.telegram-discovery-state.is-success {
  border-style: solid;
  border-color: oklch(61% 0.13 155 / 0.65);
  color: var(--green);
}

.telegram-discovery-state.is-success span,
.telegram-discovery-state.is-empty span,
.telegram-discovery-state.is-error span {
  margin-top: 2px;
  color: var(--muted);
}

.telegram-discovery-state.is-error {
  border-style: solid;
  border-color: oklch(58% 0.16 28 / 0.68);
  color: oklch(80% 0.12 28);
}

.telegram-chat-results {
  max-height: 304px;
  display: grid;
  gap: 8px;
  margin-top: 10px;
  overflow-y: auto;
}

.telegram-chat-option {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid oklch(37% 0.065 230 / 0.65);
  border-radius: 12px;
  color: var(--text);
  background: oklch(10% 0.03 235 / 0.72);
  text-align: left;
}

.telegram-chat-option:hover,
.telegram-chat-option.is-selected {
  border-color: oklch(69% 0.13 230 / 0.85);
  background: oklch(18% 0.065 230 / 0.7);
  transform: translateY(-1px);
}

.telegram-chat-icon,
.telegram-selected-icon {
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: oklch(80% 0.13 230);
  background: oklch(64% 0.14 230 / 0.18);
}

.telegram-chat-icon {
  width: 38px;
  height: 38px;
}

.telegram-chat-copy {
  min-width: 0;
}

.telegram-chat-copy strong,
.telegram-chat-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-chat-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.telegram-chat-type {
  padding: 4px 7px;
  border-radius: 999px;
  color: oklch(83% 0.1 230);
  background: oklch(65% 0.12 230 / 0.13);
  font-size: 9px;
  font-weight: 900;
}

.telegram-chat-check {
  color: transparent;
}

.telegram-chat-option.is-selected .telegram-chat-check {
  color: var(--green);
}

.telegram-selected-chat {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid oklch(37% 0.07 155 / 0.62);
  border-radius: 14px;
  background: oklch(10% 0.03 155 / 0.6);
}

.telegram-selected-chat.is-selected {
  border-color: oklch(65% 0.14 155 / 0.72);
  box-shadow: inset 3px 0 0 var(--green);
}

.telegram-selected-icon {
  width: 46px;
  height: 46px;
  font-size: 20px;
}

.telegram-selected-chat span,
.telegram-selected-chat strong,
.telegram-selected-chat small {
  display: block;
}

.telegram-selected-chat span,
.telegram-selected-chat small {
  color: var(--muted);
  font-size: 10px;
}

.telegram-selected-chat strong {
  margin: 2px 0;
}

.telegram-selected-check {
  color: oklch(42% 0.06 155);
  font-size: 18px;
}

.telegram-selected-chat.is-selected .telegram-selected-check {
  color: var(--green);
}

.telegram-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.telegram-time-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid oklch(39% 0.08 82 / 0.58);
  border-radius: 13px;
  background: oklch(10% 0.03 155 / 0.58);
}

.telegram-time-card > span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.telegram-time-card input {
  min-width: 0;
  width: 100%;
  color-scheme: dark;
  font-size: 18px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.telegram-time-card small {
  color: var(--muted);
  font-size: 10px;
}

.telegram-summary-enabled-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid oklch(39% 0.07 155 / 0.58);
  border-radius: 13px;
  background: oklch(9% 0.03 155 / 0.58);
}

.telegram-summary-enabled-row strong,
.telegram-summary-enabled-row span {
  display: block;
}

.telegram-summary-enabled-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.telegram-summary-enabled-row select {
  width: 142px;
  flex: 0 0 142px;
}

.telegram-summary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.telegram-summary-actions button {
  width: 100%;
}

.telegram-summary-preview-panel {
  display: grid;
  gap: 2px;
}

.telegram-preview-controls,
.telegram-preview-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.telegram-preview-scope .ghost-btn.is-active {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold);
}

.telegram-message-preview {
  width: min(720px, 100%);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid oklch(49% 0.1 230 / 0.55);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, oklch(61% 0.12 230 / 0.15), transparent 18rem),
    oklch(9% 0.032 235);
  box-shadow: 0 18px 42px oklch(5% 0.03 245 / 0.28);
}

.telegram-preview-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-bottom: 1px solid oklch(39% 0.08 230 / 0.5);
  color: oklch(82% 0.11 230);
  background: oklch(17% 0.055 230 / 0.56);
  font-size: 11px;
  font-weight: 900;
}

.telegram-message-preview pre {
  min-height: 260px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: oklch(93% 0.014 90);
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.report-player-strip,
.report-summary-grid {
  display: grid;
  gap: 12px;
}

.report-player-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px;
  border: 1px solid oklch(39% 0.07 155 / 0.62);
  border-radius: 14px;
  background: oklch(9% 0.025 240 / 0.55);
}

.report-player-strip div,
.report-summary-card {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: oklch(13% 0.035 155 / 0.68);
  border: 1px solid oklch(36% 0.07 155 / 0.5);
}

.report-player-strip span,
.report-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.report-player-strip strong,
.report-summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.report-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  align-items: end;
  gap: 10px;
  min-width: min(360px, 100%);
}

.report-state {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.report-state.is-loading {
  color: var(--gold);
}

.report-state.is-empty {
  color: var(--orange);
}

.report-state.is-error {
  color: var(--red);
}

.report-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-summary-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-summary-card-wide {
  grid-column: span 4;
}

.metric-card.is-positive i,
.report-summary-card.is-positive strong {
  color: var(--green);
}

.metric-card.is-negative i,
.report-summary-card.is-negative strong {
  color: var(--red);
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: oklch(9% 0.025 240 / 0.65);
}

.segmented-control button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.segmented-control button.is-active,
.segmented-control button:hover {
  color: oklch(12% 0.02 130);
  background: var(--gold);
}

.report-chart-wrap {
  min-height: 340px;
  position: relative;
}

.support-code-guide {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr);
  align-items: stretch;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid color-mix(in oklch, var(--gold) 42%, transparent);
  border-radius: 8px;
  background: color-mix(in oklch, var(--gold) 10%, transparent);
}

.support-code-guide strong,
.support-code-guide b {
  display: block;
  color: var(--gold);
}

.support-code-guide span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.support-code-guide__item {
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in oklch, var(--panel) 70%, black);
}

.pill,
.withdrawal-status,
.status-badge,
.type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.pill {
  color: oklch(12% 0.02 130);
  background: var(--gold);
}

.withdrawal-status {
  width: fit-content;
  border: 1px solid;
  font-weight: 700;
}

.withdrawal-status.is-disabled {
  color: #fda4af;
  background: #3b1823;
  border-color: #803449;
}

.withdrawal-status.is-enabled {
  color: #6ee7b7;
  background: #0c3027;
  border-color: #23634e;
}

.withdrawal-status::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge {
  color: var(--text);
  background: oklch(30% 0.07 245);
}

.status-badge.success {
  background: oklch(23% 0.09 156);
}

.status-badge.failed {
  color: oklch(96% 0.01 40);
  background: oklch(38% 0.15 28);
}

.status-badge.pending {
  color: oklch(15% 0.03 80);
  background: var(--orange);
}

.type-badge.deposit,
.type-badge.promotion {
  color: oklch(10% 0.02 150);
  background: var(--green);
}

.type-badge.refund {
  color: oklch(12% 0.03 85);
  background: var(--gold);
}

.type-badge.withdraw {
  color: oklch(98% 0.01 30);
  background: var(--red);
}

.transaction-type-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.promotion-name-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: min(260px, 100%);
  padding: 4px 9px;
  border: 1px solid rgba(250, 204, 21, .38);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(161, 98, 7, .16);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.transaction-type-stack .promotion-name-badge {
  white-space: nowrap;
}

.promotion-name-badge.is-empty {
  border-color: rgba(148, 163, 184, .24);
  color: #94a3b8;
  background: rgba(51, 65, 85, .18);
}

.amount-plus {
  color: var(--green);
  font-weight: 950;
}

.amount-plus::before {
  content: "+";
}

.amount-minus {
  color: var(--red);
  font-weight: 950;
}

.amount-minus::before {
  content: "-";
}

.report-daily-profit {
  white-space: nowrap;
}

.report-profit-percent {
  display: inline-block;
  margin-inline-start: 0.3rem;
  font-size: 0.88em;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.report-summary-card strong .report-profit-percent {
  display: inline-block;
}

.report-profit-percent.is-positive {
  color: var(--green);
}

.report-profit-percent.is-zero {
  color: var(--red);
}

.statement-credit {
  color: var(--gold-strong);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-list-scrollable {
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: oklch(35% 0.06 160 / 0.5) transparent;
}

.compact-list-scrollable::-webkit-scrollbar {
  width: 5px;
}

.compact-list-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.compact-list-scrollable::-webkit-scrollbar-thumb {
  background: oklch(35% 0.06 160 / 0.5);
  border-radius: 4px;
}

.compact-list-scrollable::-webkit-scrollbar-thumb:hover {
  background: oklch(50% 0.1 160 / 0.7);
}

.live-presence-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.live-playing-pill {
  color: oklch(96% 0.01 150);
  background: oklch(38% 0.12 155);
}

.live-presence-summary {
  margin: -5px 0 10px;
  padding: 8px 11px;
  border: 1px solid oklch(35% 0.06 160 / 0.42);
  border-radius: 10px;
  color: var(--muted);
  background: oklch(9% 0.025 245 / 0.42);
  font-size: 12px;
  line-height: 1.45;
}

.compact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 11px;
  background: oklch(9% 0.025 245 / 0.56);
  border: 1px solid oklch(35% 0.06 160 / 0.45);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.compact-item:hover {
  background: oklch(13% 0.03 245 / 0.65);
  border-color: oklch(45% 0.08 160 / 0.6);
}

.compact-item strong,
.compact-item span {
  overflow-wrap: anywhere;
}

.dashboard-presence-head {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-presence-tab-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: oklch(11% 0.02 240 / 0.75);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid oklch(30% 0.04 160 / 0.45);
}

.dashboard-presence-tab-buttons .tab-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.dashboard-presence-tab-buttons .tab-btn:hover {
  color: #fff;
  background: oklch(18% 0.03 240 / 0.6);
}

.dashboard-presence-tab-buttons .tab-btn.active {
  background: oklch(27% 0.07 160 / 0.8);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.top-credits-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.top-credits-updated-at {
  font-size: 11px;
  color: var(--muted);
}

.pill-gold {
  background: oklch(32% 0.1 75 / 0.85);
  color: #fef08a;
  border: 1px solid oklch(45% 0.14 75 / 0.6);
  font-weight: 700;
}

.top-credit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 11px;
  border-radius: 11px;
  background: oklch(9% 0.025 245 / 0.56);
  border: 1px solid oklch(35% 0.06 160 / 0.45);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.top-credit-item:hover {
  background: oklch(13% 0.03 245 / 0.65);
  border-color: oklch(45% 0.08 160 / 0.6);
}

.top-credit-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.top-credit-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 800;
  background: oklch(22% 0.03 240);
  color: var(--muted);
  flex-shrink: 0;
}

.top-credit-rank.rank-1 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111;
  box-shadow: 0 0 7px rgba(245, 158, 11, 0.45);
}

.top-credit-rank.rank-2 {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  color: #111;
  box-shadow: 0 0 6px rgba(148, 163, 184, 0.35);
}

.top-credit-rank.rank-3 {
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff;
  box-shadow: 0 0 6px rgba(180, 83, 9, 0.35);
}

.top-credit-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.top-credit-user-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-credit-username {
  font-weight: 700;
  font-size: 13px;
  color: #f8e7b2;
}

.top-credit-sub {
  font-size: 11px;
  color: var(--muted);
}

.top-credit-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}

.top-credit-amount {
  font-weight: 850;
  font-size: 13.5px;
  color: #34d399;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.top-credit-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #22c55e;
}

.top-credit-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 5px #22c55e;
}

.live-presence-limit {
  justify-content: center;
  color: var(--muted);
  text-align: center;
  border-style: dashed;
}

.table-wrap {
  overflow: auto;
  border: 1px solid oklch(35% 0.06 160 / 0.5);
  border-radius: 14px;
}

.overflow-x-auto {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid oklch(35% 0.06 160 / 0.38);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold);
  background: oklch(12% 0.035 245 / 0.76);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

td {
  color: oklch(90% 0.014 90);
  font-size: 13px;
}

tbody tr:hover {
  background: oklch(24% 0.055 155 / 0.34);
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full {
  grid-column: 1 / -1;
}

.promo-type-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.promo-type-settings[hidden] {
  display: none;
}

.promo-type-settings .settings-divider span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}

.promo-type-settings .full {
  grid-column: 1 / -1;
}

.auto-username-card {
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid oklch(64% 0.13 82 / 0.55);
  border-radius: 12px;
  background: oklch(16% 0.045 155 / 0.74);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auto-username-card span,
.profile-card-head span,
.profile-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auto-username-card strong {
  color: var(--gold);
  font-size: 18px;
  line-height: 1.2;
  text-align: right;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.form-actions .primary-btn {
  flex: 1;
}

.form-actions .test-autofill-btn {
  flex: 0 0 auto;
  min-width: 174px;
}

.toolbar {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  align-items: end;
  margin-bottom: 16px;
}

.bet-history-toolbar {
  grid-template-columns: minmax(150px, 0.85fr) minmax(170px, 1fr) minmax(190px, 1.05fr) minmax(360px, 1.9fr) minmax(100px, 0.55fr) minmax(120px, 0.65fr) minmax(110px, 0.6fr);
}

.bet-history-meta {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.bet-date-range {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid oklch(34% 0.07 155 / 0.7);
  border-radius: 8px;
  background: oklch(8% 0.025 155 / 0.62);
}

.bet-date-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bet-date-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bet-date-field span {
  margin: 0;
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 900;
}

.bet-date-field input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

.bet-date-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.date-preset-btn {
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid oklch(48% 0.09 86 / 0.66);
  border-radius: 8px;
  color: var(--gold-soft);
  background: oklch(11% 0.03 155 / 0.84);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.date-preset-btn:hover,
.date-preset-btn.is-active {
  color: oklch(12% 0.025 100);
  border-color: var(--gold);
  background: var(--gold);
}

.table-panel-head {
  align-items: end;
}

.table-panel-head > div {
  min-width: 150px;
}

.table-panel-head h3 {
  white-space: nowrap;
}

.member-filter-toolbar {
  width: min(760px, 100%);
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.55fr) minmax(130px, 0.35fr);
  margin-bottom: 0;
}

.profile-box {
  display: grid;
  gap: 10px;
}

.profile-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: oklch(10% 0.025 245 / 0.72);
}

.profile-card h4 {
  margin: 0 0 8px;
}

.profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-card-head h4 {
  margin: 3px 0 0;
  color: var(--gold);
  word-break: break-word;
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-detail-grid p {
  min-height: 54px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid oklch(36% 0.06 155 / 0.45);
  border-radius: 10px;
  background: oklch(13% 0.035 155 / 0.48);
  display: grid;
  gap: 4px;
}

.profile-detail-grid strong {
  color: var(--text);
}

.profile-empty p {
  max-width: 54ch;
  line-height: 1.55;
}

.profile-sync-warning {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid oklch(73% 0.15 70 / 0.52);
  border-radius: 12px;
  color: oklch(92% 0.035 78);
  background: oklch(19% 0.07 70 / 0.56);
}

.profile-sync-warning strong {
  color: var(--gold-strong);
}

.profile-sync-warning span {
  color: oklch(86% 0.026 82);
  font-size: 13px;
  line-height: 1.45;
}

.turnover-lock-card {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid oklch(70% 0.16 55 / 0.58);
  color: oklch(91% 0.04 70);
  background: oklch(22% 0.08 55 / 0.62);
}

.turnover-lock-card p {
  margin: 0;
  line-height: 1.5;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-btn {
  min-height: 30px;
  border: 1px solid var(--line-gold);
  border-radius: 9px;
  padding: 0 10px;
  color: var(--gold-strong);
  background: oklch(13% 0.035 155 / 0.74);
  font-weight: 900;
}

.member-money-timeline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: oklch(92% 0.13 92);
  border-color: oklch(72% 0.14 82 / 0.72);
  background: linear-gradient(135deg, oklch(22% 0.065 82 / 0.82), oklch(15% 0.045 155 / 0.86));
}

.member-money-timeline-btn:hover {
  border-color: var(--gold);
  background: linear-gradient(135deg, oklch(27% 0.075 82 / 0.9), oklch(18% 0.055 155 / 0.92));
}

.profile-card-head-actions {
  justify-content: flex-end;
}

.mini-btn:disabled,
.mini-btn[aria-disabled="true"] {
  cursor: not-allowed;
  color: oklch(85% 0.035 92);
  border-color: oklch(54% 0.09 82 / 0.52);
  background: oklch(18% 0.04 82 / 0.62);
  opacity: 0.72;
}

.gateway-primary-action.is-current-primary {
  border-color: oklch(73% 0.16 82 / 0.82);
}

.gateway-primary-action.is-current-primary[data-channel-primary="deposit"] {
  color: oklch(91% 0.08 150);
  border-color: oklch(62% 0.16 150 / 0.78);
  background: oklch(23% 0.08 150 / 0.68);
}

.gateway-primary-action.is-current-primary[data-channel-primary="withdraw"] {
  color: oklch(92% 0.07 29);
  border-color: oklch(63% 0.18 29 / 0.78);
  background: oklch(25% 0.1 29 / 0.68);
}

.tx-log-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
}

.mini-btn.red {
  color: oklch(95% 0.015 35);
  border-color: oklch(60% 0.18 28 / 0.65);
  background: oklch(30% 0.12 28 / 0.72);
}

.promo-admin-grid,
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.spin-coupon-panel {
  display: grid;
  gap: 14px;
  border-color: oklch(72% 0.13 82 / 0.46);
  background:
    linear-gradient(140deg, oklch(18% 0.045 155 / 0.92), oklch(10% 0.028 245 / 0.94));
}

.spin-coupon-form {
  align-items: end;
  padding: 14px;
  border: 1px solid oklch(48% 0.095 155 / 0.5);
  border-radius: 14px;
  background: oklch(9% 0.025 245 / 0.42);
}

.spin-coupon-result .compact-item {
  align-items: flex-start;
}

.spin-coupon-result small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.spin-coupon-codes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.spin-coupon-codes code {
  padding: 5px 7px;
  border: 1px solid oklch(72% 0.13 82 / 0.52);
  border-radius: 999px;
  color: var(--gold-strong);
  background: oklch(12% 0.035 245 / 0.78);
  font-size: .74rem;
  font-weight: 900;
}

.spin-prize-panel {
  display: grid;
  gap: 16px;
}

.spin-prize-form {
  padding: 14px;
  border: 1px solid oklch(36% 0.07 160 / 0.55);
  border-radius: 14px;
  background: oklch(9% 0.025 245 / 0.48);
}

.spin-prize-note {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid oklch(74% 0.15 82 / 0.4);
  border-radius: 12px;
  color: var(--gold-strong);
  background: linear-gradient(135deg, oklch(22% 0.065 82 / 0.42), oklch(11% 0.03 155 / 0.5));
  font-size: .86rem;
  font-weight: 850;
}

.spin-prize-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.spin-prize-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid oklch(38% 0.07 155 / 0.58);
  border-radius: 14px;
  background:
    linear-gradient(145deg, oklch(15% 0.04 155 / 0.86), oklch(9% 0.028 245 / 0.82));
}

.spin-prize-card.is-inactive {
  opacity: .62;
}

.spin-prize-card.is-special {
  border-color: oklch(80% 0.16 82 / 0.72);
  box-shadow: inset 0 0 0 1px oklch(80% 0.16 82 / 0.14);
}

.spin-prize-card header,
.spin-prize-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.spin-prize-card h4 {
  margin: 0 0 5px;
  font-size: 1rem;
  line-height: 1.2;
}

.spin-prize-card p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.spin-prize-value {
  color: var(--gold-strong);
  font-size: 1.28rem;
  font-weight: 950;
  white-space: nowrap;
}

.spin-prize-row {
  align-items: center;
  color: var(--muted);
  font-size: .84rem;
}

.spin-prize-row strong {
  color: var(--text);
}

.spin-prize-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: oklch(6% 0.02 245 / 0.84);
}

.spin-prize-meter span {
  display: block;
  width: min(100%, var(--chance, 0%));
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold-strong));
}

.spin-prize-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.spin-prize-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid oklch(40% 0.07 155 / 0.62);
  border-radius: 999px;
  color: var(--muted);
  background: oklch(10% 0.025 245 / 0.68);
  font-size: .72rem;
  font-weight: 900;
}

.spin-prize-tag.is-special {
  color: oklch(13% 0.035 150);
  border-color: oklch(82% 0.16 82 / 0.8);
  background: linear-gradient(135deg, oklch(88% 0.12 86), oklch(76% 0.16 82));
}

.maintenance-control-panel {
  border-color: oklch(72% 0.16 82 / 0.42);
  background:
    linear-gradient(145deg, oklch(19% 0.05 150 / 0.9), oklch(14% 0.04 245 / 0.96)),
    var(--panel);
}

.maintenance-status-pill.is-open {
  color: oklch(10% 0.02 150);
  background: var(--green);
}

.maintenance-status-pill.is-closed {
  color: oklch(98% 0.01 45);
  background: var(--red);
}

.maintenance-control-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid oklch(72% 0.16 82 / 0.34);
  border-radius: 14px;
  background: oklch(72% 0.16 82 / 0.08);
}

.maintenance-control-warning > i {
  margin-top: 3px;
  color: var(--gold);
}

.maintenance-control-warning strong,
.maintenance-control-warning span {
  display: block;
}

.maintenance-control-warning strong {
  color: var(--gold-soft);
}

.maintenance-control-warning span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.provider-display-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid oklch(36% 0.07 160 / 0.55);
  border-radius: 16px;
  background: oklch(10% 0.025 245 / 0.46);
}

.provider-display-form {
  align-items: end;
}

.provider-list-sort-form {
  margin: 0 0 14px;
  padding: 10px 12px;
  align-items: end;
  border: 1px solid oklch(36% 0.07 160 / 0.48);
  border-radius: 14px;
  background: oklch(9% 0.025 245 / 0.52);
}

.provider-logo-sync-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid oklch(36% 0.07 160 / 0.48);
  border-radius: 14px;
  background: linear-gradient(135deg, oklch(10% 0.03 155 / 0.82), oklch(13% 0.04 150 / 0.58));
}

.provider-logo-sync-panel h4 {
  margin: 0 0 4px;
  color: var(--gold-soft);
}

.provider-logo-sync-panel p {
  margin: 0;
  color: var(--muted);
}

.provider-logo-sync-btn {
  white-space: nowrap;
}

.provider-catalog-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid oklch(36% 0.07 160 / 0.48);
  border-radius: 14px;
  background: oklch(9% 0.025 245 / 0.58);
}

.provider-catalog-panel.is-healthy {
  border-color: oklch(62% 0.16 150 / 0.58);
}

.provider-catalog-panel.is-degraded {
  border-color: oklch(74% 0.15 82 / 0.7);
  background: linear-gradient(135deg, oklch(18% 0.06 82 / 0.42), oklch(9% 0.025 245 / 0.64));
}

.provider-catalog-panel.is-unavailable {
  border-color: oklch(58% 0.18 28 / 0.7);
  background: linear-gradient(135deg, oklch(20% 0.08 28 / 0.38), oklch(9% 0.025 245 / 0.64));
}

.provider-catalog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.provider-catalog-head h4 {
  margin: 0 0 4px;
  color: var(--gold-soft);
}

.provider-catalog-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.provider-catalog-badge {
  flex: 0 0 auto;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--gold-strong);
  background: oklch(10% 0.025 245 / 0.78);
  font-size: .72rem;
  font-weight: 950;
}

.provider-catalog-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.provider-catalog-meta span {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid oklch(36% 0.07 160 / 0.42);
  border-radius: 10px;
  color: var(--text);
  background: oklch(7% 0.02 245 / 0.48);
  overflow-wrap: anywhere;
}

.provider-catalog-meta strong {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
}

.provider-catalog-log {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed oklch(74% 0.15 82 / 0.45);
  border-radius: 10px;
  background: oklch(7% 0.02 245 / 0.55);
}

.provider-catalog-log strong {
  color: var(--gold-soft);
}

.provider-catalog-log code {
  color: oklch(89% 0.035 82);
  white-space: normal;
  overflow-wrap: anywhere;
}

.provider-catalog-refresh-btn {
  white-space: nowrap;
}

.provider-list-sort-form .muted-note {
  margin: 0;
  align-self: center;
}

.provider-category-tabs {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid oklch(36% 0.07 160 / 0.48);
  border-radius: 16px;
  background: oklch(9% 0.025 245 / 0.52);
}

.provider-category-tab {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid oklch(39% 0.07 155 / 0.55);
  border-radius: 999px;
  color: var(--muted);
  background: oklch(12% 0.03 155 / 0.7);
  font-weight: 900;
  white-space: nowrap;
}

.provider-category-tab i {
  color: var(--gold);
}

.provider-category-tab strong {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--gold-strong);
  background: oklch(78% 0.16 82 / 0.14);
  font-size: .78rem;
}

.provider-category-tab.is-active {
  color: oklch(12% 0.035 150);
  border-color: oklch(82% 0.16 82 / 0.92);
  background: linear-gradient(135deg, oklch(88% 0.12 86), oklch(72% 0.17 82));
  box-shadow: 0 10px 26px oklch(78% 0.16 82 / 0.18);
}

.provider-category-tab.is-active i,
.provider-category-tab.is-active strong {
  color: oklch(12% 0.035 150);
}

.provider-category-tab.is-active strong {
  background: oklch(10% 0.025 150 / 0.12);
}

.muted-note,
.provider-popularity-hint {
  color: var(--muted);
  font-size: .84rem;
}

.provider-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.provider-category-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.provider-category-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid oklch(42% 0.08 82 / 0.48);
  border-radius: 14px;
  background:
    linear-gradient(135deg, oklch(19% 0.05 155 / 0.82), oklch(10% 0.03 245 / 0.88));
}

.provider-category-head h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.05rem;
}

.provider-category-head h4 i {
  color: var(--gold);
}

.provider-category-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.provider-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 14px;
  min-width: 0;
}

.promo-card,
.provider-card {
  padding: 15px;
  border-radius: 16px;
  background: oklch(10% 0.025 245 / 0.64);
  border: 1px solid oklch(36% 0.07 160 / 0.55);
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.promo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid oklch(44% 0.08 82 / 0.52);
  background: oklch(8% 0.02 245);
}

.promo-card h4,
.provider-card h4 {
  margin: 0;
}

.provider-card header,
.promo-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.provider-card header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
}

.provider-card header > div:nth-child(2) {
  min-width: 0;
}

.promo-card header > div {
  min-width: 0;
}

.promo-card p {
  overflow-wrap: anywhere;
}

.provider-card h4 {
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.provider-card p {
  margin: 4px 0 0;
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.provider-card .status-badge {
  justify-self: end;
  max-width: 100%;
}

.provider-visual-preview {
  position: relative;
  min-height: 112px;
  display: grid;
  place-items: center;
  gap: 8px;
  overflow: hidden;
  border-radius: 12px;
  color: var(--muted);
  background:
    radial-gradient(circle at 20% 10%, oklch(78% 0.16 82 / 0.12), transparent 42%),
    oklch(8% 0.025 245 / 0.82);
  border: 1px dashed oklch(44% 0.08 82 / 0.52);
  font-size: .82rem;
  font-weight: 900;
  text-align: center;
}

.provider-visual-preview > i {
  color: var(--gold);
  font-size: 1.45rem;
}

.provider-visual-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: oklch(8% 0.025 245 / 0.92);
  display: block;
}

.provider-visual-preview.has-image {
  min-height: 0;
  place-items: stretch;
  border-style: solid;
  border-color: oklch(48% 0.08 82 / 0.7);
}

.provider-visual-preview.has-image span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  color: oklch(12% 0.02 130);
  background: oklch(86% 0.14 86 / 0.9);
  box-shadow: 0 8px 26px oklch(5% 0.03 245 / 0.35);
}

.image-upload-field {
  display: grid;
  gap: 10px;
}

.image-upload-box {
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  color: var(--muted);
  background:
    radial-gradient(circle at 25% 8%, oklch(78% 0.16 82 / 0.14), transparent 42%),
    linear-gradient(145deg, oklch(12% 0.035 155 / 0.82), oklch(8% 0.025 245 / 0.92));
  border: 1px dashed oklch(48% 0.08 82 / 0.68);
  cursor: pointer;
}

.image-upload-box:focus-visible {
  outline: 3px solid oklch(78% 0.16 82 / 0.28);
  outline-offset: 2px;
}

.image-upload-box img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.social-share-upload-box {
  min-height: 190px;
}

.social-share-upload-box img {
  aspect-ratio: 1200 / 630;
}

.image-upload-box img[hidden],
.image-upload-box [hidden] {
  display: none !important;
}

.image-upload-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}

.image-upload-empty i {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: oklch(12% 0.02 130);
  background: linear-gradient(135deg, oklch(92% 0.12 89), oklch(74% 0.18 74));
  box-shadow: 0 12px 30px oklch(78% 0.16 82 / 0.22);
  font-size: 1.35rem;
}

.image-upload-empty strong {
  color: var(--gold-strong);
}

.image-upload-empty small,
.upload-status {
  color: var(--muted);
  line-height: 1.55;
}

.upload-status {
  display: block;
  min-height: 20px;
  font-size: .84rem;
  font-weight: 800;
}

.upload-status.is-success {
  color: var(--green);
}

.upload-status.is-error {
  color: var(--red);
}

.image-upload-actions {
  align-items: center;
}

.provider-card .compact-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.provider-card .compact-item strong {
  min-width: 0;
  max-width: 100%;
  text-align: right;
  overflow-wrap: anywhere;
}

.provider-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: oklch(78% 0.16 82 / 0.2);
  color: var(--gold);
}

.provider-icon-logo {
  padding: 5px;
  background: oklch(96% 0.02 95 / 0.08);
}

.provider-icon-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.provider-popularity-editor,
.provider-category-editor {
  display: grid;
  gap: 6px;
}

.provider-popularity-editor span,
.provider-category-editor span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.provider-popularity-editor input,
.provider-category-editor select {
  min-height: 36px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  color: var(--text);
  background: oklch(8% 0.025 245 / 0.76);
  font-weight: 900;
}

.settings-form {
  max-width: 1040px;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: oklch(8% 0.025 245 / 0.82);
}

.settings-tab {
  min-height: 42px;
  flex: 1 1 180px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.settings-tab:hover {
  color: var(--text);
  background: oklch(14% 0.035 245 / 0.72);
}

.settings-tab.is-active {
  border-color: oklch(68% 0.15 86 / 0.58);
  color: var(--gold-soft);
  background: oklch(18% 0.05 94 / 0.28);
}

.settings-tab-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  border: 1px solid oklch(34% 0.07 150 / 0.55);
  border-radius: 14px;
  background: oklch(9% 0.028 158 / 0.72);
}

.settings-tab-panel[hidden],
.gateway-mode-panel[hidden] {
  display: none;
}

.settings-tab-heading,
.settings-panel-grid,
.gateway-mode-radios,
.gateway-mode-preview,
.gateway-mode-panel {
  grid-column: 1 / -1;
}

.settings-tab-heading h4 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text);
}

.settings-tab-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.settings-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-panel-grid .full {
  grid-column: 1 / -1;
}

.upluspay-settings-content {
  margin-top: 16px;
}

.upluspay-settings-layout {
  display: grid;
  gap: 14px;
}

.upluspay-field-grid {
  gap: 16px;
}

.upluspay-secret-hint {
  color: var(--muted);
  line-height: 1.6;
}

.upluspay-clear-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid oklch(34% 0.07 155 / 0.45);
  border-radius: 10px;
  background: oklch(8% 0.026 155 / 0.5);
}

.upluspay-clear-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.upluspay-clear-option input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.upluspay-settings-meta {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-left: 3px solid oklch(72% 0.16 82 / 0.78);
  border-radius: 0 10px 10px 0;
  background: oklch(8% 0.026 155 / 0.56);
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.upluspay-settings-meta small {
  display: block;
}

.upluspay-settings-meta strong {
  color: var(--text);
}

.upluspay-settings-meta span {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.upluspay-settings-actions {
  align-items: center;
}

.upluspay-settings-actions .mini-btn,
.upluspay-settings-actions .primary-btn {
  flex: 0 0 auto;
  height: 42px;
  min-height: 42px;
}

.upluspay-settings-actions .primary-btn {
  min-width: 220px;
}

.gateway-mode-radios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gateway-mode-radios label {
  min-height: 84px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  column-gap: 12px;
  row-gap: 3px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: oklch(7.5% 0.022 245 / 0.84);
  cursor: pointer;
}

.gateway-mode-radios input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  min-height: 0;
  height: 18px;
  margin-top: 2px;
  padding: 0;
  display: grid;
  place-content: center;
  border: 1px solid oklch(64% 0.02 90 / 0.7);
  border-radius: 50%;
  outline: none;
  background: oklch(15% 0.02 245 / 0.88);
  box-shadow: none;
}

.gateway-mode-radios input::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(75% 0.17 86);
  transform: scale(0);
  transition: transform 0.14s ease-out;
}

.gateway-mode-radios input:checked {
  border-color: oklch(75% 0.17 86);
}

.gateway-mode-radios input:checked::before {
  transform: scale(1);
}

.gateway-mode-radios input:focus {
  outline: none;
  box-shadow: 0 0 0 3px oklch(78% 0.16 82 / 0.16);
}

.gateway-mode-radios span {
  color: var(--text);
  font-weight: 900;
}

.gateway-mode-radios small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.gateway-mode-radios label:has(input:checked) {
  border-color: oklch(68% 0.15 86 / 0.72);
  background: oklch(18% 0.045 86 / 0.3);
}

.gateway-mode-panel {
  display: grid;
  gap: 14px;
}

.settings-divider {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid oklch(42% 0.08 82 / 0.5);
  border-radius: 12px;
  color: var(--gold-soft);
  background: oklch(13% 0.04 155 / 0.7);
  font-weight: 900;
}

.gateway-mode-preview {
  min-height: 46px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid oklch(40% 0.08 155 / 0.55);
  border-radius: 12px;
  color: oklch(90% 0.014 90);
  background: oklch(9% 0.025 240 / 0.72);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.gateway-mode-preview[data-mode="testing"] {
  border-color: oklch(67% 0.16 250 / 0.65);
}

.gateway-mode-preview[data-mode="production"] {
  border-color: oklch(69% 0.16 150 / 0.65);
}

.amb-api-test-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid oklch(39% 0.08 150 / 0.62);
  border-radius: 14px;
  background: oklch(8% 0.025 155 / 0.76);
}

.amb-api-test-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) auto;
  gap: 12px;
  align-items: end;
}

.amb-api-test-head h4 {
  margin: 0;
  color: var(--gold-soft);
  font-size: 1rem;
}

.amb-api-test-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.amb-api-test-result {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid oklch(42% 0.08 150 / 0.52);
  border-radius: 12px;
  background: oklch(6.5% 0.02 155 / 0.88);
}

.amb-api-test-result.is-success {
  border-color: oklch(62% 0.16 150 / 0.72);
}

.amb-api-test-result.is-error {
  border-color: oklch(62% 0.17 28 / 0.72);
}

.amb-test-summary,
.amb-test-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.amb-test-summary strong {
  color: var(--text);
}

.amb-test-summary small,
.amb-test-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.amb-test-meta strong {
  color: var(--gold-soft);
}

.amb-test-details summary {
  cursor: pointer;
  color: var(--gold-soft);
  font-weight: 900;
}

.amb-test-details .json-box {
  margin-top: 10px;
  max-height: 360px;
  overflow: auto;
}

.payment-gateway-channels {
  display: grid;
  gap: 12px;
}

.gateway-balance-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid oklch(38% 0.08 155 / 0.62);
  border-radius: 8px;
  background: oklch(9% 0.025 155 / 0.78);
}

.gateway-balance-toolbar,
.gateway-balance-provider-head,
.gateway-balance-card-head,
.gateway-balance-meta,
.gateway-balance-breakdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.gateway-balance-toolbar h4 {
  margin: 0 0 4px;
  color: var(--gold-soft);
  font-size: 16px;
}

.gateway-balance-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.gateway-balance-provider {
  display: grid;
  gap: 10px;
}

.gateway-balance-provider-head strong {
  color: var(--gold-soft);
  font-size: 14px;
}

.gateway-balance-provider-head span,
.gateway-balance-meta,
.gateway-balance-breakdown {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gateway-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.gateway-balance-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid oklch(34% 0.07 155 / 0.64);
  border-radius: 8px;
  background: oklch(7% 0.025 155 / 0.84);
}

.gateway-balance-card.is-stale {
  border-color: oklch(55% 0.15 60 / 0.62);
}

.gateway-balance-card-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.gateway-balance-card-head strong {
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.gateway-balance-card-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.gateway-balance-main {
  display: grid;
  gap: 4px;
}

.gateway-balance-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.gateway-balance-amount {
  color: var(--gold-soft);
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.gateway-balance-amount.is-empty {
  color: var(--muted);
}

.gateway-balance-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  justify-content: stretch;
  gap: 8px;
}

.gateway-balance-breakdown span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid oklch(34% 0.07 155 / 0.52);
  border-radius: 7px;
  background: oklch(11% 0.03 155 / 0.7);
}

.gateway-balance-breakdown b {
  color: var(--text);
  overflow-wrap: anywhere;
}

.gateway-balance-card p,
.gateway-balance-alert {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.45;
}

.gateway-balance-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  color: oklch(82% 0.13 35);
}

.dashboard-payment-balance-panel {
  overflow: hidden;
}

.dashboard-payment-balance-panel[hidden],
#paymentBalancesNavLink[hidden] {
  display: none !important;
}

.dashboard-payment-balances {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 10px;
}

.dashboard-payment-balance-total {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 18px;
  padding: 14px 16px;
  border: 1px solid oklch(72% 0.13 82 / 0.52);
  border-radius: 8px;
  background: linear-gradient(135deg, oklch(24% 0.07 82 / 0.3), oklch(12% 0.04 155 / 0.92));
}

.dashboard-payment-balance-total span,
.dashboard-payment-balance-total small {
  color: var(--muted);
  font-weight: 850;
}

.dashboard-payment-balance-total strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--gold-soft);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  white-space: nowrap;
}

.dashboard-payment-balance-total small {
  font-size: 12px;
}

@media (max-width: 520px) {
  .dashboard-payment-balance-total {
    grid-template-columns: 1fr;
  }

  .dashboard-payment-balance-total strong {
    grid-row: auto;
    grid-column: auto;
    white-space: normal;
  }
}

.dashboard-payment-balance-card {
  min-width: 0;
  min-height: 132px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "icon name"
    "icon amount"
    "status status";
  align-items: center;
  gap: 7px 10px;
  padding: 13px;
  border: 1px solid oklch(42% 0.08 155 / 0.58);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(150deg, oklch(13% 0.04 155 / 0.92), oklch(8% 0.025 245 / 0.95));
  text-align: left;
  cursor: pointer;
}

.dashboard-payment-balance-card:hover {
  border-color: oklch(72% 0.16 82 / 0.75);
  transform: translateY(-1px);
}

.dashboard-payment-balance-icon {
  grid-area: icon;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid oklch(72% 0.13 82 / 0.45);
  border-radius: 8px;
  color: var(--gold-strong);
  background: oklch(30% 0.08 82 / 0.2);
}

.dashboard-payment-balance-name {
  grid-area: name;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.dashboard-payment-balance-card strong {
  grid-area: amount;
  color: var(--gold-soft);
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.dashboard-payment-balance-card strong.is-negative,
.gateway-balance-amount.is-negative {
  color: #ff7b7b;
}

.dashboard-payment-balance-card small {
  grid-area: status;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.payment-balance-report-panel {
  display: grid;
  gap: 14px;
}

.payment-balance-report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-balance-report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.payment-balance-kpi {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid oklch(38% 0.08 155 / 0.58);
  border-radius: 8px;
  background: oklch(8% 0.025 245 / 0.72);
}

.payment-balance-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.payment-balance-kpi strong {
  color: var(--gold-soft);
  font-size: clamp(18px, 2.4vw, 27px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.payment-balance-kpi-wide strong {
  color: var(--text);
  font-size: 16px;
}

@media (max-width: 760px) {
  .payment-balance-report-summary {
    grid-template-columns: 1fr;
  }

  .payment-balance-report-actions {
    justify-content: stretch;
  }

  .payment-balance-report-actions > * {
    width: 100%;
  }
}

.legacy-payment-gateway-settings[hidden],
[hidden].legacy-payment-gateway-settings {
  display: none !important;
}

.gateway-channel-flow {
  display: grid;
  gap: 14px;
}

.gateway-fallback-master {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid oklch(34% 0.07 155 / 0.62);
  background: oklch(8% 0.025 155 / 0.78);
}

.gateway-fallback-master.is-on {
  border-color: oklch(60% 0.14 155 / 0.7);
  background: oklch(12% 0.05 155 / 0.7);
}

.gateway-fallback-master.is-off {
  border-color: oklch(48% 0.12 60 / 0.6);
  background: oklch(10% 0.03 60 / 0.6);
}

.gateway-fallback-master > div {
  display: grid;
  gap: 4px;
  min-width: 240px;
  flex: 1 1 320px;
}

.gateway-fallback-master strong {
  color: var(--gold-soft);
  font-size: 15px;
}

.gateway-fallback-master span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
}

.gateway-fallback-master b {
  color: var(--gold-soft);
}

.gateway-fallback-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.payment-ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.payment-ranking-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid oklch(34% 0.07 155 / 0.62);
  border-radius: 8px;
  background: oklch(7% 0.02 245 / 0.62);
}

.payment-ranking-card-head,
.payment-rank-item,
.payment-rank-actions {
  display: flex;
  align-items: center;
}

.payment-ranking-card-head {
  justify-content: space-between;
  gap: 12px;
}

.payment-ranking-card-head strong {
  color: var(--gold-soft);
  font-size: 14px;
}

.payment-rank-list {
  display: grid;
  gap: 8px;
}

.payment-rank-effective,
.payment-ranking-temporary-banner {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid oklch(36% 0.07 155 / 0.5);
  border-radius: 8px;
  background: oklch(11% 0.025 240 / 0.72);
}

.payment-rank-effective strong,
.payment-ranking-temporary-banner strong {
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-rank-effective span,
.payment-ranking-temporary-banner span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.payment-ranking-temporary-banner {
  border-color: oklch(62% 0.12 85 / 0.55);
  background: oklch(18% 0.035 85 / 0.36);
}

.payment-rank-item {
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid oklch(32% 0.06 155 / 0.55);
  border-radius: 8px;
  background: oklch(10% 0.025 245 / 0.7);
}

.payment-rank-item.is-inactive {
  border-style: dashed;
  opacity: 0.72;
}

.payment-rank-number {
  width: 74px;
  flex: 0 0 74px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-rank-body {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.payment-rank-body strong,
.payment-rank-body span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-rank-body strong {
  color: var(--text);
  font-size: 13px;
}

.payment-rank-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payment-rank-actions {
  gap: 6px;
  flex: 0 0 auto;
}

.payment-rank-actions .mini-btn {
  width: 34px;
  min-width: 34px;
  padding: 0;
  justify-content: center;
}

.payment-rank-include {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payment-ranking-temporary {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 4px;
}

.payment-ranking-temporary label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.payment-ranking-temporary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .payment-ranking-card-head,
  .payment-rank-item,
  .payment-ranking-temporary {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .payment-ranking-card-head,
  .payment-rank-item {
    flex-direction: column;
  }

  .payment-rank-number {
    width: auto;
    flex-basis: auto;
  }

  .payment-rank-actions {
    justify-content: flex-end;
  }
}

.mini-btn.is-danger {
  border-color: oklch(55% 0.16 25 / 0.7);
  color: oklch(80% 0.12 30);
}

.gateway-flow-step {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid oklch(34% 0.07 155 / 0.62);
  border-radius: 8px;
  background: oklch(8% 0.025 155 / 0.78);
}

.gateway-flow-step-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gateway-flow-step-head > span {
  display: inline-grid;
  width: 32px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: oklch(9% 0.025 155);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  font-size: 15px;
  font-weight: 1000;
}

.gateway-flow-step-head h4 {
  margin: 0 0 3px;
  color: var(--gold-soft);
  font-size: 16px;
}

.gateway-flow-step-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.gateway-channel-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.gateway-channel-selector {
  display: grid;
  gap: 8px;
}

.gateway-channel-selector-wide {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gateway-channel-selector button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  text-align: left;
  color: var(--text);
  border: 1px solid oklch(33% 0.07 155 / 0.65);
  border-radius: 8px;
  background: oklch(8% 0.025 155 / 0.82);
  cursor: pointer;
}

.gateway-channel-selector button:hover,
.gateway-channel-selector button.is-active {
  border-color: var(--line-gold);
  background: oklch(14% 0.04 155 / 0.88);
}

.gateway-channel-selector button.has-primary {
  box-shadow: inset 0 0 0 1px oklch(75% 0.17 82 / 0.18);
}

.gateway-channel-selector-title,
.gateway-channel-head-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.gateway-channel-selector strong {
  color: var(--gold-soft);
  font-size: 14px;
}

.gateway-primary-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gateway-primary-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: oklch(98% 0.01 95);
  background: oklch(38% 0.06 150);
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.gateway-primary-badge--deposit {
  background: linear-gradient(135deg, oklch(66% 0.18 150), oklch(47% 0.15 150));
}

.gateway-primary-badge--withdraw {
  background: linear-gradient(135deg, oklch(66% 0.2 29), oklch(49% 0.18 29));
}

.gateway-primary-badge i {
  font-size: 10px;
}

.gateway-channel-selector span,
.gateway-channel-selector small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.gateway-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gateway-mode-switch button {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 92px;
  padding: 14px;
  text-align: left;
  color: var(--text);
  border: 1px solid oklch(32% 0.07 155 / 0.68);
  border-radius: 8px;
  background: oklch(7% 0.025 155 / 0.88);
  cursor: pointer;
}

.gateway-mode-switch button:hover,
.gateway-mode-switch button.is-active {
  border-color: var(--line-gold);
  background: oklch(15% 0.045 155 / 0.9);
  box-shadow: inset 0 0 0 1px oklch(72% 0.17 82 / 0.18);
}

.gateway-mode-switch strong {
  color: var(--gold-soft);
  font-size: 15px;
}

.gateway-mode-switch span,
.gateway-mode-switch small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.gateway-channel-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid oklch(38% 0.08 155 / 0.55);
  border-radius: 8px;
  background: oklch(10% 0.03 155 / 0.62);
}

.gateway-channel-head,
.gateway-channel-routes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gateway-channel-head h4 {
  margin: 0 0 4px;
  color: var(--gold-soft);
}

.gateway-channel-head p,
.gateway-channel-routes {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.gateway-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gateway-primary-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gateway-route-role-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid oklch(42% 0.09 82 / 0.58);
  border-radius: 8px;
  background: oklch(8% 0.025 155 / 0.8);
}

.gateway-route-role-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gateway-route-role-head > div {
  display: grid;
  gap: 3px;
}

.gateway-route-role-head strong {
  color: var(--gold-soft);
  font-size: 15px;
}

.gateway-route-role-head span,
.gateway-route-role-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.gateway-route-role-card label {
  margin: 0;
}

.gateway-channel-config-grid .full {
  grid-column: 1 / -1;
}

.gateway-channel-webhook {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: var(--muted);
  border: 1px dashed oklch(42% 0.08 82 / 0.55);
  border-radius: 8px;
  background: oklch(9% 0.025 155 / 0.76);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.gateway-channel-webhook strong {
  color: var(--gold-soft);
}

.gateway-channel-webhook a {
  color: var(--gold);
  font-weight: 900;
}

.autopeer-transfer-preview {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.autopeer-transfer-preview strong {
  color: var(--gold-soft);
}

.autopeer-retry-status {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.autopeer-retry-status.is-running,
.autopeer-retry-status.is-waiting {
  color: var(--gold-soft);
}

.autopeer-retry-status.is-success {
  color: var(--green);
}

.autopeer-retry-status.is-stopped {
  color: var(--muted);
}

.gateway-test-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid oklch(48% 0.1 250 / 0.62);
  border-radius: 8px;
  background: oklch(11% 0.035 240 / 0.74);
}

.gateway-test-action div {
  display: grid;
  gap: 4px;
}

.gateway-test-action strong {
  color: var(--gold-soft);
}

.gateway-test-action span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.payment-routing-panel,
.payment-ranking-panel {
  display: grid;
  gap: 18px;
}

.payment-ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.payment-ranking-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: oklch(13% 0.03 245 / 0.72);
}

.payment-ranking-card-head,
.payment-ranking-temporary {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-ranking-card-head strong,
.payment-rank-effective strong,
.payment-ranking-temporary-banner strong {
  display: block;
  color: var(--text-strong);
  font-weight: 900;
}

.payment-rank-effective,
.payment-ranking-temporary-banner {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid oklch(42% 0.08 155 / 0.5);
  border-radius: 8px;
  background: oklch(9% 0.025 245 / 0.74);
}

.payment-rank-effective span,
.payment-ranking-temporary-banner span,
.payment-ranking-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.payment-rank-list {
  display: grid;
  gap: 10px;
}

.payment-rank-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid oklch(30% 0.05 155 / 0.45);
  border-radius: 8px;
  background: oklch(10% 0.025 245 / 0.72);
}

.payment-rank-item.is-inactive {
  opacity: .72;
  border-style: dashed;
}

.payment-rank-item.is-dragging {
  opacity: .55;
}

.payment-rank-number {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.payment-rank-body {
  min-width: 0;
}

.payment-rank-body strong,
.payment-rank-body span {
  display: block;
  overflow-wrap: anywhere;
}

.payment-rank-body span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.payment-rank-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.payment-rank-include {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payment-ranking-temporary label {
  flex: 1 1 180px;
  margin: 0;
}

@media (max-width: 900px) {
  .payment-ranking-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .payment-ranking-grid > *,
  .payment-ranking-card,
  .payment-rank-list,
  .payment-rank-item,
  .gateway-fallback-master > div {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .gateway-fallback-master {
    align-items: stretch;
  }

  .gateway-fallback-master > div {
    flex-basis: 100%;
  }

  .gateway-fallback-master > button,
  .payment-ranking-card-head > button,
  .payment-ranking-temporary > button {
    width: 100%;
  }

  .payment-ranking-card-head,
  .payment-ranking-temporary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .payment-ranking-temporary label {
    min-width: 0;
  }

  .payment-rank-item {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .payment-rank-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.mwpay-test-page {
  display: grid;
  gap: 14px;
}

.mwpay-test-hero {
  gap: 14px;
}

.mwpay-test-mode-switch {
  margin-top: 2px;
}

.mwpay-production-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  color: oklch(78% 0.18 35);
  border: 1px solid oklch(62% 0.2 35 / 0.68);
  border-radius: 8px;
  background: oklch(13% 0.06 32 / 0.76);
  font-size: 13px;
  font-weight: 900;
}

.mwpay-test-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.mwpay-test-summary > div {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid oklch(34% 0.07 155 / 0.64);
  border-radius: 8px;
  background: oklch(8% 0.025 155 / 0.8);
}

.mwpay-test-summary span,
.mwpay-test-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.mwpay-test-summary strong {
  color: var(--gold-soft);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.mwpay-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.compact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mwpay-test-result {
  min-height: 160px;
}

.log-details summary {
  color: var(--gold);
  cursor: pointer;
  font-weight: 900;
}

.gateway-channel-config {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  color: oklch(92% 0.02 95);
  background: oklch(7% 0.025 155 / 0.92);
  border: 1px solid oklch(34% 0.07 155 / 0.55);
  border-radius: 8px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .gateway-channel-layout,
  .gateway-channel-selector-wide,
  .gateway-mode-switch,
  .mwpay-test-summary,
  .mwpay-test-grid,
  .amb-api-test-head,
  .compact-form,
  .settings-tab-panel,
  .settings-panel-grid,
  .gateway-mode-radios,
  .gateway-channel-grid,
  .gateway-primary-secondary-grid {
    grid-template-columns: 1fr;
  }

  .upluspay-clear-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .upluspay-settings-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .upluspay-settings-actions .mini-btn,
  .upluspay-settings-actions .primary-btn {
    width: 100%;
    min-width: 0;
  }
}

/* Full-screen LINE customer-service workspace */
#section-chatbot .chatbot-container {
  display: block;
}

#section-chatbot .chatbot-settings-panel {
  width: 100%;
  max-width: 920px;
}

body.line-chat-mode {
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.line-chat-mode .main-panel {
  height: 100vh;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
}

body.line-chat-mode .topbar {
  display: none;
}

body.line-chat-mode #section-line-chat.content-section.is-active {
  display: block;
  height: 100vh;
  height: 100dvh;
  animation: none;
}

body.line-chat-mode {
  overscroll-behavior: none;
}

.line-chat-workspace {
  --line-green: #06c755;
  --line-surface: #0c1518;
  --line-panel: #111f23;
  --line-panel-soft: #17282d;
  --line-border: rgba(164, 195, 185, 0.18);
  --line-muted: #8fa6a0;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  color: #eef7f3;
  background:
    linear-gradient(135deg, rgba(6, 199, 85, 0.055), transparent 30%),
    var(--line-surface);
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
}

.line-chat-toolbar {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line-border);
  background: rgba(8, 18, 21, 0.94);
}

.line-chat-brand,
.line-chat-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}

.line-chat-brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--line-green);
  box-shadow: 0 8px 22px rgba(6, 199, 85, 0.22);
  font-size: 21px;
}

.line-chat-brand strong,
.line-chat-brand small {
  display: block;
}

.line-chat-brand strong {
  font-size: 16px;
  letter-spacing: 0.01em;
}

.line-chat-brand small {
  margin-top: 2px;
  color: var(--line-muted);
  font-size: 12px;
}

.line-chat-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--line-muted);
  font-size: 12px;
  font-weight: 750;
}

.line-chat-legend > span.is-manual {
  color: #a8f0c5;
}

.line-chat-legend .line-chat-realtime-status {
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line-border);
  border-radius: 999px;
  color: #c7d5d1;
  background: rgba(255, 255, 255, 0.035);
}

.line-chat-realtime-status .realtime-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #f0b94c;
  box-shadow: 0 0 0 3px rgba(240, 185, 76, 0.14);
}

.line-chat-realtime-status.is-connected .realtime-dot {
  background: var(--line-green);
  box-shadow: 0 0 0 3px rgba(6, 199, 85, 0.15);
}

.line-chat-realtime-status.is-offline .realtime-dot {
  background: #f06d6d;
  box-shadow: 0 0 0 3px rgba(240, 109, 109, 0.14);
}

.line-chat-workspace .chatbot-console-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 350px) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--line-surface);
  box-shadow: none;
}

.line-chat-workspace .chatbot-sessions-list {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--line-border);
  background: #0d191c;
}

.line-chat-workspace .chatbot-sessions-header {
  display: grid;
  gap: 12px;
  padding: 18px;
  color: #eef7f3;
  border-bottom: 1px solid var(--line-border);
  background: #101e22;
}

.line-chat-workspace .chatbot-session-title {
  font-size: 14px;
  letter-spacing: 0.01em;
}

.line-chat-workspace #chatbotRoomCount {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #06120b;
  background: var(--line-green);
  text-align: center;
  font-size: 12px;
}

.line-chat-workspace .chatbot-session-filters {
  grid-template-columns: minmax(0, 1fr) 112px 112px;
}

.line-chat-workspace .chatbot-session-filters input,
.line-chat-workspace .chatbot-session-filters select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line-border);
  border-radius: 10px;
  color: #eef7f3;
  background: #0a1518;
}

.line-chat-workspace .chatbot-session-filters input {
  grid-column: auto;
}

.line-chat-workspace .chatbot-sessions-items {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.line-chat-workspace .session-item {
  gap: 1px;
  padding: 14px 16px;
  color: #edf7f3;
  border-bottom: 1px solid rgba(164, 195, 185, 0.1);
  background: transparent;
}

.line-chat-workspace .session-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.line-chat-workspace .session-item.is-active {
  border-left: 3px solid var(--line-green);
  background: linear-gradient(90deg, rgba(6, 199, 85, 0.14), rgba(6, 199, 85, 0.025));
}
.line-chat-workspace .session-item.is-spam,
.web-chat-session-item.is-spam {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.14);
}
.session-spam-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.session-status-badge.spam,
.web-chat-spam-time {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
}
.chat-spam-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(248, 113, 113, 0.22);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.18);
}
.chat-spam-notice > i { color: #f87171; }
.chat-spam-notice strong,
.chat-spam-notice small { display: block; }
.chat-spam-notice small { color: #fed7d7; font-size: 11px; margin-top: 2px; }
.chatbot-spam-btn:not(.is-restore),
.web-chat-spam-btn:not(.is-restore) {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}

.line-chat-workspace .session-avatar {
  width: 44px;
  height: 44px;
  margin-right: 11px;
  color: #0b1a14;
  background: #b5c7c1;
}

.line-chat-workspace .session-name {
  color: #f7fbf9;
  font-size: 13px;
  font-weight: 800;
}

.line-chat-workspace .session-preview {
  color: var(--line-muted);
}

.line-chat-workspace .session-time {
  color: #69817b;
}

.line-chat-workspace .session-status-badge {
  color: #91a9a2;
}

.line-chat-workspace .session-status-badge.manual {
  padding: 2px 7px;
  border: 1px solid rgba(6, 199, 85, 0.3);
  border-radius: 999px;
  color: #9df0bd;
  background: rgba(6, 199, 85, 0.1);
}

.line-chat-workspace .chatbot-chat-view {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% -20%, rgba(6, 199, 85, 0.08), transparent 42%),
    #111a1d;
}

.line-chat-workspace .chatbot-chat-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  flex: none;
  min-height: 70px;
  padding: 12px 18px;
  color: #eef7f3;
  border-bottom: 1px solid var(--line-border);
  background: rgba(16, 30, 34, 0.96);
}

.line-chat-workspace .chatbot-chat-header h4 {
  margin: 0;
  overflow: hidden;
  color: #f7fbf9;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-chat-workspace .chatbot-chat-heading {
  min-width: 0;
}

.line-chat-workspace .chatbot-chat-heading small {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  margin-top: 3px;
  color: var(--line-muted) !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-chat-workspace .chatbot-channel-label {
  flex: none;
  color: #91e8b4;
  font-weight: 800;
}

.line-chat-workspace .chatbot-external-user-id {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-turnover-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 12px;
}

.chat-turnover-tag .turnover-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  cursor: help;
  transition: all 0.2s ease;
}

.chat-turnover-tag .turnover-pill.clean {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.chat-turnover-tag .turnover-pill.active {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.chat-turnover-tag .turnover-pill.completed {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.chat-turnover-tag .turnover-pill.not-linked {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.line-chat-workspace .chatbot-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.chatbot-mobile-back {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: none;
  border: 1px solid var(--line-border);
  border-radius: 10px;
  color: #eaf5f1;
  background: #0b171a;
}

.line-chat-workspace .chatbot-chat-actions .mini-btn,
.line-chat-workspace .chatbot-composer-tools .mini-btn,
.line-chat-workspace .line-chat-legend .mini-btn {
  color: #dbe9e4;
  border-color: var(--line-border);
  background: rgba(255, 255, 255, 0.035);
}

.line-chat-workspace .chatbot-takeover-btn:not(.is-manual) {
  color: #07130c;
  border-color: var(--line-green);
  background: var(--line-green);
}

.line-chat-workspace .chatbot-takeover-btn.is-manual {
  color: #f1d88f;
  border-color: rgba(241, 216, 143, 0.35);
  background: rgba(241, 216, 143, 0.09);
}

.line-chat-workspace .chatbot-messages-feed {
  min-height: 0;
  padding: 22px clamp(14px, 3vw, 42px);
  background: transparent;
  overscroll-behavior: contain;
  overflow-anchor: none;
}

.line-chat-workspace .chat-msg-bubble {
  max-width: min(72%, 720px);
  padding: 10px 13px;
  border: 1px solid transparent;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.line-chat-workspace .chat-msg-bubble.user {
  color: #eaf3f0;
  border-color: rgba(164, 195, 185, 0.14);
  background: #213137;
}

.line-chat-workspace .chat-msg-bubble.ai {
  color: #dfece7;
  border-color: rgba(118, 145, 137, 0.24);
  background: #18262a;
}

.line-chat-workspace .chat-msg-bubble.admin {
  color: #082012;
  border-color: rgba(6, 199, 85, 0.48);
  background: #8fe4b2;
}

.line-chat-workspace .chat-msg-time {
  color: rgba(133, 157, 150, 0.88);
}

.line-chat-workspace .chat-msg-bubble.admin .chat-msg-time {
  color: rgba(8, 32, 18, 0.62);
}

.line-chat-workspace .chat-msg-image-frame {
  position: relative;
  min-width: 180px;
  min-height: 120px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(164, 195, 185, 0.18);
  border-radius: 12px;
  background: rgba(4, 13, 16, 0.45);
}

.line-chat-workspace .chat-msg-image-frame .chat-msg-image {
  display: block;
  max-width: min(360px, 100%);
  max-height: 420px;
  border-radius: 10px;
  cursor: zoom-in;
}

.line-chat-workspace .chat-msg-image-frame .chat-msg-image[hidden] {
  display: none;
}

.line-chat-workspace .chat-msg-image-loading,
.line-chat-workspace .chat-msg-image-retry {
  color: #9fb5ae;
  font: inherit;
  font-size: 0.76rem;
}

.line-chat-workspace .chat-msg-image-loading {
  display: none;
}

.line-chat-workspace .chat-msg-image-frame.is-loading .chat-msg-image-loading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.line-chat-workspace .chat-msg-image-frame.is-loading .chat-msg-image {
  opacity: 0;
}

.line-chat-workspace .chat-msg-image-retry {
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(241, 216, 143, 0.35);
  border-radius: 9px;
  color: #f1d88f;
  background: rgba(241, 216, 143, 0.08);
  cursor: pointer;
}

.line-chat-workspace .chat-msg-image-retry:not([hidden]) {
  display: inline-flex;
}

.line-chat-workspace .chatbot-composer {
  position: relative;
  padding: 10px 16px 12px;
  border-top: 0;
  background: #0d191c;
}

.line-chat-workspace .chatbot-composer.is-locked {
  opacity: 0.68;
}

.line-chat-workspace .chatbot-composer.is-dragging {
  background: rgba(6, 199, 85, 0.1);
  box-shadow: inset 0 0 0 3px var(--line-green);
}

.line-chat-workspace .chatbot-chat-input-form {
  background: transparent;
}

.line-chat-workspace .chatbot-chat-input-form textarea {
  min-height: 46px;
  padding: 11px 13px;
  font-size: 16px;
  line-height: 1.35;
  color: #f1f7f5;
  border-color: var(--line-border);
  border-radius: 12px;
  background: #101f23;
  touch-action: pan-y;
}

.line-chat-workspace .chatbot-chat-input-form textarea:disabled {
  color: #768b85;
  cursor: not-allowed;
}

.line-chat-workspace .chatbot-chat-input-form .primary-btn {
  min-width: 86px;
  color: #07140c;
  background: var(--line-green);
  touch-action: manipulation;
}

.line-chat-workspace .chat-msg-bubble.is-sending {
  opacity: 0.72;
}

.line-chat-workspace .chat-msg-bubble.is-sending .chat-msg-status {
  color: #b8cac4;
}

.line-chat-workspace .chatbot-quick-menu {
  color: #2d3748;
}

.line-chat-workspace .chat-empty-state {
  color: var(--line-muted);
}

.line-chat-workspace .chat-empty-state i {
  color: rgba(6, 199, 85, 0.55);
}

@media (max-width: 900px) {
  .line-chat-legend > span {
    display: none;
  }

  .line-chat-workspace .chatbot-console-panel {
    grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  body.line-chat-mode .main-panel {
    position: fixed;
    inset: 0;
    z-index: 15;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
  }
}

@media (max-width: 680px) {
  .line-chat-workspace {
    grid-template-rows: 62px minmax(0, 1fr);
  }

  .line-chat-toolbar {
    padding: 0 12px;
  }

  .line-chat-brand-icon {
    width: 34px;
    height: 34px;
  }

  .line-chat-brand small,
  .line-chat-legend > span:not(.line-chat-realtime-status),
  .line-chat-legend .mini-btn {
    display: none;
  }

  .line-chat-legend {
    margin-left: auto;
  }

  .line-chat-legend .line-chat-realtime-status {
    display: inline-flex;
    padding: 5px 8px;
    font-size: 11px;
  }

  .line-chat-workspace .chatbot-console-panel {
    display: block;
    height: 100%;
  }

  .line-chat-workspace .chatbot-sessions-list,
  .line-chat-workspace .chatbot-chat-view {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
  }

  #section-line-chat:not(.is-room-open) .chatbot-chat-view {
    display: none;
  }

  #section-line-chat.is-room-open .chatbot-sessions-list {
    display: none;
  }

  .chatbot-mobile-back {
    display: grid;
  }

  .line-chat-workspace .chatbot-chat-header {
    min-height: 64px;
    padding: 10px 12px;
  }

  .line-chat-workspace .chatbot-chat-header h4 {
    font-size: 16px;
  }

  .line-chat-workspace .chatbot-chat-heading small {
    font-size: 11px;
  }

  .line-chat-workspace .chatbot-external-user-id {
    display: none;
  }

  .line-chat-workspace .chatbot-chat-actions .mini-btn span {
    display: none;
  }

  .line-chat-workspace .chatbot-messages-feed {
    padding: 14px 10px;
  }

  .line-chat-workspace .chat-msg-bubble {
    max-width: 88%;
  }

  .line-chat-workspace .chatbot-composer {
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .line-chat-workspace input,
  .line-chat-workspace select,
  .line-chat-workspace textarea {
    font-size: 16px;
  }

  .line-chat-workspace .chatbot-composer-hint {
    display: none;
  }

  .line-chat-workspace .chatbot-chat-input-form .primary-btn {
    min-width: 50px;
    padding: 0 13px;
    font-size: 0;
  }

  .line-chat-workspace .chatbot-chat-input-form .primary-btn i {
    font-size: 15px;
  }
}

.line-broadcast-panel {
  overflow: hidden;
}

.line-broadcast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .72fr);
  gap: 18px;
  align-items: start;
}

.line-broadcast-composer,
.line-broadcast-history {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.line-broadcast-composer {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 16px;
  background: rgba(3, 7, 18, .26);
}

.line-broadcast-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.line-broadcast-preview > div {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(56, 189, 248, .20);
  border-radius: 14px;
  background: rgba(14, 165, 233, .08);
}

.line-broadcast-preview span,
.line-broadcast-history-head span,
.line-broadcast-upload small,
.line-broadcast-history-meta,
.line-broadcast-error {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.line-broadcast-preview strong {
  display: block;
  margin-top: 5px;
  color: #e0f2fe;
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.line-broadcast-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.line-broadcast-image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 10px;
}

.line-broadcast-image-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: rgba(15, 23, 42, .52);
}

.line-broadcast-image-card.is-error {
  border-color: rgba(248, 113, 113, .7);
}

.line-broadcast-image-card img {
  width: 100%;
  height: 96px;
  display: block;
  object-fit: cover;
}

.line-broadcast-image-card .preview-state {
  padding: 7px 9px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
}

.line-broadcast-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

#lineBroadcastFormState {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

#lineBroadcastFormState.is-good {
  color: #86efac;
}

#lineBroadcastFormState.is-bad {
  color: #fca5a5;
}

#lineBroadcastFormState.is-loading {
  color: #fde68a;
}

.line-broadcast-history {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 16px;
  background: rgba(15, 23, 42, .32);
}

.line-broadcast-history-head h4 {
  margin: 0 0 4px;
  color: #f8fafc;
}

.line-broadcast-history-list {
  display: grid;
  gap: 10px;
}

.line-broadcast-history-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 14px;
  background: rgba(2, 6, 23, .28);
}

.line-broadcast-history-top,
.line-broadcast-history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.line-broadcast-history-top strong {
  color: #f8fafc;
}

.line-broadcast-history-top span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, .14);
  font-size: 11px;
  font-weight: 900;
}

.line-broadcast-history-item p {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.line-broadcast-error {
  color: #fca5a5;
}

@media (max-width: 1180px) {
  .line-broadcast-layout,
  .line-broadcast-preview {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .line-broadcast-layout,
  .line-broadcast-preview {
    grid-template-columns: 1fr;
  }

  .line-broadcast-actions .primary-btn,
  .line-broadcast-upload .ghost-btn {
    width: 100%;
  }
}

.toast {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 30;
  max-width: min(430px, calc(100vw - 40px));
  transform: translateY(-18px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-gold);
  background: oklch(13% 0.035 245 / 0.96);
  box-shadow: var(--shadow);
  font-weight: 900;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast.good {
  border-color: oklch(72% 0.16 156 / 0.7);
}

.toast.bad {
  border-color: oklch(63% 0.2 28 / 0.75);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 40;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(5% 0.03 245 / 0.72);
  backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: oklch(13% 0.035 245);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: oklch(26% 0.06 245);
}

.withdraw-reject-modal-card {
  width: min(620px, calc(100vw - 28px));
  padding: 26px;
  border-color: oklch(66% 0.16 48 / 0.5);
  background:
    radial-gradient(circle at 100% 0%, oklch(48% 0.16 48 / 0.14), transparent 22rem),
    linear-gradient(145deg, oklch(13% 0.038 245), oklch(11% 0.035 30));
}

.withdraw-reject-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-right: 44px;
  margin-bottom: 18px;
}

.withdraw-reject-modal-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid oklch(70% 0.17 48 / 0.5);
  border-radius: 12px;
  color: oklch(82% 0.14 62);
  background: oklch(35% 0.12 48 / 0.25);
}

.withdraw-reject-eyebrow {
  display: block;
  margin-bottom: 2px;
  color: oklch(80% 0.12 72);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.withdraw-reject-modal-head h3 {
  margin: 0;
  color: oklch(97% 0.012 90);
  font-size: 1.14rem;
}

.withdraw-reject-modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.withdraw-reject-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}

.withdraw-reject-summary > div {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid oklch(38% 0.06 235 / 0.52);
  border-radius: 11px;
  background: oklch(9% 0.027 245 / 0.66);
}

.withdraw-reject-summary span,
.withdraw-reject-field > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.withdraw-reject-summary strong {
  color: oklch(96% 0.015 90);
  overflow-wrap: anywhere;
}

.withdraw-reject-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.withdraw-reject-field[hidden] {
  display: none;
}

.withdraw-reject-field textarea,
.withdraw-reject-field select,
.withdraw-reject-turnover-input input {
  width: 100%;
  border-color: oklch(42% 0.07 245 / 0.7);
  background: oklch(8% 0.025 245 / 0.82);
}

.withdraw-reject-member-preview {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid oklch(63% 0.12 155 / 0.48);
  border-radius: 12px;
  background: oklch(26% 0.07 155 / 0.14);
}

.withdraw-reject-member-preview > span {
  color: oklch(78% 0.1 155);
  font-size: 0.72rem;
  font-weight: 800;
}

.withdraw-reject-member-preview > strong {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.withdraw-reject-turnover-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid oklch(52% 0.11 82 / 0.56);
  border-radius: 13px;
  background: oklch(28% 0.08 82 / 0.14);
  cursor: pointer;
}

.withdraw-reject-turnover-option[hidden] {
  display: none;
}

.withdraw-reject-turnover-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--gold);
}

.withdraw-reject-turnover-option span {
  display: grid;
  gap: 3px;
}

.withdraw-reject-turnover-option strong {
  color: oklch(94% 0.035 82);
}

.withdraw-reject-turnover-option small,
.withdraw-reject-turnover-field small {
  color: var(--muted);
  line-height: 1.45;
}

.withdraw-reject-turnover-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.withdraw-reject-turnover-input > span {
  color: var(--gold);
  font-weight: 700;
}

.withdraw-reject-error {
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid oklch(65% 0.2 28 / 0.66);
  border-radius: 10px;
  color: oklch(88% 0.11 35);
  background: oklch(32% 0.12 28 / 0.2);
  font-size: 0.8rem;
}

.withdraw-reject-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.withdraw-reject-modal-actions .danger-btn {
  border: 0;
  color: white;
  background: linear-gradient(135deg, oklch(57% 0.2 32), oklch(48% 0.2 27));
}

.transactions-panel,
.deposit-slip-modal-card {
  font-family: "Leelawadee UI", "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
}

.tx-row-needs-review > td {
  background: color-mix(in oklch, oklch(35% 0.12 30) 18%, transparent);
}

.tx-review-flags {
  display: grid;
  gap: 6px;
  margin-top: 7px;
  min-width: 210px;
}

.tx-review-flag {
  display: grid;
  gap: 3px;
  padding: 7px 9px;
  border: 1px solid oklch(62% 0.18 35 / 0.62);
  border-radius: 10px;
  color: oklch(95% 0.025 40);
  background: oklch(31% 0.12 31 / 0.36);
  line-height: 1.35;
}

.tx-review-flag > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 900;
}

.tx-review-flag small {
  color: oklch(82% 0.035 60);
  font-size: 0.66rem;
  overflow-wrap: anywhere;
}

.tx-review-flag small b {
  color: oklch(92% 0.06 75);
}

.tx-review-flag.is-refund-error {
  border-color: oklch(72% 0.15 75 / 0.64);
  background: oklch(34% 0.1 72 / 0.28);
}

.tx-review-flag.is-forfeit {
  border-color: oklch(65% 0.2 25 / 0.72);
  background: oklch(34% 0.14 25 / 0.38);
}

.tx-review-flag.is-refund-decision {
  border-color: oklch(64% 0.13 155 / 0.6);
  background: oklch(28% 0.09 155 / 0.25);
}

.withdrawal-ip-review-badge {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid;
  border-radius: 8px;
  line-height: 1.32;
  box-shadow: 0 0 0 1px color-mix(in oklch, currentColor 12%, transparent), 0 10px 22px rgb(0 0 0 / 0.18);
}

.withdrawal-ip-review-badge > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff7ed;
  font-size: 0.74rem;
  font-weight: 950;
}

.withdrawal-ip-review-badge small {
  color: #ffe4e6;
  font-size: 0.68rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.withdrawal-ip-review-badge.is-shared-ip {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgb(127 29 29 / 0.92), rgb(69 10 10 / 0.86));
}

.withdrawal-ip-review-badge.is-unavailable {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgb(120 53 15 / 0.9), rgb(69 26 3 / 0.82));
}

.withdrawal-ip-review-badge.is-reviewed-history {
  opacity: 0.78;
}

.transaction-filter-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  padding: 14px;
  border: 1px solid oklch(38% 0.07 155 / .62);
  border-radius: 16px;
  background: linear-gradient(135deg, oklch(11% .032 245 / .92), oklch(12% .04 155 / .72));
}

.transaction-filter-fields {
  display: grid;
  grid-template-columns: minmax(180px, .85fr) minmax(170px, .72fr) minmax(170px, .72fr) minmax(330px, 1.55fr);
  gap: 12px;
  align-items: end;
}

.transaction-filter-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.transaction-filter-field > span,
.transaction-quick-filter > span {
  display: block;
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.transaction-filter-field > span i,
.transaction-quick-filter > span i { width: 14px; margin-right: 4px; text-align: center; }

.transaction-filter-field input,
.transaction-filter-field select {
  min-height: 46px;
  border-color: oklch(39% .07 155 / .62);
  background: oklch(8% .025 245 / .78);
}

.transaction-filter-field input:focus,
.transaction-filter-field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px oklch(72% .15 82 / .1);
}

.transaction-date-input-wrap { position: relative; }

.transaction-date-input-wrap input,
.transaction-date-input-wrap .flatpickr-input + input {
  padding-left: 15px;
  padding-right: 15px;
  border-color: oklch(60% .12 82 / .58);
  background: oklch(8% .025 245 / .88);
  cursor: pointer;
}

.transaction-date-input-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px oklch(72% .15 82 / .12);
}

.transaction-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid oklch(35% .06 160 / .38);
}

.transaction-quick-filter,
.transaction-filter-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.transaction-date-presets {
  display: flex;
  gap: 5px;
  white-space: nowrap;
}

.transaction-date-presets button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid oklch(42% .08 155 / .65);
  border-radius: 9px;
  color: oklch(79% .025 90);
  background: oklch(13% .035 155 / .68);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}

.transaction-date-presets button:hover,
.transaction-date-presets button.is-active {
  border-color: var(--gold);
  color: oklch(16% .03 80);
  background: linear-gradient(135deg, var(--gold), oklch(72% .16 73));
  box-shadow: 0 5px 16px oklch(70% .14 82 / .2);
}

.transaction-filter-actions button {
  min-width: 132px;
  min-height: 40px;
}

.transaction-filter-clear {
  border-color: oklch(48% .035 245 / .72);
  color: oklch(78% .025 90);
  background: oklch(15% .03 245 / .72);
}

.transaction-filter-clear:hover {
  border-color: oklch(64% .06 80 / .72);
  color: var(--gold);
  background: oklch(20% .045 80 / .42);
}

.transaction-filter-submit {
  color: oklch(13% .025 80);
  background: linear-gradient(135deg, oklch(84% .14 87), oklch(72% .17 73));
  box-shadow: 0 8px 22px oklch(70% .14 82 / .16);
}

.transaction-pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid oklch(35% .06 160 / .5);
  border-radius: 14px;
  background: oklch(9% .025 245 / .56);
}

.transaction-page-meta { color: var(--muted); font-size: 12px; font-weight: 750; }
.transaction-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.flatpickr-calendar {
  border: 1px solid oklch(52% .1 82 / .55);
  border-radius: 16px;
  background: oklch(12% .035 245);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .46);
  font-family: "Leelawadee UI", "Noto Sans Thai", "Segoe UI", sans-serif;
  overflow: hidden;
}

.flatpickr-calendar.arrowTop::before { border-bottom-color: oklch(52% .1 82 / .55); }
.flatpickr-calendar.arrowTop::after { border-bottom-color: oklch(12% .035 245); }
.flatpickr-months, .flatpickr-weekdays { background: oklch(15% .045 155); }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year, span.flatpickr-weekday { color: var(--gold); fill: var(--gold); }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { color: var(--gold); fill: var(--gold); }
.flatpickr-day { color: oklch(88% .018 90); border-radius: 9px; }
.flatpickr-day:hover { border-color: oklch(64% .12 82 / .55); background: oklch(22% .055 155); }
.flatpickr-day.today { border-color: var(--gold); color: var(--gold); }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange,
.flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover {
  border-color: var(--gold);
  color: oklch(13% .025 80);
  background: var(--gold);
}
.flatpickr-day.inRange { border-color: oklch(31% .07 155); background: oklch(25% .07 155); box-shadow: -5px 0 0 oklch(25% .07 155), 5px 0 0 oklch(25% .07 155); }
.flatpickr-day.flatpickr-disabled, .flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: oklch(48% .025 245); }

@media (max-width: 1200px) {
  .transaction-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.transactions-table-wrap {
  background: oklch(8% 0.025 245 / 0.72);
  overscroll-behavior-inline: contain;
  scrollbar-color: oklch(53% 0.08 82) oklch(10% 0.025 245);
}

.transactions-table {
  min-width: 1040px;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.transactions-table .tx-col-time { width: 132px; }
.transactions-table .tx-col-member { width: 100px; }
.transactions-table .tx-col-type { width: 80px; }
.transactions-table .tx-col-amount { width: 100px; }
.transactions-table .tx-col-balance { width: 205px; }
.transactions-table .tx-col-status { width: 220px; }
.transactions-table .tx-col-payment { width: 140px; }
.transactions-table .tx-col-reference { width: 85px; }
.transactions-table .tx-col-actor { width: 70px; }
.transactions-table .tx-col-actions { width: 135px; }

.transactions-table th,
.transactions-table td {
  padding: 10px 7px;
  line-height: 1.42;
}

.transactions-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: none;
}

.transactions-table td {
  font-size: 0.8125rem;
}

.transactions-table tbody tr:last-child td {
  border-bottom: 0;
}

.tx-cell-time,
.tx-cell-reference,
.tx-cell-actor {
  color: oklch(79% 0.018 95);
  overflow-wrap: anywhere;
}

.tx-cell-member strong {
  display: block;
  color: oklch(96% 0.014 90);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.autopeer-block-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 6px;
  padding: 4px 7px;
  border: 1px solid oklch(64% 0.21 25 / 0.62);
  border-radius: 7px;
  background: oklch(29% 0.11 25 / 0.8);
  color: oklch(91% 0.055 25);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.autopeer-block-badge i {
  flex: 0 0 auto;
  color: oklch(76% 0.18 28);
}

.autopeer-block-badge.is-cleared {
  border-color: oklch(66% 0.16 150 / 0.62);
  background: oklch(27% 0.08 150 / 0.82);
  color: oklch(90% 0.08 150);
}

.autopeer-block-badge.is-cleared i {
  color: oklch(76% 0.17 150);
}

.autopeer-block-badge.is-waiting {
  border-color: oklch(72% 0.16 75 / 0.68);
  background: oklch(29% 0.08 75 / 0.84);
  color: oklch(91% 0.1 85);
}

.autopeer-block-badge.is-waiting i {
  color: oklch(80% 0.16 80);
}

.tx-cell-money {
  white-space: normal;
}

.tx-cell-payment,
.tx-cell-actions {
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}

.tx-payment-channel-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.tx-payment-provider,
.tx-payment-channel {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 750;
  line-height: 1.2;
}

.tx-payment-provider {
  border: 1px solid oklch(74% 0.14 82 / 0.52);
  color: var(--gold-strong);
  background: oklch(30% 0.08 82 / 0.24);
  letter-spacing: 0.035em;
}

.tx-payment-provider--autopeer {
  border-color: oklch(70% 0.14 230 / 0.55);
  color: oklch(88% 0.08 230);
  background: oklch(29% 0.08 230 / 0.3);
}

.tx-payment-provider--mwpay {
  border-color: oklch(70% 0.15 155 / 0.55);
  color: oklch(88% 0.09 155);
  background: oklch(29% 0.08 155 / 0.3);
}

.tx-payment-provider--upluspay {
  border-color: oklch(72% 0.15 320 / 0.55);
  color: oklch(90% 0.08 320);
  background: oklch(29% 0.08 320 / 0.3);
}

.tx-payment-channel {
  border: 1px solid oklch(45% 0.035 245 / 0.72);
  color: oklch(83% 0.018 95);
  background: oklch(18% 0.03 245 / 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-payment-context {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid oklch(42% 0.07 160 / 0.42);
  border-radius: 11px;
  background: linear-gradient(135deg, oklch(15% 0.04 155 / 0.7), oklch(10% 0.028 245 / 0.78));
  font-size: 0.72rem;
  line-height: 1.35;
}

.tx-payment-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.tx-payment-heading strong {
  flex: none;
  padding: 3px 7px;
  border: 1px solid oklch(74% 0.14 82 / 0.48);
  border-radius: 999px;
  color: var(--gold-strong);
  background: oklch(30% 0.08 82 / 0.22);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

.tx-payment-heading span {
  min-width: 0;
  color: oklch(91% 0.015 90);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-payment-details {
  display: grid;
  gap: 4px;
  margin: 0;
}

.tx-payment-details > div {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
}

.tx-payment-details dt {
  color: oklch(69% 0.025 95);
  font-size: 0.65rem;
}

.tx-payment-details dd {
  min-width: 0;
  margin: 0;
  color: oklch(87% 0.014 90);
  overflow-wrap: anywhere;
}

.tx-payment-order dd {
  color: oklch(76% 0.05 235);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.66rem;
}

.deposit-slip-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.tx-action-stack {
  display: grid;
  justify-items: stretch;
  gap: 6px;
}

.tx-action-stack > .mini-btn,
.tx-action-stack .deposit-slip-upload-btn {
  width: 100%;
  min-height: 31px;
  margin-left: 0 !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  font-size: 0.7rem;
  line-height: 1.2;
}

.tx-action-stack .deposit-slip-action-group > .deposit-slip-upload-btn {
  flex: 1 1 100%;
}

.deposit-slip-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid oklch(72% 0.16 156 / 0.45);
  border-radius: 999px;
  color: oklch(84% 0.14 156);
  background: oklch(22% 0.08 156 / 0.32);
  font-size: 0.72rem;
}

.deposit-slip-thumb-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: oklch(18% 0.035 245);
}

.deposit-slip-thumb-btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.deposit-slip-modal-card {
  width: min(840px, calc(100vw - 28px));
  padding: 26px;
  border-color: oklch(53% 0.09 160 / 0.54);
  background:
    radial-gradient(circle at 100% 0%, oklch(34% 0.08 82 / 0.12), transparent 24rem),
    linear-gradient(145deg, oklch(13% 0.038 245), oklch(11% 0.035 160));
}

.deposit-slip-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-right: 44px;
  margin-bottom: 18px;
}

.deposit-slip-modal-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid oklch(72% 0.13 82 / 0.45);
  border-radius: 12px;
  color: var(--gold-strong);
  background: oklch(30% 0.08 82 / 0.2);
  font-size: 1.05rem;
}

.deposit-slip-eyebrow {
  display: block;
  margin-bottom: 2px;
  color: oklch(72% 0.1 156);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deposit-slip-modal-head h3 {
  margin: 0;
  color: oklch(96% 0.014 90);
  font-size: 1.13rem;
  font-weight: 720;
}

.deposit-slip-modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.5;
}

.deposit-slip-payment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}

.deposit-slip-payment-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid oklch(38% 0.06 235 / 0.52);
  border-radius: 11px;
  background: oklch(9% 0.027 245 / 0.66);
}

.deposit-slip-payment-label {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
}

.deposit-slip-payment-item strong {
  color: oklch(94% 0.015 90);
  font-size: 0.8rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.deposit-slip-route-summary,
.deposit-slip-account-flow,
.deposit-slip-order-row {
  grid-column: 1 / -1;
}

.deposit-slip-route-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid oklch(72% 0.13 82 / 0.3);
  border-radius: 12px;
  background: linear-gradient(90deg, oklch(27% 0.07 82 / 0.22), oklch(10% 0.03 245 / 0.72));
}

.deposit-slip-route-heading {
  display: grid;
  gap: 3px;
}

.deposit-slip-route-heading span {
  color: var(--muted);
  font-size: 0.68rem;
}

.deposit-slip-route-heading strong {
  color: var(--gold-strong);
  font-size: 0.86rem;
}

.deposit-slip-channel-name {
  min-width: 0;
  color: oklch(91% 0.014 90);
  font-size: 0.79rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.deposit-slip-channel-name code {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 6px;
  color: oklch(76% 0.05 235);
  background: oklch(8% 0.025 245 / 0.76);
  font-size: 0.67rem;
}

.deposit-slip-account-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.deposit-slip-account-card {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 86px;
  padding: 12px 14px;
  border: 1px solid oklch(40% 0.07 235 / 0.48);
  border-radius: 12px;
  background: oklch(9% 0.028 245 / 0.72);
}

.deposit-slip-account-card--destination {
  border-color: oklch(62% 0.11 156 / 0.45);
  background: oklch(19% 0.055 156 / 0.23);
}

.deposit-slip-account-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.deposit-slip-account-card strong {
  color: oklch(95% 0.014 90);
  font-size: 0.82rem;
  font-weight: 680;
  overflow-wrap: anywhere;
}

.deposit-slip-account-card small {
  color: oklch(76% 0.022 95);
  font-size: 0.7rem;
}

.deposit-slip-flow-arrow {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 0.9rem;
}

.deposit-slip-order-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  background: oklch(8% 0.026 245 / 0.58);
}

.deposit-slip-order-row span {
  color: var(--muted);
  font-size: 0.67rem;
}

.deposit-slip-order-row code {
  min-width: 0;
  color: oklch(78% 0.05 235);
  font-size: 0.7rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.deposit-slip-dropzone {
  width: 100%;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: hidden;
  border: 2px dashed oklch(72% 0.13 82 / 0.58);
  border-radius: 14px;
  background:
    linear-gradient(oklch(13% 0.035 245 / 0.82), oklch(13% 0.035 245 / 0.82)) padding-box,
    repeating-linear-gradient(135deg, transparent 0 9px, oklch(72% 0.13 82 / 0.06) 9px 18px);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.deposit-slip-dropzone.is-dragging {
  border-color: var(--gold);
  background: oklch(22% 0.08 85 / 0.28);
  transform: translateY(-1px);
}

.deposit-slip-drop-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  max-width: 520px;
  color: var(--muted);
  text-align: center;
}

.deposit-slip-drop-empty[hidden] {
  display: none;
}

.deposit-slip-drop-empty i {
  color: var(--gold);
  font-size: 2rem;
}

.deposit-slip-drop-empty strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.5;
}

.deposit-slip-drop-empty span {
  font-size: 0.74rem;
  line-height: 1.5;
}

.deposit-slip-dropzone img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
}

.deposit-slip-upload-status {
  min-height: 22px;
  margin: 9px 2px 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.deposit-slip-upload-status.is-error {
  color: oklch(74% 0.18 28);
}

.deposit-slip-upload-status.is-success {
  color: oklch(78% 0.16 156);
}

.deposit-slip-upload-status.is-ready {
  color: oklch(82% 0.13 85);
}

.deposit-slip-upload-status.is-busy {
  color: oklch(78% 0.12 235);
}

.deposit-slip-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid oklch(36% 0.055 235 / 0.4);
}

.deposit-slip-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: oklch(4% 0.02 245 / 0.88);
  backdrop-filter: blur(10px);
}

.deposit-slip-lightbox[hidden] {
  display: none;
}

.deposit-slip-lightbox img {
  max-width: min(960px, 96vw);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.deposit-slip-lightbox button {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid oklch(82% 0.02 245 / 0.35);
  border-radius: 50%;
  color: white;
  background: oklch(10% 0.03 245 / 0.82);
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .transaction-filter-fields { grid-template-columns: 1fr; }
  .transaction-filter-footer { align-items: stretch; flex-direction: column; }
  .transaction-quick-filter { align-items: flex-start; flex-direction: column; }
  .transaction-date-presets { flex-wrap: wrap; }
  .transaction-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .transaction-filter-actions button { min-width: 0; }
  .transaction-pagination-wrap { align-items: stretch; flex-direction: column; }
  .transaction-pagination { justify-content: center; flex-wrap: wrap; }

  .transactions-table-wrap {
    overflow: visible;
    background: transparent;
  }

  .transactions-table,
  .transactions-table tbody,
  .transactions-table tr,
  .transactions-table td {
    display: block;
    width: 100%;
  }

  .transactions-table {
    min-width: 0;
  }

  .transactions-table colgroup,
  .transactions-table thead {
    display: none;
  }

  .transactions-table tbody {
    display: grid;
    gap: 12px;
  }

  .transactions-table tbody tr {
    padding: 12px;
    overflow: hidden;
    border: 1px solid oklch(37% 0.055 235 / 0.55);
    border-radius: 14px;
    background: linear-gradient(145deg, oklch(13% 0.033 245), oklch(10% 0.03 160));
  }

  .transactions-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 7px 4px !important;
    border: 0;
    border-bottom: 1px solid oklch(31% 0.045 235 / 0.42);
    text-align: left;
  }

  .transactions-table td::before {
    content: attr(data-label);
    color: oklch(68% 0.03 95);
    font-size: 0.68rem;
    font-weight: 650;
  }

  .transactions-table td:last-child {
    border-bottom: 0;
  }

  .transactions-table .tx-cell-payment,
  .transactions-table .tx-cell-actions {
    grid-template-columns: 1fr;
    gap: 7px;
    padding-top: 11px !important;
  }

  .transactions-table .tx-cell-payment::before,
  .transactions-table .tx-cell-actions::before {
    padding-bottom: 2px;
    color: var(--gold);
  }

  .tx-action-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tx-action-stack .deposit-slip-action-group,
  .tx-action-stack .deposit-slip-status-pill {
    grid-column: 1 / -1;
  }

  .deposit-slip-status-pill {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .deposit-slip-modal-card {
    width: min(100% - 18px, 840px);
    max-height: calc(100dvh - 18px);
    padding: 18px;
    border-radius: 16px;
  }

  .deposit-slip-modal-head {
    gap: 10px;
    padding-right: 36px;
    margin-bottom: 14px;
  }

  .deposit-slip-modal-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .deposit-slip-modal-head h3 {
    font-size: 1rem;
  }

  .deposit-slip-modal-head p {
    font-size: 0.76rem;
  }

  .deposit-slip-payment-summary {
    grid-template-columns: 1fr;
  }

  .deposit-slip-route-summary {
    display: grid;
    justify-content: stretch;
  }

  .deposit-slip-channel-name {
    text-align: left;
  }

  .deposit-slip-account-flow {
    grid-template-columns: 1fr;
  }

  .deposit-slip-flow-arrow {
    min-height: 24px;
    transform: rotate(90deg);
  }

  .deposit-slip-order-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .deposit-slip-order-row code {
    text-align: left;
  }

  .deposit-slip-dropzone {
    min-height: 190px;
    padding: 16px;
  }

  .deposit-slip-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .deposit-slip-modal-actions button {
    width: 100%;
  }

  .transactions-table td {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .tx-action-stack {
    grid-template-columns: 1fr;
  }

  .tx-action-stack .deposit-slip-action-group,
  .tx-action-stack .deposit-slip-status-pill {
    grid-column: auto;
  }
}

.replay-card h3 {
  margin: 0 0 10px;
  color: var(--gold);
}

.replay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.replay-side {
  min-height: 150px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: oklch(10% 0.025 245 / 0.8);
  display: grid;
  align-content: start;
  gap: 12px;
}

.cards {
  display: flex;
  gap: 10px;
}

.card-face {
  width: 54px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: oklch(96% 0.01 80);
  color: oklch(12% 0.02 245);
  font-size: 22px;
  font-weight: 950;
}

.card-face.red-card {
  color: var(--red);
}

.json-box {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 12px;
  border-radius: 12px;
  background: oklch(7% 0.02 245);
  color: oklch(82% 0.08 150);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

.mobile-only {
  display: none;
}

@media (max-width: 1280px) {
  .bet-history-toolbar {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .bet-date-range {
    grid-column: span 2;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    z-index: 20;
    transform: translateX(-105%);
    transition: transform 0.24s ease-out;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-only {
    display: inline-flex;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-today-grid,
  .report-player-strip,
  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-summary-card-wide {
    grid-column: span 2;
  }

  .two-column,
  .split-grid,
  .telegram-summary-layout {
    grid-template-columns: 1fr;
  }

  .provider-catalog-panel,
  .provider-logo-sync-panel {
    grid-template-columns: 1fr;
  }

  .provider-catalog-refresh-btn,
  .provider-logo-sync-btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .main-panel {
    padding: 16px;
  }

  .topbar {
    margin: -16px -16px 16px;
    padding: 14px 16px;
    align-items: flex-start;
  }

  .topbar-actions {
    justify-content: flex-end;
  }

  .topbar-actions .ghost-btn,
  .topbar-actions .danger-btn {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .topbar-actions i {
    font-size: 15px;
  }

  .metric-grid,
  .report-today-grid,
  .report-player-strip,
  .report-summary-grid,
  .report-toolbar,
  .form-grid,
  .promo-type-settings,
  .toolbar,
  .replay-grid {
    grid-template-columns: 1fr;
  }

  .report-summary-card-wide {
    grid-column: auto;
  }

  .report-chart-wrap {
    min-height: 280px;
  }

  .bet-date-range {
    grid-column: auto;
  }

  .bet-date-fields,
  .bet-date-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .successful-deposit-filter-head,
  .successful-deposit-range-fields {
    align-items: stretch;
    flex-direction: column;
  }

  .successful-deposit-presets {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .successful-deposit-date-field {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }

  .date-range-arrow {
    display: none;
  }

  .successful-deposit-apply {
    width: 100%;
    margin-left: 0;
  }

  .telegram-token-row,
  .telegram-time-grid,
  .telegram-summary-actions {
    grid-template-columns: 1fr;
  }

  .telegram-preview-controls,
  .telegram-preview-scope {
    width: 100%;
  }

  .telegram-preview-scope .ghost-btn,
  .telegram-preview-controls > .ghost-btn {
    flex: 1 1 100%;
  }

  .telegram-token-row .ghost-btn {
    width: 100%;
  }

  .telegram-summary-enabled-row {
    align-items: stretch;
    flex-direction: column;
  }

  .telegram-summary-enabled-row select {
    width: 100%;
    flex-basis: auto;
  }

  .telegram-chat-option {
    grid-template-columns: 38px minmax(0, 1fr) 20px;
  }

  .telegram-chat-type {
    display: none;
  }

  .panel {
    padding: 14px;
  }

  .panel-head {
    flex-direction: column;
  }

  .live-presence-badges {
    width: 100%;
    justify-content: flex-start;
  }

  .table-panel-head,
  .member-filter-toolbar,
  .form-actions,
  .auto-username-card,
  .profile-card-head {
    width: 100%;
  }

  .member-filter-toolbar,
  .profile-detail-grid {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .auto-username-card,
  .profile-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .auto-username-card strong {
    text-align: left;
  }

  .brand-lockup img,
  .sidebar-brand img {
    width: 142px;
  }

  .login-panel {
    padding: 24px;
  }
}

/* ==========================================================================
   Autocomplete Suggestions Style
   ========================================================================== */
.autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: oklch(14% 0.025 240 / 0.96);
  border: 1px solid oklch(39% 0.07 155 / 0.8);
  border-radius: 12px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  margin-top: 4px;
}

.autocomplete-suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  border-bottom: 1px solid oklch(25% 0.03 240 / 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.autocomplete-suggestion-item:last-child {
  border-bottom: none;
}

.autocomplete-suggestion-item:hover,
.autocomplete-suggestion-item.active {
  background: oklch(22% 0.05 155 / 0.6);
  color: var(--gold);
}

.autocomplete-suggestion-item .suggestion-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.autocomplete-suggestion-item .suggestion-username {
  font-weight: 600;
}

.autocomplete-suggestion-item .suggestion-name {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.autocomplete-suggestion-item .suggestion-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.autocomplete-suggestion-item .status-active {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.autocomplete-suggestion-item .status-locked {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ==========================================
   Bet History Redesign Dashboard Styles
   ========================================== */
.bet-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.bet-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  background: oklch(14% 0.03 155 / 0.85);
  border: 1px solid oklch(34% 0.07 155 / 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bet-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-gold);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15);
}

.bet-stat-card .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 20px;
  background: oklch(20% 0.04 155 / 0.6);
  color: var(--text-gold);
  border: 1px solid oklch(34% 0.07 155 / 0.2);
}

/* Icons and theme colors for different cards */
.bet-stat-card.card-deposit .card-icon {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}
.bet-stat-card.card-bet .card-icon {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}
.bet-stat-card.card-payout .card-icon {
  color: #eab308;
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.2);
}
.bet-stat-card.card-winloss .card-icon {
  color: #ec4899;
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.2);
}
.bet-stat-card.card-credit .card-icon {
  color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.2);
}

.bet-stat-card .card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bet-stat-card .card-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.bet-stat-card .card-val {
  font-size: 18px;
  font-weight: 750;
  color: #fff;
  font-family: monospace;
}

/* Spin Type Badges */
.badge-spin-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-normal {
  background: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.25);
}

.badge-freespin {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.2);
}

.badge-featurebuy {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.badge-trigger {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.bet-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Professional Page Numbers Pagination */
.page-numbers-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-num-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold-strong);
  border: 1px solid var(--line-gold);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.page-num-btn:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.page-num-btn.active-page-btn {
  background: linear-gradient(135deg, var(--gold) 0%, oklch(70% 0.18 73) 100%);
  color: oklch(12% 0.02 140);
  border: none;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
  cursor: default;
}

.pagination-ellipsis {
  color: var(--muted);
  padding: 0 4px;
  font-weight: 600;
}
/* Payment router journey and provider-specific bank matrix */
.bank-mapping-grid { display: grid; gap: 8px; min-width: 620px; }
.bank-mapping-card { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(90px, .7fr) auto auto 34px; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid color-mix(in oklab, var(--border), transparent 20%); border-radius: 10px; background: rgba(255,255,255,.025); }
.bank-mapping-card input[data-bank-code] { min-height: 34px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.bank-mapping-card label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.route-timeline-panel { overflow: hidden; }
.route-timeline-list { display: grid; gap: 8px; }
.route-journey-card { border: 1px solid color-mix(in oklab, var(--border), transparent 14%); border-radius: 14px; background: linear-gradient(115deg, rgba(16,185,129,.045), rgba(255,255,255,.018) 42%, rgba(255,255,255,.01)); transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.route-journey-card:hover { border-color: rgba(52,211,153,.28); background: linear-gradient(115deg, rgba(16,185,129,.07), rgba(255,255,255,.024) 42%, rgba(255,255,255,.012)); }
.route-journey-card.is-expanded { border-color: rgba(52,211,153,.34); box-shadow: 0 14px 38px rgba(0,0,0,.18); }
.route-journey-row { display: grid; grid-template-columns: minmax(215px, .8fr) minmax(460px, 2fr) auto; gap: 18px; align-items: center; padding: 12px 14px; }
.route-journey-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.route-journey-identity > span:last-child { display: grid; gap: 3px; min-width: 0; }
.route-journey-identity strong, .route-journey-identity code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-journey-identity code { color: var(--muted); font-size: 11px; }
.route-journey-summary, .route-timeline-event-head, .route-timeline-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.route-operation { padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(59,130,246,.15); color: #93c5fd; }
.route-operation--withdraw { background: rgba(245,158,11,.14); color: #fbbf24; }
.route-journey-summary { display: grid; grid-template-columns: repeat(5, minmax(72px, auto)); gap: 9px 18px; color: var(--muted); font-size: 12px; }
.route-journey-summary > span { display: grid; gap: 2px; min-width: 0; }
.route-journey-summary small { color: color-mix(in oklab, var(--muted), transparent 18%); font-size: 10px; letter-spacing: .035em; }
.route-journey-summary b { color: var(--text); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-journey-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.route-timeline-toggle { min-width: 126px; justify-content: center; padding: 8px 11px; }
.route-timeline-toggle[aria-expanded="true"] { border-color: rgba(52,211,153,.4); color: #86efac; background: rgba(16,185,129,.09); }
.route-timeline-detail { padding: 15px 18px 18px; border-top: 1px solid rgba(148,163,184,.14); background: rgba(1,9,7,.28); animation: route-timeline-reveal .22s ease both; }
.route-timeline-detail[hidden] { display: none; }
.route-timeline-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 12px; }
.route-timeline-detail-head > div { display: flex; align-items: baseline; gap: 9px; }
.route-timeline-detail-label { color: #6ee7b7; font-size: 11px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.route-timeline-detail-loading, .route-timeline-detail-error { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 92px; color: var(--muted); }
.route-timeline-detail-error { color: #fca5a5; }
.route-final-message { margin: 10px 0 0; padding: 9px 12px; border-radius: 9px; background: rgba(255,255,255,.035); }
.route-timeline-track { list-style: none; margin: 16px 0 0; padding: 0 0 0 14px; }
.route-timeline-event { position: relative; padding: 0 0 16px 24px; border-left: 2px solid rgba(148,163,184,.25); }
.route-timeline-event:last-child { padding-bottom: 0; }
.route-timeline-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; left: -7px; top: 15px; background: #64748b; box-shadow: 0 0 0 4px rgba(100,116,139,.16); }
.route-timeline-event.is-success .route-timeline-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.16); }
.route-timeline-event.is-failed .route-timeline-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.16); }
.route-timeline-event.is-ambiguous .route-timeline-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.18); }
.route-timeline-event-card { padding: 12px 14px; border: 1px solid rgba(148,163,184,.16); border-radius: 12px; background: rgba(3,7,18,.26); }
.route-timeline-event-head { justify-content: space-between; }
.route-timeline-event-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route-timeline-event-title code { color: #93c5fd; font-size: 11px; }
.route-timeline-meta { margin-top: 7px; color: var(--muted); font-size: 12px; }
.route-timeline-event-card p { margin: 9px 0 0; line-height: 1.55; }
.route-timeline-status { padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; background: rgba(59,130,246,.14); color: #93c5fd; }
.route-timeline-status.is-success { background: rgba(34,197,94,.14); color: #86efac; }
.route-timeline-status.is-failed { background: rgba(239,68,68,.14); color: #fca5a5; }
.route-timeline-status.is-ambiguous { background: rgba(245,158,11,.16); color: #fcd34d; }
.route-timeline-response { margin-top: 8px; display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.route-timeline-overview { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(56,189,248,.22); border-radius: 13px; background: linear-gradient(135deg, rgba(14,165,233,.09), rgba(16,185,129,.045) 58%, rgba(2,6,23,.2)); }
.route-timeline-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.route-timeline-overview-head > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.route-provider-trail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #bae6fd; }
.route-provider-trail span { padding: 6px 9px; border: 1px solid rgba(56,189,248,.2); border-radius: 9px; background: rgba(2,6,23,.34); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; font-weight: 800; }
.route-provider-trail i { color: #64748b; font-size: 11px; }
.route-timeline-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.route-timeline-overview-grid > div { display: grid; gap: 4px; padding: 10px 11px; border-radius: 10px; background: rgba(2,6,23,.26); }
.route-timeline-overview-grid > div:last-child { grid-column: 1 / -1; }
.route-timeline-overview-grid span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.route-timeline-overview-grid strong { color: #e2e8f0; font-size: 12px; line-height: 1.55; }
.route-timeline-overview + .route-timeline-detail-head { margin-top: 18px; }
@keyframes route-timeline-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1180px) { .route-journey-row { grid-template-columns: minmax(210px, .8fr) minmax(320px, 1.5fr); } .route-journey-actions { grid-column: 1 / -1; justify-content: flex-end; } }
@media (max-width: 760px) { .bank-mapping-grid { min-width: 540px; } .route-timeline-filters > * { width: 100%; } .route-journey-row { grid-template-columns: 1fr; gap: 12px; } .route-journey-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .route-journey-actions { grid-column: auto; justify-content: space-between; } .route-timeline-detail-head, .route-timeline-overview-head { align-items: flex-start; flex-direction: column; } .route-timeline-overview-grid { grid-template-columns: 1fr; } .route-timeline-overview-grid > div:last-child { grid-column: auto; } }

.customer-money-timeline-panel { overflow: hidden; }
.customer-money-timeline-meta { color: var(--muted); font-size: 12px; text-align: right; }
.money-timeline-filters { align-items: end; }
.money-timeline-filters label { display: grid; gap: 6px; min-width: 150px; }
.money-timeline-filters label span { color: var(--muted); font-size: 12px; font-weight: 700; }
.money-timeline-presets { display: flex; gap: 7px; flex-wrap: wrap; }
.money-timeline-presets .ghost-btn.is-active { border-color: rgba(250,204,21,.45); color: #fde68a; background: rgba(250,204,21,.10); }
.money-timeline-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 16px 0 18px; }
.money-timeline-stat,
.money-timeline-empty,
.money-timeline-warning { border: 1px solid rgba(148,163,184,.15); border-radius: 14px; background: rgba(2,6,23,.28); padding: 13px 14px; }
.money-timeline-empty,
.money-timeline-warning { grid-column: 1 / -1; color: var(--muted); text-align: center; }
.money-timeline-warning { color: #fcd34d; border-color: rgba(245,158,11,.28); background: rgba(245,158,11,.08); }
.money-timeline-stat span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.money-timeline-stat strong { display: block; margin-top: 4px; color: #f8fafc; font-size: 17px; }
.money-timeline-stat.is-good strong,
.money-timeline-amount.is-good { color: #86efac; }
.money-timeline-stat.is-bad strong,
.money-timeline-amount.is-bad { color: #fca5a5; }
.money-timeline-stat small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.money-timeline-roadmap { list-style: none; margin: 0; padding: 4px 0 4px 132px; position: relative; }
.money-timeline-node { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; margin: 0 0 14px; min-height: 76px; }
.money-timeline-node::before { content: ""; position: absolute; left: -34px; top: 17px; bottom: -31px; width: 2px; background: linear-gradient(180deg, rgba(250,204,21,.52), rgba(20,184,166,.22)); }
.money-timeline-node:last-child::before { display: none; }
.money-timeline-node time { color: #fde68a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; padding-top: 10px; text-align: right; }
.money-timeline-dot { position: absolute; left: -42px; top: 11px; width: 18px; height: 18px; border-radius: 999px; background: #64748b; box-shadow: 0 0 0 5px rgba(100,116,139,.16); }
.money-timeline-node.is-opening .money-timeline-dot,
.money-timeline-node.is-closing .money-timeline-dot { background: #facc15; box-shadow: 0 0 0 5px rgba(250,204,21,.17); }
.money-timeline-node.is-cash .money-timeline-dot { background: #38bdf8; box-shadow: 0 0 0 5px rgba(56,189,248,.16); }
.money-timeline-node.is-withdraw .money-timeline-dot { background: #fb7185; box-shadow: 0 0 0 5px rgba(251,113,133,.16); }
.money-timeline-node.is-play .money-timeline-dot { background: #22c55e; box-shadow: 0 0 0 5px rgba(34,197,94,.16); }
.money-timeline-node.is-incomplete .money-timeline-dot { background: #f59e0b; box-shadow: 0 0 0 5px rgba(245,158,11,.18); }
.money-timeline-card { border: 1px solid rgba(148,163,184,.16); border-radius: 16px; background: rgba(3,7,18,.34); padding: 14px 16px; box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.money-timeline-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.money-timeline-kicker { color: #6ee7b7; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.money-timeline-card h4 { margin: 4px 0 0; color: #f8fafc; font-size: 16px; }
.money-timeline-card h4 + .promotion-name-badge { margin-top: 7px; }
.money-timeline-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.money-timeline-balance-grid,
.money-timeline-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.money-timeline-balance-grid span,
.money-timeline-category-grid span { display: block; color: var(--muted); font-size: 11px; }
.money-timeline-balance-grid strong,
.money-timeline-category-grid strong { display: block; margin-top: 2px; color: #f8fafc; }
.money-timeline-category-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.money-timeline-category { border: 1px solid rgba(148,163,184,.14); border-radius: 12px; padding: 9px 10px; background: rgba(15,23,42,.22); }
.money-timeline-card details { margin-top: 12px; }
.money-timeline-card summary { cursor: pointer; color: #fde68a; font-weight: 800; }
.money-timeline-action-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.money-timeline-route-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(148,163,184,.12); }
.money-timeline-route-toggle { min-width: 166px; justify-content: center; border-color: rgba(56,189,248,.34); color: #bae6fd; background: rgba(14,165,233,.07); }
.money-timeline-route-toggle:hover,
.money-timeline-route-toggle[aria-expanded="true"] { border-color: rgba(56,189,248,.55); color: #e0f2fe; background: rgba(14,165,233,.13); }
.money-timeline-route-detail { margin-top: 12px; padding: 14px; border: 1px solid rgba(56,189,248,.2); border-radius: 13px; background: rgba(1,9,14,.46); }
.money-timeline-node.has-route-detail .money-timeline-card { border-color: rgba(56,189,248,.3); box-shadow: 0 16px 38px rgba(0,0,0,.19), 0 0 0 1px rgba(56,189,248,.04); }
.money-timeline-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 900; background: rgba(59,130,246,.14); color: #93c5fd; }
.money-timeline-status.is-success { background: rgba(34,197,94,.14); color: #86efac; }
.money-timeline-status.is-pending { background: rgba(245,158,11,.16); color: #fcd34d; }
.money-timeline-status.is-failed { background: rgba(239,68,68,.14); color: #fca5a5; }
@media (max-width: 1180px) {
  .money-timeline-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .money-timeline-filters > *,
  .money-timeline-filters label { width: 100%; min-width: 0; }
  .money-timeline-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .money-timeline-roadmap { padding-left: 24px; }
  .money-timeline-node { grid-template-columns: 1fr; gap: 5px; padding-left: 26px; }
  .money-timeline-node::before { left: 0; top: 18px; }
  .money-timeline-dot { left: -8px; top: 10px; }
  .money-timeline-node time { text-align: left; padding-top: 0; }
  .money-timeline-balance-grid { grid-template-columns: 1fr; }
  .money-timeline-route-actions { align-items: stretch; flex-direction: column; }
  .money-timeline-route-actions > * { justify-content: center; width: 100%; }
}
@media (max-width: 420px) {
  .money-timeline-summary { grid-template-columns: 1fr; }
  .money-timeline-card { padding: 12px; }
  .customer-money-timeline-meta { text-align: left; }
}

.web-chat-section { min-height: 0; padding: 0; }
body.web-chat-mode {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
body.web-chat-mode .main-panel {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
body.web-chat-mode #section-web-chat.content-section.is-active {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  animation: none;
}
.web-chat-workspace {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}
.web-chat-toolbar,
.web-chat-console-panel,
.web-chat-sessions-list,
.web-chat-chat-view { border: 1px solid rgba(148,163,184,.16); background: rgba(3,7,18,.32); border-radius: 16px; }
.web-chat-toolbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.web-chat-brand,
.web-chat-actions,
.web-chat-session-title,
.web-chat-chat-header { display: flex; align-items: center; gap: 12px; }
.web-chat-mobile-menu { display: none; }
.web-chat-brand-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #bae6fd; background: rgba(14,165,233,.14); border: 1px solid rgba(56,189,248,.25); }
.web-chat-brand strong { display: block; color: #f8fafc; font-size: 16px; }
.web-chat-brand small,
.web-chat-session-main small,
.web-chat-chat-heading small { color: var(--muted); }
.web-chat-realtime-status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(148,163,184,.12); color: #cbd5e1; }
.web-chat-realtime-status.is-connected { background: rgba(34,197,94,.14); color: #86efac; }
.web-chat-realtime-status.is-offline { background: rgba(239,68,68,.14); color: #fca5a5; }
.web-chat-console-panel { height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(310px, 360px) minmax(0, 1fr); overflow: hidden; }
.web-chat-sessions-list { height: 100%; min-height: 0; border: 0; border-right: 1px solid rgba(148,163,184,.15); border-radius: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.web-chat-sessions-header { display: grid; gap: 10px; padding: 14px; border-bottom: 1px solid rgba(148,163,184,.14); }
.web-chat-session-title { justify-content: space-between; color: #e2e8f0; font-weight: 900; }
.web-chat-session-title > span:last-child { min-width: 30px; height: 26px; border-radius: 999px; display: grid; place-items: center; background: rgba(56,189,248,.14); color: #bae6fd; font-size: 12px; }
.web-chat-session-filters,
.web-chat-start-row { display: grid; gap: 8px; }
.web-chat-session-filters { grid-template-columns: minmax(0, 1fr) 112px 112px; }
.web-chat-start-row { position: relative; }
.web-chat-start-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #e2e8f0; font-size: 12px; font-weight: 800; }
.web-chat-start-label span { display: inline-flex; align-items: center; gap: 7px; }
.web-chat-start-label i { color: #7dd3fc; }
.web-chat-start-label small { color: var(--muted); font-size: 10px; font-weight: 600; }
.web-chat-sessions-items { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 8px; display: grid; align-content: start; gap: 8px; }
.web-chat-session-item { width: 100%; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid rgba(148,163,184,.14); border-radius: 12px; background: rgba(15,23,42,.26); color: inherit; text-align: left; cursor: pointer; }
.web-chat-session-item:hover,
.web-chat-session-item.is-active { border-color: rgba(56,189,248,.45); background: rgba(14,165,233,.10); }
.web-chat-session-item.is-closed { opacity: .68; }
.web-chat-session-avatar { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: rgba(250,204,21,.14); color: #fde68a; font-weight: 900; }
.web-chat-session-main { min-width: 0; display: grid; gap: 3px; }
.web-chat-session-main strong,
.web-chat-session-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-chat-session-meta { display: grid; justify-items: end; gap: 5px; color: var(--muted); font-size: 11px; }
.web-chat-session-meta em { min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: #ef4444; color: #fff; font-style: normal; font-weight: 900; }
.web-chat-player-results { position: absolute; z-index: 24; top: calc(100% + 7px); left: 0; right: 0; max-height: 286px; overflow-y: auto; display: grid; gap: 6px; padding: 8px; border: 1px solid rgba(56,189,248,.25); border-radius: 12px; background: rgba(15,23,42,.98); box-shadow: 0 20px 42px rgba(0,0,0,.42); }
.web-chat-player-results[hidden] { display: none !important; }
.web-chat-player-results button { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid transparent; border-radius: 10px; color: #e2e8f0; background: rgba(148,163,184,.08); text-align: left; cursor: pointer; }
.web-chat-player-results button:hover,
.web-chat-player-results button:focus-visible { border-color: rgba(56,189,248,.42); background: rgba(14,165,233,.15); outline: none; }
.web-chat-player-results button > span:nth-child(2) { min-width: 0; }
.web-chat-player-results button strong,
.web-chat-player-results button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-chat-player-results button small { margin-top: 2px; color: #94a3b8; font-size: 10px; }
.web-chat-player-results button > i { color: #7dd3fc; font-size: 11px; }
.web-chat-player-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fde68a; background: rgba(250,204,21,.14); font-size: 12px; font-weight: 900; }
.web-chat-player-empty { padding: 10px; color: var(--muted); text-align: center; }
.web-chat-chat-view { height: 100%; min-height: 0; min-width: 0; border: 0; border-radius: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; }
.web-chat-chat-header { justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(148,163,184,.14); }
.web-chat-chat-heading { min-width: 0; flex: 1; }
.web-chat-chat-heading h4 { margin: 0; color: #f8fafc; font-size: 17px; }
.web-chat-chat-heading small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-chat-contact-username { color: #bae6fd; font-weight: 800; }
.web-chat-message-feed { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: radial-gradient(circle at 90% 0, rgba(14,165,233,.07), transparent 34%), linear-gradient(180deg, rgba(2,6,23,.12), rgba(2,6,23,.32)); }
.web-chat-bubble { max-width: min(660px, 82%); padding: 12px 14px 10px; border-radius: 18px 18px 18px 6px; border: 1px solid rgba(148,163,184,.18); background: rgba(15,23,42,.78); align-self: flex-start; overflow-wrap: anywhere; box-shadow: 0 12px 28px rgba(0,0,0,.16); }
.web-chat-bubble.is-admin { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, rgba(3,105,161,.36), rgba(30,64,175,.30)); border-color: rgba(56,189,248,.32); }
.web-chat-bubble-identity { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.web-chat-bubble-avatar { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #fde68a; background: rgba(250,204,21,.13); border: 1px solid rgba(250,204,21,.18); font-size: 12px; font-weight: 900; }
.web-chat-bubble.is-admin .web-chat-bubble-avatar { color: #bae6fd; background: rgba(14,165,233,.17); border-color: rgba(56,189,248,.24); }
.web-chat-bubble-identity > span:last-child { min-width: 0; }
.web-chat-bubble-identity strong { display: block; margin: 0; color: #f8fafc; font-size: 12px; line-height: 1.25; }
.web-chat-bubble-identity small { display: block; margin: 2px 0 0; color: #94a3b8; font-size: 10px; line-height: 1.2; }
.web-chat-bubble p { margin: 0; color: #f8fafc; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.web-chat-image-link { display: block; overflow: hidden; border-radius: 12px; background: rgba(2,6,23,.42); }
.web-chat-image-link img { width: min(100%, 560px); max-height: 440px; display: block; object-fit: contain; }
.web-chat-bubble-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 9px; color: #94a3b8; font-size: 10px; }
.web-chat-bubble-footer time { font-variant-numeric: tabular-nums; }
.web-chat-bubble-footer span { display: inline-flex; align-items: center; gap: 4px; color: #7dd3fc; }
.web-chat-composer { position: sticky; z-index: 4; bottom: 0; min-width: 0; display: grid; grid-template-columns: 46px 46px minmax(0,1fr) auto; align-items: end; gap: 10px; padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(148,163,184,.14); background: rgba(2,6,23,.96); box-shadow: 0 -12px 28px rgba(0,0,0,.18); }
.web-chat-composer textarea { min-width: 0; min-height: 46px; max-height: 112px; overflow-y: auto; resize: none; }
.web-chat-attach { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border-radius: 13px; font-size: 17px; }
.web-chat-emoji-control { position: relative; }
.web-chat-emoji-toggle { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border-radius: 13px; font-size: 18px; }
.web-chat-emoji-picker { position: absolute; z-index: 18; left: 0; bottom: calc(100% + 11px); width: 294px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 10px; border: 1px solid rgba(148,163,184,.24); border-radius: 16px; background: rgba(15,23,42,.98); box-shadow: 0 20px 46px rgba(0,0,0,.42); }
.web-chat-emoji-picker[hidden] { display: none !important; }
.web-chat-emoji-picker button { width: 39px; height: 39px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 10px; color: inherit; background: rgba(148,163,184,.08); font-size: 20px; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.web-chat-emoji-picker button:hover,
.web-chat-emoji-picker button:focus-visible { transform: translateY(-2px); border-color: rgba(56,189,248,.38); background: rgba(14,165,233,.18); outline: none; }
.web-chat-mobile-back { display: none; }

.player-pl-hero {
  border-color: rgba(250,204,21,.22);
  background:
    linear-gradient(135deg, rgba(250,204,21,.08), transparent 34%),
    linear-gradient(180deg, rgba(15,23,42,.94), rgba(2,6,23,.92));
}

.player-pl-head,
.player-pl-actions {
  align-items: flex-start;
  gap: 12px;
}

.player-pl-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.player-pl-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin: 18px 0 14px;
}

.player-pl-summary-card {
  min-height: 116px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 8px;
  background: rgba(15,23,42,.62);
}

.player-pl-summary-card i {
  color: #facc15;
}

.player-pl-summary-card > span,
.player-pl-summary-card small {
  color: var(--muted);
  font-size: 12px;
}

.player-pl-summary-card strong {
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.25;
}

.player-pl-summary-card.is-profit i,
.player-pl-result.is-profit,
.player-pl-aggregate-value.is-player-loss {
  color: #86efac;
}

.player-pl-summary-card.is-loss i,
.player-pl-result.is-loss,
.player-pl-aggregate-value.is-player-win {
  color: #fca5a5;
}

.player-pl-summary-card.is-stale i {
  color: #fdba74;
}

.player-pl-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-pl-period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: oklch(11% 0.025 155 / 0.65);
  border: 1px solid oklch(35% 0.06 160 / 0.45);
}

.player-pl-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.player-pl-preset-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 850;
  margin-right: 4px;
}

.player-pl-preset-btn {
  padding: 6px 13px;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid oklch(35% 0.06 160 / 0.5);
  background: oklch(14% 0.03 155 / 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.15s ease;
}

.player-pl-preset-btn:hover {
  color: var(--text);
  border-color: var(--gold);
  background: oklch(20% 0.05 82 / 0.2);
}

.player-pl-preset-btn.is-active {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.65);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.12);
}

.player-pl-custom-dates {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-pl-custom-dates label,
.player-pl-date-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-pl-custom-dates label span,
.player-pl-date-field span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.player-pl-custom-dates input[type="date"] {
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  color-scheme: dark;
  background: oklch(7% 0.025 155 / 0.9);
  border: 1px solid oklch(43% 0.07 155 / 0.7);
}

.player-pl-controls-row {
  display: grid;
  grid-template-columns: 150px 210px minmax(220px, 1fr) 150px 150px 120px auto;
  gap: 10px;
  align-items: end;
}

.player-pl-controls-row label {
  display: grid;
  gap: 6px;
}

.player-pl-controls-row label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.player-pl-filter-search input {
  min-width: 0;
}

.player-pl-table th button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.player-pl-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.player-pl-result {
  display: inline-grid;
  gap: 2px;
  min-width: 132px;
  font-weight: 900;
}

.player-pl-result b {
  font-size: 11px;
}

.player-pl-result span {
  font-variant-numeric: tabular-nums;
}

.player-pl-result.is-even {
  color: #cbd5e1;
}

.player-pl-freshness {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(148,163,184,.18);
  font-size: 11px;
  font-weight: 900;
}

.player-pl-freshness.is-fresh {
  color: #bbf7d0;
  background: rgba(34,197,94,.16);
}

.player-pl-freshness.is-stale {
  color: #fed7aa;
  background: rgba(249,115,22,.17);
}

.player-pl-freshness.is-unavailable {
  color: #fecaca;
  background: rgba(239,68,68,.16);
}

.player-pl-expand,
.player-pl-mobile-detail {
  display: none;
}

.player-pl-page-label {
  color: var(--muted);
  font-weight: 800;
}

.player-pl-drawer {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
}

.player-pl-drawer.is-open {
  display: block;
}

.player-pl-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2,6,23,.68);
  cursor: pointer;
}

.player-pl-drawer-card {
  position: absolute;
  top: 0;
  right: 0;
  width: min(720px, 100vw);
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  border-left: 1px solid rgba(250,204,21,.24);
  background: #08111f;
  box-shadow: -24px 0 70px rgba(0,0,0,.52);
}

.player-pl-drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid rgba(148,163,184,.16);
}

.player-pl-drawer-head h3 {
  margin: 0;
}

.player-pl-drawer-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.player-pl-drawer-body {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
}

.player-pl-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.player-pl-detail-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 8px;
  background: rgba(15,23,42,.58);
}

.player-pl-detail-grid span,
.player-pl-aggregate-row small {
  color: var(--muted);
  font-size: 12px;
}

.player-pl-detail-grid strong {
  color: #f8fafc;
}

.player-pl-detail-section {
  display: grid;
  gap: 9px;
}

.player-pl-detail-section h4 {
  margin: 4px 0 0;
  color: #f8fafc;
}

.player-pl-aggregate-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 8px;
  background: rgba(15,23,42,.48);
}

.player-pl-aggregate-row > * {
  position: relative;
  z-index: 1;
}

.player-pl-aggregate-row > i {
  position: absolute;
  z-index: 0;
  left: 0;
  bottom: 0;
  width: var(--bar-width, 8%);
  height: 3px;
  background: linear-gradient(90deg, #facc15, #38bdf8);
}

.player-pl-aggregate-row strong,
.player-pl-aggregate-row small {
  display: block;
}

.player-pl-aggregate-value {
  align-self: center;
  font-weight: 900;
  white-space: nowrap;
}

.player-pl-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.player-pl-return-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 1100px) {
  body.web-chat-mode .main-panel { position: fixed; inset: 0; z-index: 230; width: 100vw; height: 100vh; height: 100dvh; grid-template-rows: minmax(0, 1fr); overflow: hidden; padding: 10px; }
  body.web-chat-mode .sidebar.is-open { z-index: 240; }
  body.web-chat-mode .topbar { display: none; }
  .web-chat-mobile-menu { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; }
  .web-chat-workspace { height: 100%; min-height: 0; }
  .web-chat-console-panel { width: 100%; height: 100%; min-height: 0; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .web-chat-sessions-list,
  .web-chat-chat-view { width: 100%; height: 100%; min-height: 0; }
  .web-chat-chat-view { display: none; }
  .web-chat-section.is-room-open .web-chat-sessions-list { display: none; }
  .web-chat-section.is-room-open .web-chat-chat-view { display: grid; }
  .web-chat-mobile-back { display: inline-flex; }
}

@media (max-width: 1180px) {
  .player-pl-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-pl-controls-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body.web-chat-mode .main-panel { padding: 6px; }
  .web-chat-workspace { gap: 6px; }
  .web-chat-toolbar { min-height: 58px; align-items: center; flex-direction: row; gap: 8px; padding: 8px 10px; }
  .web-chat-brand { min-width: 0; flex: 1; }
  .web-chat-brand > div { min-width: 0; }
  .web-chat-brand-icon,
  .web-chat-brand small,
  .web-chat-mobile-menu span,
  .web-chat-realtime-status span:last-child,
  #webChatRefreshBtn span { display: none; }
  .web-chat-brand strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .web-chat-actions { flex: 0 0 auto; gap: 6px; }
  .web-chat-realtime-status { width: 34px; min-height: 34px; justify-content: center; padding: 0; }
  #webChatRefreshBtn { width: 38px; min-width: 38px; min-height: 38px; padding: 0; }
  .web-chat-session-filters { grid-template-columns: minmax(0, 1fr) 104px 104px; }
  .web-chat-start-label small { display: none; }
  .web-chat-sessions-header { gap: 8px; padding: 10px; }
  .web-chat-message-feed { padding: 12px 10px; }
  .web-chat-bubble { max-width: 94%; }
  .web-chat-chat-header { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 8px; padding: 8px 10px; }
  .web-chat-chat-heading h4 { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .web-chat-chat-header > .mini-btn { min-width: 40px; min-height: 40px; padding-inline: 10px; }
  .web-chat-composer { grid-template-columns: 42px 42px minmax(0,1fr) 44px; gap: 6px; padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .web-chat-attach { width: 42px; height: 44px; }
  .web-chat-emoji-toggle { width: 42px; height: 44px; }
  .web-chat-composer textarea { min-height: 44px; padding: 10px 12px; }
  .web-chat-composer > .primary-btn { width: 44px; min-width: 44px; justify-content: center; padding: 0; }
  .web-chat-composer > .primary-btn span { display: none; }
  .web-chat-emoji-picker { width: min(286px, calc(100vw - 36px)); grid-template-columns: repeat(6, 1fr); }
  .web-chat-emoji-picker button { width: 100%; }

  .player-pl-summary-grid,
  .player-pl-controls-row,
  .player-pl-detail-grid {
    grid-template-columns: 1fr;
  }

  .player-pl-actions,
  .player-pl-detail-actions {
    width: 100%;
  }

  .player-pl-actions > *,
  .player-pl-detail-actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }

  .player-pl-table {
    min-width: 0;
  }

  .player-pl-table thead {
    display: none;
  }

  .player-pl-table tr {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(148,163,184,.16);
  }

  .player-pl-table td {
    display: none;
    padding: 0;
    border: 0;
  }

  .player-pl-table td:nth-child(1),
  .player-pl-table td:nth-child(2),
  .player-pl-table td:nth-child(9),
  .player-pl-table td:nth-child(11) {
    display: block;
  }

  .player-pl-table td:nth-child(9) {
    grid-column: 2 / 3;
  }

  .player-pl-table td:nth-child(11) {
    grid-column: 3 / 4;
  }

  .player-pl-expand {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-right: 4px;
    border: 1px solid rgba(250,204,21,.24);
    border-radius: 8px;
    color: #facc15;
    background: rgba(250,204,21,.08);
  }

  .player-pl-table tr[data-player-pl-expanded="true"] .player-pl-mobile-detail {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    padding-top: 10px;
  }

  .player-pl-mobile-detail > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
  }

  .player-pl-mobile-detail strong {
    color: #f8fafc;
    text-align: right;
  }

  .player-pl-drawer-card {
    width: 100vw;
  }

  .player-pl-drawer-head {
    padding: 16px;
  }

  .player-pl-drawer-body {
    padding: 16px;
  }
}

.tx-order-id {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 5px 7px;
  border: 1px solid #514313;
  border-radius: 6px;
  background: #171706;
  color: #f4cd64;
  text-align: left;
  cursor: pointer;
}
.tx-order-id small { display: block; font-size: 10px; margin-bottom: 3px; }
.tx-order-id code { font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
.tx-order-id:hover { background: #302908; border-color: #e4b72e; }
.tx-order-id:focus-visible { outline: 2px solid #e4b72e; outline-offset: 2px; }

.admin-push-control { position: relative; margin-bottom: 12px; }
.admin-push-toggle { width: 100%; justify-content: center; }
.admin-push-toggle.is-enabled { border-color: #22c55e; color: #bbf7d0; }
.admin-push-panel {
  position: fixed;
  z-index: 260;
  top: 70px;
  right: 16px;
  width: min(340px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid rgba(229, 183, 46, .35);
  border-radius: 14px;
  background: #1c2029;
  color: #f9fafb;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .45);
  text-align: left;
}
.admin-push-panel[hidden], .admin-push-ios-help[hidden] { display: none; }
.admin-push-panel strong { display: block; margin-bottom: 4px; font-size: 14px; }
.admin-push-panel p { margin: 0 0 10px; line-height: 1.4; font-size: 13px; overflow-wrap: anywhere; }
.admin-push-panel p:empty { display: none; }
.admin-push-panel #adminPushTestStatus:not(:empty) { margin: 8px 0 0; }
.admin-push-panel .admin-push-help { color: #bac3cf; font-size: 13px; }
.admin-push-panel .admin-push-ios-help {
  padding: 10px;
  border: 1px solid rgba(229, 183, 46, .4);
  border-radius: 8px;
  background: rgba(229, 183, 46, .08);
  font-size: 13px;
}
.admin-push-actions { display: flex; gap: 8px; }
.admin-push-actions button { flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px; border-radius: 8px; font-size: 13px; justify-content: center; box-shadow: none; }
.admin-push-actions [hidden] { display: none; }
@media (max-width: 1100px) {
  .admin-push-panel { top: 68px; right: 12px; width: min(290px, calc(86vw - 24px)); }
}

/* Emergency Maintenance Controls */
.emergency-controls-container {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}
.emergency-control-card {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid oklch(35% 0.05 155 / 0.7);
  background: oklch(14% 0.02 155 / 0.85);
  transition: all 0.25s ease;
}
.emergency-control-card.is-active {
  border-color: #ef4444;
  background: oklch(18% 0.06 25 / 0.85);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
}
.emergency-control-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.emergency-control-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.emergency-control-icon--deposit {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.emergency-control-icon--withdraw {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}
.emergency-control-title {
  flex: 1;
}
.emergency-control-title h4 {
  margin: 0 0 2px;
  font-size: 16px;
  color: var(--text);
}
.emergency-control-title p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.emergency-control-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 14px;
}
.emergency-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.emergency-switch-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.emergency-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #22c55e;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  transition: all 0.2s ease;
}
.emergency-toggle-btn .emergency-toggle-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  transition: all 0.2s ease;
}
.emergency-toggle-btn.is-active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
}
.emergency-toggle-btn.is-active .emergency-toggle-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}
.emergency-toggle-btn:hover {
  filter: brightness(1.15);
}
.emergency-toggle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Payment Routing Quick Emergency Strip */
.payment-routing-emergency-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  background: oklch(12% 0.02 155 / 0.85);
  border: 1px solid oklch(35% 0.06 155 / 0.6);
  border-radius: 10px;
}
@media (max-width: 768px) {
  .payment-routing-emergency-strip {
    grid-template-columns: 1fr;
  }
}
.emergency-strip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  gap: 12px;
}
.emergency-strip-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.emergency-strip-info i {
  font-size: 18px;
}
.emergency-strip-info strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}
.emergency-strip-info .pill {
  font-size: 11px;
  padding: 2px 6px;
}


.player-payment-route-settings {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: oklch(13% 0.035 155 / 0.48);
}
.player-payment-route-field { display: grid; gap: 8px; min-width: 0; }
.player-payment-route-field select { width: 100%; min-width: 0; }
.player-payment-route-settings .muted-note { margin: 8px 0; line-height: 1.6; }

.slip-member-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #edf2f7;
  color: #2d3748;
  border: 1px solid #cbd5e0;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.slip-member-tag button {
  border: none;
  background: transparent;
  color: #718096;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.slip-member-tag button:hover {
  color: #e53e3e;
}
.slip-member-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-size: 0.85rem;
}
.slip-member-option:hover {
  background: #f7fafc;
}
.slip-member-option strong {
  color: #2b6cb0;
}
.slip-member-option small {
  color: #718096;
}

/* Payment Gateway Workspace UI Cleanup */
.payment-workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid oklch(34% 0.06 155 / 0.45);
}

.payment-subview-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 12px;
  background: oklch(8% 0.025 155 / 0.85);
  border: 1px solid oklch(35% 0.07 155 / 0.58);
}

.payment-subview-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.payment-subview-tab:hover {
  color: var(--text);
  background: oklch(14% 0.035 155 / 0.6);
}

.payment-subview-tab.is-active {
  color: var(--gold-soft);
  background: oklch(16% 0.045 155 / 0.92);
  border-color: var(--line-gold);
  box-shadow: inset 0 0 0 1px oklch(75% 0.16 82 / 0.18);
}

.payment-subview-panel {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.payment-global-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.payment-subview-panel[hidden],
.provider-vault-panel[hidden] {
  display: none !important;
}

.provider-vault-panel {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  border: 1px solid oklch(46% 0.11 82 / 0.58);
  background: linear-gradient(180deg, oklch(11% 0.032 155 / 0.82), oklch(8.5% 0.024 155 / 0.9));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.jinlipay-field-grid {
  grid-template-columns: minmax(220px, 1.3fr) minmax(220px, 1.3fr) minmax(140px, 0.7fr);
}

.upluspay-field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .jinlipay-field-grid,
  .upluspay-field-grid {
    grid-template-columns: 1fr;
  }
}

.provider-vault-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: oklch(20% 0.055 82 / 0.36);
  border: 1px solid oklch(55% 0.12 82 / 0.45);
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.provider-env-badge-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 10px;
  background: oklch(9% 0.025 155 / 0.78);
  border: 1px solid oklch(39% 0.07 155 / 0.62);
  font-size: 13px;
  font-weight: 800;
}

.provider-env-badge-select select {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: oklch(13% 0.03 240 / 0.9);
  color: var(--gold-soft);
  border: 1px solid oklch(48% 0.1 82 / 0.55);
  font-weight: 800;
}

.provider-vault-group {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: oklch(8% 0.022 155 / 0.66);
  border: 1px solid oklch(32% 0.06 155 / 0.52);
}

.provider-vault-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  font-size: 13.5px;
  font-weight: 900;
  padding-bottom: 8px;
  border-bottom: 1px dashed oklch(35% 0.06 155 / 0.5);
}

.provider-vault-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .provider-vault-split-grid {
    grid-template-columns: 1fr;
  }
}

.clear-options-label {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
}

.vault-status-line {
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px dashed oklch(35% 0.06 155 / 0.45);
}

.callback-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border-radius: 8px;
  background: oklch(6.5% 0.02 155 / 0.72);
  border: 1px solid oklch(28% 0.05 155 / 0.45);
}

.callback-copy-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  min-width: 0;
}

.callback-copy-row .mini-btn {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}


.dashboard-recent-size { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; }
.dashboard-recent-size select { width: auto; min-width: 76px; }

.dashboard-timeline-row { cursor: pointer; }
.dashboard-timeline-row:hover, .dashboard-timeline-row:focus-visible { background: rgba(250, 204, 21, 0.07); outline: 1px solid rgba(250, 204, 21, 0.4); outline-offset: -1px; }
