:root {

  color-scheme: dark;

}



body {

  font-family: Vazirmatn, Tahoma, sans-serif;

  font-weight: 400;

  line-height: 1.65;

  -webkit-font-smoothing: antialiased;

}



h1, h2, h3, h4 {

  font-weight: 700;

  line-height: 1.35;

  letter-spacing: -0.01em;

}



button, .btn {

  font-weight: 600;

  line-height: 1.4;

}



input, select, textarea {

  font-family: inherit;

  line-height: 1.5;

}



table {

  font-variant-numeric: tabular-nums;

}



a {

  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;

}



#sidebar-backdrop {

  transition: opacity 0.2s ease;

}



#admin-sidebar {
  transition: transform 0.25s ease;
  max-height: 100dvh;
}

#admin-sidebar-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#admin-sidebar-footer {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  #admin-sidebar {
    max-height: none;
  }
}



@media (max-width: 767px) {

  #admin-sidebar.sidebar-closed {

    transform: translateX(100%);

  }

}



.nav-link {

  display: flex;

  align-items: center;

  gap: 0.75rem;

  padding: 0.625rem 0.875rem;

  border-radius: 0.625rem;

  font-size: 0.875rem;

  font-weight: 500;

  color: rgb(148 163 184);

  transition: all 0.15s ease;

}



.nav-link:hover {

  color: rgb(248 250 252);

  background: rgb(30 41 59 / 0.8);

}



.nav-link.is-active {

  color: rgb(251 191 36);

  background: rgb(245 158 11 / 0.12);

  border: 1px solid rgb(245 158 11 / 0.25);

}



.stat-card {

  transition: transform 0.15s ease, box-shadow 0.15s ease;

}



.stat-card:hover {

  transform: translateY(-2px);

  box-shadow: 0 12px 28px -8px rgb(0 0 0 / 0.45);

}



.data-table tbody tr {

  transition: background-color 0.12s ease;

}



.data-table tbody tr:hover {

  background: rgb(30 41 59 / 0.55);

}



/* Admin credit ledger — grouped numeric columns */
.credit-ledger-table {
  table-layout: auto;
}

.credit-ledger-table__meta {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.credit-ledger-table__amounts-head {
  padding: 0.5rem 0.75rem 0.35rem;
  text-align: center;
  border-inline: 1px solid rgb(51 65 85 / 0.65);
  background: rgb(15 23 42 / 0.55);
  color: rgb(148 163 184);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.credit-ledger-table__subhead th {
  padding: 0.35rem 0.75rem 0.65rem;
  text-align: center;
  font-size: 0.7rem;
  color: rgb(100 116 139);
  border-inline: 1px solid rgb(51 65 85 / 0.45);
  background: rgb(15 23 42 / 0.35);
}

.credit-ledger-table__amount,
.credit-ledger-table__balance {
  padding: 0.75rem 1rem;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.8125rem;
  border-inline: 1px solid rgb(51 65 85 / 0.25);
  background: rgb(15 23 42 / 0.22);
}

.credit-ledger-table__amount {
  min-width: 4.5rem;
}

.credit-ledger-table__amount--plus {
  color: rgb(110 231 183);
}

.credit-ledger-table__amount--minus {
  color: rgb(252 165 165);
}

.credit-ledger-table__balance {
  min-width: 4rem;
  font-weight: 500;
}

.credit-ledger-table__balance--before {
  color: rgb(148 163 184);
}

.credit-ledger-table__balance--after {
  color: rgb(226 232 240);
}

.credit-ledger-table tbody tr:hover .credit-ledger-table__amount,
.credit-ledger-table tbody tr:hover .credit-ledger-table__balance {
  background: rgb(30 41 59 / 0.45);
}

.credit-ledger-table .credit-ledger-table__meta:last-child {
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-ledger-table__desc {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



.badge {

  display: inline-flex;

  align-items: center;

  gap: 0.25rem;

  padding: 0.2rem 0.55rem;

  border-radius: 9999px;

  font-size: 0.7rem;

  font-weight: 600;

  border: 1px solid transparent;

  white-space: nowrap;

}



.ltr-isolate,
.dir-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.mixed-inline {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.125rem;
}

.btn-copy {
  background: rgb(51 65 85);
  color: rgb(226 232 240);
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-copy:hover {
  background: rgb(71 85 105);
  color: rgb(255 255 255);
}

/* Provision modal */
.provision-modal {
  isolation: isolate;
}

.provision-modal__panel {
  animation: provision-modal-in 0.2s ease-out;
}

@keyframes provision-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.provision-modal__body {
  scrollbar-width: thin;
  scrollbar-color: rgb(71 85 105) rgb(15 23 42);
}

.provision-modal__body::-webkit-scrollbar {
  width: 6px;
}

.provision-modal__body::-webkit-scrollbar-thumb {
  background: rgb(71 85 105);
  border-radius: 3px;
}

#toast {
  z-index: 200;
}

.provision-modal.is-open {
  overflow: hidden;
}

.credit-purchase-modal {
  isolation: isolate;
}

.credit-purchase-modal.is-open {
  overflow: hidden;
}

.invite-credit-modal {
  isolation: isolate;
}

.invite-credit-modal.is-open {
  overflow: hidden;
}

.invite-credit-modal__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 1rem;
  row-gap: 0.75rem;
  margin: 0;
}

.invite-credit-modal__summary dt {
  margin: 0;
  text-align: start;
}

.invite-credit-modal__summary dd {
  margin: 0;
  text-align: end;
}

.invite-credit-modal__summary dd.invite-credit-modal__value--numeric {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
  font-variant-numeric: tabular-nums;
}

.provision-modal.is-submitting [data-modal-backdrop] {
  background-color: rgb(0 0 0 / 0.82);
}

.provision-modal__dismiss--disabled {
  pointer-events: none;
  opacity: 0.45;
  cursor: not-allowed;
}

.provision-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 9.5rem;
}

/* [hidden] must win over display — otherwise spinner shows while "idle" text stays visible */
.provision-submit__busy[hidden] {
  display: none !important;
}

.provision-submit__busy:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.provision-submit.is-loading .provision-submit__default {
  display: none;
}

.provision-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgb(255 255 255 / 0.35);
  border-top-color: rgb(255 255 255);
  border-radius: 50%;
  animation: provision-spin 0.65s linear infinite;
  flex-shrink: 0;
}

@keyframes provision-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty state */
.empty-state__icon svg {
  display: block;
  margin-inline: auto;
}

/* Inbound card grid (provision modal) */
.inbound-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
}

@media (min-width: 400px) {
  .inbound-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.inbound-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  text-align: right;
  background: rgb(30 41 59 / 0.6);
  border: 1px solid rgb(51 65 85);
  border-radius: 0.75rem;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.inbound-card:hover {
  border-color: rgb(71 85 105);
  background: rgb(30 41 59 / 0.9);
}

.inbound-card:focus-visible {
  outline: 2px solid rgb(245 158 11 / 0.5);
  outline-offset: 2px;
}

.inbound-card.is-selected {
  border-color: rgb(245 158 11 / 0.55);
  background: rgb(245 158 11 / 0.08);
  box-shadow: 0 0 0 1px rgb(245 158 11 / 0.2), 0 0 20px -4px rgb(245 158 11 / 0.25);
}

.inbound-card.is-selected:hover {
  border-color: rgb(245 158 11 / 0.65);
}

/* Invite tables */
.invite-table th,
.invite-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.invite-table .cell-muted {
  color: rgb(100 116 139);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.invite-table .cell-desc {
  max-width: 12rem;
}

@media (min-width: 768px) {
  .invite-table .cell-desc {
    max-width: 16rem;
  }
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Config page — motto & donate support strip */
.config-page-support {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .config-page-support {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .config-page-support:has(> section:only-child) {
    grid-template-columns: 1fr;
  }
}

.config-page-support > section {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.config-page-support > section:hover {
  box-shadow:
    0 0 0 1px rgb(245 158 11 / 0.08),
    0 12px 40px -16px rgb(245 158 11 / 0.18),
    0 8px 24px -12px rgb(0 0 0 / 0.45);
}

/* Donate page */
.donate-page {
  padding-inline: 0.125rem;
}

.donate-page__intro {
  padding-bottom: 0.25rem;
}

.donate-wallets__title {
  letter-spacing: -0.01em;
}

.donate-wallets__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 56rem;
  margin-inline: auto;
  justify-items: stretch;
}

@media (min-width: 768px) {
  .donate-wallets__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.donate-wallet-card {
  display: flex;
  flex-direction: column;
  background: rgb(15 23 42 / 0.92);
  border: 1px solid rgb(51 65 85 / 0.85);
  border-radius: 1rem;
  padding: 1.25rem 1.375rem;
  box-shadow:
    0 0 0 1px rgb(245 158 11 / 0.04),
    0 16px 40px -20px rgb(0 0 0 / 0.55);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.donate-wallet-card:hover {
  border-color: rgb(71 85 105 / 0.9);
  box-shadow:
    0 0 0 1px rgb(245 158 11 / 0.1),
    0 20px 48px -18px rgb(245 158 11 / 0.12);
}

.donate-wallet-card__head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.25rem;
}

.donate-wallet-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.donate-wallet-card__stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  flex: 1;
}

.donate-wallet-card__address {
  background: rgb(2 6 23 / 0.75);
  border: 1px solid rgb(51 65 85 / 0.9);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  line-height: 1.55;
  word-break: break-all;
}

.donate-wallet-card__copy {
  width: 100%;
  align-self: stretch;
  text-align: center;
}

@media (min-width: 480px) {
  .donate-wallet-card__copy {
    width: auto;
    min-width: 9.5rem;
    align-self: flex-start;
  }
}

.donate-online {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.donate-online__card {
  width: 100%;
  max-width: 28rem;
  text-align: center;
  background: rgb(15 23 42 / 0.92);
  border: 1px solid rgb(180 83 9 / 0.35);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  box-shadow:
    0 0 0 1px rgb(245 158 11 / 0.06),
    0 20px 48px -16px rgb(245 158 11 / 0.14);
}

@media (min-width: 640px) {
  .donate-online__card {
    padding: 2rem 2.25rem;
  }
}

.donate-online__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(251 191 36);
  border: 1px solid rgb(180 83 9 / 0.45);
  border-radius: 0.75rem;
  padding: 0.625rem 1.25rem;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.donate-online__link:hover {
  color: rgb(253 224 71);
  border-color: rgb(245 158 11 / 0.55);
  background: rgb(245 158 11 / 0.08);
}

.customer-welcome-card {
  direction: rtl;
  text-align: right;
  background: linear-gradient(
    145deg,
    rgb(41 28 18 / 0.45) 0%,
    rgb(15 23 42 / 0.96) 50%,
    rgb(15 23 42) 100%
  );
  border: 1px solid rgb(180 83 9 / 0.32);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow:
    0 0 0 1px rgb(245 158 11 / 0.06),
    0 14px 44px -14px rgb(245 158 11 / 0.14),
    0 6px 28px -10px rgb(0 0 0 / 0.45);
}

.customer-welcome-card__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: rgb(226 232 240);
  white-space: pre-line;
}

.community-rules-card {
  direction: rtl;
  background: rgb(15 23 42 / 0.92);
  border: 1px solid rgb(51 65 85 / 0.8);
  border-radius: 1rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 8px 32px -12px rgb(0 0 0 / 0.4);
}

.provision-rules-accept {
  direction: rtl;
}

.provision-rules-accept a {
  white-space: nowrap;
}

.chart-placeholder {

  background: linear-gradient(135deg, rgb(15 23 42) 0%, rgb(30 41 59) 100%);

  border: 1px dashed rgb(51 65 85);

  border-radius: 0.75rem;

  min-height: 10rem;

  display: flex;

  align-items: center;

  justify-content: center;

  color: rgb(100 116 139);

  font-size: 0.8rem;

}

/* QR expand modal */
.qr-expandable {
  display: inline-flex;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0.75rem;
}

.qr-expandable:focus-visible {
  outline: 2px solid rgb(251 191 36);
  outline-offset: 2px;
}

.qr-modal {
  isolation: isolate;
}

.qr-modal__panel {
  animation: provision-modal-in 0.2s ease-out;
}

.qr-modal__img {
  width: min(20rem, 72vw);
  height: min(20rem, 72vw);
  object-fit: contain;
}

.qr-modal__close {
  font-size: 1.125rem;
  line-height: 1;
}

.qr-modal.is-open {
  overflow: hidden;
}

/* Manual traffic refresh */
.traffic-refresh-btn__icon {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.traffic-refresh-btn.is-syncing .traffic-refresh-btn__icon {
  animation: traffic-refresh-spin 0.75s linear infinite;
}

@keyframes traffic-refresh-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

.traffic-last-sync:not([hidden]) {
  margin: 0;
}

/* Rep dashboard — credit balance + cost calculator */
.rep-credit-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: rgb(15 23 42);
  border: 1px solid rgb(30 41 59);
  border-radius: 0.75rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .rep-credit-toolbar {
    flex-direction: row;
    align-items: start;
  }
}

.rep-credit-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgb(69 26 3 / 0.45), rgb(15 23 42));
  border-bottom: 1px solid rgb(245 158 11 / 0.18);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .rep-credit-strip {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    width: min(13.5rem, 32%);
    padding: 1rem 1.125rem;
    border-bottom: none;
    border-inline-end: 1px solid rgb(30 41 59);
  }
}

.rep-credit-strip__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.375rem 0.625rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .rep-credit-strip__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.125rem;
  }
}

.rep-credit-strip__label {
  margin: 0;
  font-size: 0.75rem;
  color: rgb(100 116 139);
}

.rep-credit-strip__balance {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  color: rgb(252 211 77);
  text-align: right;
}

@media (min-width: 640px) {
  .rep-credit-strip__balance {
    font-size: 1.5rem;
  }
}

.rep-credit-strip__btn {
  flex-shrink: 0;
  padding: 0.4375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(255 255 255);
  background: rgb(217 119 6);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgb(120 53 15 / 0.35);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.rep-credit-strip__btn:hover {
  background: rgb(245 158 11);
}

@media (min-width: 768px) {
  .rep-credit-strip__btn {
    width: 100%;
    padding: 0.5rem 0.875rem;
    text-align: center;
  }
}

.rep-cost-calc {
  flex: 1;
  min-width: 0;
  padding: 0.875rem 1rem 1rem;
}

@media (min-width: 640px) {
  .rep-cost-calc {
    padding: 1rem 1.25rem 1.125rem;
  }
}

.rep-cost-calc__title {
  margin: 0 0 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(203 213 225);
}

.rep-cost-calc__form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

@media (min-width: 768px) {
  .rep-cost-calc__form {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.75rem;
  }
}

.rep-cost-calc__fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
}

@media (min-width: 640px) {
  .rep-cost-calc__fields--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rep-cost-calc__fields--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.rep-cost-calc__field {
  min-width: 0;
}

.rep-cost-calc__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  color: rgb(100 116 139);
}

.rep-cost-calc__input {
  display: block;
  width: 100%;
  padding: 0.4375rem 0.75rem;
  font-size: 0.875rem;
  color: rgb(226 232 240);
  background: rgb(30 41 59);
  border: 1px solid rgb(51 65 85);
  border-radius: 0.5rem;
}

.rep-cost-calc__input:focus {
  outline: 2px solid rgb(245 158 11 / 0.35);
  outline-offset: 1px;
}

.rep-cost-calc__select {
  font-size: 0.8125rem;
}

.rep-cost-calc__submit {
  flex-shrink: 0;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(226 232 240);
  background: rgb(30 41 59);
  border: 1px solid rgb(51 65 85);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.rep-cost-calc__submit:hover {
  background: rgb(51 65 85);
  border-color: rgb(71 85 105);
}

@media (min-width: 768px) {
  .rep-cost-calc__submit {
    width: auto;
    min-width: 7.5rem;
    white-space: nowrap;
  }
}

.rep-cost-calc__result {
  margin: 0.625rem 0 0;
  padding: 0.5rem 0 0;
  font-size: 0.875rem;
  color: rgb(148 163 184);
  border-top: 1px solid rgb(30 41 59 / 0.85);
}

.rep-cost-calc__result:not(.hidden) {
  display: block;
}

