:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f6fb;
  color: #12121a;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -ms-touch-action: manipulation;
}

.page-wrapper {
  padding: 16px;
  max-width: 540px;
  margin: 0 auto;
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
}

.hidden {
  display: none !important;
}

.visible {
  display: block;
}

.mobile-menu-toggle {
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
  cursor: pointer;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(82vw, 320px);
  height: 100vh;
  padding: 18px 16px 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 18px 0 30px rgba(15, 23, 42, 0.18);
  transform: translateX(-110%);
  transition: transform 0.28s ease;
  z-index: 1400;
  overflow-y: auto;
}

.mobile-menu-panel:not(.hidden) {
  transform: translateX(0);
}

.mobile-menu-panel.hidden {
  display: block !important;
  transform: translateX(-110%);
}

.mobile-menu-toggle.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 72px;
  padding: 8px 0 16px;
  border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-header .brand-title {
  margin: 0 0 4px;
  font-size: 1.26rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.mobile-menu-header .brand-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.3;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(82vw, 320px);
  height: 100vh;
  padding: 18px 16px 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 18px 0 30px rgba(15, 23, 42, 0.18);
  transform: translateX(-110%);
  transition: transform 0.28s ease;
  z-index: 1400;
  overflow-y: auto;
}

.mobile-menu-close {
  position: absolute;
  right: 25px;
  bottom: 25px;
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-nav {
  display: grid;
  gap: 7px;
  padding-top: 16px;
}

.nav-button {
  border: none;
  padding: 0 14px;
  height: 54px;
  font-weight: 700;
  font-size: 0.96rem;
  color: #334155;
  background: #f8fafc;
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
  padding-left: 16px;
  padding-right: 16px;
}

.nav-button.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.amount-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.amount-input-grid input {
  min-width: 0;
  padding-top: 7px;
  padding-bottom: 7px;
}

.amount-input-grid input[readonly] {
  background: #eef6ff;
  color: #0f172a;
}

.bonus-toggle-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.bonus-toggle-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  padding: 8px 10px;
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
  min-height: 34px;
}

.bonus-toggle-item span {
  display: inline-block;
  min-width: 2.2ch;
  text-align: center;
}

.bonus-toggle-item input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2563eb;
}

.player-results {
  display: grid;
  gap: 12px;
}

.settings-accordion { display: grid; gap: 12px; }
.settings-section { overflow: hidden; border: 1px solid #dbe3ef; border-radius: 16px; background: #ffffff; box-shadow: 0 8px 22px rgba(15, 23, 42, .06); }
.settings-section summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding: 14px 16px; color: #0f172a; cursor: pointer; list-style: none; }
.settings-section summary::-webkit-details-marker { display: none; }
.settings-section[open] summary { border-bottom: 1px solid #e2e8f0; background: #f8fbff; }
.settings-section-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.settings-section-title > span:last-child { display: grid; gap: 3px; }
.settings-section-title strong { font-size: .98rem; }
.settings-section-title small { color: #64748b; font-size: .78rem; font-weight: 500; }
.settings-section-icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #eff6ff; color: #2563eb; font-size: 1.05rem; }
.settings-section:first-child .settings-section-icon { background: #fff1f2; color: #dc2626; }
.settings-chevron { color: #64748b; font-size: 1.35rem; line-height: 1; transition: transform .2s ease; }
.settings-section[open] .settings-chevron { transform: rotate(180deg); }
.settings-section-body { display: grid; gap: 10px; padding: 16px; }
.payment-settings-form { display: grid; gap: 9px; max-width: 560px; }
.payment-settings-form textarea { width: 100%; min-height: 110px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.auto-topup-bonus-form { display: grid; gap: 9px; max-width: 560px; }
.auto-topup-bonus-form input[type="number"] { width: 100%; }
.auto-topup-bonus-toggle { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #dbe3ef; border-radius: 10px; background: #f8fafc; color: #0f172a; font-weight: 700; }
.auto-topup-bonus-toggle input { width: 18px; height: 18px; accent-color: #2563eb; }
.auto-topup-bonus-form .message { min-height: 18px; margin: 0; }
.auto-topup-bonus-form .message-error { color: #b91c1c; }
.auto-topup-bonus-form .message-success { color: #15803d; }
.settings-placeholder { padding: 18px; border: 1px dashed #cbd5e1; border-radius: 12px; color: #64748b; background: #f8fafc; text-align: center; }
.referral-form { display: grid; gap: 9px; max-width: 560px; }
.referral-form .btn { justify-self: start; }
.referral-form .message { min-height: 18px; margin: 0; }
.referral-form .message-success { color: #15803d; }
.referral-form .message-error { color: #b91c1c; }
.referral-results { display: grid; gap: 14px; }
.referral-card { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid #dbe3ef; border-radius: 14px; background: #fff; }
.referral-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.referral-card-header h3 { margin: 0 0 3px; color: #0f172a; font-size: .98rem; }
.referral-card-header small { color: #64748b; }
.referral-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.referral-delete-button { color: #b91c1c; border-color: #fecaca; }
.referral-url { overflow-wrap: anywhere; color: #1d4ed8; font-size: .84rem; }
.referral-url-disabled { color: #64748b; }
.referral-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.referral-stats > div { display: grid; gap: 2px; padding: 11px; border-radius: 10px; background: #f8fafc; }
.referral-stats strong { color: #0f172a; font-size: 1.1rem; }
.referral-stats span { color: #64748b; font-size: .75rem; }
.referral-visits-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.referral-visits-table th, .referral-visits-table td { padding: 9px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.referral-visits-table th { color: #475569; background: #f8fafc; }
.referral-visits-table td strong, .referral-visits-table td small { display: block; }
.referral-visits-table td small { margin-top: 3px; color: #64748b; }
.referral-visits-table .empty-state { padding: 16px; }
.referral-table-hint { color: #64748b; font-size: .72rem; }
.game-maintenance-settings { display: grid; gap: 10px; }
.game-maintenance-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #e2e8f0; border-radius: 13px; background: #f8fafc; }
.game-maintenance-icon { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #eff6ff; color: #2563eb; font-weight: 800; }
.game-maintenance-copy { display: grid; flex: 1; gap: 3px; min-width: 0; }
.game-maintenance-copy strong { color: #0f172a; font-size: .9rem; }
.game-maintenance-copy small { color: #64748b; font-size: .75rem; }
.maintenance-switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 46px; height: 26px; }
.maintenance-switch input { width: 0; height: 0; opacity: 0; }
.maintenance-switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; transition: background .2s ease; }
.maintenance-switch span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .25); transition: transform .2s ease; }
.maintenance-switch input:checked + span { background: #f59e0b; }
.maintenance-switch input:checked + span::before { transform: translateX(20px); }
.maintenance-switch input:disabled + span { cursor: wait; opacity: .6; }
.player-result-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 13px; background: #f8fafc; }
.player-result-row > div { min-width: 0; display: grid; gap: 4px; color: #64748b; font-size: .82rem; }
.player-result-row strong { color: #0f172a; font-size: .92rem; overflow-wrap: anywhere; }
.player-result-row small { color: #64748b; font-weight: 700; letter-spacing: .04em; }
.player-result-row .btn { flex: 0 0 auto; white-space: nowrap; }

.waha-status-panel {
  display: grid;
  gap: 10px;
}

.waha-session-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.waha-session-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
}

.waha-session-card .waha-session-input {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}

@media (max-width: 520px) {
  .waha-session-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.transaction-results {
  display: block;
}
.transaction-load-more { display: block; width: min(100%, 220px); margin: 12px auto 0; }

.transaction-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 290px);
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.transaction-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.74rem;
}

.transaction-table th,
.transaction-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.transaction-col-date { width: 9%; }
.transaction-col-name { width: 14%; }
.transaction-col-id { width: 15%; }
.transaction-col-value { width: 9%; }
.transaction-col-game { width: 7.5%; }
.transaction-col-max { width: 11%; }
.transaction-col-note { width: 12%; }

.transaction-table thead th {
  background: #dfe7ef;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  vertical-align: middle;
  height: 52px;
  word-break: normal;
  overflow-wrap: normal;
  white-space: nowrap;
}
.transaction-header-label, .transaction-header-total { display: block; }
.transaction-header-total { margin-top: 6px; color: #0f172a; font-size: 0.8rem; text-align: center; line-height: 1.1; }

.transaction-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.transaction-table tbody td {
  color: #0f172a;
  font-size: 0.7rem;
}
.request-checkout-status { color: #2563eb; font-weight: 800; text-decoration: none; }
.request-checkout-status:hover { color: #1d4ed8; text-decoration: underline; }
.request-actions { display: flex; align-items: center; gap: 4px; width: 100%; }
.request-actions .request-decision { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.transaction-total-row th { background: #e0f2fe; color: #0f172a; font-weight: 800; }
.transaction-total-row th:nth-child(3),
.transaction-total-row th:nth-child(4),
.transaction-total-row th:nth-child(5),
.transaction-total-row th:nth-child(6) { color: #166534; text-align: right; }
.transaction-modal-total-row th { background: #fff7ed; color: #9a3412; font-weight: 800; }
.transaction-modal-total-row th:nth-child(3),
.transaction-modal-total-row th:nth-child(4),
.transaction-modal-total-row th:nth-child(5),
.transaction-modal-total-row th:nth-child(6) { text-align: right; }
.transaction-summary-wrap { margin-top: 12px; overflow-x: auto; }
.transaction-summary-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.transaction-summary-table th, .transaction-summary-table td { border: 1px solid #0f172a; padding: 8px; text-align: right; }
.transaction-summary-table th { background: #dbeafe; color: #0f172a; text-align: center; font-weight: 800; }
.transaction-data-total-row td { background: #eff6ff; color: #0f172a; font-weight: 800; }
.transaction-modal-total-row td { background: #fff7ed; }
.transaction-modal-input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #9a3412; font: inherit; font-weight: 800; text-align: right; }
.transaction-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.transaction-summary { border: 1px solid #e2e8f0; border-radius: 6px; padding: 10px; background: #f8fafc; min-width: 0; }
.transaction-summary-heading, .transaction-summary-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.transaction-summary-heading strong { overflow-wrap: anywhere; }
.transaction-summary-line { margin: 10px 0; font-size: 0.75rem; }
.transaction-summary-total { font-size: 1rem; color: #166534; }
.transaction-modal-toggle { border: 0; background: transparent; color: #2563eb; cursor: pointer; font-size: 0.7rem; padding: 0; }
.transaction-modal-field { display: grid; gap: 4px; font-size: 0.7rem; color: #475569; }
.transaction-modal-field input { width: 100%; min-width: 0; padding: 6px; border: 1px solid #cbd5e1; border-radius: 4px; }
.transaction-modal-field.is-hidden { display: none; }

.player-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.player-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.player-profile-grid .player-row-field {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.player-profile-grid .player-name-field {
  grid-column: 1 / -1;
  background: #eff6ff;
}

.player-profile-grid .player-row-field .player-label,
.player-contact-field .player-label {
  color: #64748b;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.player-profile-grid .player-row-field .player-value {
  margin-top: 4px;
  color: #0f172a;
  font-size: .82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: normal;
}

.player-password-field .player-value {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.player-extra-details {
  display: grid;
  flex: 1;
  gap: 8px;
  min-width: 0;
}

.player-contact-field {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  align-items: baseline;
  color: #475569;
  font-size: .72rem;
}

.player-contact-field .player-value {
  overflow-wrap: anywhere;
}

.player-row-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.player-row-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.player-row-field .player-label,
.player-row-field .player-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-value {
  font-size: 0.88rem;
}

.player-row {
  padding: 12px;
}

.player-row-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.player-row-actions {
  display: grid;
  gap: 6px;
  align-items: center;
  justify-items: stretch;
  justify-content: stretch;
  align-self: center;
  min-width: 120px;
}

.player-row-field {
  position: relative;
}

.player-row-field .player-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #475569;
  line-height: 1.2;
}

.player-row-field .player-value {
  display: block;
  margin-top: 1px;
  font-size: 0.72rem;
  color: #0f172a;
  line-height: 1.25;
}

.player-settings-button {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 10px;
  padding: 9px 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

.player-settings-popup {
  display: grid;
  gap: 14px;
  width: min(100%, 440px);
  margin: 0 auto;
  text-align: left;
}

.player-settings-member {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
}

.player-settings-member strong {
  color: #0f172a;
  font-size: 1rem;
}

.player-settings-member span,
.settings-popup-note {
  color: #64748b;
  font-size: 0.82rem;
}

.player-settings-menu {
  display: grid;
  gap: 8px;
}

.player-settings-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.player-settings-option:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #f8fbff;
}

.player-settings-option:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.player-settings-option-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 800;
}

.player-settings-option strong,
.player-settings-option small {
  display: block;
}

.player-settings-option strong {
  font-size: 0.88rem;
}

.player-settings-option small {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.74rem;
}

.member-edit-popup {
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 0;
  gap: 8px;
}

.member-edit-game-ids {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.member-edit-game-ids strong {
  grid-column: 1 / -1;
  color: #0f172a;
}

@media (max-width: 520px) {
  .player-row-actions {
    min-width: 0;
  }

  .player-settings-button {
    min-height: 38px;
    padding-inline: 10px;
  }

  .member-edit-game-ids {
    grid-template-columns: 1fr;
  }
}

.player-id-list {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  flex: 1;
}

.player-id-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #1d4ed8;
}

.player-id-line:hover {
  background: rgba(59, 130, 246, 0.08);
  border-radius: 12px;
  cursor: pointer;
}

.id-label {
  font-weight: 700;
  color: #0f172a;
}

.id-value {
  word-break: break-word;
}

@media (max-width: 520px) {
  .transaction-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .transaction-summary { padding: 8px; }
  .transaction-summary-line { align-items: flex-start; flex-direction: column; gap: 3px; }
}

@media (max-width: 520px) {
  .page-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 2px 5px 200px;
  }

  .bottom-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-menu-panel .nav-button {
    padding: 0 16px;
    font-size: 0.95rem;
    text-align: left;
    justify-content: flex-start;
  }

  .panel-header {
    padding: 7px 7px 5px;
  }

  .transaction-header-bar {
    gap: 8px;
    align-items: flex-start;
  }

  .transaction-header-actions {
    gap: 5px;
  }

  .telegram-report-button,
  .transaction-clear-button {
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.58rem;
  }

  .telegram-report-preview {
    font-size: 0.62rem;
  }

  .panel-header h1 {
    font-size: 0.66rem;
    margin-bottom: 1px;
  }

  .panel-header p {
    font-size: 0.56rem;
    line-height: 1.25;
  }

  .panel-body {
    padding: 7px;
    gap: 5px;
  }

  label {
    font-size: 0.52rem;
  }

  input,
  select,
  textarea,
  button {
    font-size: 0.68rem;
  }

  .brand-title {
    font-size: 0.74rem;
  }

  .brand-subtitle {
    font-size: 0.6rem;
  }

  .amount-input-grid {
    gap: 4px;
  }

  .bonus-toggle-group {
    gap: 4px;
  }

  .bonus-toggle-item {
    padding: 4px 5px;
    gap: 4px;
    font-size: 0.7rem;
    min-height: 32px;
    border-radius: 2px;
  }

  .bonus-toggle-item input {
    width: 12px;
    height: 12px;
  }

  .transaction-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    max-height: none;
    border-radius: 4px;
  }

  .transaction-table {
    width: 100%;
    min-width: 0;
    font-size: 0.42rem;
    table-layout: fixed;
  }

  .transaction-table th,
  .transaction-table td {
    padding: 3px 2px;
    line-height: 1.2;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .transaction-table th:nth-child(1) { width: 9%; }
  .transaction-table th:nth-child(2) { width: 14%; }
  .transaction-table th:nth-child(3) { width: 15%; }
  .transaction-table th:nth-child(4) { width: 10%; }
  .transaction-table th:nth-child(5),
  .transaction-table th:nth-child(6),
  .transaction-table th:nth-child(7) { width: 10%; }
  .transaction-table th:nth-child(8),
  .transaction-table th:nth-child(9) { width: 11%; }

  .transaction-table thead th {
    font-size: 0.34rem;
    letter-spacing: 0.01em;
    height: 34px;
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: normal;
    white-space: nowrap;
  }

  .transaction-header-label,
  .transaction-header-total { line-height: 1; }
  .transaction-header-total { margin-top: 3px; font-size: 0.28rem; font-weight: 800; }

  .transaction-table tbody td {
    font-size: 0.4rem;
  }

  .user-request-table th:nth-child(1) { width: 22%; }
  .user-request-table th:nth-child(2) { width: 21%; }
  .user-request-table th:nth-child(3) { width: 14%; }
  .user-request-table th:nth-child(4) { width: 13%; }
  .user-request-table th:nth-child(5) { width: 12%; }
  .user-request-table th:nth-child(6) { width: 18%; }
  .user-request-table .request-actions { gap: 2px; }
  .user-request-table .request-decision { padding: 4px 2px; font-size: 0.34rem; line-height: 1.1; }
  .user-request-table .request-processing-button { width: 100%; padding: 4px 2px; font-size: 0.34rem; line-height: 1.1; white-space: nowrap; }

  .transaction-load-more { margin-bottom: 24px; }

  .player-row {
    padding: 5px 5px;
    gap: 3px;
  }

  .player-row-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .player-row-field {
    gap: 1px;
  }

  .player-row-field .player-label {
    font-size: 0.42rem;
    letter-spacing: 0.02em;
  }

  .player-row-field .player-value {
    font-size: 0.56rem;
  }

  .player-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
    min-width: 0;
    width: 100%;
    margin-top: 1px;
  }

  .player-row-actions .player-settings-button {
    width: 100%;
    font-size: 0.54rem;
    padding: 6px 7px;
    min-height: 26px;
  }

  .player-row-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .player-id-list {
    gap: 3px;
    padding-top: 2px;
  }

  .player-id-line {
    font-size: 0.62rem;
    padding: 5px 6px;
    gap: 4px;
  }
}



.player-id-block {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.id-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  color: #1d4ed8;
}

.player-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #475569;
}

.player-value {
  font-size: 0.95rem;
  color: #0f172a;
  word-break: break-word;
}

.id-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.id-button {
  width: 100%;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
}

.id-button:hover {
  background: #dbeafe;
}

.id-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.player-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.player-pagination span {
  font-weight: 700;
  color: #334155;
}

.search-note {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: -8px;
  margin-bottom: 10px;
}

.empty-state {
  text-align: center;
  color: #475569;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.brand-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #5565ff 0%, #3ab0ff 100%);
  color: #fff;
  margin-bottom: 18px;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.brand-subtitle {
  font-size: 0.95rem;
  opacity: 0.92;
  line-height: 1.4;
}

.dashboard-card {
  display: grid;
  gap: 16px;
}

.panel {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(16, 36, 74, 0.08);
  overflow: hidden;
}

.panel-header {
  padding: 18px;
  border-bottom: 1px solid #f0f2f8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.transaction-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.transaction-header-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.telegram-report-button,
.transaction-clear-button {
  white-space: nowrap;
  min-width: 0;
  width: auto;
  padding: 8px 10px;
  font-size: 0.72rem;
  border-radius: 10px;
}

.panel-header h1 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.panel-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #5d6d88;
  line-height: 1.5;
}

.panel-body {
  padding: 18px;
  display: grid;
  gap: 14px;
}

label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #344058;
}

input,
select,
button {
  width: 100%;
  font: inherit;
}

input,
select {
  border: 1px solid #d9e2ec;
  border-radius: 2px;
  padding: 12px 14px;
  background: #f8fafc;
  color: #0f172a;
}

input:focus,
select:focus {
  outline: 2px solid rgba(59, 130, 246, 0.22);
  outline-offset: 2px;
}

button {
  border: none;
  border-radius: 0px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-secondary {
  background: #eef2ff;
  color: #1f2937;
}

.btn-small {
  width: auto;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.message {
  font-size: 0.88rem;
  min-height: 1.4rem;
  color: #334155;
}

.message-error {
  color: #7a5a00;
}

.result-card {
  border-top: 1px solid #f0f2f8;
  padding: 18px;
}

.result-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

#response-output {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.55;
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

.popup-response {
  margin-top: 16px;
  max-height: 260px;
  overflow-y: auto;
  text-align: left;
  font-size: 0.9rem;
  color: #0f172a;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.35);
  padding: 16px;
}

.popup-card {
  width: min(100%, 460px);
  max-width: 92vw;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.16);
  padding: 18px 20px 20px;
  display: grid;
  gap: 12px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.popup-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1.45rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.popup-close-button:hover {
  background: #e2e8f0;
}

.popup-close-button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.popup-content {
  display: grid;
  gap: 10px;
  width: 100%;
}

.popup-text {
  width: 100%;
  display: block;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}

.popup-card .btn {
  margin: 0 auto;
  width: auto;
  min-width: 140px;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.popup-close-button.hidden {
  display: none !important;
}

.add-player-popup {
  display: grid;
  gap: 10px;
  width: min(100%, 320px);
  margin: 0 auto;
  text-align: left;
}

.add-player-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #172b4d;
  margin-bottom: 4px;
  text-align: left;
}

.add-player-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  text-align: left;
  margin: 0;
}

.add-player-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  padding: 12px 14px;
  font-size: 1rem;
}

.popup-card .member-edit-popup .btn {
  width: 100%;
  margin: 4px 0 0;
}

.add-player-status {
  min-height: 18px;
  font-size: 0.75rem;
  color: #475569;
  text-align: left;
}

.add-player-status.success {
  color: #166534;
}

.add-player-status.error {
  color: #7a5a00;
}

.player-credentials {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #14532d;
}

.player-credentials-title {
  font-weight: 700;
}

.player-credential-line {
  color: #166534;
  word-break: break-word;
}

.credential-copy-button {
  width: fit-content;
  margin-top: 4px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #16a34a;
  color: #ffffff;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.popup-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e2e8f0;
}

.popup-icon::before {
  content: '';
  width: 24px;
  height: 24px;
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
}

.popup-icon.loading::before {
  background-image: url('data:image/svg+xml,%3Csvg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M12 2V6" stroke="%233b82f6" stroke-width="2" stroke-linecap="round"/%3E%3Cpath d="M12 18V22" stroke="%233b82f6" stroke-width="2" stroke-linecap="round"/%3E%3Cpath d="M4.93 4.93L7.76 7.76" stroke="%233b82f6" stroke-width="2" stroke-linecap="round"/%3E%3Cpath d="M16.24 16.24L19.07 19.07" stroke="%233b82f6" stroke-width="2" stroke-linecap="round"/%3E%3Cpath d="M2 12H6" stroke="%233b82f6" stroke-width="2" stroke-linecap="round"/%3E%3Cpath d="M18 12H22" stroke="%233b82f6" stroke-width="2" stroke-linecap="round"/%3E%3Cpath d="M4.93 19.07L7.76 16.24" stroke="%233b82f6" stroke-width="2" stroke-linecap="round"/%3E%3Cpath d="M16.24 7.76L19.07 4.93" stroke="%233b82f6" stroke-width="2" stroke-linecap="round"/%3E%3C/svg%3E');
  animation: popup-spin 1.2s linear infinite;
}

.popup-icon.success::before {
  background-image: url('data:image/svg+xml,%3Csvg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M6 12L10 16L18 8" stroke="%2314b8a6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/%3E%3C/svg%3E');
}

.popup-icon.error::before {
  background-image: url('data:image/svg+xml,%3Csvg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M6 6L18 18" stroke="%23ef4444" stroke-width="2" stroke-linecap="round"/%3E%3Cpath d="M18 6L6 18" stroke="%23ef4444" stroke-width="2" stroke-linecap="round"/%3E%3C/svg%3E');
}

.popup-icon.warning {
  background: #fff7ed;
}

.popup-icon.warning::before {
  background-image: url('data:image/svg+xml,%3Csvg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M12 3.5L21 18.5C21.4 19.2 20.9 20 20.1 20H3.9C3.1 20 2.6 19.2 3 18.5L12 3.5Z" stroke="%23f59e0b" stroke-width="2" stroke-linejoin="round"/%3E%3Cpath d="M12 9V13" stroke="%23f59e0b" stroke-width="2" stroke-linecap="round"/%3E%3Ccircle cx="12" cy="16.5" r="1" fill="%23f59e0b"/%3E%3C/svg%3E');
}

.popup-icon.user {
  background: #eff6ff;
}

.popup-icon.user::before {
  background-image: url('data:image/svg+xml,%3Csvg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M16 19V17C16 15.3431 14.6569 14 13 14H11C9.34315 14 8 15.3431 8 17V19" stroke="%232563eb" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/%3E%3Ccircle cx="12" cy="8" r="3.5" stroke="%232563eb" stroke-width="2"/%3E%3C/svg%3E');
}
.popup-icon.telegram { background: #e0f2fe; }
.popup-icon.telegram::before { width: 34px; height: 34px; background-image: url('/img/sosialmedia/telegram.png'); }

.popup-title {
  font-size: 1.12rem;
  font-weight: 600;
  color: #172b4d;
}
.popup-text { white-space: pre-line; }

.telegram-report-popup {
  display: grid;
  gap: 12px;
  width: min(100%, 360px);
  margin: 0 auto;
  text-align: left;
}

.telegram-report-row {
  display: grid;
  gap: 7px;
}

.telegram-report-row label {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #334155;
  font-weight: 700;
}

.telegram-report-row select,
.telegram-report-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  padding: 10px 12px;
  font-size: 0.8rem;
  box-sizing: border-box;
}

.telegram-report-preview {
  margin: 0;
  padding: 12px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: left;
  text-rendering: optimizeLegibility;
}

.telegram-report-status {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.telegram-report-status.success {
  background: #dcfce7;
  color: #166534;
}

.telegram-report-status.error {
  background: #fff2bd;
  color: #7a5a00;
}

.confirm-clear-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.confirm-clear-actions .btn {
  min-width: 100px;
  width: auto;
  margin: 0;
}

.popup-card .btn {
  margin: 0 auto;
  width: auto;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

@media (max-width: 480px) {
  .popup-overlay {
    padding: 10px;
  }

  .popup-card {
    width: min(100%, 360px);
    max-width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px 14px;
    border-radius: 14px;
    gap: 10px;
  }

  .popup-content {
    gap: 8px;
  }

  .popup-title {
    font-size: 1rem;
  }

  .popup-response {
    font-size: 0.75rem;
    padding: 12px;
    max-height: 220px;
  }

  .telegram-report-popup {
    width: min(100%, 300px);
  }

  .telegram-report-preview {
    font-size: 0.68rem;
  }

  .add-player-popup {
    width: min(100%, 280px);
    gap: 8px;
  }

  .member-edit-popup {
    width: 100%;
  }

  .add-player-select {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 10px;
  }
}

@media (min-width: 640px) {
  .player-row-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .player-row {
    gap: 7px;
    padding: 8px;
  }

  .player-profile-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .player-profile-grid .player-row-field {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 8px;
  }

  .player-profile-grid .player-name-field {
    display: grid;
    grid-column: auto;
    gap: 4px;
  }

  .player-profile-grid .player-row-field .player-label {
    flex: 0 0 42%;
    font-size: .54rem;
    line-height: 1.3;
    white-space: normal;
  }

  .player-profile-grid .player-row-field .player-value {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    font-size: .68rem;
    line-height: 1.3;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .player-profile-grid .player-name-field .player-value {
    font-size: .76rem;
    text-align: left;
  }

  .player-extra-details {
    gap: 5px;
  }

  .player-contact-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    gap: 8px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
  }

  .player-contact-field .player-label {
    flex: 0 0 auto;
    font-size: .54rem;
    line-height: 1.3;
  }

  .player-contact-field .player-value {
    min-width: 0;
    font-size: .66rem;
    line-height: 1.3;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .player-row-meta {
    gap: 6px;
  }

  .player-row-actions .player-settings-button {
    min-height: 32px;
    font-size: .66rem;
  }

  .player-id-block {
    padding: 10px 12px;
  }

  .id-line {
    font-size: 0.88rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .referral-card { padding: 12px; }
  .referral-card-header { align-items: flex-start; flex-direction: column; }
  .referral-actions { width: 100%; }
  .referral-stats { gap: 6px; }
  .referral-stats > div { padding: 8px; }
  .referral-stats span { font-size: .68rem; }
  .referral-results .transaction-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 360px;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #e2e8f0;
  }
  .referral-visits-table { width: max-content; min-width: 560px; }
}

@keyframes popup-spin {
  to {
    transform: rotate(360deg);
  }
}

button,
input,
select {
  touch-action: manipulation;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

@media (max-width: 520px) {
  .page-wrapper {
    padding: 14px;
  }

  .panel-header,
  .panel-body,
  .result-card {
    padding: 14px;
  }

  .brand-bar {
    border-radius: 16px;
    padding: 16px;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    font-size: 0.88rem;
  }

  input,
  select,
  button {
    font-size: 0.75rem;
  }
}

body {
  background: #f1f5f9;
  color: #0f172a;
}

.page-wrapper {
  width: min(100%, 700px);
  max-width: 700px;
  padding: 16px 14px calc(96px + env(safe-area-inset-bottom));
}

.mobile-menu-toggle {
  top: 20px;
  bottom: auto;
  left: 18px;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 1.35rem;
}

.mobile-menu-panel {
  width: min(86vw, 340px);
  height: 100vh;
  height: 100dvh;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 18px 0 44px rgba(15, 23, 42, 0.2);
}

.mobile-menu-close {
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  bottom: auto;
  font-size: 1.8rem;
}

.mobile-menu-nav {
  gap: 8px;
}

.nav-button {
  min-height: 48px;
  border-radius: 12px;
  font-size: 0.9rem;
  box-shadow: none;
}

.nav-button:not(.active):hover {
  background: #eff6ff;
}

.brand-bar {
  min-height: 84px;
  margin-bottom: 14px;
  padding: 16px 14px 16px 70px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: linear-gradient(130deg, #1d4ed8, #2563eb 58%, #0ea5e9);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.16);
}

.brand-title {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.78rem;
}

.brand-bar .btn {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
}

.dashboard-card {
  gap: 14px;
}

.panel {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.panel-header {
  padding: 18px;
  gap: 12px;
}

.panel-header h1 {
  margin-bottom: 5px;
  color: #0f172a;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.panel-header p {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.panel-body {
  padding: 18px;
  gap: 12px;
}

label {
  font-size: 0.82rem;
  font-weight: 650;
}

input,
select,
textarea {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 16px;
}

textarea {
  min-height: 92px;
}

button {
  min-height: 42px;
  border-radius: 10px;
}

.btn {
  padding: 10px 14px;
  font-size: 0.88rem;
}

.btn-small {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 0.8rem;
}

.amount-input-grid {
  gap: 10px;
}

.bonus-toggle-item {
  min-height: 42px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.player-row {
  border-radius: 14px;
}

.player-row-grid {
  gap: 10px;
}

.player-row-actions {
  flex-wrap: wrap;
}

.player-row-actions .player-settings-button {
  min-height: 38px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.data-player-header {
  align-items: flex-start;
}

.data-player-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.transaction-table-wrap,
.transaction-summary-wrap {
  max-width: 100%;
}

.player-pagination {
  align-items: center;
  gap: 8px;
}

.player-pagination .btn {
  width: auto;
}

.empty-state {
  border-radius: 12px;
}

@media (max-width: 520px) {
  .page-wrapper {
    padding: 12px 10px calc(88px + env(safe-area-inset-bottom));
  }

  .mobile-menu-toggle {
    top: 17px;
    left: 14px;
    width: 40px;
    height: 40px;
  }

  .brand-bar {
    min-height: 76px;
    padding: 13px 10px 13px 62px;
    border-radius: 15px;
  }

  .brand-title {
    font-size: 0.94rem;
  }

  .brand-subtitle {
    font-size: 0.72rem;
  }

  .panel-header,
  .panel-body {
    padding: 15px;
  }

  .panel-header h1 {
    font-size: 1rem;
  }

  .panel-header p {
    font-size: 0.78rem;
  }

  .panel-body {
    gap: 10px;
  }

  input,
  select,
  textarea {
    min-height: 43px;
  }

  .amount-input-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-player-header {
    flex-direction: column;
  }

  .data-player-header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .data-player-header-actions .btn {
    flex: 1 1 auto;
  }

  .transaction-header-bar {
    flex-direction: column;
  }

  .transaction-header-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .telegram-report-button,
  .transaction-clear-button {
    font-size: 0.74rem;
    padding: 8px 10px;
  }
}

body {
  background: #f3f4f6;
}

.brand-bar,
.panel {
  border-radius: 4px;
  box-shadow: none;
}

.brand-bar {
  min-height: 72px;
  padding-top: 13px;
  padding-bottom: 13px;
  border: 0;
  background: #24476b;
}

.brand-title {
  font-weight: 650;
  letter-spacing: 0;
}

.panel {
  border: 1px solid #d7dce2;
}

.panel-header {
  border-bottom-color: #e5e7eb;
}

.panel-header h1 {
  font-weight: 650;
  letter-spacing: 0;
}

.panel-body {
  gap: 11px;
}

.mobile-menu-toggle {
  border-radius: 4px;
  background: #24476b;
  box-shadow: none;
}

.mobile-menu-panel {
  box-shadow: 8px 0 20px rgba(15, 23, 42, 0.12);
}

.mobile-menu-header {
  border-bottom-color: #e5e7eb;
}

.nav-button {
  border-radius: 3px;
  font-weight: 600;
}

.mobile-menu-nav .nav-button {
  gap: 12px;
}

.mobile-menu-nav .nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.nav-button.active {
  background: #e8eef5;
  color: #17365d;
  box-shadow: inset 3px 0 #2563eb;
}

input,
select,
textarea,
button,
.btn,
.player-row,
.settings-section,
.settings-section-icon,
.game-maintenance-row,
.game-maintenance-icon,
.transaction-summary,
.waha-session-card,
.empty-state,
.bonus-toggle-item {
  border-radius: 4px;
}

input,
select,
textarea {
  border-color: #cbd2da;
  box-shadow: none;
}

.btn-primary {
  background: #24558a;
  box-shadow: none;
}

.btn-primary:hover {
  background: #1d456f;
}

@media (max-width: 520px) {
  .page-wrapper {
    padding-top: 10px;
  }

  .brand-bar {
    min-height: 66px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .mobile-menu-toggle {
    top: 21px;
    width: 36px;
    height: 36px;
  }

  .panel-header,
  .panel-body {
    padding: 14px;
  }

  .mobile-menu-panel {
    width: min(84vw, 320px);
  }
}

.game-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.game-picker-native {
  position: absolute;
  width: 1px !important;
  height: 1px;
  min-height: 1px;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.game-picker-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 6px 11px;
  border: 1px solid #cbd2da;
  border-radius: 4px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 650;
}

.game-picker-button:hover,
.game-picker-button[aria-expanded="true"] {
  border-color: #8798aa;
  background: #f8fafc;
}

.game-picker-icon,
.game-picker-option img {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
}

.game-picker-chevron {
  margin-left: auto;
  color: #64748b;
}

.game-picker-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  padding: 4px;
  border: 1px solid #cbd2da;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.game-picker-options.hidden {
  display: none !important;
}

.game-picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 8px;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: #1f2937;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
}

.game-picker-option:hover,
.game-picker-option[aria-selected="true"] {
  background: #eef3f8;
}

.game-picker-option:focus-visible,
.game-picker-button:focus-visible {
  outline: 2px solid #24558a;
  outline-offset: 2px;
}

.powered-by {
  padding: 18px 8px 4px;
  color: #87909c;
  font-size: 0.7rem;
  letter-spacing: 0.015em;
  text-align: center;
}

.powered-by strong {
  color: #64748b;
  font-weight: 650;
}
