/* ============================================================
   پنل مدیریت سکه مجید — چیدمان اپلیکیشنی مدرن
   سایدبار ثابت + تاپ‌بار + داشبورد — هماهنگ با توکن‌های تم
   مشکی-طلایی (دارک پیش‌فرض) و لایت — RTL — بدون CDN
   ============================================================ */

/* ---------- پوسته اپ ---------- */
body.adm-body { display: block; }

.adm-shell { min-height: 100vh; }

/* ---------- سایدبار ---------- */
.adm-side {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0; /* در RTL سمت راست صفحه */
  width: 266px;
  background: var(--panel);
  border-inline-end: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 60;
  overflow-y: auto;
  scrollbar-width: thin;
}

.adm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.adm-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--gold-grad);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}
.adm-brand-logo svg { width: 26px; height: 26px; }
.adm-brand-name { font-size: 16px; font-weight: 800; line-height: 1.4; }
.adm-brand-tag { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.adm-nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.adm-nav-label {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 2px;
  padding: 4px 14px 10px;
  font-weight: 700;
}
.adm-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  text-align: start;
}
.adm-nav button svg { width: 20px; height: 20px; flex-shrink: 0; }
.adm-nav button:hover { color: var(--gold-2); background: var(--gold-soft); }
.adm-nav button.active {
  background: var(--gold-soft);
  color: var(--gold-2);
  border-color: var(--border-gold);
  font-weight: 700;
}
.adm-nav .nav-count {
  margin-inline-start: auto;
  font-size: 11px;
  background: var(--panel-3);
  border: 1px solid var(--border);
  color: var(--text-3);
  padding: 1px 9px;
  border-radius: 20px;
  min-width: 26px;
  text-align: center;
}
.adm-nav button.active .nav-count {
  background: var(--gold-grad);
  color: #241a04;
  border-color: transparent;
  font-weight: 700;
}

.adm-side-foot { border-top: 1px solid var(--border); padding: 16px; }
.adm-view-site {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 13.5px;
  margin-bottom: 14px;
  transition: all 0.18s;
}
.adm-view-site:hover { border-color: var(--gold); color: var(--gold-2); }
.adm-view-site svg { width: 17px; height: 17px; }
.adm-me { display: flex; align-items: center; gap: 12px; }
.adm-me-av {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--gold-grad);
  color: #241a04;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.adm-me-name { font-size: 13.5px; font-weight: 700; line-height: 1.5; }
.adm-me-role { font-size: 11px; color: var(--gold-2); }
.adm-me-logout {
  margin-inline-start: auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-3);
  display: grid;
  place-items: center;
  transition: all 0.18s;
}
.adm-me-logout:hover { border-color: rgba(229, 83, 75, 0.5); background: var(--red-soft); color: var(--red); }
.adm-me-logout svg { width: 17px; height: 17px; }

/* ---------- بخش اصلی ---------- */
.adm-main { margin-inline-start: 266px; min-height: 100vh; display: flex; flex-direction: column; }

.adm-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 13px 26px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.adm-burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-2);
  place-items: center;
}
.adm-burger svg { width: 20px; height: 20px; }
.adm-title h1 { font-size: 18.5px; font-weight: 800; line-height: 1.4; }
.adm-title p { font-size: 12px; color: var(--text-3); }
.adm-top-actions { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; }

.adm-content { padding: 24px 26px 70px; width: 100%; max-width: 1460px; margin-inline: auto; }

/* ---------- کارت‌های آمار ---------- */
.astat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.astat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 19px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.astat::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold-grad);
  opacity: 0;
  transition: opacity 0.2s;
}
.astat:hover { transform: translateY(-3px); border-color: var(--border-gold); }
.astat:hover::before { opacity: 1; }
.astat-ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold-2);
  border: 1px solid var(--border-gold);
  flex-shrink: 0;
}
.astat-ic svg { width: 23px; height: 23px; }
.astat-ic.ic-green { background: var(--green-soft); color: var(--green); border-color: rgba(52, 199, 123, 0.35); }
.astat-ic.ic-amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(232, 185, 62, 0.35); }
.astat-ic.ic-blue { background: var(--blue-soft); color: var(--blue); border-color: rgba(91, 157, 217, 0.35); }
.astat-ic.ic-red { background: var(--red-soft); color: var(--red); border-color: rgba(229, 83, 75, 0.35); }
.astat-v { font-size: 23px; font-weight: 800; line-height: 1.35; letter-spacing: 0.2px; }
.astat-v .money-unit { font-size: 0.6em; }
.astat-l { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.astat-s { font-size: 11.5px; color: var(--text-3); margin-top: 5px; opacity: 0.85; }

/* ---------- کارت‌ها ---------- */
.adm-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.adm-card-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.adm-card-head h3 { font-size: 15.5px; display: flex; align-items: center; gap: 9px; }
.adm-card-head h3 svg { width: 19px; height: 19px; color: var(--gold-2); }
.adm-card-head .head-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.adm-card-body { padding: 20px; }
.adm-card-body.flush { padding: 0; }

.dash-grid {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

/* ---------- نوار ابزار ---------- */
.adm-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 15px; }
.adm-toolbar .adm-toolbar-end { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.adm-search { position: relative; flex: 1; min-width: 210px; max-width: 400px; }
.adm-search .input { padding-inline-start: 42px; }
.adm-search > svg {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
}
.adm-toolbar .select { width: auto; min-width: 150px; }

/* ---------- قرص‌های فیلتر ---------- */
.apills { display: flex; gap: 8px; flex-wrap: wrap; }
.apill {
  padding: 7px 16px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-2);
  font-size: 13px;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.apill:hover { border-color: var(--gold); color: var(--gold-2); }
.apill.active { background: var(--gold-grad); color: #241a04; border-color: transparent; font-weight: 700; }
.apill .cnt {
  font-size: 11px;
  background: var(--panel-3);
  border: 1px solid var(--border);
  color: var(--text-3);
  padding: 0 8px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
}
.apill.active .cnt { background: rgba(36, 26, 4, 0.16); border-color: transparent; color: #241a04; font-weight: 700; }

/* ---------- جدول‌های پنل ---------- */
.adm-card .table-wrap { border: 0; border-radius: 0; }
.adm-card .data-table thead th { border-top: 0; }
.adm-card .data-table tbody td:first-child,
.adm-card .data-table thead th:first-child { padding-inline-start: 20px; }
.adm-card .data-table tbody td:last-child,
.adm-card .data-table thead th:last-child { padding-inline-end: 20px; }

.pthumb {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--panel-2);
  display: block;
}
.ucell { display: flex; align-items: center; gap: 10px; }
.uav {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-2);
  border: 1px solid var(--border-gold);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.ucell-name { font-weight: 600; font-size: 13.5px; line-height: 1.5; }
.ucell-sub { font-size: 11.5px; color: var(--text-3); direction: ltr; text-align: right; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- دراپ‌زون آپلود تصویر ---------- */
.dropzone {
  border: 2px dashed var(--border-gold);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--gold); background: var(--gold-soft); }
.dropzone-ic {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-2);
  display: grid;
  place-items: center;
  border: 1px solid var(--border-gold);
}
.dropzone-ic svg { width: 21px; height: 21px; }
.dropzone .dz-t { font-size: 13.5px; font-weight: 600; }
.dropzone .dz-s { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.dropzone .dz-remove {
  position: absolute;
  top: 9px;
  inset-inline-end: 9px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(229, 83, 75, 0.45);
  background: var(--red-soft);
  color: var(--red);
  display: grid;
  place-items: center;
}
.dropzone .dz-remove svg { width: 15px; height: 15px; }
.dz-preview img {
  max-height: 190px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border-gold);
}

/* ---------- مودال پنل — کمی بازتر ---------- */
#app-modal .modal-box { max-width: 620px; }
#app-modal .modal-body { max-height: min(66vh, 620px); overflow-y: auto; }

/* ---------- چیدمان فرم مودال ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }

/* ---------- حالت خالی و بارگذاری ---------- */
.adm-empty { padding: 44px 20px; text-align: center; color: var(--text-3); }
.adm-empty svg { width: 46px; height: 46px; color: var(--gold-3); margin-bottom: 12px; }
.adm-empty .t { font-weight: 600; color: var(--text-2); font-size: 14.5px; margin-bottom: 4px; }
.adm-empty .s { font-size: 12.5px; }

/* ---------- داشبورد: کاربران جدید ---------- */
.mini-user { display: flex; align-items: center; gap: 11px; padding: 11px 20px; border-bottom: 1px solid var(--border); }
.mini-user:last-child { border-bottom: 0; }
.mini-user .mu-name { font-size: 13.5px; font-weight: 600; }
.mini-user .mu-sub { font-size: 11.5px; color: var(--text-3); }
.mini-user .mu-time { margin-inline-start: auto; font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* ---------- دکمه شناور اسکرول به بالا ---------- */
.adm-totop {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 24px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--border-gold);
  background: var(--panel);
  color: var(--gold-2);
  display: grid;
  place-items: center;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s;
  box-shadow: var(--shadow);
}
.adm-totop.show { opacity: 1; visibility: visible; transform: none; }
.adm-totop svg { width: 19px; height: 19px; }

/* ---------- اورلی موبایل ---------- */
.adm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 55;
}
.adm-overlay.show { display: block; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1180px) {
  .astat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .adm-side { transform: translateX(100%); transition: transform 0.26s ease; }
  .adm-side.open { transform: none; box-shadow: var(--shadow); }
  .adm-main { margin-inline-start: 0; }
  .adm-burger { display: grid; }
  .adm-content { padding: 16px 13px 60px; }
  .adm-top { padding: 11px 14px; }
  .adm-title p { display: none; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .astat-grid { grid-template-columns: 1fr; }
  .astat { padding: 16px; }
  .astat-v { font-size: 20px; }
}

/* ============================================================
   تب‌های جدید: KYC، مالی، گزارش‌ها، تنظیمات (v2)
   ============================================================ */
.finance-pane { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* مدارک KYC در مودال */
.kyc-docs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.kyc-docs figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: rgba(0, 0, 0, 0.2);
  cursor: zoom-in;
  transition: transform 0.15s;
}
.kyc-docs figure:hover { transform: translateY(-2px); }
.kyc-docs img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.kyc-docs figcaption {
  font-size: 11px;
  text-align: center;
  padding: 7px 4px;
  color: var(--text-3, #999);
}
.kyc-meta {
  display: grid;
  gap: 6px;
  font-size: 13px;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
}
.kyc-meta span { color: var(--text-3, #888); margin-inline-end: 6px; }

@media (max-width: 640px) {
  .kyc-docs { grid-template-columns: 1fr; }
  .kyc-docs img { height: 180px; }
}

/* لایت‌باکس تصاویر مدرک */
.kyc-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 1000;
  display: grid;
  place-items: center;
  cursor: zoom-out;
  padding: 24px;
}
.kyc-lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

/* فرم تنظیمات سایت */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
@media (max-width: 720px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-2, #bbb);
}
.field .input,
.field textarea.input {
  width: 100%;
  resize: vertical;
}

/* تراکنش‌ها — رنگ مبالغ */
.tx-in { color: #4caf7d; }
.tx-out { color: #e0705a; }

/* کیف پول در مودال کاربر */
.um-wallet-box { margin-bottom: 4px; }
.um-wallet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.um-wallet-grid > div {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
}
.um-wallet-grid span {
  display: block;
  font-size: 11px;
  color: var(--text-3, #888);
  margin-bottom: 4px;
}
.um-wallet-grid b { font-size: 14px; font-weight: 800; }
.um-wallet-grid b.gold { color: var(--gold, #d4af37); }
.um-assets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.um-asset-pill {
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 99px;
  padding: 5px 11px;
}
@media (max-width: 640px) {
  .um-wallet-grid { grid-template-columns: 1fr 1fr; }
}

.kyc-doc-err {
  height: 140px;
  display: grid;
  place-items: center;
  color: var(--text-3, #888);
  font-size: 12px;
}

/* ============================================================
   قواعد تجارت v6 — موجودی محصول، رد تک‌مدرکی، چک‌باکس نامحدود
   ============================================================ */
.pm-unlimited {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2, #b8b8b8);
  cursor: pointer;
  white-space: nowrap;
}
.pm-unlimited input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--gold, #d4af37);
  cursor: pointer;
}
.kyc-docs figure.doc-rejected {
  border: 1.5px solid rgba(229, 83, 75, 0.55);
  border-radius: 12px;
  padding: 6px;
  background: var(--red-soft, rgba(229, 83, 75, 0.1));
}
.kyc-docs figure figcaption {
  font-size: 12.5px;
}

/* ================= زنگ هشدارهای مدیر (v8) ================= */

.adm-bell-wrap { position: relative; }

.adm-bell-wrap .alerts-badge {
  position: absolute;
  top: -4px;
  left: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e5534b, #c53030);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 8px rgba(229, 83, 75, 0.45);
  animation: bell-pulse 2.4s ease-in-out infinite;
}

@keyframes bell-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.adm-alerts-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: var(--panel, #1c1f26);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.09));
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  z-index: 90;
  overflow: hidden;
}

.adm-alerts-panel .aap-head {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold, #d4af37);
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: rgba(212, 175, 55, 0.06);
}

.adm-alerts-panel .aap-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: background 0.15s;
}

.adm-alerts-panel .aap-row:hover { background: rgba(255, 255, 255, 0.04); }

.adm-alerts-panel .aap-ic {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold, #d4af37);
}

.adm-alerts-panel .aap-ic svg { width: 18px; height: 18px; }

.adm-alerts-panel .aap-txt { flex: 1; min-width: 0; }
.adm-alerts-panel .aap-txt b { display: block; font-size: 12.5px; }
.adm-alerts-panel .aap-txt span { display: block; font-size: 11px; color: var(--text-3, #8b8b8b); margin-top: 2px; }

.adm-alerts-panel .aap-count {
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(229, 83, 75, 0.16);
  color: #ff8a80;
}

.adm-alerts-panel .aap-count.is-zero {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-3, #8b8b8b);
}

.adm-alerts-panel .aap-foot {
  padding: 9px 16px;
  font-size: 10.5px;
  color: var(--text-3, #8b8b8b);
  text-align: center;
}

/* v33 — زنگ مثل سایت: فهرست پیام‌های جدید + ردیف صفر مخفی */
.adm-alerts-panel .aap-scroll {
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.adm-alerts-panel .aap-subhead {
  padding: 9px 16px 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3, #8b8b8b);
  letter-spacing: .2px;
}

.adm-alerts-panel .aap-row.hidden,
.adm-alerts-panel .aap-empty.hidden,
.adm-alerts-panel #aap-queues.hidden { display: none; }

.adm-alerts-panel .aap-msg {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: background 0.15s;
}

.adm-alerts-panel .aap-msg:hover { background: rgba(212, 175, 55, 0.07); }

.adm-alerts-panel .aap-msg .aap-mic {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold, #d4af37);
}

.adm-alerts-panel .aap-msg .aap-mic svg { width: 18px; height: 18px; }

.adm-alerts-panel .aap-msg .aap-mtxt {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.adm-alerts-panel .aap-msg .aap-mtxt b {
  display: block;
  font-size: 12.5px;
  color: var(--text, #f2f2f2);
}

.adm-alerts-panel .aap-msg .aap-msnip {
  display: block;
  font-size: 11px;
  color: var(--text-3, #8b8b8b);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-alerts-panel .aap-msg .aap-mtime {
  display: block;
  font-size: 10px;
  color: var(--text-3, #8b8b8b);
  margin-top: 2px;
  opacity: .85;
}

.adm-alerts-panel .aap-mcount {
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(229, 83, 75, 0.16);
  color: #ff8a80;
}

.adm-alerts-panel .aap-empty {
  padding: 22px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3, #8b8b8b);
}

/* v33 — زنگ مثل سایت: فهرست پیام‌های جدید + ردیف صفر مخفی */
.adm-alerts-panel .aap-scroll {
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.adm-alerts-panel .aap-subhead {
  padding: 9px 16px 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3, #8b8b8b);
  letter-spacing: .2px;
}

.adm-alerts-panel .aap-row.hidden,
.adm-alerts-panel .aap-empty.hidden,
.adm-alerts-panel #aap-queues.hidden { display: none; }

.adm-alerts-panel .aap-msg {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: background 0.15s;
}

.adm-alerts-panel .aap-msg:hover { background: rgba(212, 175, 55, 0.07); }

.adm-alerts-panel .aap-msg .aap-mic {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold, #d4af37);
}

.adm-alerts-panel .aap-msg .aap-mic svg { width: 18px; height: 18px; }

.adm-alerts-panel .aap-msg .aap-mtxt {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.adm-alerts-panel .aap-msg .aap-mtxt b {
  display: block;
  font-size: 12.5px;
  color: var(--text, #f2f2f2);
}

.adm-alerts-panel .aap-msg .aap-msnip {
  display: block;
  font-size: 11px;
  color: var(--text-3, #8b8b8b);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-alerts-panel .aap-msg .aap-mtime {
  display: block;
  font-size: 10px;
  color: var(--text-3, #8b8b8b);
  margin-top: 2px;
  opacity: .85;
}

.adm-alerts-panel .aap-mcount {
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(229, 83, 75, 0.16);
  color: #ff8a80;
}

.adm-alerts-panel .aap-empty {
  padding: 22px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3, #8b8b8b);
}


/* ============================================================
   v15 — واریز سریع به حساب کاربر + فیلترهای دفتر تراکنش‌ها
   ============================================================ */
.qd-results {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 10px;
  margin-top: 8px;
  background: var(--panel, #131313);
}
.qd-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #2a2a2a);
}
.qd-user:last-child { border-bottom: 0; }
.qd-user:hover { background: rgba(212, 175, 55, 0.06); }
.qd-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-gold, #8a6d1f);
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.08);
  margin-bottom: 4px;
}

/* ============================================================
   ظاهر سایت — آپلود لوگو و تصاویر هیرو (پاسخ کارفرما)
   ============================================================ */
.st-img-row { display: flex; align-items: center; gap: 14px; }
.st-img-prev {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px dashed var(--border-gold, #8a6d1f);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--panel-2, #141414);
}
.st-img-prev.wide { width: 92px; border-radius: 12px; }
.st-img-prev img { width: 100%; height: 100%; object-fit: cover; }
.st-img-prev .st-noimg { font-size: 10px; color: var(--text-3, #8a8a8a); }
.st-img-controls { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.st-img-controls input[type="file"] { font-size: 12px; max-width: 250px; }
@media (max-width: 640px) {
  .st-img-row { flex-direction: column; align-items: stretch; }
  .st-img-controls { align-items: stretch; }
  .st-img-controls input[type="file"] { max-width: none; }
}

/* ============================================================
   شعبه‌های مجموعه (v18) — کارت‌های مدیریت شعبه در تب تنظیمات
   ============================================================ */
.br-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  background: var(--panel-2);
  flex-wrap: wrap;
}
.br-row.br-inactive { opacity: 0.62; }
.br-row .br-main { flex: 1; min-width: 240px; }
.br-row .br-name { font-weight: 700; font-size: 14.5px; margin-bottom: 3px; }
.br-row .br-addr { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.br-row .br-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.br-row .br-actions { display: flex; gap: 7px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .br-row .br-actions { width: 100%; }
  .br-row .br-actions .btn { flex: 1; }
}

/* ============================================================
   تب‌های افقی تنظیمات سایت — به‌جای کارت‌های پشت‌سرهم (پاسخ کارفرما)
   پنج پنل: محتوا / ظاهر / قواعد معاملات / قواعد انتقال / شعبه‌ها
   ============================================================ */
.set-tabs {
  display: flex;
  gap: 2px;
  align-items: stretch;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.set-tabs::-webkit-scrollbar { display: none; }
.set-tab {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  padding: 11px 16px 12px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.set-tab:hover { color: var(--text); }
.set-tab.active { color: var(--gold-2); border-bottom-color: var(--gold); }

@media (max-width: 640px) {
  .set-tabs { margin-inline: -12px; padding-inline: 12px; }
  .set-tab { min-height: 44px; padding: 10px 14px 11px; font-size: 13px; }
}

/* ---------- چت زنده پشتیبانی (v31) — تب گفتگوها؛ رنگ‌ها از توکن‌های تم ---------- */
.achat-layout {
  display: flex;
  gap: 14px;
  height: calc(100vh - 205px);
  min-height: 430px;
}

.achat-list {
  width: 330px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.achat-list-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.achat-rooms {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.achat-room {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: right;
  background: none;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}

.achat-room:hover { background: var(--grey-soft); }
.achat-room.active { background: var(--gold-soft); }

.achat-conv {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.achat-conv-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#achat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
}

#achat-back-wrap { display: none; }

@media (max-width: 900px) {
  .achat-layout { flex-direction: column; height: calc(100vh - 185px); }
  .achat-list { width: 100%; }
  .achat-conv { display: none; }
  .achat-layout.achat-conv-open .achat-list { display: none; }
  .achat-layout.achat-conv-open .achat-conv { display: flex; }
  #achat-back-wrap { display: block; padding: 8px 12px 0; }
}

/* ============================================================
   تیک «استفاده در سایت» کنار هر منبع قیمت (v1.17.0 — پاسخ کارفرما:
   «هر منبع کنارش یه علامت تیک باشه که مشخص کنه از کدوم منبع
   میخواد استفاده کنه») — دکمهٔ انحصاری؛ تیکِ روشن طلایی است
   v1.25.0 (پاسخ کارفرما: «باکسهای تیک که برای اعمال منابع گذاشتی
   اصلا دیده نمیشن اونم یکم بهتر کن تا خالی چک باکس هم معلوم باشه»):
   تیک‌ها حالا چک‌باکس مربعیِ دیده‌شدنی‌اند — حالت خالی هم قابِ
   مشخص با علامتِ کم‌رنگ دارد، نه دایرهٔ بی‌حدی که در پس‌زمینه گم
   می‌شد.
   ============================================================ */
.br-row .br-tick {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 8px;
  border: 2px solid rgba(212, 175, 55, 0.65);
  background: var(--gold-soft);
  color: rgba(212, 175, 55, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.br-row .br-tick svg {
  width: 15px;
  height: 15px;
  opacity: 0.45;
  transition: opacity 0.15s ease;
}
.br-row .br-tick:hover {
  border-color: var(--gold);
  color: var(--gold-2);
}
.br-row .br-tick:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.br-row .br-tick.on {
  background: var(--gold-grad);
  border-color: transparent;
  color: #1a1a1a;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
}
.br-row .br-tick.on svg { opacity: 1; }
.br-row.br-selected {
  border-color: rgba(212, 175, 55, 0.55);
  background: var(--gold-soft);
}
.br-row .br-sel-badge {
  background: var(--gold-soft);
  color: var(--gold-2);
  border: 1px solid rgba(212, 175, 55, 0.45);
}
/* ============================================================
   تیک دوم «اعمال خودکار» کنار هر منبع (v1.24.0 — پاسخ کارفرما:
   «وقتی زده بشه دیگه نیازی به ارسال به بله برای تایید قیمت
   نباشه و هر ۱۰ دقیقه قیمت‌ها از منبع گرفته و در سایت به‌روز
   شود») — سبز و جدا از تیک طلایی «استفاده در سایت»؛
   v1.25.0 — چک‌باکس مربعیِ دیده‌شدنی (همان اصلاح تیک طلایی)
   ============================================================ */
.br-row .br-tick-auto {
  border-color: rgba(52, 199, 123, 0.65);
  background: var(--green-soft);
  color: rgba(52, 199, 123, 0.6);
}
.br-row .br-tick-auto:hover,
.br-row .br-tick-auto:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline-color: var(--green);
}
.br-row .br-tick-auto.on {
  background: var(--green);
  border-color: transparent;
  color: #0c1f16;
  box-shadow: 0 2px 10px rgba(52, 199, 123, 0.35);
}
.br-row .br-auto-badge {
  background: var(--green-soft);
  border-color: rgba(52, 199, 123, 0.4);
}
.br-row .br-auto-hint {
  color: var(--green);
}
@media (max-width: 640px) {
  .br-row .br-tick { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; }
  .br-row .br-tick svg { width: 13px; height: 13px; }
}
