:root {
  --rh-bg: #f3f5f8;
  --rh-surface: #ffffff;
  --rh-surface-soft: #f8fafc;
  --rh-text: #172033;
  --rh-muted: #667085;
  --rh-line: #e4e9f0;
  --rh-primary: #2563eb;
  --rh-primary-dark: #1d4ed8;
  --rh-navy: #102a49;
  --rh-success: #17865f;
  --rh-warning: #b7791f;
  --rh-danger: #d14343;
  --rh-sidebar: 236px;
  --rh-topbar: 64px;
  --rh-radius: 8px;
  --rh-shadow: 0 5px 18px rgba(16, 42, 73, .07);
}

/* Native admin control surface. The server renders this structure directly. */
.rh-native-admin-page {
  scroll-behavior: smooth;
}

.rh-native-admin {
  --rh-sidebar: 224px;
}

.rh-native-admin .rh-mobile-brand {
  display: none;
}

.rh-native-admin .rh-nav a {
  position: relative;
}

.rh-native-admin .rh-nav a > span {
  min-width: 0;
}

.rh-native-admin .rh-nav-badge,
.rh-native-admin .rh-alert-badge {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  line-height: 1;
}

.rh-native-admin .rh-topbar-actions .rh-nav-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  margin: 0;
  border: 2px solid #fff;
}

.rh-native-admin .rh-admin-alert-link {
  position: relative;
}

.rh-native-admin .rh-page {
  width: min(1280px, calc(100% - 36px)) !important;
  margin-top: 22px !important;
}

.rh-native-admin .admin-view,
.rh-native-admin .admin-section {
  min-width: 0;
  scroll-margin-top: 82px;
}

.rh-native-admin .admin-section {
  margin-top: 36px;
  padding-top: 4px;
}

.rh-native-admin .page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 15px;
}

.rh-native-admin .page-heading h1,
.rh-native-admin .page-heading p,
.rh-native-admin .surface-head h2,
.rh-native-admin .surface-head h3,
.rh-native-admin .surface-head p {
  margin: 0;
}

.rh-native-admin .page-heading h1 {
  color: #172033;
  font-size: 25px;
  line-height: 1.25;
}

.rh-native-admin .page-heading p {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.rh-native-admin .btn,
.rh-native-admin .text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.rh-native-admin .btn .icon,
.rh-native-admin .text-link .icon {
  width: 15px;
  height: 15px;
}

.rh-native-admin .btn-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.rh-native-admin .btn-secondary:hover,
.rh-native-admin .text-link:hover {
  border-color: #a9c2f4;
  color: #1d4ed8;
}

.rh-native-admin .section-block {
  margin-bottom: 12px;
}

.rh-native-admin .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.rh-native-admin .stat {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(16, 42, 73, .045);
}

.rh-native-admin .stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.rh-native-admin .stat-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  background: #eff4ff;
  color: #2563eb;
}

.rh-native-admin .stat-icon .icon {
  width: 15px;
  height: 15px;
}

.rh-native-admin .stat > strong {
  display: block;
  margin-top: 5px;
  color: #172033;
  font-size: 23px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.rh-native-admin .stat > strong.profit,
.rh-native-admin .profit,
.rh-native-admin .win {
  color: #dc2626 !important;
  font-weight: 800;
}

.rh-native-admin .stat > strong.loss,
.rh-native-admin .loss {
  color: #16915d !important;
  font-weight: 800;
}

.rh-native-admin .flat {
  color: #667085 !important;
}

.rh-native-admin .stat-foot {
  min-height: 15px;
  margin-top: 5px;
  color: #7b8493;
  font-size: 10px;
  line-height: 1.45;
}

.rh-native-admin .status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 3px rgba(34, 160, 107, .12);
  vertical-align: middle;
}

.rh-native-admin .page-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.rh-native-admin .page-heading-actions form {
  margin: 0;
}

.rh-native-admin .page-heading-actions input[type="hidden"] {
  display: none;
}

.rh-native-admin .maintenance-status {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid #bfe7d5;
  border-radius: 7px;
  background: #effaf5;
  color: #187657;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.rh-native-admin .maintenance-status[data-maintenance-state="draining"],
.rh-native-admin .maintenance-status[data-maintenance-state="ready"] {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #b45309;
}

.rh-native-admin .maintenance-status .icon {
  width: 15px;
  height: 15px;
}

.rh-native-admin .page-heading-actions .btn {
  white-space: nowrap;
}

.rh-native-admin .server-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.rh-native-admin .server-health-item {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
}

.rh-native-admin .server-health-item > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #667085;
  font-size: 10px;
  font-weight: 750;
}

.rh-native-admin .server-health-item > span .icon {
  width: 14px;
  height: 14px;
  color: #2563eb;
}

.rh-native-admin .server-health-item > strong,
.rh-native-admin .server-health-item > small {
  display: block;
}

.rh-native-admin .server-health-item > strong {
  margin-top: 7px;
  color: #172033;
  font-size: 19px;
}

.rh-native-admin .server-health-item > small {
  min-height: 28px;
  margin-top: 2px;
  color: #7b8493;
  font-size: 9px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.rh-native-admin .server-usage {
  display: block !important;
  width: 100%;
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.rh-native-admin .server-usage b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3b82f6;
  transition: width .25s ease;
}

.rh-native-admin .content-grid {
  display: grid;
}

.rh-native-admin .admin-overview-grid {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 10px;
}

.rh-native-admin .surface {
  min-width: 0;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(16, 42, 73, .045);
}

.rh-native-admin .surface-head {
  min-height: 59px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f4;
}

.rh-native-admin .surface-head h2,
.rh-native-admin .surface-head h3 {
  color: #172033;
  font-size: 14px;
}

.rh-native-admin .surface-head p {
  margin-top: 3px;
  color: #7b8493;
  font-size: 9px;
}

.rh-native-admin .text-link {
  min-height: 30px;
  padding: 5px 8px;
  border: 0;
  color: #2563eb;
  font-size: 10px;
}

.rh-native-admin .scroll-x {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.rh-native-admin .data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.rh-native-admin .data-table th,
.rh-native-admin .data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f4;
  color: #344054;
  font-size: 10px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.rh-native-admin .data-table th {
  background: #fafbfc;
  color: #7b8493;
  font-size: 9px;
  font-weight: 750;
}

.rh-native-admin .data-table tbody tr:last-child td {
  border-bottom: 0;
}

.rh-native-admin .cell-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rh-native-admin .cell-title > span:last-child,
.rh-native-admin .cell-title strong,
.rh-native-admin .cell-title small,
.rh-native-admin .table-subline {
  display: block;
  min-width: 0;
}

.rh-native-admin .cell-title strong {
  color: #172033;
  font-size: 11px;
}

.rh-native-admin .cell-title small,
.rh-native-admin .table-subline {
  margin-top: 2px;
  color: #8a93a2;
  font-size: 8px;
}

.rh-native-admin .table-subline .state {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.rh-native-admin .account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #eaf1ff;
  color: #2563eb;
  font-size: 10px;
  font-weight: 850;
}

.rh-native-admin .chip,
.rh-native-admin .phase,
.rh-native-admin .login-state,
.rh-native-admin .state,
.rh-native-admin .log-level,
.rh-native-admin .section-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #5f6b7a;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.rh-native-admin .chip-success,
.rh-native-admin .login-state.ok,
.rh-native-admin .state.on {
  background: #e7f7ef;
  color: #157a53;
}

.rh-native-admin .chip-danger,
.rh-native-admin .log-level.error {
  background: #fff0f0;
  color: #c93636;
}

.rh-native-admin .chip-primary {
  background: #eaf1ff;
  color: #1d4ed8;
}

.rh-native-admin .chip-info,
.rh-native-admin .phase {
  background: #edf8ff;
  color: #0473a8;
}

.rh-native-admin .log-level.warn {
  background: #fff7e6;
  color: #a15c00;
}

.rh-native-admin .icon-btn {
  position: relative;
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 29px;
  padding: 0;
  border: 1px solid #dde3ec;
  border-radius: 7px;
  background: #fff;
  color: #4d596a;
  text-decoration: none;
  cursor: pointer;
}

.rh-native-admin .icon-btn .icon {
  width: 14px;
  height: 14px;
}

.rh-native-admin .icon-btn:hover {
  border-color: #adc4f3;
  color: #2563eb;
}

.rh-native-admin .icon-btn.action-start:not(:disabled) {
  border-color: #b9e3d0;
  color: #17865f;
}

.rh-native-admin .icon-btn.action-stop:not(:disabled) {
  border-color: #f2c6c6;
  color: #d14343;
}

.rh-native-admin .icon-btn:disabled {
  background: #f6f7f9;
  color: #b1b8c2;
  cursor: not-allowed;
}

.rh-native-admin .row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rh-native-admin .row-actions form {
  display: contents;
}

.rh-native-admin .alert-list {
  max-height: 330px;
  margin: 0;
  padding: 5px 12px 10px;
  overflow-y: auto;
  list-style: none;
}

.rh-native-admin .alert-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 2px;
  border-bottom: 1px solid #edf0f4;
}

.rh-native-admin .alert-item:last-child {
  border-bottom: 0;
}

.rh-native-admin .alert-symbol {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #fff2e5;
  color: #c66a09;
}

.rh-native-admin .alert-symbol .icon {
  width: 15px;
  height: 15px;
}

.rh-native-admin .alert-copy strong,
.rh-native-admin .alert-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.rh-native-admin .alert-copy strong {
  color: #344054;
  font-size: 10px;
  line-height: 1.45;
}

.rh-native-admin .alert-copy span {
  margin-top: 3px;
  color: #8a93a2;
  font-size: 8px;
  line-height: 1.45;
}

.rh-native-admin .alert-empty,
.rh-native-admin .empty-row td {
  padding: 24px 14px !important;
  color: #8a93a2 !important;
  text-align: center !important;
}

.rh-native-admin .account-filter-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  background: #f5f7fa;
}

.rh-native-admin .account-filter-tab {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.rh-native-admin .account-filter-tab b {
  min-width: 17px;
  padding: 2px 4px;
  border-radius: 999px;
  background: #e4e8ee;
  color: #667085;
  font-size: 8px;
}

.rh-native-admin .account-filter-tab.active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 4px rgba(16, 42, 73, .09);
}

.rh-native-admin .admin-account-table,
.rh-native-admin .report-table {
  min-width: 860px;
}

.rh-native-admin .report-stats {
  margin-bottom: 10px;
}

.rh-native-admin .strategy-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rh-native-admin .strategy-entry {
  min-width: 0;
  min-height: 88px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 15px;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(16, 42, 73, .045);
}

.rh-native-admin .strategy-entry:hover {
  border-color: #adc4f3;
}

.rh-native-admin .strategy-entry > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #eef3ff;
  color: #2563eb;
}

.rh-native-admin .strategy-entry .icon {
  width: 17px;
  height: 17px;
}

.rh-native-admin .strategy-entry strong,
.rh-native-admin .strategy-entry small {
  display: block;
}

.rh-native-admin .strategy-entry strong {
  font-size: 12px;
}

.rh-native-admin .strategy-entry small {
  margin-top: 4px;
  color: #7b8493;
  font-size: 9px;
  line-height: 1.5;
}

.rh-native-admin .section-count {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a4f08;
}

.rh-native-admin .admin-alert-grid {
  display: grid;
  gap: 10px;
}

.rh-native-admin .events-table,
.rh-native-admin .failure-table {
  min-width: 820px;
}

.rh-native-admin .failure-reason {
  max-width: 440px;
  color: #b42318 !important;
  line-height: 1.45;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.rh-native-admin .admin-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  color: #075985;
  font-size: 11px;
  font-weight: 700;
}

.rh-native-admin .admin-notice .icon {
  width: 16px;
  height: 16px;
}

.rh-native-admin .telegram-admin-panel {
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid #dfe5ed !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 3px 12px rgba(16, 42, 73, .045) !important;
}

.rh-native-admin .telegram-admin-head,
.rh-native-admin .telegram-admin-title,
.rh-native-admin .telegram-admin-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rh-native-admin .telegram-admin-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.rh-native-admin .telegram-admin-title h2,
.rh-native-admin .telegram-admin-title p {
  margin: 0;
}

.rh-native-admin .telegram-admin-title h2 {
  font-size: 14px;
}

.rh-native-admin .telegram-admin-title p,
.rh-native-admin .telegram-admin-foot {
  color: #7b8493;
  font-size: 9px;
}

.rh-native-admin .telegram-admin-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  background: #eaf7ff;
  color: #0284c7;
}

.rh-native-admin .telegram-admin-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
}

.rh-native-admin .panel-kicker {
  display: none;
}

.rh-native-admin .telegram-admin-state {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff7e6;
  color: #a15c00;
  font-size: 9px;
  font-weight: 750;
}

.rh-native-admin .telegram-admin-state.configured {
  background: #e7f7ef;
  color: #157a53;
}

.rh-native-admin .telegram-admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(190px, .6fr) auto;
  gap: 8px;
  align-items: end;
}

.rh-native-admin .telegram-admin-form label {
  display: grid;
  gap: 5px;
  color: #596579;
  font-size: 9px;
  font-weight: 750;
}

.rh-native-admin .telegram-admin-form input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d8dfe8;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  outline: none;
}

.rh-native-admin .tg-admin-save,
.rh-native-admin .tg-admin-disable {
  min-height: 38px;
  padding: 8px 11px;
  border: 0;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 750;
}

.rh-native-admin .tg-admin-save {
  background: #2563eb;
  color: #fff;
}

.rh-native-admin .tg-admin-disable {
  background: #fff0f0;
  color: #c93636;
}

.rh-native-admin .telegram-admin-foot {
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf0f4;
}

.rh-native-admin .telegram-admin-foot > div {
  display: grid;
  gap: 2px;
  min-width: 180px;
}

.rh-native-admin .telegram-admin-foot b {
  color: #475467;
}

.rh-native-admin .telegram-admin-foot form {
  margin-left: auto;
}

.rh-admin-dashboard .strategy-modal-backdrop {
  position: fixed;
  z-index: 1400;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .58);
}

.rh-admin-dashboard .strategy-modal-backdrop[hidden] {
  display: none;
}

.rh-admin-dashboard .strategy-modal {
  position: relative;
  width: min(940px, 100%);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rh-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(2, 6, 23, .28);
}

.rh-admin-dashboard .strategy-modal-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--rh-line);
  background: #fff;
}

.rh-admin-dashboard .strategy-modal-head > div {
  min-width: 0;
}

.rh-admin-dashboard .strategy-modal-close {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: #f2f4f7;
  color: #667085;
  cursor: pointer;
}

.rh-admin-dashboard .strategy-modal-close .icon {
  width: 18px;
  height: 18px;
}

.rh-admin-dashboard .strategy-modal h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.rh-admin-dashboard .strategy-modal-reference {
  margin: 5px 0 0;
  color: #7b8493;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.rh-admin-dashboard .strategy-modal-body {
  min-height: 160px;
  padding: 14px 18px 18px;
  overflow: auto;
  overscroll-behavior: contain;
}

.rh-admin-dashboard .strategy-modal-loading {
  padding: 32px 14px;
  color: #7b8493;
  text-align: center;
}

.rh-admin-dashboard .strategy-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #edf0f4;
  background: #fff;
}

.rh-admin-dashboard .strategy-modal-actions button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: #eef1f5;
  color: #475467;
  font-size: 10px;
  font-weight: 750;
}

.rh-admin-dashboard .strategy-modal-actions .strategy-refresh {
  background: #2563eb;
  color: #fff;
}

.rh-admin-dashboard .strategy-modal-actions .icon {
  width: 14px;
  height: 14px;
}

.rh-admin-dashboard .admin-strategy-detail {
  min-width: 0;
  display: grid;
  gap: 10px;
  color: var(--rh-text);
}

.rh-admin-dashboard .strategy-detail-overview,
.rh-admin-dashboard .strategy-detail-section,
.rh-admin-dashboard .strategy-detail-alert,
.rh-admin-dashboard .strategy-detail-empty {
  min-width: 0;
  border: 1px solid var(--rh-line);
  border-radius: 8px;
  background: #fff;
}

.rh-admin-dashboard .strategy-detail-overview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: #f6f9ff;
  border-color: #cfdcf3;
}

.rh-admin-dashboard .strategy-detail-overview > div:first-child,
.rh-admin-dashboard .strategy-detail-heading > div,
.rh-admin-dashboard .strategy-ball-card header > div,
.rh-admin-dashboard .strategy-market-card header > div {
  min-width: 0;
}

.rh-admin-dashboard .strategy-detail-overview > div:first-child > small,
.rh-admin-dashboard .strategy-detail-heading small,
.rh-admin-dashboard .strategy-ball-card header div small,
.rh-admin-dashboard .strategy-market-card header div small {
  display: none;
}

.rh-admin-dashboard .strategy-detail-overview h3,
.rh-admin-dashboard .strategy-detail-heading h3,
.rh-admin-dashboard .strategy-ball-card h4,
.rh-admin-dashboard .strategy-market-card h4 {
  margin: 0;
  color: var(--rh-text);
  letter-spacing: 0;
}

.rh-admin-dashboard .strategy-detail-overview h3 {
  font-size: 15px;
}

.rh-admin-dashboard .strategy-overview-badges {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.rh-admin-dashboard .strategy-overview-badge,
.rh-admin-dashboard .strategy-detail-heading > span,
.rh-admin-dashboard .strategy-enabled-badge,
.rh-admin-dashboard .strategy-ball-card header i,
.rh-admin-dashboard .strategy-market-card header > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2f6;
  color: #5d6878;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.rh-admin-dashboard .strategy-overview-badge.on,
.rh-admin-dashboard .strategy-enabled-badge,
.rh-admin-dashboard .strategy-ball-card header i {
  background: #e9f8ef;
  color: #157347;
}

.rh-admin-dashboard .strategy-overview-badge.off,
.rh-admin-dashboard .strategy-ball-card.disabled header i {
  background: #eef1f5;
  color: #7b8493;
}

.rh-admin-dashboard .strategy-overview-badge.pricing,
.rh-admin-dashboard .strategy-market-card header > span {
  background: #eaf2ff;
  color: #1759b0;
}

.rh-admin-dashboard .strategy-detail-alert {
  padding: 10px 11px;
  border-color: #ead79d;
  background: #fffaf0;
  color: #805d13;
  font-size: 11px;
  line-height: 1.55;
}

.rh-admin-dashboard .strategy-detail-alert.error {
  border-color: #efc6c6;
  background: #fff5f5;
  color: #b42318;
}

.rh-admin-dashboard .strategy-detail-alert.advanced-takeover {
  border-color: #b8dfc8;
  background: #f0faf4;
  color: #16653a;
}

.rh-admin-dashboard .strategy-detail-section {
  padding: 12px;
  background: #fafbfc;
}

.rh-admin-dashboard .strategy-detail-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.rh-admin-dashboard .strategy-detail-heading h3 {
  font-size: 14px;
}

.rh-admin-dashboard .strategy-ball-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rh-admin-dashboard .strategy-ball-card,
.rh-admin-dashboard .strategy-market-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  background: #fff;
}

.rh-admin-dashboard .strategy-ball-card.disabled {
  opacity: .68;
}

.rh-admin-dashboard .strategy-ball-card header,
.rh-admin-dashboard .strategy-market-card header {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #edf0f4;
  background: #f8fafc;
}

.rh-admin-dashboard .strategy-ball-card header > span {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.rh-admin-dashboard .strategy-ball-card.ball-2 header > span {
  background: #0f766e;
}

.rh-admin-dashboard .strategy-ball-card.ball-3 header > span {
  background: #7c3e9d;
}

.rh-admin-dashboard .strategy-ball-card h4,
.rh-admin-dashboard .strategy-market-card h4 {
  font-size: 12px;
}

.rh-admin-dashboard .strategy-ball-card header i,
.rh-admin-dashboard .strategy-market-card header > span {
  margin-left: auto;
  white-space: nowrap;
}

.rh-admin-dashboard .strategy-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.rh-admin-dashboard .strategy-detail-field {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #edf0f4;
  border-radius: 6px;
  background: #fafbfc;
}

.rh-admin-dashboard .strategy-detail-field.wide {
  grid-column: 1 / -1;
}

.rh-admin-dashboard .strategy-detail-field small,
.rh-admin-dashboard .strategy-mapping small,
.rh-admin-dashboard .strategy-plan-states small,
.rh-admin-dashboard .strategy-zone-list small {
  display: block;
  margin-bottom: 2px;
  color: #8b95a5;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.35;
}

.rh-admin-dashboard .strategy-detail-field b,
.rh-admin-dashboard .strategy-mapping b,
.rh-admin-dashboard .strategy-plan-states b,
.rh-admin-dashboard .strategy-zone-list b {
  display: block;
  color: #344054;
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.rh-admin-dashboard .strategy-mapping,
.rh-admin-dashboard .strategy-plan-states,
.rh-admin-dashboard .strategy-zone-list {
  margin: 0 8px 8px;
  padding: 8px;
  border: 1px solid #dce5f1;
  border-radius: 7px;
  background: #f7faff;
}

.rh-admin-dashboard .strategy-mapping > span,
.rh-admin-dashboard .strategy-plan-states > span {
  display: block;
  margin-bottom: 6px;
  color: #475467;
  font-size: 9px;
  font-weight: 800;
}

.rh-admin-dashboard .strategy-mapping > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.rh-admin-dashboard .strategy-plan-states > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.rh-admin-dashboard .strategy-zone-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.rh-admin-dashboard .strategy-mapping > div > div,
.rh-admin-dashboard .strategy-plan-states > div > div,
.rh-admin-dashboard .strategy-zone-list > div {
  min-width: 0;
  padding: 6px;
  border-radius: 5px;
  background: #fff;
}

.rh-admin-dashboard .strategy-market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rh-admin-dashboard .strategy-market-card.exact-sum-card,
.rh-admin-dashboard .strategy-market-card.random-sum-card {
  grid-column: 1 / -1;
}

.rh-admin-dashboard .strategy-detail-empty {
  padding: 18px 12px;
  border-style: dashed;
  color: #7b8493;
  font-size: 11px;
  text-align: center;
}

.rh-admin-dashboard .advanced-overview {
  border-color: #b8dfc8;
  background: #f0faf4;
}

.rh-admin-dashboard .advanced-overview p {
  margin: 4px 0 0;
  color: #527263;
  font-size: 10px;
}

.rh-admin-dashboard .advanced-detail {
  border-color: #cbe7d5;
  background: #f7fcf9;
}

.rh-admin-dashboard .advanced-state-details {
  margin: 0 8px 8px;
}

.rh-admin-dashboard .advanced-state-details > summary {
  padding: 8px;
  border: 1px solid #cbe7d5;
  border-radius: 6px;
  background: #f0faf4;
  color: #16653a;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.rh-admin-dashboard .advanced-natural-language {
  display: grid;
  gap: 6px;
}

.rh-admin-dashboard .advanced-natural-language > p,
.rh-admin-dashboard .advanced-natural-language article {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #cbe7d5;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-size: 10px;
  line-height: 1.55;
}

.rh-admin-dashboard .advanced-natural-language h4 {
  margin: 0 0 5px;
  color: #16653a;
  font-size: 11px;
}

.rh-admin-dashboard .advanced-natural-language ul {
  margin: 0;
  padding-left: 17px;
}

.rh-native-admin .copy-toast {
  position: fixed;
  z-index: 1600;
  top: 18px;
  right: 18px;
  padding: 10px 13px;
  border-radius: 7px;
  background: #172033;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  box-shadow: 0 12px 35px rgba(15, 23, 42, .22);
}

@media (max-width: 1060px) {
  .rh-native-admin .stats-grid,
  .rh-native-admin .server-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rh-native-admin .admin-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .rh-native-admin .rh-mobile-brand {
    min-width: 0;
    display: block;
  }

  .rh-native-admin .rh-mobile-brand .rh-brand {
    min-height: 42px;
    padding: 0;
  }

  .rh-native-admin .rh-mobile-brand .rh-brand img {
    width: 32px;
    height: 32px;
  }

  .rh-native-admin .rh-mobile-brand .rh-brand strong {
    font-size: 13px;
  }

  .rh-native-admin .rh-mobile-brand .rh-brand small {
    font-size: 8px;
  }

  .rh-native-admin .rh-topbar-copy {
    display: none;
  }

  .rh-native-admin .rh-topbar-actions {
    margin-left: auto;
  }

  .rh-native-admin .rh-topbar-actions a,
  .rh-native-admin .rh-topbar-actions button {
    width: 34px;
    min-height: 34px;
    padding: 0;
  }

  .rh-native-admin .rh-page {
    width: calc(100% - 16px) !important;
    margin-top: 10px !important;
  }

  .rh-native-admin .admin-section {
    margin-top: 28px;
    scroll-margin-top: 66px;
  }

  .rh-native-admin .page-heading {
    align-items: flex-start;
    margin-bottom: 11px;
  }

  .rh-native-admin .page-heading h1 {
    font-size: 20px;
  }

  .rh-native-admin .page-heading p {
    max-width: 235px;
    font-size: 9px;
    line-height: 1.45;
  }

  .rh-native-admin .page-heading > .btn,
  .rh-native-admin .page-heading-actions .btn {
    min-height: 32px;
    padding: 6px 7px;
    font-size: 9px;
  }

  .rh-native-admin .page-heading-actions {
    flex: 0 1 auto;
    gap: 4px;
  }

  .rh-native-admin .maintenance-status {
    min-height: 32px;
    gap: 3px;
    padding: 6px;
    font-size: 8px;
  }

  .rh-native-admin .maintenance-status .icon,
  .rh-native-admin .page-heading-actions .btn .icon {
    width: 12px;
    height: 12px;
  }

  .rh-native-admin .stats-grid,
  .rh-native-admin .server-health-grid {
    gap: 6px;
  }

  .rh-native-admin .stat {
    min-height: 92px;
    padding: 11px 10px;
  }

  .rh-native-admin .stat > strong {
    font-size: 19px;
  }

  .rh-native-admin .stat-top {
    font-size: 9px;
  }

  .rh-native-admin .stat-foot {
    font-size: 8px;
  }

  .rh-native-admin .server-health-item {
    padding: 10px;
  }

  .rh-native-admin .server-health-item > strong {
    font-size: 17px;
  }

  .rh-native-admin .server-health-item > small {
    font-size: 8px;
  }

  .rh-native-admin .surface-head {
    min-height: 54px;
    padding: 10px 11px;
  }

  .rh-native-admin .surface-head h2,
  .rh-native-admin .surface-head h3 {
    font-size: 12px;
  }

  .rh-native-admin .surface-head p {
    font-size: 8px;
  }

  .rh-native-admin .account-filter-tabs {
    width: 100%;
    position: absolute;
    top: 54px;
    left: 0;
  }

  .rh-native-admin #accounts .page-heading {
    position: relative;
    margin-bottom: 52px;
  }

  .rh-native-admin .account-filter-tab {
    flex: 1;
    justify-content: center;
  }

  .rh-native-admin #overview .scroll-x,
  .rh-native-admin #accounts .scroll-x {
    overflow: visible;
  }

  .rh-native-admin #overview .data-table,
  .rh-native-admin .admin-account-table {
    display: block;
    min-width: 0;
  }

  .rh-native-admin #overview .data-table thead,
  .rh-native-admin .admin-account-table thead {
    display: none;
  }

  .rh-native-admin #overview .data-table tbody,
  .rh-native-admin .admin-account-table tbody {
    display: grid;
    gap: 7px;
    padding: 8px;
  }

  .rh-native-admin #overview .data-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(72px, .7fr) minmax(66px, .65fr) 30px;
    align-items: center;
    gap: 6px;
    padding: 9px;
    border: 1px solid #e6eaf0;
    border-radius: 7px;
    background: #fff;
  }

  .rh-native-admin #overview .data-table td {
    display: block;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rh-native-admin #overview .data-table td:nth-child(2),
  .rh-native-admin #overview .data-table td:nth-child(5) {
    display: none;
  }

  .rh-native-admin #overview .data-table td:nth-child(6) {
    justify-self: end;
  }

  .rh-native-admin .admin-account-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
    padding: 11px;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    background: #fff;
  }

  .rh-native-admin .admin-account-table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .rh-native-admin .admin-account-table td:first-child,
  .rh-native-admin .admin-account-table td:last-child {
    grid-column: 1 / -1;
  }

  .rh-native-admin .admin-account-table td:nth-child(n+2):nth-child(-n+5)::before {
    display: block;
    margin-bottom: 3px;
    color: #8a93a2;
    font-size: 8px;
    font-weight: 700;
  }

  .rh-native-admin .admin-account-table td:nth-child(2)::before { content: "客户归属"; }
  .rh-native-admin .admin-account-table td:nth-child(3)::before { content: "登录与运行"; }
  .rh-native-admin .admin-account-table td:nth-child(4)::before { content: "余额 / 今日盈亏"; }
  .rh-native-admin .admin-account-table td:nth-child(5)::before { content: "期号 / 盘面"; }

  .rh-native-admin .admin-account-table .row-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .rh-native-admin .admin-account-table .row-actions .icon-btn {
    width: 100%;
  }

  .rh-native-admin .strategy-entry-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .rh-native-admin .strategy-entry {
    min-height: 76px;
    padding: 12px;
  }

  .rh-native-admin .admin-alert-grid {
    gap: 8px;
  }

  .rh-native-admin .telegram-admin-panel {
    padding: 12px !important;
  }

  .rh-native-admin .telegram-admin-head {
    align-items: flex-start;
  }

  .rh-native-admin .telegram-admin-form {
    grid-template-columns: 1fr;
  }

  .rh-native-admin .telegram-admin-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .rh-native-admin .telegram-admin-foot form,
  .rh-native-admin .tg-admin-disable {
    width: 100%;
    margin-left: 0;
  }

  .rh-admin-dashboard .strategy-modal-backdrop {
    place-items: end center;
    padding: 0;
  }

  .rh-admin-dashboard .strategy-modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 10px 10px 0 0;
  }

  .rh-admin-dashboard .strategy-modal-head {
    padding: 13px 12px 11px;
  }

  .rh-admin-dashboard .strategy-modal h2 {
    font-size: 17px;
  }

  .rh-admin-dashboard .strategy-modal-reference {
    margin-top: 3px;
    font-size: 9px;
  }

  .rh-admin-dashboard .strategy-modal-body {
    padding: 9px 10px 12px;
  }

  .rh-admin-dashboard .strategy-modal-actions {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }

  .rh-admin-dashboard .strategy-modal-actions button {
    width: 100%;
    min-height: 38px;
  }

  .rh-admin-dashboard .strategy-detail-overview {
    display: block;
    padding: 10px;
  }

  .rh-admin-dashboard .strategy-overview-badges {
    justify-content: flex-start;
    margin-top: 7px;
  }

  .rh-admin-dashboard .strategy-detail-section {
    padding: 9px;
  }

  .rh-admin-dashboard .strategy-detail-heading {
    align-items: flex-start;
  }

  .rh-admin-dashboard .strategy-ball-grid,
  .rh-admin-dashboard .strategy-market-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .rh-admin-dashboard .strategy-market-card.exact-sum-card,
  .rh-admin-dashboard .strategy-market-card.random-sum-card {
    grid-column: auto;
  }

  .rh-admin-dashboard .strategy-detail-fields {
    gap: 5px;
    padding: 7px;
  }

  .rh-admin-dashboard .strategy-mapping > div,
  .rh-admin-dashboard .strategy-plan-states > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rh-admin-dashboard .strategy-zone-list {
    grid-template-columns: 1fr;
  }
}

/* Mobile customer fixes: keep utility actions readable and modal content reachable. */
.rh-customer .customer-tool-notice {
  width: min(420px, calc(100% - 28px));
}

.rh-customer .customer-tool-notice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.rh-customer .customer-tool-notice-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.rh-customer .customer-tool-notice-secondary {
  background: #eef2f6;
  color: #475467;
}

.rh-customer .customer-tool-notice-primary {
  background: var(--rh-primary);
  color: #fff;
}

@media (max-width: 760px) {
  .rh-customer .rh-mobile-brand {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .rh-customer .rh-mobile-brand .rh-brand {
    min-width: 0;
    gap: 8px;
    padding: 0;
  }

  .rh-customer .rh-mobile-brand .rh-brand img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 4px;
    border-radius: 7px;
  }

  .rh-customer .rh-mobile-brand .rh-brand strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rh-customer .rh-mobile-brand .rh-brand small {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rh-customer-dashboard > .dashboard-tools .utility-grid,
  .rh-customer .dashboard-tools .utility-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    min-width: 0;
  }

  .rh-customer .utility-action-card {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 68px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px !important;
    overflow: hidden;
  }

  .rh-customer .utility-action-card .panel-heading,
  .rh-customer .utility-action-card .panel-heading > div {
    min-width: 0 !important;
  }

  .rh-customer .utility-action-card h2,
  .rh-customer .utility-action-card p {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rh-customer .wallet-label-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .rh-customer .demo-balance-button,
  .rh-customer .total-stop-open {
    display: inline-flex !important;
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
  }

  .rh-customer .wallet-panel > strong,
  .rh-customer .metric strong {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rh-customer .customer-profit-overview .metric {
    min-width: 0;
    overflow: hidden;
  }

  .rh-customer .modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .rh-customer .modal-backdrop > .login-modal,
  .rh-customer .modal-backdrop > .account-add-modal {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(92dvh, 760px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    border-radius: 18px 18px 0 0 !important;
  }

  .rh-customer .modal-backdrop > .login-modal > form,
  .rh-customer .modal-backdrop > .account-add-modal > form {
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  .rh-customer .modal-backdrop > .login-modal > .modal-kicker,
  .rh-customer .modal-backdrop > .login-modal > h2,
  .rh-customer .modal-backdrop > .login-modal > p,
  .rh-customer .modal-backdrop > .account-add-modal > .modal-kicker,
  .rh-customer .modal-backdrop > .account-add-modal > h2,
  .rh-customer .modal-backdrop > .account-add-modal > p {
    flex: 0 0 auto;
  }

  .rh-customer .modal-backdrop > .login-modal > form.add-form,
  .rh-customer .modal-backdrop > .account-add-modal > form.add-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
  }

  .rh-customer .modal-backdrop > .login-modal .captcha-field,
  .rh-customer .modal-backdrop > .account-add-modal .captcha-field {
    flex: 0 0 auto;
  }
}

html.rh-v2 {
  background: var(--rh-bg);
  color-scheme: light;
  overflow-x: hidden;
}

html.rh-v2 body {
  min-width: 0;
  margin: 0 !important;
  background: var(--rh-bg) !important;
  color: var(--rh-text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

html.rh-v2 *,
html.rh-v2 *::before,
html.rh-v2 *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

html.rh-v2 button,
html.rh-v2 input,
html.rh-v2 select,
html.rh-v2 textarea {
  font: inherit;
}

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

.rh-sidebar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--rh-line);
  background: #fff;
}

.rh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 8px;
  color: var(--rh-text);
  text-decoration: none;
}

.rh-brand img {
  width: 38px;
  height: 38px;
  padding: 5px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #f2f6fc;
  object-fit: contain;
}

.rh-brand strong,
.rh-brand small {
  display: block;
  min-width: 0;
}

.rh-brand strong {
  color: var(--rh-navy);
  font-size: 15px;
  line-height: 1.25;
}

.rh-brand small {
  margin-top: 2px;
  color: var(--rh-muted);
  font-size: 10px;
}

.rh-nav {
  display: grid;
  gap: 4px;
}

.rh-nav-label {
  padding: 9px 11px 5px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 750;
}

.rh-nav a,
.rh-nav button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.rh-nav a:hover,
.rh-nav button:hover {
  background: #f3f6fa;
  color: var(--rh-navy);
}

.rh-nav a.active,
.rh-nav button.active {
  background: #eaf1ff;
  color: var(--rh-primary);
}

.rh-nav .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.rh-sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--rh-line);
  border-radius: var(--rh-radius);
  background: var(--rh-surface-soft);
}

.rh-sidebar-foot strong,
.rh-sidebar-foot small {
  display: block;
}

.rh-sidebar-foot strong {
  font-size: 12px;
}

.rh-sidebar-foot small {
  margin-top: 5px;
  color: var(--rh-muted);
  font-size: 10px;
  line-height: 1.45;
}

.rh-main-shell {
  min-width: 0;
}

.rh-topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  min-height: var(--rh-topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--rh-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.rh-topbar-copy small,
.rh-topbar-copy strong {
  display: block;
}

.rh-topbar-copy small {
  color: var(--rh-muted);
  font-size: 10px;
}

.rh-topbar-copy strong {
  margin-top: 2px;
  color: var(--rh-text);
  font-size: 14px;
}

.rh-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.rh-topbar-actions a,
.rh-topbar-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--rh-line);
  border-radius: 7px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.rh-topbar-actions a:hover,
.rh-topbar-actions button:hover {
  color: var(--rh-primary);
  border-color: #b9cff9;
}

.rh-topbar-actions .icon {
  width: 15px;
  height: 15px;
}

.rh-customer-shell .rh-topbar-copy {
  display: none !important;
}

.rh-customer-shell .rh-sidebar-foot {
  display: none !important;
}

.rh-customer-shell .rh-service-dot {
  display: inline-block;
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  margin: 0 2px 0 1px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .14);
  animation: rh-service-pulse 2.2s ease-in-out infinite;
}

@keyframes rh-service-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, .14); transform: scale(1); }
  50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); transform: scale(1.08); }
}

.rh-page {
  width: min(1320px, calc(100% - 32px)) !important;
  max-width: none !important;
  min-width: 0;
  margin: 18px auto 42px !important;
  padding: 0 !important;
}

.rh-service-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid #d9e7df;
  border-radius: var(--rh-radius);
  background: #f4faf7;
}

.rh-service-main,
.rh-service-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rh-service-main .icon {
  width: 19px;
  height: 19px;
  color: var(--rh-success);
}

.rh-service-main strong,
.rh-service-main small,
.rh-service-meta strong,
.rh-service-meta small {
  display: block;
}

.rh-service-main strong,
.rh-service-meta strong {
  font-size: 12px;
}

.rh-service-main small,
.rh-service-meta small {
  margin-top: 2px;
  color: var(--rh-muted);
  font-size: 10px;
}

.rh-service-meta button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  background: var(--rh-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.rh-service-meta button .icon {
  width: 14px;
  height: 14px;
}

.rh-mobile-nav {
  display: none;
}

.rh-app-shell > .rh-sidebar {
  border-right-color: #263348;
  background: #182235;
}

.rh-app-shell > .rh-sidebar .rh-brand,
.rh-app-shell > .rh-sidebar .rh-brand strong {
  color: #fff;
}

.rh-app-shell > .rh-sidebar .rh-brand small,
.rh-app-shell > .rh-sidebar .rh-nav-label {
  color: #95a2b5;
}

.rh-app-shell > .rh-sidebar .rh-brand img {
  border-color: rgba(255, 255, 255, .16);
  background: #fff;
}

.rh-app-shell > .rh-sidebar .rh-nav a,
.rh-app-shell > .rh-sidebar .rh-nav button {
  color: #c8d1de;
}

.rh-app-shell > .rh-sidebar .rh-nav a:hover,
.rh-app-shell > .rh-sidebar .rh-nav button:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.rh-app-shell > .rh-sidebar .rh-nav a.active,
.rh-app-shell > .rh-sidebar .rh-nav button.active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.rh-app-shell > .rh-sidebar .rh-sidebar-foot {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.rh-app-shell > .rh-sidebar .rh-sidebar-foot small {
  color: #aeb9c9;
}

/* Customer dashboard */
.rh-customer-dashboard > .rh-dashboard-source {
  display: contents !important;
}

.rh-customer-dashboard > .rh-dashboard-source > .global-brand,
.rh-customer-dashboard > .rh-dashboard-source > .customer-head,
.rh-customer-dashboard > .rh-dashboard-source > .recharge-utility-panel,
.rh-customer-dashboard > .accounts-title {
  display: none !important;
}

.rh-customer-dashboard > .customer-profit-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.rh-customer-dashboard > .dashboard-tools {
  margin: 0 0 10px !important;
}

.rh-customer-dashboard > .dashboard-tools .utility-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.rh-customer-dashboard > .dashboard-tools .utility-action-card {
  min-height: 66px !important;
  margin: 0 !important;
  padding: 11px 13px !important;
}

.rh-customer-dashboard > .grid {
  gap: 10px !important;
}

.rh-customer .dashboard-hero,
.rh-customer .customer-head,
.rh-customer .customer-profit-overview,
.rh-customer .panel,
.rh-customer .account-group,
.rh-customer .utility-action-card,
.rh-customer .telegram-panel,
.rh-customer .recharge-panel,
.rh-customer .calculator-utility-panel,
.rh-customer .history-utility-panel {
  border: 1px solid var(--rh-line) !important;
  border-radius: var(--rh-radius) !important;
  background: #fff !important;
  box-shadow: var(--rh-shadow) !important;
}

.rh-customer .dashboard-hero {
  margin: 0 0 14px !important;
  padding: 16px !important;
  color: var(--rh-text) !important;
  overflow: visible !important;
}

.rh-customer .dashboard-hero::before,
.rh-customer .dashboard-hero::after {
  display: none !important;
}

.rh-customer .dashboard-hero h1,
.rh-customer .dashboard-hero h2,
.rh-customer .dashboard-hero h3,
.rh-customer .dashboard-hero strong {
  color: inherit;
}

.rh-customer .dashboard-hero .subtitle,
.rh-customer .dashboard-hero p,
.rh-customer .dashboard-hero small {
  color: var(--rh-muted) !important;
}

.rh-customer .wallet-grid,
.rh-customer .customer-profit-overview,
.rh-customer .dashboard-tools,
.rh-customer .utility-grid {
  gap: 10px !important;
}

.rh-customer .metric,
.rh-admin .metric {
  min-width: 0;
  padding: 14px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: var(--rh-radius) !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--rh-text) !important;
}

.rh-customer .metric strong,
.rh-admin .metric strong {
  overflow-wrap: anywhere;
}

.rh-customer .customer-profit-overview .metric strong {
  color: var(--rh-text) !important;
}

.rh-customer .customer-profit-overview .metric strong.win {
  color: var(--rh-danger) !important;
}

.rh-customer .customer-profit-overview .metric strong.loss {
  color: var(--rh-success) !important;
}

.rh-customer .account-group {
  margin-top: 14px !important;
  padding: 0 !important;
  overflow: hidden;
}

.rh-customer .account-group-head {
  min-height: 58px;
  margin: 0 !important;
  padding: 13px 16px !important;
  border-bottom: 1px solid var(--rh-line);
  background: var(--rh-surface-soft);
}

.rh-customer .account-group-head h3 {
  margin: 0 !important;
  font-size: 15px !important;
}

.rh-customer .account-group-kicker,
.rh-customer .account-group-head p {
  display: none !important;
}

.rh-customer .account-group > .grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

.rh-customer .account-card {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rh-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.rh-customer .account-card:last-child {
  border-bottom: 0 !important;
}

.rh-customer .account-head {
  min-height: 70px;
  display: grid !important;
  grid-template-columns: minmax(210px, 1.5fr) minmax(190px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px !important;
  border: 0 !important;
  background: #fff !important;
}

.rh-customer .account-head:hover {
  background: #f9fbfd !important;
}

.rh-customer .account-avatar {
  border-radius: 8px !important;
}

.rh-customer .account-title h3 {
  margin: 0 !important;
  color: var(--rh-text) !important;
  font-size: 14px !important;
}

.rh-customer .account-quick-summary {
  min-width: 0;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px !important;
}

.rh-customer .account-quick-summary span {
  min-width: 0;
  color: var(--rh-muted) !important;
  font-size: 10px !important;
}

.rh-customer .account-quick-summary b {
  display: block;
  margin-top: 2px;
  color: var(--rh-text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.rh-customer .account-card-body {
  padding: 0 16px 16px !important;
  border-top: 1px solid var(--rh-line) !important;
  background: #fbfcfe !important;
}

.rh-customer .account-workspace,
.rh-customer .control-panel,
.rh-customer .strategy-panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.rh-customer .account-workspace {
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr) !important;
  gap: 10px !important;
  padding-top: 12px !important;
}

.rh-customer .wallet-panel {
  padding: 13px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--rh-text) !important;
  box-shadow: none !important;
}

.rh-customer .wallet-panel small,
.rh-customer .wallet-panel .wallet-unit {
  color: var(--rh-muted) !important;
}

.rh-customer .wallet-panel > strong,
.rh-customer .wallet-panel .wallet-grid b,
.rh-customer .wallet-panel .wallet-grid span {
  color: var(--rh-text) !important;
}

.rh-customer .wallet-panel .wallet-grid {
  border-top-color: var(--rh-line) !important;
}

.rh-customer .draw-console,
.rh-customer .strategy-panel {
  border: 1px solid var(--rh-line) !important;
  border-radius: 7px !important;
  background: #fff !important;
}

.rh-customer .primary-actions,
.rh-customer .demo-primary-actions,
.rh-customer .state-buttons,
.rh-customer .strategy-entry-grid {
  gap: 8px !important;
}

.rh-customer .primary-actions a,
.rh-customer .primary-actions button,
.rh-customer .demo-primary-actions a,
.rh-customer .demo-primary-actions button,
.rh-customer .state-buttons button,
.rh-customer .strategy-entry-grid a,
.rh-customer .strategy-entry-grid button {
  min-height: 42px !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}

.rh-customer .utility-action-card {
  padding: 14px !important;
}

.rh-customer .total-profit-metric > div {
  min-width: 0 !important;
}

.rh-customer .total-profit-metric .total-profit {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.rh-customer dialog,
.rh-customer .modal-backdrop,
.rh-customer .recharge-modal-backdrop,
.rh-customer .recharge-payment-backdrop,
.rh-customer .recharge-pending-backdrop {
  z-index: 1200 !important;
}

.rh-customer dialog > *,
.rh-customer .login-modal,
.rh-customer .account-add-modal,
.rh-customer .advanced-strategy-modal,
.rh-customer .recharge-modal-card,
.rh-customer .recharge-payment-card,
.rh-customer .recharge-pending-card,
.rh-customer .account-config-modal,
.rh-admin .strategy-modal,
.rh-admin .confirm-card {
  border-radius: var(--rh-radius) !important;
  box-shadow: 0 22px 60px rgba(16, 42, 73, .2) !important;
}

/* Customer editors and secondary pages */
.rh-customer-subpage .rh-page > .hero {
  display: none !important;
}

.rh-customer-strategy-page .strategy-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.rh-customer-strategy-page .strategy-tabs a {
  min-width: 0;
  min-height: 54px;
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 10px 12px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #475467 !important;
  box-shadow: none !important;
  text-decoration: none;
}

.rh-customer-strategy-page .strategy-tabs a.active {
  border-color: #a9c3f7 !important;
  background: #eef4ff !important;
  color: var(--rh-primary) !important;
}

.rh-customer-strategy-page .editor,
.rh-customer-strategy-page .strategy-panel,
.rh-customer-strategy-page .advanced-editor,
.rh-customer-strategy-page .provided-strategy-panel {
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: var(--rh-radius) !important;
  background: #fff !important;
  box-shadow: var(--rh-shadow) !important;
}

.rh-customer-strategy-page .ball-workbench-head,
.rh-customer-strategy-page .editor > header,
.rh-customer-strategy-page .panel-head {
  margin-bottom: 12px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--rh-line) !important;
}

.rh-customer-strategy-page .board-kicker,
.rh-customer-strategy-page .eyebrow {
  color: var(--rh-primary) !important;
  letter-spacing: 0 !important;
}

.rh-customer-strategy-page .ball-grid,
.rh-customer-strategy-page .strategy-grid,
.rh-customer-strategy-page .market-grid {
  gap: 10px !important;
}

.rh-customer-strategy-page .ball-card,
.rh-customer-strategy-page .market-card,
.rh-customer-strategy-page .profile-card {
  min-width: 0;
  padding: 13px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: 7px !important;
  background: #fbfcfe !important;
  box-shadow: none !important;
}

.rh-customer-strategy-page .ball-head,
.rh-customer-strategy-page .section-head,
.rh-customer-strategy-page .profile-head {
  margin-bottom: 10px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid var(--rh-line) !important;
}

.rh-customer-strategy-page input,
.rh-customer-strategy-page select,
.rh-customer-strategy-page textarea,
.rh-customer-strategy-page button {
  border-radius: 6px !important;
  box-shadow: none !important;
}

.rh-customer-strategy-page textarea {
  max-width: 100%;
}

/* Admin surfaces */
.rh-admin .admin-hero,
.rh-admin .hero {
  margin: 0 0 14px !important;
  padding: 18px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: var(--rh-radius) !important;
  background: #fff !important;
  color: var(--rh-text) !important;
  box-shadow: var(--rh-shadow) !important;
}

.rh-admin .admin-hero::before,
.rh-admin .admin-hero::after,
.rh-admin .hero::before,
.rh-admin .hero::after,
.rh-admin .global-brand {
  display: none !important;
}

.rh-admin .admin-hero h1,
.rh-admin .admin-hero h2,
.rh-admin .hero h1,
.rh-admin .hero h2 {
  color: var(--rh-text) !important;
}

.rh-admin .admin-hero p,
.rh-admin .hero p {
  color: var(--rh-muted) !important;
}

.rh-admin .admin-hero nav,
.rh-admin .hero nav {
  display: none !important;
}

.rh-admin .panel,
.rh-admin .server-panel,
.rh-admin .customer-card,
.rh-admin .strategy-card {
  border: 1px solid var(--rh-line) !important;
  border-radius: var(--rh-radius) !important;
  background: #fff !important;
  box-shadow: var(--rh-shadow) !important;
}

.rh-admin .panel {
  margin-top: 14px !important;
  padding: 16px !important;
}

.rh-admin table {
  width: 100%;
  border-collapse: collapse;
}

.rh-admin th {
  padding: 10px 12px !important;
  background: #f7f9fc !important;
  color: var(--rh-muted) !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  text-align: left;
}

.rh-admin td {
  padding: 12px !important;
  border-bottom: 1px solid var(--rh-line) !important;
  color: var(--rh-text);
  font-size: 12px;
}

.rh-admin tr:last-child td {
  border-bottom: 0 !important;
}

.rh-admin .accounts-panel,
.rh-admin .events-panel,
.rh-admin .failure-panel,
.rh-admin .recharge-orders {
  max-width: 100%;
  overflow-x: auto;
}

.rh-admin .maintenance-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
}

.rh-admin .maintenance-panel form {
  min-width: 0;
  margin: 0;
}

.rh-admin .maintenance-panel button {
  max-width: 100%;
  white-space: nowrap;
}

.rh-admin button,
.rh-admin a,
.rh-admin input,
.rh-admin select,
.rh-admin textarea {
  border-radius: 7px !important;
}

.rh-admin .actions button,
.rh-admin .actions a,
.rh-admin .account-actions button {
  min-height: 38px !important;
  box-shadow: none !important;
}

.rh-scroll-anchor {
  display: block;
  height: 0;
  scroll-margin-top: calc(var(--rh-topbar) + 12px);
}

.rh-mobile-more-menu {
  display: none;
}

/* Authentication */
.rh-auth {
  min-height: 100vh;
  display: grid !important;
  place-items: center;
  padding: 18px !important;
  background: #edf1f6 !important;
}

.rh-auth .auth-shell,
.rh-auth .password-shell {
  width: min(940px, 100%) !important;
  min-height: 560px !important;
  overflow: hidden;
  border: 1px solid #dfe6ef;
  border-radius: var(--rh-radius) !important;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 42, 73, .12) !important;
}

.rh-auth .auth-intro,
.rh-auth .password-intro {
  background: var(--rh-navy) !important;
}

.rh-auth .auth-main,
.rh-auth .password-main {
  background: #fff;
}

.rh-auth input,
.rh-auth button,
.rh-auth a {
  border-radius: 7px !important;
}

/* Reports and live detail */
.rh-report main,
.rh-live main {
  width: min(1180px, calc(100% - 28px)) !important;
  margin: 14px auto 40px !important;
}

.rh-report .report-hero,
.rh-report .record-hero,
.rh-live .share-hero,
.rh-live .box,
.rh-report .week-card,
.rh-report .record-card {
  border: 1px solid var(--rh-line) !important;
  border-radius: var(--rh-radius) !important;
  background: #fff !important;
  box-shadow: var(--rh-shadow) !important;
}

.rh-report .report-hero,
.rh-report .record-hero,
.rh-live .share-hero {
  color: var(--rh-text) !important;
}

.rh-report .global-brand,
.rh-live .global-brand {
  display: none !important;
}

@media (max-width: 980px) {
  :root {
    --rh-sidebar: 205px;
  }

  .rh-customer .account-head {
    grid-template-columns: minmax(190px, 1.3fr) minmax(170px, 1fr) auto;
  }

  .rh-customer .account-collapse-icon {
    display: none !important;
  }
}

@media (max-width: 760px) {
  html.rh-v2 body {
    padding: 0 !important;
  }

  .rh-app-shell {
    display: block;
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }

  .rh-sidebar {
    display: none;
  }

  .rh-topbar {
    min-height: 56px;
    padding: 0 12px;
  }

  .rh-topbar-actions .rh-hide-mobile {
    display: none;
  }

  .rh-page {
    width: calc(100% - 16px) !important;
    margin: 8px auto 22px !important;
  }

  .rh-service-rail {
    display: none !important;
  }

  .rh-service-main small,
  .rh-service-meta small {
    display: none;
  }

  .rh-service-meta {
    text-align: right;
  }

  .rh-service-meta button {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 9px;
  }

  .rh-customer-shell .rh-topbar {
    justify-content: flex-end;
  }

  .rh-customer-shell .rh-topbar-actions {
    margin-left: auto;
  }

  .rh-customer .total-profit-metric {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 6px 7px !important;
    align-content: start !important;
    min-width: 0 !important;
  }

  .rh-customer .total-profit-metric .total-stop-open {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 31px !important;
    padding: 5px 8px !important;
    font-size: 10px !important;
    justify-content: center !important;
    margin-top: 1px !important;
  }

  .rh-customer-dashboard > .dashboard-tools .utility-grid,
  .rh-customer .dashboard-tools .utility-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .rh-customer .utility-action-card {
    min-width: 0 !important;
    min-height: 68px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  .rh-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    min-height: 58px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--rh-line);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -8px 24px rgba(16, 42, 73, .08);
  }

  .rh-mobile-nav a,
  .rh-mobile-nav button {
    min-width: 0;
    min-height: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 2px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #667085;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.1;
    text-decoration: none;
  }

  .rh-mobile-nav .active {
    color: var(--rh-primary);
    background: #eff4ff;
  }

  .rh-mobile-nav .icon {
    width: 19px;
    height: 19px;
  }

  .rh-mobile-more-menu:not([hidden]) {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    align-items: end;
    background: rgba(15, 23, 42, .44);
  }

  .rh-mobile-more-menu .rh-more-dismiss {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: transparent;
  }

  .rh-mobile-more-menu > section {
    position: relative;
    z-index: 1;
    max-height: min(88dvh, 620px);
    overflow-y: auto;
    padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
    background: #fff;
    box-shadow: 0 -18px 50px rgba(15, 23, 42, .18);
  }

  .rh-mobile-more-menu header {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }

  .rh-mobile-more-menu header button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--rh-line);
    border-radius: 6px;
    background: #fff;
    color: #475467;
  }

  .rh-mobile-more-menu header .icon {
    width: 16px;
    height: 16px;
  }

  .rh-mobile-more-menu nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .rh-mobile-more-menu nav a,
  .rh-mobile-more-menu nav button {
    min-width: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid var(--rh-line);
    border-radius: 7px;
    background: #f8fafc;
    color: #344054;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
  }

  .rh-mobile-more-menu nav .icon {
    width: 16px;
    height: 16px;
    color: var(--rh-primary);
  }

  .rh-customer .dashboard-hero,
  .rh-customer .panel,
  .rh-customer .utility-action-card,
  .rh-admin .panel,
  .rh-admin .admin-hero,
  .rh-admin .hero {
    margin-top: 8px !important;
    padding: 12px !important;
    border-radius: 7px !important;
  }

  .rh-customer .wallet-grid,
  .rh-customer .customer-profit-overview,
  .rh-customer .dashboard-tools,
  .rh-customer .utility-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .rh-customer .metric,
  .rh-admin .metric {
    min-height: 86px !important;
    padding: 11px !important;
  }

  .rh-customer .metric strong,
  .rh-admin .metric strong {
    font-size: clamp(16px, 6vw, 24px) !important;
    line-height: 1.2;
  }

  .rh-customer .account-group {
    margin-top: 8px !important;
  }

  .rh-customer .account-group-head {
    min-height: 50px;
    padding: 10px 12px !important;
  }

  .rh-customer .account-head {
    min-height: 66px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    padding: 10px 11px !important;
  }

  .rh-customer .account-identity {
    min-width: 0;
  }

  .rh-customer .account-identity > div,
  .rh-customer .account-title {
    min-width: 0;
  }

  .rh-customer .account-title h3,
  .rh-customer .account-identity p {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rh-customer .account-quick-summary {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-left: 46px;
  }

  .rh-customer .login-chip,
  .rh-customer .run-chip {
    font-size: 9px !important;
  }

  .rh-customer .account-card-body {
    padding: 0 10px 12px !important;
  }

  .rh-customer .account-workspace {
    grid-template-columns: 1fr !important;
  }

  .rh-customer .primary-actions,
  .rh-customer .demo-primary-actions,
  .rh-customer .state-buttons,
  .rh-customer .strategy-entry-grid,
  .rh-customer .auto-stop-fields,
  .rh-customer .time-schedule-fields,
  .rh-customer .amount-reset-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .rh-customer input,
  .rh-customer select,
  .rh-customer textarea,
  .rh-admin input,
  .rh-admin select,
  .rh-admin textarea {
    max-width: 100%;
  }

  .rh-admin .layout,
  .rh-admin .metrics,
  .rh-admin .customer-grid,
  .rh-admin .strategy-grid {
    grid-template-columns: 1fr !important;
  }

  .rh-admin .maintenance-panel {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 11px !important;
  }

  .rh-admin .maintenance-panel form,
  .rh-admin .maintenance-panel form button {
    width: 100%;
  }

  .rh-admin .table-wrap,
  .rh-admin .scroll-x,
  .rh-admin .accounts-panel,
  .rh-admin .events-panel,
  .rh-admin .failure-panel {
    max-width: 100%;
    overflow-x: auto;
  }

  .rh-auth {
    display: block !important;
    padding: 8px !important;
  }

  .rh-auth .auth-shell,
  .rh-auth .password-shell {
    min-height: 0 !important;
  }

  .rh-auth .auth-intro,
  .rh-auth .password-intro {
    min-height: 104px !important;
    padding: 14px !important;
  }

  .rh-auth .auth-main,
  .rh-auth .password-main {
    padding: 20px 16px 22px !important;
  }

  .rh-report main,
  .rh-live main {
    width: calc(100% - 14px) !important;
    margin: 7px auto 24px !important;
  }
}

html:has(.rh-mobile-more-menu:not([hidden])) {
  overflow: hidden;
}

@media (max-width: 420px) {
  .rh-topbar-copy small {
    display: none;
  }

  .rh-topbar-actions a,
  .rh-topbar-actions button {
    min-width: 34px;
    padding: 6px 8px;
  }

  .rh-customer .wallet-grid,
  .rh-customer .customer-profit-overview,
  .rh-customer .dashboard-tools,
  .rh-customer .utility-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .rh-customer .account-quick-summary {
    padding-left: 0;
  }

  .rh-customer .primary-actions,
  .rh-customer .demo-primary-actions,
  .rh-customer .state-buttons,
  .rh-customer .strategy-entry-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Live detail */
.rh-live {
  background: #f4f6f9 !important;
}

/* Final mobile customer polish: keep controls legible and compact. */
.rh-customer-shell .rh-topbar-actions a,
.rh-customer-shell .rh-topbar-actions button {
  color: #111827 !important;
  opacity: 1 !important;
  border-color: #d8dee8 !important;
  background: #fff !important;
}

.rh-customer-shell .rh-topbar-actions a .icon,
.rh-customer-shell .rh-topbar-actions button .icon,
.rh-customer-shell .rh-topbar-actions svg.icon {
  color: #111827 !important;
  stroke: #111827 !important;
  opacity: 1 !important;
}

.rh-customer-shell .rh-topbar-actions a:hover,
.rh-customer-shell .rh-topbar-actions button:hover {
  color: #0f172a !important;
  border-color: #aeb8c7 !important;
  background: #f8fafc !important;
}

.rh-customer .total-stop-open,
.rh-customer .demo-balance-button {
  color: #12324f !important;
  opacity: 1 !important;
  border-color: #b9d1e3 !important;
  background: #edf6fb !important;
  text-shadow: none !important;
}

.rh-customer .demo-balance-button {
  color: #0f766e !important;
  border-color: #b8e8dd !important;
  background: #effcf8 !important;
}

.rh-customer #amountCalculatorModal > .amount-calculator-modal {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@media (max-width: 760px) {
  .rh-customer .account-card.collapsed .account-head {
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    row-gap: 4px !important;
  }

  .rh-customer .account-card.collapsed .account-quick-summary {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .rh-customer .account-card.collapsed .account-quick-summary > span {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    padding: 4px 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  .rh-customer .account-card.collapsed .account-quick-summary b {
    display: inline !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .rh-customer #amountCalculatorModal > .amount-calculator-modal {
    max-height: 92dvh !important;
    padding-bottom: calc(18px + env(safe-area-inset-bottom)) !important;
  }
}

.rh-live-topbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px max(16px, calc((100% - 1120px) / 2));
  border-bottom: 1px solid #27364b;
  background: #0f172a;
}

.rh-live-topbar .rh-brand {
  color: #f8fafc;
}

.rh-live-topbar .rh-brand strong {
  color: #f8fafc;
}

.rh-live-topbar .rh-brand small {
  color: #aab7ca;
}

.rh-live-topbar .rh-brand img {
  border-color: #34445d;
  background: #fff;
}

.rh-live-actions,
.rh-live-actions a,
.rh-live-connected {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rh-live-actions a,
.rh-live-connected {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #34445d;
  border-radius: 7px;
  background: #172238;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.rh-live-actions .icon {
  width: 14px;
  height: 14px;
}

.rh-live-connected {
  border-color: #275d50;
  background: #102d29;
  color: #6ee7b7;
}

.rh-live .share-shell {
  width: min(1120px, calc(100% - 28px)) !important;
  margin: 14px auto 38px !important;
}

.rh-live .share-hero {
  padding: 16px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: var(--rh-radius) !important;
  background: #fff !important;
  color: var(--rh-text) !important;
  box-shadow: var(--rh-shadow) !important;
}

.rh-live .share-head {
  margin-bottom: 10px !important;
}

.rh-live .share-head .header-support {
  display: none !important;
}

.rh-live .share-head h1 {
  color: var(--rh-text) !important;
  font-size: 23px !important;
}

.rh-live .share-eyebrow,
.rh-live .share-eyebrow span {
  color: var(--rh-muted) !important;
  font-size: 10px !important;
  font-weight: 750;
  letter-spacing: 0 !important;
}

.rh-live .overview-box {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.rh-live .status-line {
  min-height: 34px;
  justify-content: flex-start !important;
  padding: 7px 10px;
  border: 1px solid #d8e9df;
  border-radius: 7px;
  background: #f3faf6;
}

.rh-live .status {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 7px !important;
  color: var(--rh-success) !important;
  font-size: 13px !important;
  font-weight: 800;
}

.rh-live .status::before {
  width: 7px !important;
  height: 7px !important;
  margin: 0 !important;
  box-shadow: 0 0 0 3px rgba(23, 134, 95, .12) !important;
}

.rh-live .run-duration {
  margin: 0 !important;
  color: var(--rh-muted) !important;
  font-size: 10px !important;
}

.rh-live .share-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 8px 0 !important;
}

.rh-live .share-metrics > div,
.rh-live .today-extreme {
  min-width: 0;
  padding: 10px 11px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: 7px !important;
  background: #f8fafc !important;
}

.rh-live .share-metrics small,
.rh-live .today-extreme header b,
.rh-live .today-extreme header time,
.rh-live .today-extreme > small {
  color: var(--rh-muted) !important;
  font-size: 9px !important;
}

.rh-live .share-metrics strong,
.rh-live .today-extreme strong {
  color: var(--rh-text) !important;
  font-size: 19px !important;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.rh-live .profit-value-row {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.rh-live .profit-value-row > small {
  flex: 0 0 auto;
  margin: 0 !important;
  white-space: nowrap;
}

.rh-live .today-extremes {
  gap: 8px !important;
  margin: 0 0 8px !important;
}

.rh-live .today-extreme {
  gap: 5px !important;
}

.rh-live .today-extreme header {
  align-items: center !important;
}

.rh-live .today-extreme header time {
  white-space: nowrap;
}

.rh-live .today-extreme.win strong,
.rh-live .share-metrics .win {
  color: var(--rh-success) !important;
}

.rh-live .today-extreme.loss strong,
.rh-live .share-metrics .loss {
  color: var(--rh-danger) !important;
}

.rh-live .share-core .latest-draw {
  padding: 11px 12px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: 7px !important;
  background: #f8fafc !important;
}

.rh-live .share-core .draw-head {
  margin-bottom: 8px !important;
}

.rh-live .share-core .draw-head b,
.rh-live .share-core .draw-head span {
  color: var(--rh-text) !important;
}

.rh-live .share-core .draw-actions button,
.rh-live .share-core .draw-head > button {
  min-height: 30px;
  padding: 5px 8px !important;
  border: 1px solid #cbd8ea !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--rh-primary) !important;
  font-size: 10px;
}

.rh-live .share-core .draw-sum {
  border-color: var(--rh-line) !important;
  background: #fff !important;
}

.rh-live .market-strip {
  grid-template-columns: minmax(120px, .8fr) minmax(120px, .8fr) minmax(0, 2fr) !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-color: var(--rh-line) !important;
}

.rh-live .market-strip > div {
  min-width: 0;
  padding: 7px 9px;
  border-radius: 6px;
  background: #f8fafc;
}

.rh-live .market-strip small {
  color: var(--rh-muted) !important;
}

.rh-live .market-strip strong {
  color: var(--rh-text) !important;
  font-size: 14px !important;
}

.rh-live .refresh-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--rh-muted) !important;
}

.rh-live .refresh-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rh-live .refresh-meta b {
  color: #475467 !important;
}

.rh-live .refresh-btn {
  min-height: 30px !important;
  padding: 5px 8px !important;
  border: 1px solid #cbd8ea !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--rh-primary) !important;
  font-size: 10px !important;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .rh-live-topbar {
    min-height: 54px;
    padding: 7px 9px;
  }

  .rh-live-topbar .rh-brand {
    padding: 0;
  }

  .rh-live-topbar .rh-brand img {
    width: 34px;
    height: 34px;
  }

  .rh-live-connected,
  .rh-live-actions a span b {
    display: none;
  }

  .rh-live .share-shell {
    width: calc(100% - 12px) !important;
    margin: 6px auto 22px !important;
  }

  .rh-live .share-hero {
    padding: 10px !important;
  }

  .rh-live .share-head {
    display: block !important;
    margin-bottom: 7px !important;
  }

  .rh-live .share-head h1 {
    font-size: 20px !important;
  }

  .rh-live .status-line {
    min-height: 31px;
    padding: 6px 8px;
  }

  .rh-live .share-metrics {
    gap: 5px !important;
    margin: 5px 0 !important;
  }

  .rh-live .share-metrics > div {
    padding: 8px 7px !important;
  }

  .rh-live .share-metrics strong,
  .rh-live .today-extreme strong {
    font-size: 15px !important;
  }

  .rh-live .profit-value-row {
    display: grid;
    gap: 2px;
  }

  .rh-live .profit-value-row > small {
    font-size: 8px !important;
  }

  .rh-live .today-extremes {
    gap: 5px !important;
    margin-bottom: 5px !important;
  }

  .rh-live .today-extreme {
    padding: 7px !important;
  }

  .rh-live .today-extreme header {
    display: flex !important;
    gap: 5px !important;
  }

  .rh-live .share-core .latest-draw {
    padding: 9px !important;
  }

  .rh-live .draw-balls {
    gap: 6px !important;
  }

  .rh-live .draw-balls span {
    width: 36px !important;
    height: 36px !important;
    font-size: 17px !important;
  }

  .rh-live .market-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin-top: 5px !important;
    padding-top: 5px !important;
  }

  .rh-live .market-strip > div {
    padding: 6px 7px !important;
  }

  .rh-live .refresh-meta {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    margin: 0 !important;
  }

  .rh-live .refresh-meta > span {
    flex: 1 1 auto;
  }
}

/* Admin operations dashboard */
.rh-mobile-brand {
  display: none;
  min-width: 0;
}

.rh-admin-alert-link,
.rh-nav a {
  position: relative;
}

.rh-alert-badge {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 8px;
  line-height: 1;
}

.rh-nav-badge {
  min-width: 21px;
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b42318;
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}

.rh-admin-dashboard .admin-hero {
  padding: 16px !important;
}

.rh-admin-dashboard .admin-hero .page-head {
  margin-bottom: 14px !important;
}

.rh-admin-dashboard .admin-hero h1,
.rh-admin-customers .admin-hero h1 {
  margin: 2px 0 4px !important;
  font-size: 30px !important;
  line-height: 1.18 !important;
  letter-spacing: 0 !important;
}

.rh-admin .overview {
  gap: 8px !important;
}

.rh-admin .overview .metric {
  min-height: 76px !important;
  padding: 11px 12px !important;
  border: 1px solid #e3e8ef !important;
  border-radius: 7px !important;
  background: #fbfcfe !important;
  box-shadow: none !important;
}

.rh-admin .overview .metric small {
  color: #667085 !important;
}

.rh-admin .overview .metric strong {
  color: #101828 !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.rh-admin .overview .metric-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 7px !important;
  background: #eef4ff !important;
  color: #2563eb !important;
}

.rh-admin .rh-maintenance-rail {
  min-height: 64px;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  margin-top: 10px !important;
  padding: 12px 14px !important;
  border-color: #cfe1d6 !important;
  background: #f4faf7 !important;
  box-shadow: none !important;
}

.rh-admin .rh-maintenance-rail .panel-kicker {
  color: #17865f !important;
}

.rh-admin .rh-maintenance-rail h2 {
  margin: 1px 0 2px !important;
  font-size: 17px !important;
}

.rh-admin .rh-maintenance-rail p {
  color: #667085 !important;
  font-size: 11px !important;
}

.rh-admin .rh-maintenance-rail form {
  margin: 0;
}

.rh-admin .rh-maintenance-rail button {
  min-height: 38px !important;
  padding: 8px 11px !important;
  border-radius: 6px !important;
  background: #175cd3 !important;
  font-size: 11px;
  white-space: nowrap;
}

.rh-admin-dashboard .server-panel {
  margin-top: 10px !important;
  padding: 15px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.rh-admin-dashboard .server-panel-head {
  align-items: flex-start !important;
  margin-bottom: 11px !important;
}

.rh-admin-dashboard .server-panel-head h2 {
  margin: 2px 0 3px !important;
  color: #101828 !important;
  font-size: 19px !important;
}

.rh-admin-dashboard .server-panel-head p,
.rh-admin-dashboard .server-panel-status small {
  color: #667085 !important;
  font-size: 10px !important;
}

.rh-admin-dashboard .server-kicker {
  color: #2563eb !important;
  font-size: 9px !important;
  letter-spacing: 0 !important;
}

.rh-admin-dashboard .server-panel-status {
  gap: 5px !important;
}

.rh-admin-dashboard .server-health {
  min-height: 26px !important;
  padding: 4px 7px !important;
  border: 1px solid #fed7aa !important;
  border-radius: 999px !important;
  background: #fff7ed !important;
  color: #b54708 !important;
  font-size: 9px !important;
}

.rh-admin-dashboard .server-health.ok {
  border-color: #abefc6 !important;
  background: #ecfdf3 !important;
  color: #067647 !important;
}

.rh-admin-dashboard .server-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.rh-admin-dashboard .server-card {
  min-width: 0;
  min-height: 112px !important;
  display: flex !important;
  flex-direction: column;
  padding: 11px !important;
  border: 1px solid #e3e8ef !important;
  border-radius: 7px !important;
  background: #fbfcfe !important;
  color: #101828 !important;
  box-shadow: none !important;
}

.rh-admin-dashboard .server-card-head {
  gap: 7px !important;
}

.rh-admin-dashboard .server-card-head small {
  min-width: 0;
  color: #667085 !important;
  font-size: 9px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rh-admin-dashboard .server-icon {
  width: 29px !important;
  height: 29px !important;
  border-radius: 6px !important;
}

.rh-admin-dashboard .server-card strong {
  margin-top: 8px !important;
  color: #101828 !important;
  font-size: 18px !important;
  line-height: 1.15 !important;
  overflow-wrap: anywhere;
}

.rh-admin-dashboard .server-card p {
  min-height: 16px;
  margin: 4px 0 7px !important;
  color: #667085 !important;
  font-size: 9px !important;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rh-admin-dashboard .server-progress {
  height: 3px !important;
  margin-top: auto !important;
  border-radius: 999px !important;
  background: #e9eef5 !important;
}

.rh-admin-dashboard .telegram-admin-panel,
.rh-admin-dashboard .accounts-panel,
.rh-admin-dashboard .events-panel,
.rh-admin-dashboard .failure-panel {
  margin-top: 10px !important;
  padding: 15px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.rh-admin-dashboard .panel-head,
.rh-admin-dashboard .telegram-admin-head {
  align-items: flex-start !important;
  margin-bottom: 11px !important;
}

.rh-admin-dashboard .panel-heading h2,
.rh-admin-dashboard .telegram-admin-title h2 {
  margin: 2px 0 !important;
  font-size: 18px !important;
}

.rh-admin-dashboard .panel-heading p,
.rh-admin-dashboard .telegram-admin-title p {
  color: #667085 !important;
  font-size: 10px !important;
}

.rh-admin-dashboard .panel-title-icon,
.rh-admin-dashboard .telegram-admin-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 7px !important;
}

.rh-admin-dashboard .telegram-admin-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) auto !important;
  gap: 8px !important;
}

.rh-admin-dashboard .telegram-admin-form input {
  min-height: 40px !important;
}

.rh-admin-dashboard .telegram-admin-form button {
  min-height: 40px !important;
  align-self: end;
}

.rh-admin-dashboard .telegram-admin-foot {
  gap: 8px !important;
  margin-top: 9px !important;
}

.rh-admin-dashboard .telegram-admin-foot > div {
  padding: 9px 10px !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
}

.rh-admin-dashboard .account-filter-tabs {
  gap: 4px !important;
  padding: 3px !important;
  border-radius: 7px !important;
  background: #f2f4f7 !important;
}

.rh-admin-dashboard .account-filter-tab {
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 5px !important;
  font-size: 10px !important;
}

.rh-admin-dashboard .accounts-table {
  min-width: 980px !important;
}

.rh-admin-dashboard .account-actions {
  gap: 5px !important;
}

.rh-admin-dashboard .account-actions button,
.rh-admin-dashboard .account-actions a {
  min-height: 32px !important;
  padding: 6px 8px !important;
  border-radius: 5px !important;
  font-size: 10px !important;
  white-space: nowrap;
}

.rh-admin-alert-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
  align-items: start;
  gap: 10px;
}

.rh-admin-alert-grid .events-panel .table-wrap {
  max-height: 430px;
  overflow: auto !important;
}

.rh-admin-alert-grid .failure-panel .table-wrap {
  max-height: 430px;
  overflow: auto !important;
}

.rh-admin-alert-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.rh-admin-customers .section {
  margin-top: 10px !important;
  padding: 16px !important;
  border: 1px solid var(--rh-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.rh-admin-customers .section-head {
  margin-bottom: 13px !important;
}

.rh-admin-customers .section h2 {
  font-size: 19px !important;
}

.rh-admin-customers .recharge-admin-form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.rh-admin-customers .recharge-admin-form > :first-child,
.rh-admin-customers .recharge-admin-form > :nth-child(4),
.rh-admin-customers .recharge-admin-form > :nth-child(5) {
  grid-column: 1 / -1;
}

.rh-admin-customers .recharge-admin-form > :first-child {
  justify-self: end;
}

.rh-admin-customers .recharge-admin-form > button {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 150px;
}

.rh-admin-customers .admin-qr-upload {
  padding: 10px !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 7px !important;
  background: #f8fafc !important;
}

@media (max-width: 760px) {
  .rh-admin .rh-topbar {
    min-height: 60px;
    padding: 0 10px;
  }

  .rh-admin .rh-mobile-brand {
    display: block;
    flex: 1 1 auto;
  }

  .rh-admin .rh-mobile-brand .rh-brand {
    min-height: 44px;
    gap: 8px;
    padding: 0;
    color: #101828;
  }

  .rh-admin .rh-mobile-brand .rh-brand img {
    width: 34px;
    height: 34px;
    padding: 4px;
    border: 1px solid #e3e8ef;
    border-radius: 7px;
    background: #fff;
  }

  .rh-admin .rh-mobile-brand .rh-brand strong {
    color: #101828;
    font-size: 12px;
  }

  .rh-admin .rh-mobile-brand .rh-brand small {
    color: #667085;
    font-size: 8px;
  }

  .rh-admin .rh-topbar-copy {
    display: none;
  }

  .rh-admin .rh-topbar-actions {
    flex: 0 0 auto;
    gap: 5px;
  }

  .rh-admin .rh-topbar-actions a,
  .rh-admin .rh-topbar-actions button {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
  }

  .rh-admin-dashboard .admin-hero {
    margin-top: 0 !important;
    padding: 12px !important;
  }

  .rh-admin-dashboard .admin-hero .page-head {
    margin-bottom: 10px !important;
  }

  .rh-admin-dashboard .admin-hero h1,
  .rh-admin-customers .admin-hero h1 {
    font-size: 23px !important;
  }

  .rh-admin-dashboard .admin-hero .subtitle,
  .rh-admin-customers .admin-hero .subtitle {
    font-size: 10px !important;
  }

  .rh-admin .overview {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .rh-admin .overview .metric {
    min-height: 72px !important;
    display: grid !important;
    align-content: center;
    justify-items: start;
    gap: 4px;
    padding: 8px !important;
  }

  .rh-admin .overview .metric-icon {
    width: 27px !important;
    height: 27px !important;
  }

  .rh-admin .overview .metric small {
    font-size: 8px !important;
  }

  .rh-admin .overview .metric strong {
    font-size: 18px !important;
  }

  .rh-admin .rh-maintenance-rail {
    grid-template-columns: minmax(0, 1fr) 92px !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .rh-admin .rh-maintenance-rail h2 {
    font-size: 15px !important;
  }

  .rh-admin .rh-maintenance-rail p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .rh-admin .rh-maintenance-rail form,
  .rh-admin .rh-maintenance-rail button {
    width: 100% !important;
  }

  .rh-admin .rh-maintenance-rail button {
    white-space: normal;
  }

  .rh-admin-dashboard .server-panel {
    padding: 11px !important;
  }

  .rh-admin-dashboard .server-panel-head {
    display: grid !important;
    gap: 7px !important;
  }

  .rh-admin-dashboard .server-panel-status {
    align-items: flex-start !important;
    text-align: left !important;
  }

  .rh-admin-dashboard .server-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .rh-admin-dashboard .server-card {
    min-height: 101px !important;
    padding: 9px !important;
  }

  .rh-admin-dashboard .server-icon {
    width: 27px !important;
    height: 27px !important;
  }

  .rh-admin-dashboard .server-card strong {
    margin-top: 6px !important;
    font-size: 14px !important;
  }

  .rh-admin-dashboard .server-card p {
    margin: 3px 0 5px !important;
    font-size: 8px !important;
  }

  .rh-admin-dashboard .telegram-admin-panel,
  .rh-admin-dashboard .accounts-panel,
  .rh-admin-dashboard .events-panel,
  .rh-admin-dashboard .failure-panel {
    padding: 11px !important;
    overflow: visible !important;
  }

  .rh-admin-dashboard .telegram-admin-head,
  .rh-admin-dashboard .panel-head {
    display: grid !important;
    gap: 8px !important;
  }

  .rh-admin-dashboard .telegram-admin-form,
  .rh-admin-dashboard .telegram-admin-foot {
    grid-template-columns: 1fr !important;
  }

  .rh-admin-dashboard .account-filter-tabs {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rh-admin-dashboard .accounts-table {
    min-width: 0 !important;
  }

  .rh-admin-dashboard .accounts-table tr {
    margin-bottom: 8px !important;
    padding: 9px !important;
    border: 1px solid #e3e8ef !important;
    border-radius: 7px !important;
    background: #fff !important;
  }

  .rh-admin-dashboard .accounts-table td {
    grid-template-columns: 74px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 5px 0 !important;
  }

  .rh-admin-dashboard .account-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .rh-admin-dashboard .account-actions form,
  .rh-admin-dashboard .account-actions button,
  .rh-admin-dashboard .account-actions a {
    width: 100% !important;
  }

  .rh-admin-alert-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rh-admin-alert-grid .events-panel .table-wrap,
  .rh-admin-alert-grid .failure-panel .table-wrap {
    max-height: 430px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .rh-admin-alert-grid .events-panel tr,
  .rh-admin-alert-grid .failure-panel tr {
    padding: 9px !important;
    border: 1px solid #e3e8ef !important;
    border-radius: 7px !important;
    background: #fff !important;
  }

  .rh-admin-customers .section {
    padding: 12px !important;
  }

  .rh-admin-customers .recharge-admin-form {
    grid-template-columns: 1fr !important;
  }

  .rh-admin-customers .recharge-admin-form > * {
    grid-column: 1 !important;
    justify-self: stretch !important;
  }

  .rh-admin-customers .recharge-admin-form > button {
    width: 100%;
  }
}

/* Native strategy editors. */
.rh-admin-strategy-code-page,
.rh-admin-provided-strategy-page {
  max-width: 1120px;
}

.rh-admin .strategy-editor-body {
  padding: 14px;
}

.rh-admin .strategy-editor-body textarea {
  width: 100%;
  min-height: 410px;
  padding: 12px;
  border: 1px solid #d7dee8;
  outline: 0;
  background: #fff;
  color: #172033;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  resize: vertical;
}

.rh-admin .strategy-editor-body textarea:focus,
.rh-admin .provided-customer-select:focus {
  border-color: #9ab8ef;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}

.rh-admin .strategy-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 11px 14px;
  border-top: 1px solid #edf0f4;
  background: #fbfcfe;
}

.rh-admin .admin-native-notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #c8dcfa;
  border-radius: 7px;
  background: #f3f7ff;
  color: #2455a6;
  font-size: 10px;
  font-weight: 750;
}

.rh-admin .admin-native-notice.success {
  border-color: #bde3d2;
  background: #f1fbf6;
  color: #157a53;
}

.rh-admin .admin-native-notice.error {
  border-color: #f2c6c6;
  background: #fff5f5;
  color: #c93636;
}

.rh-admin .strategy-code-result textarea {
  min-height: 170px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.rh-admin .copy-state {
  min-height: 16px;
  margin-top: 6px;
  color: #157a53;
  font-size: 9px;
  font-weight: 750;
}

.rh-admin .provided-editor-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 10px;
}

.rh-admin .provided-library,
.rh-admin .provided-editor {
  min-width: 0;
}

.rh-admin .provided-profile-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 8px;
  list-style: none;
}

.rh-admin .provided-profile-list li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e4e9f0;
  border-radius: 7px;
  background: #fbfcfe;
}

.rh-admin .provided-profile-list li.active {
  border-color: #bfd0f6;
  background: #f3f7ff;
}

.rh-admin .provided-profile-list li > a {
  min-width: 0;
  flex: 1;
  padding: 9px 10px;
  color: #344054;
  text-decoration: none;
}

.rh-admin .provided-profile-list b,
.rh-admin .provided-profile-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rh-admin .provided-profile-list b {
  font-size: 10px;
}

.rh-admin .provided-profile-list small {
  margin-top: 2px;
  color: #8a93a2;
  font-size: 8px;
}

.rh-admin .provided-profile-list form {
  margin: 0 7px 0 0;
}

.rh-admin .provided-profile-list .icon-btn {
  color: #c93636;
}

.rh-admin .provided-empty {
  padding: 22px 10px;
  border: 0 !important;
  color: #8a93a2;
  font-size: 9px;
  text-align: center;
}

.rh-admin .provided-customer-select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #d7dee8;
  outline: 0;
  background: #fff;
  color: #344054;
  font: inherit;
}

.rh-admin .customer-strategy-badge {
  display: inline-flex;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #eaf1ff;
  color: #2455a6;
  font-size: 9px;
  font-weight: 750;
}

@media (max-width: 760px) {
  .rh-admin .provided-editor-layout {
    grid-template-columns: 1fr;
  }

  .rh-admin .provided-profile-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rh-admin .strategy-editor-body {
    padding: 11px;
  }

  .rh-admin .strategy-editor-body textarea {
    min-height: 330px;
  }

  .rh-admin .strategy-editor-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 11px;
  }

  .rh-admin .strategy-editor-actions > .btn {
    width: 100%;
  }

  .rh-admin .strategy-editor-actions > .btn:only-child,
  .rh-admin .strategy-editor-actions > .btn:nth-child(3):last-child {
    grid-column: 1 / -1;
  }
}

/* Native customer and order administration. */
.rh-native-admin .btn-danger {
  border-color: #f4c7c7;
  background: #fff5f5;
  color: #c93636;
}

.rh-native-admin .btn-compact {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 10px;
}

.rh-native-admin .chip-warning {
  background: #fff7e6;
  color: #a15c00;
}

.rh-admin-customers-page .admin-customer-stats {
  margin-bottom: 10px;
}

.rh-admin-customers-page .admin-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px;
}

.rh-admin-customers-page .search-field {
  position: relative;
  min-width: 260px;
  max-width: 520px;
  flex: 1 1 360px;
}

.rh-admin-customers-page .search-field .icon {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 14px;
  height: 14px;
  color: #8a93a2;
  transform: translateY(-50%);
  pointer-events: none;
}

.rh-admin-customers-page .search-field input,
.rh-admin-customers-page .form-field input,
.rh-admin-customers-page .form-field select,
.rh-admin-customers-page .assign-form input,
.rh-admin-customers-page .assign-form select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d8dfe8;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
  outline: none;
}

.rh-admin-customers-page .search-field input {
  padding-left: 33px;
}

.rh-admin-customers-page input:focus,
.rh-admin-customers-page select:focus {
  border-color: #9ab8ef;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}

.rh-admin-customers-page .permission-tags {
  display: flex;
  max-width: 230px;
  flex-wrap: wrap;
  gap: 4px;
}

.rh-admin-customers-page .permission-tags b,
.rh-admin-customers-page .permission-tags span {
  padding: 3px 6px;
  border-radius: 5px;
  background: #f2f4f7;
  color: #596579;
  font-size: 8px;
  font-weight: 750;
}

.rh-admin-customers-page .admin-customer-table {
  min-width: 940px;
}

.rh-admin-customers-page .account-assignment-panel {
  margin-top: 12px;
}

.rh-admin-customers-page .admin-assignment-table {
  min-width: 980px;
}

.rh-admin-customers-page .assign-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto 132px auto;
  align-items: center;
  gap: 6px;
}

.rh-admin-customers-page .expiry-manage-option {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #667085;
  font-size: 9px;
  white-space: nowrap;
}

.rh-admin-customers-page .expiry-manage-option input {
  width: 14px;
  min-height: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2563eb;
}

.rh-admin-customers-page .payment-summary {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rh-admin-customers-page .payment-summary > div {
  min-width: 0;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
}

.rh-admin-customers-page .payment-summary img {
  width: 34px;
  height: 34px;
}

.rh-admin-customers-page .payment-summary small,
.rh-admin-customers-page .payment-summary strong {
  display: block;
}

.rh-admin-customers-page .payment-summary small {
  color: #7b8493;
  font-size: 9px;
}

.rh-admin-customers-page .payment-summary strong {
  margin-top: 3px;
  color: #172033;
  font-size: 12px;
}

.rh-admin-customers-page .admin-order-table {
  min-width: 850px;
}

.rh-admin-customers-page .admin-order-table .row-actions {
  flex-wrap: wrap;
}

.rh-admin .admin-modal-backdrop {
  position: fixed;
  z-index: 1500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .58);
}

.rh-admin .admin-modal-backdrop[hidden] {
  display: none !important;
}

.rh-admin .admin-unsaved-modal {
  z-index: 1600;
}

.rh-admin .admin-unsaved-copy {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}

.rh-admin .admin-unsaved-copy strong {
  display: block;
  margin-bottom: 4px;
  color: #172033;
  font-size: 14px;
}

.rh-admin .admin-unsaved-copy p {
  color: #697386;
  font-size: 11px;
  line-height: 1.65;
}

.rh-admin .admin-unsaved-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff4df;
  color: #b45309;
}

.rh-admin .admin-unsaved-icon .icon {
  width: 19px;
  height: 19px;
}

.rh-admin .admin-modal {
  width: min(640px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(2, 6, 23, .28);
}

.rh-admin .admin-payment-modal {
  width: min(720px, 100%);
}

.rh-admin .compact-modal {
  width: min(440px, 100%);
}

.rh-admin .admin-modal-head,
.rh-admin .admin-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
}

.rh-admin .admin-modal-head {
  border-bottom: 1px solid #edf0f4;
}

.rh-admin .admin-modal-head h2,
.rh-admin .admin-modal-head p,
.rh-admin .admin-modal-body p {
  margin: 0;
}

.rh-admin .admin-modal-head h2 {
  color: #172033;
  font-size: 16px;
}

.rh-admin .admin-modal-head p {
  margin-top: 3px;
  color: #7b8493;
  font-size: 9px;
}

.rh-admin .admin-modal-body {
  padding: 15px;
}

.rh-admin .admin-modal-foot {
  justify-content: flex-end;
  border-top: 1px solid #edf0f4;
  background: #fbfcfe;
}

.rh-admin .admin-modal-foot form {
  margin: 0;
}

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

.rh-admin .form-field {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #5f6b7a;
  font-size: 9px;
  font-weight: 750;
}

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

.rh-admin .toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  padding: 9px 10px;
  border: 1px solid #dfe7ef;
  border-radius: 7px;
  background: #fbfcfe;
  color: #344054;
  font-size: 10px;
}

.rh-admin .toggle-row input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2563eb;
}

.rh-admin .admin-qr-preview,
.rh-admin .admin-qr-empty {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7b8493;
  font-size: 9px;
}

.rh-admin .admin-qr-preview img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  border: 1px solid #e1e7ef;
  border-radius: 7px;
}

.rh-admin .admin-qr-preview label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rh-admin .admin-qr-preview input {
  width: 14px;
  min-height: 14px;
  height: 14px;
  margin: 0;
}

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

.rh-admin .quota-form-grid form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
}

.rh-admin .admin-login-security,
.rh-admin .admin-provided-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 7px;
  background: #fbfcfe;
}

.rh-admin .admin-login-security.warning {
  border-color: #fed7aa;
  background: #fffaf0;
}

.rh-admin .admin-login-security.locked {
  border-color: #fecaca;
  background: #fff5f5;
}

.rh-admin .admin-login-security small,
.rh-admin .admin-login-security strong,
.rh-admin .admin-login-security span,
.rh-admin .admin-provided-summary small,
.rh-admin .admin-provided-summary strong,
.rh-admin .admin-provided-summary span {
  display: block;
}

.rh-admin .admin-login-security small,
.rh-admin .admin-provided-summary small {
  color: #7b8493;
  font-size: 8px;
}

.rh-admin .admin-login-security strong,
.rh-admin .admin-provided-summary strong {
  margin-top: 2px;
  color: #344054;
  font-size: 10px;
}

.rh-admin .admin-login-security span,
.rh-admin .admin-provided-summary span {
  margin-top: 2px;
  color: #8a93a2;
  font-size: 8px;
}

.rh-admin .admin-permission-form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf0f4;
}

.rh-admin .admin-modal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #344054;
  font-size: 10px;
}

.rh-admin .admin-modal-section-head span {
  max-width: 65%;
  overflow: hidden;
  color: #7b8493;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.rh-admin .permission-check-grid label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #e1e7ef;
  border-radius: 7px;
  background: #fbfcfe;
  color: #475467;
  font-size: 9px;
  cursor: pointer;
}

.rh-admin .permission-check-grid label:has(input:checked) {
  border-color: #bfd0f6;
  background: #f4f7ff;
}

.rh-admin .permission-check-grid input {
  width: 15px;
  min-height: 15px;
  height: 15px;
  margin: 0;
  accent-color: #2563eb;
}

.rh-admin .admin-permission-form > .btn {
  width: 100%;
  margin-top: 7px;
}

.rh-admin .message-popup.success {
  border-top: 4px solid #17865f;
}

.rh-admin .message-popup.error {
  border-top: 4px solid #d14343;
}

@media (max-width: 760px) {
  .rh-admin-customers-page .admin-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .rh-admin-customers-page .search-field {
    min-width: 0;
    max-width: none;
    grid-column: auto;
  }

  .rh-admin-customers-page .payment-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .rh-admin-customers-page .payment-summary > div {
    min-height: 62px;
    padding: 9px;
  }

  .rh-admin-customers-page .payment-summary img {
    width: 30px;
    height: 30px;
  }

  .rh-admin-customers-page .admin-customer-table,
  .rh-admin-customers-page .admin-order-table,
  .rh-admin-customers-page .admin-assignment-table {
    min-width: 0;
  }

  .rh-admin-customers-page .admin-customer-table thead,
  .rh-admin-customers-page .admin-order-table thead,
  .rh-admin-customers-page .admin-assignment-table thead {
    display: none;
  }

  .rh-admin-customers-page .admin-customer-table tbody,
  .rh-admin-customers-page .admin-order-table tbody,
  .rh-admin-customers-page .admin-assignment-table tbody,
  .rh-admin-customers-page .admin-customer-table tr,
  .rh-admin-customers-page .admin-order-table tr,
  .rh-admin-customers-page .admin-assignment-table tr {
    display: block;
  }

  .rh-admin-customers-page .admin-customer-table tr,
  .rh-admin-customers-page .admin-order-table tr,
  .rh-admin-customers-page .admin-assignment-table tr {
    margin: 8px;
    padding: 9px;
    border: 1px solid #e3e8ef;
    border-radius: 7px;
    background: #fff;
  }

  .rh-admin-customers-page .admin-customer-table td,
  .rh-admin-customers-page .admin-order-table td,
  .rh-admin-customers-page .admin-assignment-table td {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 7px;
    padding: 5px 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .rh-admin-customers-page .admin-customer-table td::before,
  .rh-admin-customers-page .admin-order-table td::before,
  .rh-admin-customers-page .admin-assignment-table td::before {
    color: #7b8493;
    font-size: 8px;
    font-weight: 750;
  }

  .rh-admin-customers-page .admin-customer-table td:nth-child(2)::before { content: "社交账号"; }
  .rh-admin-customers-page .admin-customer-table td:nth-child(3)::before { content: "账号额度"; }
  .rh-admin-customers-page .admin-customer-table td:nth-child(4)::before { content: "运行"; }
  .rh-admin-customers-page .admin-customer-table td:nth-child(5)::before { content: "登录安全"; }
  .rh-admin-customers-page .admin-customer-table td:nth-child(6)::before { content: "策略权限"; }
  .rh-admin-customers-page .admin-customer-table td:nth-child(7)::before { content: "操作"; }
  .rh-admin-customers-page .admin-order-table td:nth-child(2)::before { content: "客户"; }
  .rh-admin-customers-page .admin-order-table td:nth-child(3)::before { content: "内容"; }
  .rh-admin-customers-page .admin-order-table td:nth-child(4)::before { content: "金额"; }
  .rh-admin-customers-page .admin-order-table td:nth-child(5)::before { content: "状态"; }
  .rh-admin-customers-page .admin-order-table td:nth-child(6)::before { content: "操作"; }
  .rh-admin-customers-page .admin-assignment-table td:nth-child(2)::before { content: "状态"; }
  .rh-admin-customers-page .admin-assignment-table td:nth-child(3)::before { content: "当前客户"; }
  .rh-admin-customers-page .admin-assignment-table td:nth-child(4)::before { content: "服务期"; }
  .rh-admin-customers-page .admin-assignment-table td:nth-child(5)::before { content: "分配与到期"; }

  .rh-admin-customers-page .admin-customer-table td:first-child,
  .rh-admin-customers-page .admin-order-table td:first-child,
  .rh-admin-customers-page .admin-assignment-table td:first-child {
    display: block;
    padding-bottom: 7px;
    border-bottom: 1px solid #edf0f4;
  }

  .rh-admin-customers-page .admin-customer-table td:first-child::before,
  .rh-admin-customers-page .admin-order-table td:first-child::before,
  .rh-admin-customers-page .admin-assignment-table td:first-child::before {
    display: none;
  }

  .rh-admin-customers-page .assign-form {
    grid-template-columns: 1fr;
  }

  .rh-admin-customers-page .assign-form .btn {
    width: 100%;
  }

  .rh-admin .admin-modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .rh-admin .admin-modal {
    width: 100%;
    max-height: 91vh;
    border-radius: 10px 10px 0 0;
  }

  .rh-admin .admin-modal-head,
  .rh-admin .admin-modal-foot,
  .rh-admin .admin-modal-body {
    padding-right: 12px;
    padding-left: 12px;
  }

  .rh-admin .admin-modal-foot {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .rh-admin .form-grid,
  .rh-admin .quota-form-grid,
  .rh-admin .permission-check-grid {
    grid-template-columns: 1fr;
  }

  .rh-admin .form-field.full {
    grid-column: auto;
  }

  .rh-admin .admin-modal-foot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rh-admin .admin-modal-foot > .btn:last-child {
    grid-column: 1 / -1;
  }

  .rh-admin .admin-modal-foot .btn,
  .rh-admin .admin-modal-foot form,
  .rh-admin .admin-modal-foot form .btn {
    width: 100%;
  }
}

/* Customer mobile audit: consistent financial color, top/bottom navigation and scrollable cards. */
.rh-customer .win {
  color: var(--rh-danger) !important;
}

.rh-customer .loss {
  color: var(--rh-success) !important;
}

.rh-customer .account-card {
  scroll-margin-top: calc(var(--rh-topbar) + 12px);
}

.rh-customer-discard-backdrop[hidden] {
  display: none;
}

.rh-customer-discard-backdrop {
  position: fixed;
  z-index: 12050;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, .72);
}

.rh-customer-discard-card {
  position: relative;
  width: min(400px, 100%);
  padding: 20px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(2, 6, 23, .32);
}

.rh-customer-discard-card h2 {
  margin: 0 32px 6px 0;
  color: var(--rh-text);
  font-size: 18px;
}

.rh-customer-discard-card p {
  margin: 0;
  color: var(--rh-muted);
  line-height: 1.6;
}

.rh-customer-discard-close {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 23px;
}

.rh-customer-discard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.rh-customer-discard-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  font-weight: 800;
}

.rh-customer-discard-keep {
  background: #edf1f6;
  color: #475467;
}

.rh-customer-discard-leave {
  background: var(--rh-danger);
  color: #fff;
}

@media (max-width: 760px) {
  .rh-customer-shell .rh-topbar {
    border-color: #27364b;
    background: #0f172a !important;
    backdrop-filter: none;
  }

  .rh-customer-shell .rh-mobile-brand .rh-brand strong {
    color: #f8fafc !important;
  }

  .rh-customer-shell .rh-mobile-brand .rh-brand small {
    color: #aab7ca !important;
  }

  .rh-customer-shell .rh-mobile-brand .rh-brand img {
    border-color: #34445d;
    background: #fff;
  }

  .rh-customer-shell .rh-topbar-actions a,
  .rh-customer-shell .rh-topbar-actions button {
    border-color: #34445d !important;
    background: #172238 !important;
    color: #f8fafc !important;
  }

  .rh-customer-shell .rh-topbar-actions a .icon,
  .rh-customer-shell .rh-topbar-actions button .icon,
  .rh-customer-shell .rh-topbar-actions svg.icon {
    color: #f8fafc !important;
    stroke: #f8fafc !important;
  }

  .rh-customer-shell .rh-service-dot {
    margin-right: 4px;
  }

  .rh-customer .modal-backdrop,
  .rh-customer .tg-modal-backdrop,
  .rh-customer .advanced-notice-backdrop,
  .rh-customer .advanced-confirm-backdrop {
    align-items: flex-end !important;
    padding: 8px 0 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .rh-customer .modal-backdrop > .login-modal,
  .rh-customer .modal-backdrop > .account-add-modal,
  .rh-customer .tg-modal,
  .rh-customer .advanced-notice,
  .rh-customer .advanced-confirm {
    max-height: calc(100dvh - 8px) !important;
    min-height: 0 !important;
    margin-top: auto !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .rh-customer .modal-backdrop > .advanced-strategy-modal {
    display: block !important;
    max-height: calc(100dvh - 8px) !important;
    margin-top: auto !important;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .rh-customer .modal-backdrop > .advanced-strategy-modal .advanced-source-field textarea {
    min-height: 360px;
  }

  .rh-mobile-nav {
    border-color: #27364b;
    background: #0f172a;
    box-shadow: 0 -8px 24px rgba(2, 6, 23, .24);
  }

  .rh-mobile-nav a,
  .rh-mobile-nav button {
    color: #aab7ca;
    display: grid;
    grid-template-rows: 20px 14px;
    align-content: center;
    justify-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
  }

  .rh-mobile-nav .icon {
    width: 20px;
    height: 20px;
  }

  .rh-mobile-nav > a > span,
  .rh-mobile-nav > button > span {
    display: block;
    min-height: 14px;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    white-space: nowrap;
  }

  .rh-mobile-nav .active {
    color: #fff;
    background: #1d4b7a;
  }

  .rh-customer-discard-backdrop {
    place-items: end center;
    padding: 0;
  }

  .rh-customer-discard-card {
    width: 100%;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    border-radius: 10px 10px 0 0;
  }
}
