:root {
  --primary: #1c7ea6;
  --primary-dark: #12607f;
  --primary-soft: #e2f3fa;
  --teal: #119183;
  --purple: #6a53d6;
  --purple-soft: #efebfe;
  --amber: #f9a825;
  --amber-soft: #fff7e0;
  --blue: #1e88e5;
  --blue-soft: #e3f0fd;
  --danger: #ef5350;
  --danger-soft: #ffecec;
  --success: #2e7d32;
  --success-soft: #e8f5e9;
  --bg: #eef6fa;
  --card: #ffffff;
  --text: #122a34;
  --text-soft: #4e6a77;
  --line: #dbe9f1;
  --radius: 16px;
  --shadow: 0 1px 4px rgba(18, 42, 52, 0.05);
  --shadow-lg: 0 14px 36px rgba(18, 42, 52, 0.14);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  overflow-x: hidden;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(43,155,201,0.13), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(31,179,160,0.11), transparent 45%),
    radial-gradient(circle at 50% 96%, rgba(106,83,214,0.07), transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='92' viewBox='0 0 92 92'%3E%3Cg fill='none' stroke='%231c7ea6' stroke-opacity='0.075' stroke-width='1.1'%3E%3Cpath d='M46 18 L52.6 32 L68 34.2 L56.8 45 L59.6 60 L46 53 L32.4 60 L35.2 45 L24 34.2 L39.4 32 Z'/%3E%3Ccircle cx='46' cy='46' r='6'/%3E%3Cpath d='M0 0 L14 14 M92 0 L78 14 M0 92 L14 78 M92 92 L78 78'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--text-soft); }
.sm { font-size: 12.5px; }
.mt { margin-top: 18px; }
code {
  font-family: ui-monospace, Menlo, monospace;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
  direction: ltr;
  display: inline-block;
}

/* ══════ ورود ══════ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(43, 155, 201, 0.28), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(31, 179, 160, 0.22), transparent 45%),
    linear-gradient(160deg, #0b3b52, #0e4a66 45%, #072b3d);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  padding: 34px 28px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.login-brand { text-align: center; margin-bottom: 26px; }
.brand-logo { width: 66px; height: 66px; display: block; margin: 0 auto 12px; border-radius: 19px; box-shadow: 0 8px 22px rgba(18,42,52,0.18); }
.brand-logo.sm { width: 38px; height: 38px; margin: 0; border-radius: 11px; box-shadow: none; }
.login-brand h1 { font-size: 21px; font-weight: 800; }
.login-brand p { color: var(--text-soft); font-size: 12.5px; margin-top: 2px; }

.login-form { display: grid; gap: 14px; }
.login-form label { display: grid; gap: 6px; }
.login-form label span { font-size: 12.5px; font-weight: 600; }
.login-form input {
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  background: #f8fbfa;
  transition: 0.2s;
}
.login-form input:focus { outline: none; border-color: var(--primary); background: #fff; }
.login-hint { text-align: center; font-size: 11.5px; color: var(--text-soft); }

/* ══════ چیدمان ══════ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0e4a66, #0b3b52);
  color: #d9ece6;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 16px;
}
.sidebar-brand strong { display: block; font-size: 15px; color: #fff; }
.sidebar-brand small { font-size: 11px; color: #8fb5aa; }

.nav { display: grid; gap: 4px; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #bcxd6ce;
  color: #bcd6ce;
  font-family: inherit;
  font-size: 13.5px;
  text-align: right;
  cursor: pointer;
  transition: 0.18s;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.9; }
.nav-item.active svg { opacity: 1; }
.stat-ico svg { width: 22px; height: 22px; }
.gw-logo svg { width: 22px; height: 22px; }
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(43, 155, 201, 0.32), rgba(31, 179, 160, 0.10));
  color: #fff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-foot { padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.09); display: grid; gap: 10px; }
.status-chip { font-size: 11.5px; color: #9fc3b8; display: flex; align-items: center; gap: 6px; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 26px 26px; min-height: 100vh; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  position: sticky;
  top: 0;
  background: rgba(243, 246, 245, 0.92);
  backdrop-filter: blur(8px);
  z-index: 20;
}
.topbar-title h2 { font-size: 18px; font-weight: 800; }
.topbar-title p { font-size: 12px; color: var(--text-soft); }
.topbar-actions { margin-right: auto; display: flex; align-items: center; gap: 12px; }
.clock {
  font-size: 12px;
  color: var(--text-soft);
  background: #fff;
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 10px;
  direction: ltr;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 15px; color: var(--text);
  display: grid; place-items: center; transition: 0.18s;
}
.icon-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.menu-btn { display: none; }

/* ══════ کارت‌ها ══════ */
.card {
  background: var(--card);
  background-image: linear-gradient(180deg, rgba(43,155,201,0.035), transparent 60%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.card-head h3 { font-size: 14.5px; font-weight: 800; }
.link {
  background: none; border: 0; color: var(--primary-dark); font-family: inherit;
  font-size: 12.5px; cursor: pointer; font-weight: 600;
}
.link:hover { text-decoration: underline; }
.badge {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 700;
}
.badge-soft { background: #f1f5f4; color: var(--text-soft); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2:last-child { margin-bottom: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow);
}
.stat-ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 19px; flex-shrink: 0;
}
.bg-teal { background: var(--primary-soft); color: var(--primary-dark); }
.bg-purple { background: var(--purple-soft); color: var(--purple); }
.bg-amber { background: var(--amber-soft); color: #b27500; }
.bg-blue { background: var(--blue-soft); color: var(--blue); }
.stat-label { font-size: 12px; color: var(--text-soft); display: block; }
.stat-value { font-size: 22px; font-weight: 800; line-height: 1.35; display: block; }
.stat-card small { font-size: 11.5px; }

/* ══════ نمودار ══════ */
.chart-box { width: 100%; height: 210px; }
.chart-box svg { width: 100%; height: 100%; overflow: visible; }

.bars { display: grid; gap: 11px; }
.bar-row { display: grid; gap: 5px; }
.bar-row-top { display: flex; justify-content: space-between; font-size: 12.5px; gap: 8px; }
.bar-track { height: 9px; border-radius: 8px; background: #f0f4f3; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--primary), var(--teal)); }

.mini-list { display: grid; gap: 9px; }
.mini-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 12px; background: #fafcfb; border: 1px solid #eff4f2;
}
.mini-item strong { font-size: 13px; font-weight: 700; display: block; }
.mini-item small { font-size: 11.5px; color: var(--text-soft); }
.mini-item .end { margin-right: auto; text-align: left; }

/* ══════ ابزارها ══════ */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.search, .select, .input {
  height: 42px; border: 1px solid var(--line); border-radius: 11px;
  padding: 0 13px; font-family: inherit; font-size: 13px; background: #fff;
  min-width: 170px; color: var(--text);
}
.search { flex: 1; min-width: 220px; }
.search:focus, .select:focus, .input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 179, 134, 0.12); }

.btn {
  height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid transparent;
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: 0.18s; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, #2b9bc9, #1fb3a0); color: #fff; box-shadow: 0 6px 16px rgba(28, 126, 166, 0.28); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-danger { background: var(--danger-soft); color: #c62828; }
.btn-danger:hover { background: #ffdede; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 11.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.file-btn { cursor: pointer; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

.notice {
  background: var(--blue-soft); color: #15507f; border: 1px solid #c6e0f7;
  border-radius: 12px; padding: 12px 15px; font-size: 12.5px; margin-bottom: 14px;
}
.notice.sm { padding: 10px 13px; font-size: 12px; margin-top: 12px; }
.hint { font-size: 11.5px; color: var(--text-soft); }

/* ══════ جدول ══════ */
.table-card { padding: 6px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
.table th {
  text-align: right; font-size: 11.5px; font-weight: 700; color: var(--text-soft);
  padding: 12px 12px; background: #f8fbfa; white-space: nowrap;
}
.table th:first-child { border-radius: 0 10px 10px 0; }
.table th:last-child { border-radius: 10px 0 0 10px; }
.table td { padding: 11px 12px; border-bottom: 1px solid #f2f6f5; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafdfc; }
.cell-strong { font-weight: 700; }
.cell-sub { font-size: 11.5px; color: var(--text-soft); }
.row-actions { display: flex; gap: 6px; }
.price-input {
  width: 108px; height: 32px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 9px; font-family: inherit; font-size: 12px; direction: ltr; text-align: left;
}
.price-input:focus { outline: none; border-color: var(--primary); }

.pill { font-size: 10.5px; padding: 3px 10px; border-radius: 20px; font-weight: 700; display: inline-block; white-space: nowrap; }
.pill-active { background: var(--success-soft); color: var(--success); }
.pill-inactive { background: #f0f2f2; color: #78877f; }
.pill-pending { background: var(--amber-soft); color: #8a6100; }
.pill-paid { background: var(--success-soft); color: var(--success); }
.pill-processing { background: var(--blue-soft); color: #14548f; }
.pill-done { background: var(--primary-soft); color: var(--primary-dark); }
.pill-rejected { background: var(--danger-soft); color: #c62828; }
.pill-gold { background: linear-gradient(135deg, #ffe082, #ffca28); color: #6b4c00; }

/* ══════ سوییچ ══════ */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute; inset: 0; background: #b9c6c1; border-radius: 24px;
  cursor: pointer; transition: 0.22s;
}
.switch i::before {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; right: 3px; transition: 0.22s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::before { transform: translateX(-20px); }

/* ══════ دسته‌بندی‌ها ══════ */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 13px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: grid; gap: 10px;
}
.cat-top { display: flex; align-items: center; gap: 10px; }
.cat-ico {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  font-size: 17px; background: var(--primary-soft); color: var(--primary-dark);
}
.cat-card strong { font-size: 13.5px; }
.cat-card small { font-size: 11px; color: var(--text-soft); }

/* ══════ درگاه‌ها ══════ */
.gateway-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.gw-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px; box-shadow: var(--shadow); display: grid; gap: 12px;
  transition: 0.2s;
}
.gw-card.on { border-color: rgba(0, 179, 134, 0.45); box-shadow: 0 8px 22px rgba(0, 179, 134, 0.12); }
.gw-top { display: flex; align-items: center; gap: 11px; }
.gw-logo {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 19px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.gw-card strong { font-size: 14px; }
.gw-card small { font-size: 11.8px; color: var(--text-soft); display: block; }
.gw-field { display: grid; gap: 5px; }
.gw-field span { font-size: 12px; color: var(--text-soft); }
.gw-field input {
  height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px;
  font-family: inherit; font-size: 12.5px; direction: ltr; background: #fafcfb;
}
.gw-field input:focus { outline: none; border-color: var(--primary); background: #fff; }

/* ══════ فرم ══════ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid label { display: grid; gap: 6px; }
.form-grid label span { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.form-grid input, .form-grid textarea, .form-grid select {
  height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: 0 12px;
  font-family: inherit; font-size: 13px; background: #fafcfb; color: var(--text);
  resize: vertical;
}
.form-grid textarea { height: auto; padding: 10px 12px; line-height: 1.7; }
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 179, 134, 0.12);
}
.form-grid .full { grid-column: 1 / -1; }
.row-switch {
  display: flex !important; align-items: center; justify-content: space-between;
  background: #fafcfb; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
}
.row-switch > span { font-size: 12.5px; color: var(--text); font-weight: 600; }

.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type='color'] {
  width: 52px; height: 42px; padding: 3px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; cursor: pointer;
}
.color-row input[type='text'] { flex: 1; height: 42px; }
.palette { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; transition: 0.15s; }
.swatch:hover { transform: scale(1.08); }
.swatch.active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--primary); }
.swatch:hover { transform: scale(1.08); }

.preview-card {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.pc-ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-dark); font-size: 20px;
}
.pc-price { font-size: 12px; color: var(--primary-dark); font-weight: 700; }

.steps { padding-right: 18px; display: grid; gap: 8px; font-size: 12.5px; }
.steps li { line-height: 1.9; }

/* ══════ مودال ══════ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(12, 30, 26, 0.5);
  display: grid; place-items: center; padding: 20px; z-index: 100;
  backdrop-filter: blur(3px);
}
.modal {
  width: 100%; max-width: 560px; background: #fff; border-radius: 20px;
  box-shadow: var(--shadow-lg); max-height: 90vh; display: flex; flex-direction: column;
  animation: pop 0.18s ease-out;
}
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 15px; font-weight: 800; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-start;
}

/* ══════ توست ══════ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #16231f; color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: 13px; box-shadow: var(--shadow-lg); z-index: 200;
  animation: rise 0.22s ease-out;
}
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.foot { text-align: center; font-size: 12px; color: var(--text-soft); padding: 22px 0 6px; margin-top: auto; }

/* ══════ ریسپانسیو ══════ */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; right: 0; top: 0; z-index: 90;
    transform: translateX(100%); transition: transform 0.25s ease;
    box-shadow: -14px 0 40px rgba(0, 0, 0, 0.25);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: grid; }
  .main { padding: 0 16px 20px; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-grid .stat-value { font-size: 19px; }
  .topbar-title h2 { font-size: 16px; }
  .clock { display: none; }
  .toolbar .search { min-width: 100%; }
}

/* ══════ فرم‌های اختصاصی ══════ */
.fields-list { display: grid; gap: 8px; }
.field-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 12px;
  background: #fafcfb; border: 1px solid #eff4f2;
  transition: 0.15s;
}
.field-row:hover { border-color: var(--primary); background: #fff; }
.field-grip { color: #b9c9c4; font-size: 14px; cursor: grab; }
.field-main { flex: 1; min-width: 0; }
.field-title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.field-sub { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.field-actions { display: flex; gap: 4px; flex-shrink: 0; }
.req { color: var(--danger); font-weight: 700; }

/* پیش‌نمایش موبایل */
.phone-preview {
  width: 100%; max-width: 300px; margin: 0 auto;
  background: #f4f7f6; border-radius: 28px; padding: 16px 13px;
  border: 8px solid #14201d; display: grid; gap: 10px;
  max-height: 620px; overflow-y: auto;
  box-shadow: 0 18px 40px rgba(16,40,34,0.18);
}
.phone-preview::before {
  content: ''; display: block; width: 62px; height: 5px; border-radius: 5px;
  background: #253430; margin: -8px auto 4px;
}
.pv-header {
  border-radius: 14px; padding: 12px;
  background: linear-gradient(135deg, #0a5c4b, #008a66); color: #fff;
}
.pv-title { font-size: 12px; font-weight: 800; }
.pv-sub { font-size: 10.5px; opacity: 0.82; margin-top: 2px; line-height: 1.7; }
.pv-docs {
  background: #eff6ff; color: #14548f; border: 1px solid #cfe4fb;
  border-radius: 11px; padding: 9px 11px; font-size: 10.5px; line-height: 1.7;
}
.pv-row { display: grid; gap: 5px; }
.pv-label { font-size: 11px; font-weight: 600; color: #3d4f49; }
.pv-input {
  background: #fff; border: 1px solid #e2eae7; border-radius: 10px;
  padding: 9px 11px; font-size: 11px; color: #93a5a0;
}
.pv-file {
  background: #fff; border: 1.5px dashed #cfe0db; border-radius: 12px;
  padding: 14px; text-align: center; font-size: 10.5px; color: var(--primary-dark); font-weight: 600;
}
.pv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-chip {
  background: #fff; border: 1px solid #e2eae7; border-radius: 9px;
  padding: 6px 10px; font-size: 10px; color: #46554f;
}
.pv-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pv-check { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.pv-check i {
  width: 17px; height: 17px; border-radius: 5px; background: var(--primary);
  display: inline-block; position: relative;
}
.pv-check i::after {
  content: '✓'; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 11px;
}
/* پلاک ایران در پیش‌نمایش */
.pv-plate {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 2px solid #c3d0cc; border-radius: 8px;
  padding: 6px 8px; direction: ltr; font-weight: 900; font-size: 13px; letter-spacing: 1px;
}
.pv-ir {
  background: #123a8f; color: #fff; font-size: 9px; font-weight: 700;
  padding: 5px 6px; border-radius: 5px; letter-spacing: 0;
}

/* ══════ کدهای تخفیف ══════ */
.coupon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px;
}
.coupon-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; display: grid; gap: 10px; box-shadow: var(--shadow);
  transition: 0.2s; position: relative; overflow: hidden;
}
.coupon-card.on::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #ffd166, #00b386);
}
.coupon-card.on { border-color: rgba(0, 179, 134, 0.4); }
.coupon-card { min-height: 232px; align-content: start; }
.coupon-card .cp-actions { margin-top: auto; }
.cp-cond { color: #3f564e; }
.cp-usage-top { color: #566b63; }
.cp-top { display: flex; align-items: center; gap: 9px; }
.cp-badge {
  background: linear-gradient(135deg, #ffd166, #ff8a00); color: #4a3000;
  font-size: 13px; font-weight: 900; padding: 4px 10px; border-radius: 9px;
  white-space: nowrap;
}
.cp-code {
  font-family: ui-monospace, monospace; font-size: 13px; font-weight: 800;
  letter-spacing: 1.6px; color: var(--text); direction: ltr; flex: 1;
  overflow: hidden; text-overflow: ellipsis;
}
.cp-title { font-size: 13px; font-weight: 700; }
.cp-desc { font-size: 11.5px; color: var(--text-soft); margin-top: -6px; }
.cp-conds { display: flex; flex-wrap: wrap; gap: 5px; }
.cp-cond {
  font-size: 10px; background: #f2f7f5; color: #4d655d;
  padding: 3px 8px; border-radius: 7px; border: 1px solid #e6efec;
}
.cp-usage { display: grid; gap: 6px; }
.cp-usage-top { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-soft); }
.cp-actions { display: flex; gap: 6px; padding-top: 4px; border-top: 1px solid #f2f6f5; }
.cp-svcs {
  max-height: 150px; overflow-y: auto; display: grid; gap: 4px;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px;
  background: #fafcfb;
}
.cp-svc { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; }

/* ══════ اسلایدهای بنر ══════ */
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.banner-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.banner-card.on { border-color: rgba(28,126,166,0.42); }
.bn-preview { position: relative; border-radius: 13px; padding: 14px; min-height: 118px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; overflow: hidden; }
.bn-preview::after { content: ''; position: absolute; left: -30px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); }
.bn-badge { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.24); border-radius: 7px; padding: 2px 8px; font-size: 10px; font-weight: 700; }
.bn-title { font-size: 14px; font-weight: 800; line-height: 1.5; }
.bn-sub { font-size: 10.5px; opacity: 0.86; margin-top: 2px; line-height: 1.6; }
.bn-cta { align-self: flex-start; margin-top: 8px; background: #fff; color: #12607f; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 7px; }
.bn-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.bn-actions { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid #f2f6f5; }
.bn-actions .btn { margin-right: auto; }

/* ══════ نظرات ══════ */
.review-list { display: grid; gap: 12px; }
.review-row { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.rv-head { display: flex; align-items: center; gap: 10px; }
.rv-avatar { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg,#2b9bc9,#1fb3a0); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.rv-head strong { font-size: 13px; display: block; }
.rv-head small { font-size: 10.5px; color: var(--text-soft); }
.rv-stars { color: #f0a532; font-size: 14px; letter-spacing: 1px; }
.rv-text { font-size: 12.5px; line-height: 1.9; color: #33474f; }
.rv-foot { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

/* ══════ جزئیات سفارش ══════ */
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .od-grid { grid-template-columns: 1fr; } }
.od-side { display: grid; gap: 12px; align-content: start; }
.od-block { background: #fafcfb; border: 1px solid #eef4f2; border-radius: 13px; padding: 12px; }
.od-block h4 { font-size: 12px; font-weight: 800; color: var(--primary-dark); margin-bottom: 8px; }
.od-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; padding: 4px 0; border-bottom: 1px dashed #eef4f2; }
.od-kv:last-child { border-bottom: 0; }
.od-kv span { color: var(--text-soft); }
.od-kv b { font-weight: 700; text-align: left; }
.od-doc { display: flex; align-items: center; gap: 7px; font-size: 11.5px; background: #fff; border: 1px solid #e8efec; border-radius: 9px; padding: 7px 9px; margin-bottom: 6px; }
.od-doc-ico { color: var(--primary); }

.od-chat { display: flex; flex-direction: column; background: #fafcfb; border: 1px solid #eef4f2; border-radius: 13px; overflow: hidden; min-height: 340px; }
.od-chat-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; background: #fff; border-bottom: 1px solid #eef4f2; font-size: 12.5px; }
.od-chat-dot { width: 8px; height: 8px; border-radius: 50%; background: #2e9e6b; box-shadow: 0 0 0 3px rgba(46,158,107,0.16); }
.od-chat-body { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 8px; align-content: start; max-height: 320px; }
.chat-row { display: flex; }
.chat-row.mine { justify-content: flex-end; }
.chat-bubble { max-width: 78%; background: #fff; border: 1px solid #e8efec; border-radius: 12px 12px 12px 4px; padding: 8px 11px; }
.chat-row.mine .chat-bubble { background: linear-gradient(135deg,#2b9bc9,#1fb3a0); border: 0; color: #fff; border-radius: 12px 12px 4px 12px; }
.chat-who { display: block; font-size: 9px; font-weight: 700; color: var(--primary-dark); margin-bottom: 2px; }
.chat-text { font-size: 12px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.chat-time { font-size: 8.5px; opacity: 0.6; margin-top: 3px; text-align: left; }
.od-chat-input { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid #eef4f2; }

.unread-dot { display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: #fff; color: #1c7ea6; font-size: 9px; font-weight: 800; margin-right: 4px; }

/* ══════════ آپلود تصویر بنر ══════════ */
.bn-lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #41607a;
  margin-bottom: 6px;
}

.bn-img-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.bn-img-preview {
  position: relative;
  width: 148px;
  height: 66px;
  border-radius: 12px;
  border: 1.5px dashed #b9d6e4;
  background: #f4fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.bn-img-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bn-img-empty {
  font-size: 10px;
  color: #8fa9b8;
}

.bn-img-del {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: none;
  background: rgba(198, 40, 40, 0.92);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bn-img-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bn-img-actions .hint {
  margin: 0;
  font-size: 9.5px;
  line-height: 1.6;
}

/* پیش‌نمایش کارت بنر با تصویر */
.bn-preview.has-img {
  position: relative;
  overflow: hidden;
}

.bn-img-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 42, 60, 0.18) 0%, rgba(8, 42, 60, 0.62) 100%);
  border-radius: inherit;
}

.bn-preview.has-img .bn-title,
.bn-preview.has-img .bn-sub,
.bn-preview.has-img .bn-badge,
.bn-preview.has-img .bn-cta {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.bn-img-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: #0e4a66;
  font-size: 8.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  z-index: 3;
}

/* ══════════ قالب‌های پیامک ══════════ */
.tpl-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #e3eef4;
  border-radius: 11px;
  background: #fbfdfe;
  margin-bottom: 7px;
}
.tpl-row.ok { border-color: #b6e3d6; background: #f4fdfa; }
.tpl-info { flex: 1; min-width: 0; }
.tpl-info strong { display: block; font-size: 12px; color: #14424f; }
.tpl-info small {
  display: block;
  font-size: 10px;
  color: #6b8797;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tpl-params { font-size: 9.5px; color: #8fa9b8; }
.tpl-act { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ══════════ آیکون خدمت ══════════ */
.svc-ico-preview {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}
.svc-ico-preview img {
  border-radius: 16px;
}

/* ══════════ پیام به کاربران ══════════ */
.bc-list { max-height: 620px; overflow-y: auto; }
.bc-row {
  padding: 11px 12px;
  border: 1px solid #e3eef4;
  border-radius: 12px;
  background: #fbfdfe;
  margin-bottom: 8px;
}
.bc-head { display: flex; gap: 9px; align-items: center; }
.bc-head strong { display: block; font-size: 12px; color: #14424f; }
.bc-head small { display: block; font-size: 9.5px; color: #7d97a8; margin-top: 1px; }
.bc-ico {
  width: 30px; height: 30px; border-radius: 9px; background: #eaf5fa;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.bc-body {
  font-size: 10.5px; color: #5d7e90; line-height: 1.8;
  margin: 8px 0 0; padding-right: 39px;
}
.bc-foot { font-size: 9px; color: #a0b7c4; margin-top: 6px; padding-right: 39px; }
