/* ============================================================
   Aira Ecosystem - Stylesheet
   ============================================================ */

:root,
html[data-theme="dark"] {
  --bg: #06070d;
  --bg-2: #0b0f1c;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-3: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #f5f7fb;
  --text-dim: #8b93a7;
  --text-dimmer: #565e73;
  --topbar-bg: rgba(6, 7, 13, 0.75);
  --modal-bg-1: rgba(15, 20, 35, 0.98);
  --modal-bg-2: rgba(10, 14, 26, 0.98);
  --toast-bg: rgba(15, 20, 35, 0.95);
  --label-bg: rgba(6, 7, 13, 0.85);
  --grid-line: rgba(255, 255, 255, 0.022);
  --stat-bg: rgba(11, 15, 28, 0.7);
  --shadow-color: rgba(0, 0, 0, 0.8);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #a78bfa;
  --pink: #f472b6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --danger: #ef4444;
}

html[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-2: #e9edf6;
  --surface: rgba(15, 23, 42, 0.035);
  --surface-2: rgba(15, 23, 42, 0.06);
  --surface-3: rgba(15, 23, 42, 0.09);
  --border: rgba(15, 23, 42, 0.1);
  --border-2: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --text-dim: #4b5563;
  --text-dimmer: #8a92a6;
  --topbar-bg: rgba(244, 246, 251, 0.8);
  --modal-bg-1: rgba(255, 255, 255, 0.98);
  --modal-bg-2: rgba(248, 250, 253, 0.98);
  --toast-bg: rgba(255, 255, 255, 0.96);
  --label-bg: rgba(255, 255, 255, 0.9);
  --grid-line: rgba(15, 23, 42, 0.045);
  --stat-bg: rgba(255, 255, 255, 0.75);
  --shadow-color: rgba(15, 23, 42, 0.15);
  --cyan: #0891b2;
  --blue: #2563eb;
  --violet: #7c3aed;
  --pink: #db2777;
  --green: #059669;
  --amber: #d97706;
  --red: #dc2626;
  --danger: #dc2626;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ===== پس‌زمینه ===== */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 40%, #000 30%, transparent 80%);
  z-index: -3; pointer-events: none;
}
.bg-glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 20%, rgba(167, 139, 250, 0.14), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(244, 114, 182, 0.08), transparent 65%);
  animation: glowShift 18s ease-in-out infinite alternate;
}
html[data-theme="light"] .bg-glow {
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(8, 145, 178, 0.12), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 20%, rgba(124, 58, 237, 0.1), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(219, 39, 119, 0.06), transparent 65%);
}
@keyframes glowShift {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(-2%, 2%) scale(1.08); }
}

/* ===== نوار بالا ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 50%, var(--pink));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 0 20px -4px rgba(34, 211, 238, 0.6);
}
.brand-mark::after {
  content: ''; position: absolute; inset: 3px; border-radius: 7px; background: var(--bg); z-index: 0;
  transition: background 0.4s ease;
}
.brand-mark span {
  position: relative; z-index: 1; font-size: 15px; font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.brand-text {
  font-size: 1rem;
  background: linear-gradient(120deg, var(--text), var(--text-dim));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.brand-text small {
  display: block; font-size: 0.6rem; font-weight: 400; letter-spacing: 2px;
  color: var(--text-dimmer); -webkit-text-fill-color: var(--text-dimmer); margin-top: 1px;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative;
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  transition: all 0.2s ease;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .icon-moon { display: none; }
html[data-theme="light"] .icon-btn .icon-sun { display: none; }
html[data-theme="light"] .icon-btn .icon-moon { display: block; }

.cart-badge {
  position: absolute; top: -5px; left: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff; font-size: 0.6rem; font-weight: 800;
  display: none; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  box-shadow: 0 4px 10px -2px rgba(244, 114, 182, 0.6);
}
.cart-badge.show { display: flex; }

.user-chip {
  display: none; align-items: center; gap: 10px;
  padding: 6px 8px 6px 14px;
  border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.75rem; color: var(--text-dim);
  cursor: pointer; transition: all 0.2s ease;
}
.user-chip:hover { background: var(--surface-2); border-color: var(--border-2); }
.user-chip .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #fff;
}

.btn-login-top {
  padding: 8px 18px; border-radius: 100px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff; font-size: 0.78rem; font-weight: 600;
  border: none; cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(34, 211, 238, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.btn-login-top:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -6px rgba(34, 211, 238, 0.7); }

.status-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.7rem; color: var(--text-dim); font-weight: 500;
}
.status-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ===== بخش قهرمان ===== */
.hero {
  max-width: 1320px; margin: 0 auto;
  padding: 50px 24px 30px; text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.68rem; letter-spacing: 2.5px; color: var(--text-dim);
  text-transform: uppercase; font-weight: 600; margin-bottom: 22px;
}
.hero-eyebrow::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}
.hero h1 {
  font-size: clamp(1.9rem, 5.5vw, 3.4rem);
  font-weight: 900; line-height: 1.15; letter-spacing: -1.2px;
  margin-bottom: 18px;
  background: linear-gradient(120deg, var(--text) 0%, var(--text-dim) 40%, var(--cyan) 70%, var(--violet) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: var(--text-dim); max-width: 620px; margin: 0 auto 32px;
  font-weight: 300; line-height: 1.9;
}

.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  max-width: 900px; margin: 0 auto;
  background: var(--border); border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
}
.stat { background: var(--stat-bg); backdrop-filter: blur(20px); padding: 20px 12px; text-align: center; transition: background 0.4s ease; }
.stat-value {
  font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--text), var(--text-dim));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label {
  font-size: 0.62rem; color: var(--text-dimmer); letter-spacing: 1.5px;
  margin-top: 4px; text-transform: uppercase; font-weight: 500;
}

/* ===== بخش‌ها ===== */
.sections { max-width: 1320px; margin: 0 auto; padding: 20px 24px 60px; }
.section { margin-bottom: 52px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 12px;
}
.section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 1rem; font-weight: 700; letter-spacing: -0.3px;
}
.section-title .num {
  font-size: 0.68rem; color: var(--text-dimmer);
  font-variant-numeric: tabular-nums; font-weight: 500;
  padding: 3px 9px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
}
.section-title .bar {
  width: 3px; height: 18px; border-radius: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
}
.section-desc { font-size: 0.72rem; color: var(--text-dimmer); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

/* ===== کارت سرویس (نسخه جدید با قیمت و دکمه‌ها) ===== */
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cardIn 0.5s ease both;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--card-glow, rgba(34,211,238,0.1)), transparent 65%);
  opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(-4px);
  background: var(--surface-2);
  border-color: var(--border-2);
  box-shadow:
    0 20px 40px -20px var(--shadow-color),
    0 0 0 1px var(--card-border, rgba(34,211,238,0.2)),
    0 0 40px -12px var(--card-glow, rgba(34,211,238,0.4));
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-top {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 14px;
}
.card-icon {
  flex-shrink: 0; width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 8px 20px -8px var(--card-glow), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-icon svg { width: 23px; height: 23px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card-icon { transform: scale(1.08) rotate(-5deg); }

.card-info { flex: 1; min-width: 0; }
.card-name {
  font-size: 0.92rem; font-weight: 700; letter-spacing: -0.2px;
  margin-bottom: 3px; display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.card-name .en {
  font-size: 0.66rem; color: var(--text-dimmer); font-weight: 500;
  letter-spacing: 0.5px; direction: ltr;
}
.card-desc {
  font-size: 0.72rem; color: var(--text-dim); line-height: 1.5;
}

.card-price-row {
  display: flex; align-items: baseline; gap: 6px;
  padding: 10px 12px; margin-bottom: 12px;
  border-radius: 10px;
  background: var(--surface); border: 1px dashed var(--border);
  font-size: 0.72rem;
}
.card-price-row .price-label { color: var(--text-dimmer); }
.card-price-row .price-value {
  font-weight: 800; font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
}
.card-price-row .price-unit { color: var(--text-dimmer); font-size: 0.65rem; }
.card-price-row .price-tag {
  margin-right: auto;
  font-size: 0.6rem; padding: 2px 8px; border-radius: 100px;
  background: rgba(34, 211, 238, 0.12); color: var(--cyan);
  font-weight: 700;
}
.card-price-row .price-tag.fixed {
  background: rgba(167, 139, 250, 0.12); color: var(--violet);
}
.card-price-row.free {
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.07);
}
.card-price-row .free-value {
  font-size: 1rem;
  color: var(--green, #34d399);
  letter-spacing: 0.5px;
}
.card-price-row .free-tag {
  background: rgba(52, 211, 153, 0.14);
  color: var(--green, #34d399);
}
/* برچسب جای‌گزین «رایگان» (مثلاً «درون‌سیستمی») — رنگ متفاوت، تا با رایگان اشتباه نشود */
.card-price-row.free.is-in-system { border-color: rgba(56, 189, 248, 0.45); background: rgba(56, 189, 248, 0.07); }
.card-price-row.free.is-in-system .free-value { color: var(--cyan, #38bdf8); }
.card-price-row.free.is-in-system .free-tag { background: rgba(56, 189, 248, 0.14); color: var(--cyan, #38bdf8); }
.card-access-hint { margin: -2px 0 10px; color: var(--text-dimmer); font-size: .62rem; }

.card-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.card-actions > .card-btn { flex: 1 1 calc(50% - 4px); min-width: 0; }
.card-actions > .btn-primary { flex: 0 0 100%; width: 100%; margin-top: 0; }
.card-demo-btn { color: var(--cyan, #38bdf8); border-color: color-mix(in srgb, var(--cyan, #38bdf8) 35%, transparent); text-decoration: none; }
.card-demo-btn:hover { color: var(--text); border-color: var(--cyan, #38bdf8); background: color-mix(in srgb, var(--cyan, #38bdf8) 10%, transparent); }
.card-demo-btn.is-disabled,
.card-demo-btn:disabled { color: var(--text-dimmer); border-color: var(--border); background: var(--surface); opacity: .55; cursor: not-allowed; pointer-events: none; text-decoration: none; }
.card-btn {
  flex: 1;
  padding: 9px 10px; border-radius: 10px;
  font-family: inherit; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.card-btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.card-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.card-btn.primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff; border: none;
  box-shadow: 0 6px 16px -6px rgba(34, 211, 238, 0.6);
}
.card-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(34, 211, 238, 0.75); }
.card-btn.added {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #fff; border: none;
}

/* ===== دستیار Airachat ===== */
.assistant {
  position: fixed; bottom: 24px; left: 24px;
  z-index: 1000; display: flex; align-items: center; gap: 12px;
}
.assistant-btn {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 50%, var(--pink) 100%);
  background-size: 200% 200%;
  box-shadow: 0 12px 32px -8px rgba(34, 211, 238, 0.55), 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0 rgba(255,255,255,0.35);
  cursor: pointer; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: gradientShift 6s ease infinite;
}
.assistant-btn::before {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--cyan), var(--violet), var(--pink), transparent);
  z-index: -1; opacity: 0.55; filter: blur(8px);
  animation: rotate 5s linear infinite;
}
.assistant-btn::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  animation: ripple 3s ease-out infinite; pointer-events: none;
}
@keyframes ripple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.assistant-btn:hover { transform: scale(1.08) translateY(-3px); }
.assistant-btn:active { transform: scale(0.96); }
.assistant-btn svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }
.assistant-btn .online {
  position: absolute; top: 3px; right: 3px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--green); border: 2.5px solid var(--bg);
  box-shadow: 0 0 10px var(--green); animation: pulse 2s ease-in-out infinite; z-index: 2;
}
.assistant-label {
  display: flex; flex-direction: column; padding: 9px 15px 9px 13px;
  border-radius: 14px; background: var(--label-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px -12px var(--shadow-color);
  animation: labelIn 0.6s ease 1.2s both;
  pointer-events: none; white-space: nowrap;
}
.assistant-label .title { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.assistant-label .sub { font-size: 0.6rem; color: var(--text-dim); margin-top: 1px; }
@keyframes labelIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===================================================== */
/* ================== مودال ورود ================== */
/* ===================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
html[data-theme="light"] .modal-overlay { background: rgba(15, 23, 42, 0.35); }
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  width: 100%; max-width: 460px;
  max-height: 92vh; overflow-y: auto;
  background: linear-gradient(160deg, var(--modal-bg-1), var(--modal-bg-2));
  border: 1px solid var(--border-2);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 40px 100px -20px var(--shadow-color), 0 0 0 1px rgba(255,255,255,0.03);
  position: relative;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.service-frame-overlay {
  position: fixed; inset: 0; z-index: 7000; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.service-frame-overlay.active { opacity: 1; visibility: visible; }
.service-frame-header {
  display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 58px; padding: 8px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface); box-shadow: 0 4px 20px rgba(0,0,0,.16);
}
.service-frame-header > div { display: flex; align-items: center; gap: 12px; }
.service-frame-header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-frame-external { color: var(--cyan); font-size: .75rem; text-decoration: none; }
.service-frame-close { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--surface-2); }
.service-frame-close svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.service-frame-hint { flex: 0 0 auto; margin: 0; padding: 5px 14px; color: var(--text-dim); background: var(--surface-2); text-align: center; font-size: .68rem; }
.service-frame-overlay iframe { display: block; width: 100%; min-height: 0; flex: 1 1 auto; border: 0; background: #fff; }
.sd-cover-image { display: block; width: 100%; max-height: 280px; margin: 14px 0; border-radius: 16px; object-fit: cover; }
.sd-desc p { margin: 0 0 10px; }
.sd-desc ul, .sd-desc ol { padding-inline-start: 24px; }
.sd-desc a { color: var(--cyan); }
.sd-access-mode { margin: 14px 0 8px; color: var(--text-dimmer); font-size: .7rem; line-height: 1.8; }
.sd-capability-description { display: block; margin-top: 4px; color: var(--text-dimmer); font-size: .68rem; }
.sd-capability a { display: inline-block; margin-top: 5px; color: var(--cyan); font-size: .68rem; }

/* مودال بزرگ‌تر برای جزئیات سرویس */
.modal-lg { max-width: 540px; }

.modal-close {
  position: absolute; top: 16px; left: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; z-index: 10;
}
.modal-close:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-2); }
.modal-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

.btn-back {
  display: none; align-items: center; gap: 6px;
  background: none; border: none; color: var(--text-dim);
  font-size: 0.75rem; font-family: inherit; cursor: pointer;
  padding: 6px 10px; border-radius: 8px;
  margin-bottom: 14px; transition: all 0.2s ease;
}
.btn-back:hover { background: var(--surface); color: var(--text); }
.btn-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.step { display: none; animation: stepIn 0.4s ease both; }
.step.active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 24px;
}
.progress-steps .p-step {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.65rem; color: var(--text-dimmer);
}
.progress-steps .p-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 700; font-size: 0.65rem; transition: all 0.3s ease;
}
.progress-steps .p-step.done .p-num {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border-color: transparent; color: #fff;
}
.progress-steps .p-step.active .p-num {
  background: var(--surface-3); border-color: var(--cyan);
  color: var(--cyan); box-shadow: 0 0 12px -2px var(--cyan);
}
.progress-steps .p-step.done .p-label,
.progress-steps .p-step.active .p-label { color: var(--text); }
.progress-steps .p-line {
  width: 16px; height: 1px; background: var(--border);
}

.modal-title {
  font-size: 1.35rem; font-weight: 800;
  letter-spacing: -0.4px; margin-bottom: 6px; text-align: center;
  background: linear-gradient(120deg, var(--text), var(--text-dim));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.modal-sub {
  font-size: 0.78rem; color: var(--text-dim);
  text-align: center; margin-bottom: 26px; line-height: 1.7;
}

.social-btns { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
}
.btn-social:hover { background: var(--surface-2); border-color: var(--border-2); transform: translateY(-1px); }
.btn-social:active { transform: translateY(0); }
.btn-social svg { width: 18px; height: 18px; }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--text-dimmer); font-size: 0.7rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: 0.72rem; color: var(--text-dim);
  margin-bottom: 6px; font-weight: 500;
}
.form-input {
  width: 100%; padding: 13px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text);
  font-family: inherit; font-size: 0.85rem;
  transition: all 0.2s ease;
  direction: ltr; text-align: right;
}
.form-input::placeholder { color: var(--text-dimmer); direction: rtl; text-align: right; }
.form-input:focus {
  outline: none; border-color: var(--cyan);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
textarea.form-input { direction: rtl; resize: vertical; min-height: 100px; line-height: 1.7; }
select.form-input { direction: rtl; text-align: right; cursor: pointer; }

.login-tabs {
  display: flex; gap: 6px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 18px;
}
.login-tab {
  flex: 1; padding: 9px 8px; border-radius: 9px;
  background: none; border: none; color: var(--text-dim);
  font-family: inherit; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
}
.login-tab.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(167, 139, 250, 0.15));
  color: var(--text); border: 1px solid rgba(34, 211, 238, 0.3);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.btn-primary {
  width: 100%; padding: 14px; border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff; font-family: inherit; font-size: 0.9rem; font-weight: 700;
  border: none; cursor: pointer;
  box-shadow: 0 10px 26px -8px rgba(34, 211, 238, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(34, 211, 238, 0.75); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
  box-shadow: none; filter: grayscale(0.5);
}

.otp-inputs {
  display: flex; gap: 8px; direction: ltr; justify-content: center;
  margin: 8px 0 16px;
}
.otp-inputs input {
  width: 46px; height: 54px; text-align: center;
  font-size: 1.3rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text);
  font-family: inherit;
  transition: all 0.2s ease;
}
.otp-inputs input:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
  background: var(--surface-2);
}

.resend-row {
  text-align: center; font-size: 0.72rem; color: var(--text-dim);
  margin-top: 14px;
}
.resend-row button {
  background: none; border: none; color: var(--cyan);
  font-family: inherit; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; padding: 4px 8px;
}

.select-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 14px;
}
.select-header .count {
  font-size: 0.75rem; color: var(--text-dim); font-weight: 500;
}
.select-header .count strong {
  color: var(--cyan); font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.select-header .select-all {
  font-size: 0.72rem; color: var(--cyan);
  background: none; border: none; font-family: inherit;
  cursor: pointer; font-weight: 600; padding: 4px 8px;
  border-radius: 8px; transition: background 0.2s ease;
}
.select-header .select-all:hover { background: rgba(34, 211, 238, 0.1); }

.service-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 340px; overflow-y: auto;
  padding: 2px 4px 2px 2px;
  margin: 0 -4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.service-list::-webkit-scrollbar { width: 6px; }
.service-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.service-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s ease;
  position: relative;
}
.service-item:hover { background: var(--surface-2); border-color: var(--border-2); }
.service-item.selected {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(167, 139, 250, 0.08));
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15);
}
.service-item .s-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 6px 14px -6px var(--glow);
}
.service-item .s-icon svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service-item .s-body { flex: 1; min-width: 0; }
.service-item .s-name { font-size: 0.82rem; font-weight: 700; }
.service-item .s-desc { font-size: 0.66rem; color: var(--text-dimmer); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.checkbox {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px solid var(--border-2); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.checkbox svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity 0.2s ease; }
.service-item.selected .checkbox {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border-color: transparent;
}
.service-item.selected .checkbox svg { opacity: 1; }

/* ===== مودال جزئیات سرویس ===== */
.sd-header {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 20px;
}
.sd-icon {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 10px 26px -8px var(--glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.sd-icon svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sd-title-block { flex: 1; min-width: 0; }
.sd-title {
  font-size: 1.15rem; font-weight: 800; letter-spacing: -0.3px;
  margin-bottom: 4px; display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.sd-title .en {
  font-size: 0.72rem; color: var(--text-dimmer); font-weight: 500;
  letter-spacing: 0.5px; direction: ltr;
}
.sd-cat {
  display: inline-block;
  font-size: 0.62rem; padding: 3px 9px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim); font-weight: 600;
}

.sd-desc {
  font-size: 0.82rem; color: var(--text-dim); line-height: 1.9;
  margin-bottom: 18px; padding: 14px;
  background: var(--surface); border-radius: 12px;
  border: 1px solid var(--border);
}

.sd-features {
  margin-bottom: 20px;
}
.sd-features-title {
  font-size: 0.72rem; color: var(--text-dimmer); font-weight: 600;
  margin-bottom: 10px; letter-spacing: 0.5px;
}
.sd-features-list {
  display: flex; flex-direction: column; gap: 7px;
}
.sd-feature {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.76rem; color: var(--text-dim);
}
.sd-feature .check {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  display: flex; align-items: center; justify-content: center;
}
.sd-feature .check svg { width: 11px; height: 11px; stroke: var(--green); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* بخش قیمت‌گذاری در مودال جزئیات */
.sd-pricing {
  padding: 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 16px;
}
.sd-pricing-title {
  font-size: 0.72rem; color: var(--text-dimmer); font-weight: 600;
  margin-bottom: 12px; letter-spacing: 0.5px;
}
.sd-plans {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.sd-plan {
  position: relative; padding: 12px 10px; border-radius: 12px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  cursor: pointer; transition: all 0.2s ease;
  text-align: center;
}
.sd-plan:hover { border-color: var(--border-2); }
.sd-plan.selected {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(167, 139, 250, 0.1));
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2);
}
.sd-plan .badge {
  position: absolute; top: -8px; right: 10px;
  padding: 2px 7px; border-radius: 100px;
  font-size: 0.55rem; font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff;
}
.sd-plan .p-months {
  font-size: 0.9rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.sd-plan .p-price {
  font-size: 0.72rem; font-weight: 700; margin-top: 4px;
  color: var(--cyan); font-variant-numeric: tabular-nums;
}
.sd-plan .p-save {
  font-size: 0.58rem; color: var(--green); font-weight: 600; margin-top: 2px;
}

/* حالت قیمت ثابت */
.sd-fixed-price {
  text-align: center; padding: 20px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(167, 139, 250, 0.3);
  margin-bottom: 16px;
}
.sd-fixed-price .fp-label {
  font-size: 0.72rem; color: var(--text-dim); margin-bottom: 6px;
}
.sd-fixed-price .fp-value {
  font-size: 1.6rem; font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.sd-fixed-price .fp-value small {
  font-size: 0.8rem; font-weight: 700;
  -webkit-text-fill-color: var(--text-dim);
}
.sd-fixed-price .fp-note {
  font-size: 0.65rem; color: var(--text-dimmer); margin-top: 6px;
}

.sd-actions {
  display: flex; gap: 8px;
  padding-top: 4px;
}
.sd-actions .btn-primary { margin-top: 0; }

/* ===== سبد خرید ===== */
.cart-empty {
  text-align: center; padding: 40px 20px;
  color: var(--text-dimmer); font-size: 0.78rem;
}
.cart-empty svg { width: 46px; height: 46px; margin: 0 auto 10px; stroke: var(--text-dimmer); fill: none; stroke-width: 1.5; opacity: 0.6; }

.cart-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
  max-height: 320px; overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.cart-list::-webkit-scrollbar { width: 6px; }
.cart-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.cart-item .ci-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 6px 14px -6px var(--glow);
}
.cart-item .ci-icon svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cart-item .ci-body { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 0.82rem; font-weight: 700; }
.cart-item .ci-meta { font-size: 0.65rem; color: var(--text-dimmer); margin-top: 2px; }
.cart-item .ci-remove {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dimmer); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.cart-item .ci-remove:hover { background: rgba(248, 113, 113, 0.15); color: var(--red); border-color: rgba(248, 113, 113, 0.3); }
.cart-item .ci-remove svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

.cart-summary {
  padding: 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 14px;
}
.cart-summary-row {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; padding: 5px 0;
  color: var(--text-dim);
}
.cart-summary-row.total {
  padding-top: 10px; margin-top: 4px;
  border-top: 1px solid var(--border-2);
  color: var(--text);
}
.cart-summary-row.total .val {
  font-size: 1.1rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.cart-summary-row .val { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ===== پلن‌ها ===== */
.plans {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 18px;
}
.plan {
  position: relative; padding: 16px 12px; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  cursor: pointer; transition: all 0.25s ease;
  text-align: center;
}
.plan:hover { background: var(--surface-2); border-color: var(--border-2); }
.plan.selected {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(167, 139, 250, 0.1));
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2), 0 0 30px -10px rgba(34, 211, 238, 0.5);
}
.plan.disabled {
  opacity: 0.5; cursor: not-allowed;
}
.plan .plan-badge {
  position: absolute; top: -9px; right: 12px;
  padding: 2px 8px; border-radius: 100px;
  font-size: 0.6rem; font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff;
}
.plan .plan-title {
  font-size: 1.05rem; font-weight: 800; letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}
.plan .plan-sub {
  font-size: 0.66rem; color: var(--text-dim); margin-top: 3px;
}
.plan .plan-price {
  font-size: 0.85rem; font-weight: 700; margin-top: 8px;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.plan .plan-save {
  font-size: 0.6rem; color: var(--green); font-weight: 600; margin-top: 2px;
}

.summary-box {
  padding: 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 16px;
}
.summary-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; font-size: 0.78rem;
}
.summary-row + .summary-row { border-top: 1px dashed var(--border); }
.summary-row .label { color: var(--text-dim); }
.summary-row .value { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-row.total {
  padding-top: 12px; margin-top: 4px;
  border-top: 1px solid var(--border-2);
}
.summary-row.total .label { font-weight: 700; color: var(--text); font-size: 0.85rem; }
.summary-row.total .value {
  font-size: 1.15rem; font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.summary-row.total .value small {
  font-size: 0.65rem; color: var(--text-dimmer); font-weight: 500;
  -webkit-text-fill-color: var(--text-dimmer);
}

.selected-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.tag {
  padding: 4px 10px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 0.65rem; color: var(--text-dim); font-weight: 500;
}

.btn-pay {
  width: 100%; padding: 16px; border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #fff; font-family: inherit; font-size: 0.95rem; font-weight: 800;
  border: none; cursor: pointer;
  box-shadow: 0 12px 32px -8px rgba(52, 211, 153, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-pay:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(52, 211, 153, 0.75); }
.btn-pay:active { transform: translateY(0); }
.btn-pay svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.success-box { text-align: center; padding: 10px 0; }
.success-icon {
  width: 80px; height: 80px; border-radius: 50%;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.1), 0 20px 40px -12px rgba(52, 211, 153, 0.6);
  animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes successPop {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}
.success-icon svg { width: 40px; height: 40px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.success-title {
  font-size: 1.3rem; font-weight: 800; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text), var(--green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.success-desc { font-size: 0.8rem; color: var(--text-dim); line-height: 1.7; margin-bottom: 22px; }

.receipt {
  padding: 16px; border-radius: 14px;
  background: var(--surface); border: 1px dashed var(--border-2);
  text-align: right; margin-bottom: 18px;
  font-size: 0.72rem;
}
.receipt .rc-row {
  display: flex; justify-content: space-between;
  padding: 5px 0; color: var(--text-dim);
}
.receipt .rc-row span:last-child { color: var(--text); font-weight: 600; }

/* ===== فوتر ===== */
footer {
  max-width: 1320px; margin: 0 auto;
  padding: 32px 24px 100px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  font-size: 0.72rem; color: var(--text-dimmer);
}
footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
footer .links a { color: var(--text-dim); text-decoration: none; transition: color 0.2s ease; }
footer .links a:hover { color: var(--cyan); }
footer .links a.footer-linkedin { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
footer .footer-linkedin svg { width: 19px; height: 19px; fill: currentColor; flex: 0 0 auto; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 20px; border-radius: 12px;
  background: var(--toast-bg);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(20px);
  color: var(--text); font-size: 0.78rem; font-weight: 600;
  box-shadow: 0 20px 40px -12px var(--shadow-color);
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
  z-index: 9999; white-space: nowrap;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ============================================================
   ==================== پنل کاربری ====================
   ============================================================ */
.user-panel {
  position: fixed; inset: 0; z-index: 4500;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
html[data-theme="light"] .user-panel { background: rgba(15, 23, 42, 0.35); }
.user-panel.active { opacity: 1; visibility: visible; }

.user-panel-card {
  width: 100%; max-width: 720px; max-height: 92vh; overflow: hidden;
  background: linear-gradient(160deg, var(--modal-bg-1), var(--modal-bg-2));
  border: 1px solid var(--border-2);
  border-radius: 24px;
  box-shadow: 0 40px 100px -20px var(--shadow-color);
  transform: translateY(30px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  display: flex; flex-direction: column;
}
.user-panel.active .user-panel-card { transform: translateY(0) scale(1); }

.user-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.user-panel-header .up-title {
  display: flex; align-items: center; gap: 10px;
}
.user-panel-header .up-title h3 { font-size: 1.05rem; font-weight: 800; }
.user-panel-header .up-title .up-badge {
  font-size: 0.6rem; padding: 3px 8px; border-radius: 100px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff; font-weight: 700;
}
.close-panel {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.close-panel:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-2); }
.close-panel svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

.up-tabs {
  display: flex; gap: 4px; padding: 10px 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.up-tabs::-webkit-scrollbar { display: none; }
.up-tab {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: none; border: none;
  color: var(--text-dim);
  font-family: inherit; font-size: 0.78rem; font-weight: 600;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.up-tab:hover { color: var(--text); background: var(--surface); }
.up-tab.active { color: var(--text); background: var(--surface-2); }
.up-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}
.up-tab svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.up-body {
  flex: 1; overflow-y: auto;
  padding: 20px 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.up-body::-webkit-scrollbar { width: 6px; }
.up-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.up-pane { display: none; animation: stepIn 0.35s ease both; }
.up-pane.active { display: block; }

.up-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 18px;
}
.up-stat {
  padding: 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.up-stat .up-stat-label {
  font-size: 0.66rem; color: var(--text-dim); font-weight: 500;
  margin-bottom: 6px;
}
.up-stat .up-stat-value {
  font-size: 1.05rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--text), var(--text-dim));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.up-stat .up-stat-value small {
  font-size: 0.62rem; color: var(--text-dimmer); font-weight: 500;
  -webkit-text-fill-color: var(--text-dimmer);
}
.up-stat.accent-cyan::before,
.up-stat.accent-violet::before,
.up-stat.accent-green::before,
.up-stat.accent-amber::before {
  content: ''; position: absolute; top: 12px; left: 12px;
  width: 8px; height: 8px; border-radius: 50%;
}
.up-stat.accent-cyan::before { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.up-stat.accent-violet::before { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.up-stat.accent-green::before { background: var(--green); box-shadow: 0 0 10px var(--green); }
.up-stat.accent-amber::before { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

.up-section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem; font-weight: 700; color: var(--text);
  margin: 8px 0 12px;
}
.up-section-title .more {
  font-size: 0.7rem; color: var(--cyan); font-weight: 600;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
  padding: 4px 8px; border-radius: 8px;
  transition: background 0.2s ease;
}
.up-section-title .more:hover { background: rgba(34, 211, 238, 0.1); }

.active-services { display: flex; flex-direction: column; gap: 8px; }
.owned-service-card { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.owned-service-card .active-service { border: 0; border-radius: 0; }
.owned-service-state { padding: 5px 9px; border: 1px solid rgba(52,211,153,.25); border-radius: 100px; color: var(--green); background: rgba(52,211,153,.08); font-size: .63rem; white-space: nowrap; }
.activation-panel { padding: 13px 15px 15px; border-top: 1px solid var(--border); }
.activation-panel h4 { margin: 0 0 8px; font-size: .8rem; }
.activation-instructions { color: var(--text-dim); font-size: .72rem; line-height: 1.9; }
.activation-instructions p { margin: 0 0 8px; }
.activation-instructions ul, .activation-instructions ol { padding-inline-start: 22px; }
.activation-capabilities { display: grid; gap: 8px; margin-top: 10px; }
.activation-capability { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: .7rem; line-height: 1.8; }
.activation-capability > strong { display: block; margin-bottom: 4px; }
.activation-capability a, .activation-doc-link { display: inline-block; margin-top: 6px; color: var(--cyan); font-size: .68rem; text-decoration: none; }
.activation-doc-link { margin-top: 12px; }
.activation-runtime-box { border: 1px solid var(--border-2) !important; border-radius: 14px !important; padding: 14px !important; background: linear-gradient(145deg, rgba(34,211,238,.075), rgba(15,23,42,.58)) !important; }
.service-usage-wallet { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px 14px; margin-top: 14px; padding: 14px; border: 1px solid var(--border-2); border-radius: 14px; background: linear-gradient(135deg, rgba(34,211,238,.08), var(--surface-2)); }
.service-wallet-balance { grid-column: 1 / -1; color: var(--green); font-size: .78rem; font-weight: 800; }
.service-wallet-api-key { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.service-wallet-key-status { color: var(--text-dim); font-size: .68rem; }
.service-wallet-api-key code { display: inline-block; max-width: 100%; padding: 8px 10px; overflow-wrap: anywhere; border: 1px solid var(--border); border-radius: 8px; background: rgba(2,6,23,.55); color: var(--cyan); font: .72rem ui-monospace,Consolas,monospace; }
.service-usage-wallet form { display: grid; grid-template-columns: minmax(120px,1fr) auto; align-items: center; gap: 7px 10px; }
.service-usage-wallet form label { grid-column: 1 / -1; color: var(--text-dim); font-size: .68rem; }
.service-usage-wallet form .control { min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid var(--border-2); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; }
.service-usage-wallet form button, .service-wallet-api-key button { min-height: 38px; padding: 8px 12px; border: 1px solid rgba(34,211,238,.35); border-radius: 9px; background: linear-gradient(120deg, rgba(34,211,238,.2), rgba(139,92,246,.2)); color: var(--text); font: inherit; font-size: .7rem; font-weight: 700; cursor: pointer; }
.service-usage-wallet form button:hover, .service-wallet-api-key button:hover { border-color: var(--cyan); filter: brightness(1.1); }
.service-usage-wallet small { grid-column: 1 / -1; color: var(--text-dimmer); font-size: .65rem; }
@media (max-width: 560px) { .service-usage-wallet { grid-template-columns: 1fr; } .service-usage-wallet form { grid-template-columns: 1fr; } .service-usage-wallet form button { width: 100%; } }
.service-wallet-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.service-wallet-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 13px 15px; border: 1px solid var(--border-2); border-radius: 14px; background: linear-gradient(145deg, var(--surface-2), var(--surface)); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.service-wallet-summary strong { font-size: .78rem; }
.service-wallet-summary span { color: var(--green); font-size: .7rem; text-align: end; }
.service-wallet-summary-disabled { opacity: .62; }
.service-wallet-summary-disabled span { color: var(--text-dimmer); }
.wallet-topup-card { margin: 14px 0 20px; padding: 18px; border: 1px solid var(--border-2); border-radius: 18px; background: radial-gradient(ellipse at top right, rgba(34,211,238,.09), transparent 55%), linear-gradient(145deg, var(--surface-2), var(--surface)); box-shadow: 0 18px 42px rgba(0,0,0,.18); }
.wallet-topup-card h3 { margin: 0 0 5px; font-size: .9rem; }
.wallet-topup-card p { margin: 0 0 14px; font-size: .72rem; line-height: 1.8; }
.wallet-topup-card form { display: grid; gap: 8px; }
.wallet-topup-card label { color: var(--text-dim); font-size: .7rem; }
.wallet-topup-card .control { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; outline: none; }
.wallet-topup-card .control:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.12); }
.wallet-topup-card select.control { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: 16px 18px, 11px 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-inline-start: 30px; }
.wallet-topup-card select.control option { background: var(--surface-2); color: var(--text); }
.wallet-topup-card small { color: var(--text-dimmer); font-size: .65rem; line-height: 1.7; }
.wallet-topup-card button { min-height: 42px; margin-top: 6px; border: 1px solid rgba(34,211,238,.32); border-radius: 11px; background: linear-gradient(120deg, rgba(34,211,238,.2), rgba(139,92,246,.2)); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: transform .18s ease, border-color .18s ease, filter .18s ease; }
.wallet-topup-card button:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--cyan); filter: brightness(1.12); }
.wallet-topup-card button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 600px) { .service-wallet-overview { grid-template-columns: 1fr; } .wallet-topup-card { padding: 14px; } }
.active-service {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.active-service:hover { background: var(--surface-2); border-color: var(--border-2); }
.active-service .as-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 6px 14px -6px var(--glow);
}
.active-service .as-icon svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.active-service .as-body { flex: 1; min-width: 0; }
.active-service .as-name { font-size: 0.82rem; font-weight: 700; }
.active-service .as-meta { font-size: 0.66rem; color: var(--text-dimmer); margin-top: 2px; }
.active-service .as-status {
  font-size: 0.62rem; font-weight: 700;
  padding: 3px 9px; border-radius: 100px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.3);
  display: flex; align-items: center; gap: 5px;
}
.active-service .as-status::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
}
.active-service .as-status.fixed {
  background: rgba(167, 139, 250, 0.12);
  color: var(--violet);
  border-color: rgba(167, 139, 250, 0.3);
}
.active-service .as-status.fixed::before { background: var(--violet); box-shadow: 0 0 6px var(--violet); }

.tx-list { display: flex; flex-direction: column; gap: 8px; }
.tx-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.tx-item:hover { background: var(--surface-2); border-color: var(--border-2); }
.tx-item .tx-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border);
}
.tx-item .tx-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tx-item.credit .tx-icon { color: var(--green); background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.25); }
.tx-item.debit .tx-icon { color: var(--red); background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.25); }
.tx-item .tx-body { flex: 1; min-width: 0; }
.tx-item .tx-title { font-size: 0.8rem; font-weight: 700; }
.tx-item .tx-meta { font-size: 0.64rem; color: var(--text-dimmer); margin-top: 2px; }
.tx-status {
  display: inline-block; margin-inline-start: 6px; padding: 2px 7px;
  border-radius: 999px; font-size: 0.62rem; font-weight: 700;
  vertical-align: middle; color: var(--text-dimmer);
  background: var(--surface-2); border: 1px solid var(--border);
}
.tx-status-success { color: var(--green); border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.08); }
.tx-status-pending, .tx-status-processing { color: var(--amber); border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.08); }
.tx-status-failed, .tx-status-cancelled, .tx-status-abandoned { color: var(--red); border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.08); }
.tx-status-gateway_error { color: var(--amber); border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.08); }
.tx-item .tx-amount {
  font-size: 0.85rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  white-space: nowrap;
}
.tx-item.credit .tx-amount { color: var(--green); }
.tx-item.debit .tx-amount { color: var(--red); }

.admin-payments-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-payments-head h3 { font-size: 1rem; font-weight: 800; }
.admin-payments-head p { margin-top: 4px; color: var(--text-dimmer); font-size: 0.7rem; line-height: 1.8; }
.admin-payment-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.admin-payment-stats > div { display: flex; flex-direction: column; gap: 5px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.admin-payment-stats span, .admin-payment-grid small { color: var(--text-dimmer); font-size: 0.65rem; }
.admin-payment-stats strong { font-size: 1rem; }
.admin-payment-filters { display: grid; grid-template-columns: minmax(180px, 1fr) 150px auto; gap: 8px; margin-bottom: 14px; }
.admin-payment-filters .form-input { min-width: 0; margin: 0; }
.admin-payment-list { display: flex; flex-direction: column; gap: 10px; }
.admin-payment-card { padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.admin-payment-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.admin-payment-card-head > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.admin-payment-card-head strong { font-size: 0.8rem; }
.admin-payment-card-head small, .admin-payment-reviewed { color: var(--text-dimmer); font-size: 0.65rem; }
.admin-payment-description { margin: 0 0 10px; color: var(--text-dim); font-size: 0.7rem; }
.admin-payment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.admin-payment-grid > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.admin-payment-grid strong { overflow-wrap: anywhere; font-size: 0.7rem; font-weight: 600; }
.admin-payment-message { margin: 10px 0; padding: 8px 10px; border-radius: 8px; color: var(--amber); background: rgba(251, 191, 36, 0.08); font-size: 0.68rem; overflow-wrap: anywhere; }
.admin-payment-note-label { display: block; margin: 12px 0 5px; color: var(--text-dim); font-size: 0.68rem; }
.admin-payment-note-row { display: flex; align-items: flex-end; gap: 8px; }
.admin-payment-note-row textarea { min-height: 64px; resize: vertical; margin: 0; }
.admin-payment-note-row .btn-sm { flex-shrink: 0; }
.admin-payment-reviewed { display: block; margin-top: 7px; }

@media (max-width: 600px) {
  .admin-payment-filters { grid-template-columns: 1fr; }
  .admin-payment-stats > div { padding: 9px; }
  .admin-payment-note-row { align-items: stretch; flex-direction: column; }
  .admin-payment-note-row .btn-sm { align-self: flex-start; }
}

.ticket-new {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(167, 139, 250, 0.08));
  border: 1px dashed rgba(34, 211, 238, 0.35);
  margin-bottom: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ticket-new:hover { background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(167, 139, 250, 0.14)); }
.ticket-new .tn-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -6px rgba(34, 211, 238, 0.6);
}
.ticket-new .tn-icon svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ticket-new .tn-text { flex: 1; }
.ticket-new .tn-text .tn-title { font-size: 0.82rem; font-weight: 700; }
.ticket-new .tn-text .tn-sub { font-size: 0.66rem; color: var(--text-dim); margin-top: 1px; }

.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-item {
  padding: 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s ease;
}
.ticket-item:hover { background: var(--surface-2); border-color: var(--border-2); }
.ticket-item .ti-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.ticket-item .ti-subject {
  font-size: 0.82rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ticket-item .ti-status {
  font-size: 0.6rem; padding: 3px 9px; border-radius: 100px;
  font-weight: 700; white-space: nowrap;
}
.ti-status.open { background: rgba(34, 211, 238, 0.12); color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.3); }
.ti-status.answered { background: rgba(52, 211, 153, 0.12); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.3); }
.ti-status.pending { background: rgba(251, 191, 36, 0.12); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.3); }
.ti-status.closed { background: rgba(139, 147, 167, 0.12); color: var(--text-dim); border: 1px solid var(--border-2); }
.ticket-item .ti-preview {
  font-size: 0.7rem; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 6px;
}
.ticket-item .ti-meta {
  font-size: 0.62rem; color: var(--text-dimmer);
  display: flex; align-items: center; gap: 10px;
}

.profile-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; margin-bottom: 16px;
}
.profile-avatar {
  width: 78px; height: 78px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800; color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 12px 30px -10px rgba(34, 211, 238, 0.6), inset 0 2px 0 rgba(255,255,255,0.2);
}
.profile-name { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.profile-id { font-size: 0.7rem; color: var(--text-dimmer); direction: ltr; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.up-empty {
  text-align: center; padding: 40px 20px;
  color: var(--text-dimmer); font-size: 0.78rem;
}
.up-empty svg {
  width: 42px; height: 42px; margin: 0 auto 10px;
  stroke: var(--text-dimmer); fill: none; stroke-width: 1.5;
  opacity: 0.6;
}

.btn-sm {
  padding: 9px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
}
.btn-sm:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn-sm.primary {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff; border: none;
  box-shadow: 0 8px 20px -8px rgba(34, 211, 238, 0.6);
}
.btn-sm.primary:hover { transform: translateY(-1px); }
.btn-sm.danger { color: var(--red); border-color: rgba(248, 113, 113, 0.3); }
.btn-sm.danger:hover { background: rgba(248, 113, 113, 0.1); }

/* مودال تیکت */
.ticket-modal-overlay {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
html[data-theme="light"] .ticket-modal-overlay { background: rgba(15, 23, 42, 0.35); }
.ticket-modal-overlay.active { opacity: 1; visibility: visible; }
.ticket-modal {
  width: 100%; max-width: 440px;
  background: linear-gradient(160deg, var(--modal-bg-1), var(--modal-bg-2));
  border: 1px solid var(--border-2);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 40px 100px -20px var(--shadow-color);
  transform: translateY(30px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.ticket-modal-overlay.active .ticket-modal { transform: translateY(0) scale(1); }
.ticket-modal-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ticket-modal-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 14px; color: var(--cyan); background: rgba(34,211,238,.12); border: 1px solid rgba(34,211,238,.2); }
.ticket-modal-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ticket-modal h3 { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.ticket-modal .tm-sub { font-size: 0.72rem; color: var(--text-dim); margin: 0; }
.ticket-modal .form-group { margin-bottom: 14px; }
.ticket-modal .ticket-subject-select,
.ticket-modal .ticket-subject-select option { color: var(--text) !important; background-color: var(--surface-2) !important; }
.ticket-modal .ticket-subject-select { color-scheme: dark; appearance: none; -webkit-appearance: none; padding-left: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; }
html[data-theme="light"] .ticket-modal .ticket-subject-select { color-scheme: light; }
.ticket-modal .ticket-subject-select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.12); }
.ticket-attachment-group .form-label { display: flex; align-items: center; gap: 7px; }
.ticket-attachment-optional { color: var(--text-dimmer); font-size: .65rem; font-weight: 500; }
.ticket-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.ticket-file-picker { min-height: 74px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--border-2); border-radius: 14px; background: linear-gradient(135deg,rgba(34,211,238,.045),rgba(167,139,250,.055)); cursor: pointer; transition: border-color .2s ease,background .2s ease,transform .2s ease; }
.ticket-file-picker:hover,.ticket-file-input:focus-visible + .ticket-file-picker { border-color: var(--cyan); background: rgba(34,211,238,.09); }
.ticket-file-input:focus-visible + .ticket-file-picker { outline: 2px solid var(--cyan); outline-offset: 3px; }
.ticket-file-picker:hover { transform: translateY(-1px); }
.ticket-file-icon,.ticket-file-selected-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; color: var(--cyan); background: rgba(34,211,238,.12); }
.ticket-file-icon svg,.ticket-file-selected-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ticket-file-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.ticket-file-copy strong { color: var(--text); font-size: .73rem; font-weight: 700; }
.ticket-file-copy small { color: var(--text-dim); font-size: .62rem; line-height: 1.5; }
.ticket-file-browse { flex: 0 0 auto; color: var(--cyan); font-size: .67rem; font-weight: 700; }
.ticket-file-selected { align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ticket-file-selected:not([hidden]) { display: flex; }
.ticket-file-selected-icon { width: 32px; height: 32px; flex-basis: 32px; }
.ticket-file-selected-icon svg { width: 16px; height: 16px; }
.ticket-file-name { flex: 1; min-width: 0; color: var(--text); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-file-remove { width: 28px; height: 28px; border: 0; border-radius: 9px; background: rgba(248,113,113,.1); color: var(--red); font: inherit; font-size: 1.15rem; cursor: pointer; }
.ticket-modal .tm-actions { display: flex; gap: 8px; margin-top: 14px; }
.ticket-modal .tm-actions .btn-primary { margin-top: 0; }
.ticket-attachment-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 6px 9px; color: var(--cyan); background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.16); border-radius: 9px; font-size: .67rem; text-decoration: none; }
.ticket-attachment-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ticket-admin-reply { display: grid; gap: 6px; margin-top: 9px; padding: 10px 12px; border: 1px solid rgba(34,211,238,.16); border-right: 3px solid var(--cyan); border-radius: 11px; background: rgba(34,211,238,.055); }
.ticket-admin-reply strong { display: flex; align-items: center; gap: 6px; color: var(--cyan); font-size: .68rem; }
.ticket-admin-reply strong svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ticket-admin-reply span { color: var(--text); font-size: .71rem; line-height: 1.75; white-space: pre-line; }
.ti-preview { white-space: pre-line; }

/* پاسخ‌های ساختارمند دستیار */
.chat-msg.incoming { max-width: min(88%, 760px); }
.chat-msg.incoming .msg-content { flex: 1; min-width: 0; }
.chat-msg.incoming .msg-bubble { padding: 14px 16px; border-radius: 18px 5px 18px 18px; }
.chat-msg.incoming .msg-bubble p { margin: 0 0 8px; }
.chat-msg.incoming .msg-bubble p:last-child { margin-bottom: 0; }
.chat-msg.incoming .msg-bubble ul { display: grid; gap: 7px; margin: 9px 0; padding: 0 18px 0 0; }
.chat-msg.incoming .msg-bubble li { padding-inline-start: 2px; }
.chat-msg.incoming .msg-bubble .chat-card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--cyan); font-size: .76rem; font-weight: 800; }
.chat-msg.incoming .msg-bubble .chat-card-title svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-msg.incoming .msg-bubble .chat-card-note { margin-top: 10px; padding: 9px 11px; border-radius: 11px; background: rgba(34,211,238,.07); border: 1px solid rgba(34,211,238,.12); color: var(--text-dim); font-size: .7rem; }
.chat-msg.incoming .msg-bubble .chat-service-list { display: grid; gap: 8px; margin: 10px 0; }
.chat-msg.incoming .msg-bubble .chat-service-card { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.chat-msg.incoming .msg-bubble .chat-service-card strong { display: block; margin-bottom: 3px; color: var(--text); font-size: .75rem; }
.chat-msg.incoming .msg-bubble .chat-service-card small { display: block; color: var(--text-dim); font-size: .66rem; line-height: 1.7; }
.chat-msg.incoming .msg-bubble .chat-price-list { display: grid; gap: 7px; margin: 10px 0; }
.chat-msg.incoming .msg-bubble .chat-price-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.chat-msg.incoming .msg-bubble .chat-price-row span { color: var(--text-dim); font-size: .69rem; }
.chat-msg.incoming .msg-bubble .chat-price-row strong { color: var(--cyan); font-size: .72rem; white-space: nowrap; }
.chat-msg.incoming .msg-bubble .chat-price-list { max-height: min(56vh, 600px); overflow-y: auto; padding: 2px 2px 2px 6px; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.chat-msg.incoming .msg-bubble .chat-price-row { align-items: flex-start; flex-direction: column; gap: 4px; }
.chat-msg.incoming .msg-bubble .chat-price-row span { color: var(--text); font-size: .73rem; font-weight: 800; }
.chat-msg.incoming .msg-bubble .chat-price-row strong { color: var(--cyan); white-space: normal; line-height: 1.7; }
.chat-msg.incoming .msg-bubble .chat-service-list,.chat-msg.incoming .msg-bubble .chat-ticket-list { max-height: min(56vh, 600px); overflow-y: auto; padding: 2px 2px 2px 6px; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.chat-msg.incoming .msg-bubble .chat-ticket-card { padding: 10px 12px; margin: 8px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.chat-msg.incoming .msg-bubble .chat-ticket-head { display: flex; justify-content: space-between; gap: 8px; color: var(--text); font-size: .71rem; font-weight: 700; }
.chat-msg.incoming .msg-bubble .chat-ticket-status { color: var(--cyan); font-size: .64rem; white-space: nowrap; }
.chat-msg.incoming .msg-bubble .chat-ticket-reply { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: .67rem; }
html[data-theme="light"] .ticket-modal .ticket-subject-select,
html[data-theme="light"] .ticket-modal .ticket-subject-select option { color: var(--text) !important; background-color: #fff !important; }

/* ===== ریسپانسیو ===== */
@media (max-width: 900px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .brand-text small { display: none; }
  .status-pill { display: none; }
  .hero { padding: 36px 18px 24px; }
  .sections { padding: 10px 18px 40px; }
  .section { margin-bottom: 36px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 14px; border-radius: 14px; }
  .card-icon { width: 44px; height: 44px; border-radius: 12px; }
  .card-icon svg { width: 20px; height: 20px; }
  .assistant { bottom: 18px; left: 18px; }
  .assistant-btn { width: 56px; height: 56px; }
  .assistant-btn svg { width: 24px; height: 24px; }
  .assistant-label { display: none; }
  .stats-bar { max-width: 100%; }
  .stat { padding: 14px 6px; }
  footer { padding: 24px 18px 100px; flex-direction: column; text-align: center; }
  .modal { padding: 26px 20px; border-radius: 20px; }
  .plans { gap: 8px; }
  .plan { padding: 14px 8px; }
  .otp-inputs input { width: 42px; height: 50px; font-size: 1.15rem; }
  .progress-steps .p-label { display: none; }
  .sd-plans { grid-template-columns: 1fr; }

  .user-panel { padding: 0; }
  .user-panel-card {
    max-width: 100%; height: 100vh; max-height: 100vh;
    border-radius: 0; border: none;
  }
  .up-body { padding: 16px 16px 30px; }
  .up-stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (min-width: 1200px) { .cards { grid-template-columns: repeat(3, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .modal-overlay.active { opacity: 1 !important; visibility: visible !important; }
  .modal-overlay.active .modal { transform: none !important; }
}
/* ============================================================
   ==================== چت تمام‌صفحه ====================
   ============================================================ */
.chat-modal {
  position: fixed; inset: 0; z-index: 7000;
  background: var(--bg);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
}
.chat-modal.active {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}

/* --------- هدر --------- */
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header .chat-back {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.chat-header .chat-back:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.chat-header .chat-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.chat-avatar-wrap { position: relative; }
.chat-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 50%, var(--pink));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px -6px rgba(34, 211, 238, 0.6);
}
.chat-avatar svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.chat-avatar-wrap .chat-online {
  position: absolute; bottom: 0; right: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); border: 2.5px solid var(--bg);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
.chat-info { flex: 1; min-width: 0; }
.chat-info .chat-name {
  font-size: 0.92rem; font-weight: 800;
  display: flex; align-items: center; gap: 6px;
}
.chat-info .chat-name .ai-badge {
  font-size: 0.55rem; padding: 2px 6px; border-radius: 100px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff; font-weight: 800; letter-spacing: 0.5px;
}
.chat-info .chat-status {
  font-size: 0.68rem; color: var(--green);
  display: flex; align-items: center; gap: 5px; margin-top: 2px;
}
.chat-info .chat-status::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
}

.chat-header-actions { display: flex; align-items: center; gap: 6px; }
.chat-header-actions .chat-hbtn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.chat-header-actions .chat-hbtn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.chat-header-actions .chat-hbtn.danger:hover { color: var(--red); border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.08); }
.chat-header-actions .chat-hbtn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --------- بدنه پیام‌ها --------- */
.chat-body {
  flex: 1; overflow-y: auto;
  padding: 20px 16px;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(34, 211, 238, 0.06), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 90%, rgba(167, 139, 250, 0.06), transparent 60%),
    var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
  display: flex; flex-direction: column; gap: 4px;
}
html[data-theme="light"] .chat-body {
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(8, 145, 178, 0.05), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 90%, rgba(124, 58, 237, 0.05), transparent 60%),
    var(--bg);
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

.chat-date-sep {
  align-self: center;
  margin: 14px 0 10px;
  padding: 4px 12px; border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.62rem; color: var(--text-dimmer); font-weight: 600;
  letter-spacing: 0.5px;
}

.chat-msg {
  display: flex; gap: 10px; max-width: 78%;
  animation: msgIn 0.3s ease both;
  margin-bottom: 6px;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.incoming { align-self: flex-start; }
.chat-msg.outgoing { align-self: flex-end; flex-direction: row-reverse; }

.chat-msg .msg-avatar {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: #fff;
}
.chat-msg.incoming .msg-avatar {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}
.chat-msg.incoming .msg-avatar svg {
  width: 18px; height: 18px; stroke: #fff; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.chat-msg.outgoing .msg-avatar {
  background: linear-gradient(135deg, var(--green), var(--cyan));
}
.chat-msg .msg-avatar img { width: 100%; height: 100%; border-radius: 50%; }

.chat-msg .msg-content { min-width: 0; display: flex; flex-direction: column; }
.chat-msg.outgoing .msg-content { align-items: flex-end; }

.chat-msg .msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.82rem; line-height: 1.7;
  word-wrap: break-word; word-break: break-word;
  position: relative;
  max-width: 100%;
  white-space: pre-wrap;
}
.chat-msg.incoming .msg-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top-right-radius: 4px;
  color: var(--text);
}
.chat-msg.outgoing .msg-bubble {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #fff;
  border-top-left-radius: 4px;
  box-shadow: 0 8px 20px -10px rgba(34, 211, 238, 0.6);
}

.chat-msg .msg-time {
  font-size: 0.58rem; color: var(--text-dimmer);
  margin-top: 4px; padding: 0 6px;
}

/* --------- تایپینگ --------- */
.typing-bubble {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 16px;
}
.typing-bubble .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-dim);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-bubble .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* --------- پیام صوتی --------- */
.voice-bubble {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; min-width: 200px;
}
.voice-play {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s ease;
}
.voice-play:hover { background: rgba(255,255,255,0.35); }
.voice-play svg { width: 14px; height: 14px; stroke: currentColor; fill: currentColor; stroke-width: 0; }
.chat-msg.incoming .voice-play { background: var(--surface-3); color: var(--text); }
.chat-msg.incoming .voice-play:hover { background: var(--surface-3); filter: brightness(1.2); }

.voice-wave {
  flex: 1;
  display: flex; align-items: center; gap: 2px;
  height: 26px;
}
.voice-wave .bar {
  flex: 1;
  min-width: 2px; max-width: 4px;
  border-radius: 100px;
  background: currentColor;
  opacity: 0.4;
  transition: opacity 0.15s ease;
}
.voice-wave .bar.played { opacity: 1; }

.voice-duration {
  font-size: 0.65rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
  direction: ltr;
  white-space: nowrap;
}
.chat-msg.incoming .voice-duration { color: var(--text-dim); }

/* --------- ورودی پایین --------- */
.chat-footer {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--border);
}
.chat-quick-replies {
  max-width: 900px;
  margin: 0 auto 7px;
}
.chat-quick-replies[hidden] { display: none; }
.chat-quick-replies-grid {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 1px 0 3px;
}
.chat-quick-replies-grid::-webkit-scrollbar { display: none; }
.chat-quick-reply {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--surface), rgba(34, 211, 238, .035));
  color: var(--text);
  font: inherit;
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, color .18s ease;
}
.chat-quick-reply span { color: var(--cyan); font-size: 0.9rem; }
.chat-quick-reply:hover {
  border-color: rgba(34, 211, 238, .48);
  background: linear-gradient(135deg, rgba(34,211,238,.12), rgba(167,139,250,.1));
  color: var(--cyan);
  transform: translateY(-1px);
}
.chat-quick-reply:disabled { opacity: .55; cursor: wait; transform: none; }
.chat-quick-answer { display: grid; gap: 10px; }
.chat-quick-answer > p, .chat-quick-note { margin: 0; color: var(--text-dim); font-size: .76rem; line-height: 1.8; }
.chat-quick-catalog-link { color: var(--cyan); font-weight: 800; text-decoration: underline; }
.chat-quick-category { display: grid; gap: 7px; }
.chat-quick-category h4 { margin: 2px 0 0; color: var(--cyan); font-size: .77rem; font-weight: 800; }
.chat-quick-service-list { display: grid; gap: 7px; }
.chat-quick-service-card { padding: 10px 11px; border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(135deg, var(--surface), rgba(34,211,238,.025)); }
.chat-quick-service-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.chat-quick-service-heading > div { display: grid; gap: 2px; }
.chat-quick-service-heading strong { font-size: .78rem; }
.chat-quick-service-heading small { color: var(--text-dim); font-size: .64rem; }
.chat-quick-status { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; font-size: .6rem; font-weight: 700; }
.chat-quick-status.available { color: #34d399; background: rgba(52,211,153,.1); }
.chat-quick-status.capacity { color: #fbbf24; background: rgba(251,191,36,.1); }
.chat-quick-service-details { margin-top: 7px; color: var(--text-dim); font-size: .7rem; line-height: 1.75; }
.chat-quick-service-details p { margin: 0; }
.chat-quick-service-details.prices { display: flex; flex-wrap: wrap; gap: 5px; }
.chat-quick-service-details.prices span { padding: 3px 7px; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: .64rem; }
.chat-quick-feature-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chat-quick-feature-list span { padding: 3px 7px; border-radius: 8px; background: var(--surface-2); color: var(--text-dim); font-size: .63rem; }
.chat-quick-steps { margin: 0; padding-inline-start: 20px; color: var(--text-dim); font-size: .75rem; line-height: 1.9; }
.chat-quick-cta { justify-self: start; padding: 8px 12px; border: 1px solid rgba(34,211,238,.35); border-radius: 10px; background: rgba(34,211,238,.08); color: var(--cyan); font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.chat-input-row {
  display: flex; align-items: flex-end; gap: 8px;
  max-width: 900px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px;
  padding: 6px 6px 6px 12px;
  transition: all 0.2s ease;
}
.chat-input-row:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}
.chat-textarea {
  flex: 1;
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 0.85rem;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  padding: 8px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.chat-textarea::-webkit-scrollbar { width: 5px; }
.chat-textarea::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
.chat-textarea::placeholder { color: var(--text-dimmer); }

.chat-icon-btn {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.chat-icon-btn:hover { background: var(--surface-3); color: var(--text); }
.chat-icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chat-send-btn {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px -6px rgba(34, 211, 238, 0.6);
  transition: all 0.2s ease;
  opacity: 0.4; pointer-events: none;
}
.chat-send-btn.ready { opacity: 1; pointer-events: auto; }
.chat-send-btn:hover { transform: translateY(-1px) scale(1.04); }
.chat-send-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1); }

/* --------- حالت ضبط --------- */
.chat-recording {
  display: none;
  align-items: center; gap: 12px;
  max-width: 900px; margin: 0 auto;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), rgba(244, 114, 182, 0.1));
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 22px;
}
.chat-recording.active { display: flex; }

.chat-recording .rec-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 10px var(--red);
  animation: pulse 1s ease-in-out infinite;
}
.chat-recording .rec-time {
  font-size: 0.8rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--red); direction: ltr;
}
.chat-recording .rec-wave {
  flex: 1;
  display: flex; align-items: center; gap: 2px;
  height: 30px;
}
.chat-recording .rec-wave .bar {
  flex: 1;
  min-width: 2px; max-width: 4px;
  border-radius: 100px;
  background: var(--red);
  opacity: 0.6;
  transition: height 0.08s ease;
  height: 8px;
}
.chat-recording .rec-hint {
  font-size: 0.7rem; color: var(--text-dim);
  white-space: nowrap;
}
.chat-recording .rec-actions { display: flex; gap: 6px; }
.chat-recording .rec-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s ease; border: none;
}
.chat-recording .rec-btn.cancel {
  background: var(--surface-2); color: var(--text-dim);
  border: 1px solid var(--border);
}
.chat-recording .rec-btn.cancel:hover { background: var(--surface-3); color: var(--text); }
.chat-recording .rec-btn.stop {
  background: linear-gradient(135deg, var(--red), var(--pink));
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(248, 113, 113, 0.6);
}
.chat-recording .rec-btn.stop:hover { transform: scale(1.06); }
.chat-recording .rec-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chat-recording .rec-btn.stop svg { fill: currentColor; }

/* --------- اسکرول به پایین --------- */
.chat-scroll-btn {
  position: absolute;
  bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-2);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px -8px var(--shadow-color);
  opacity: 0; visibility: hidden;
  transition: all 0.25s ease;
  z-index: 5;
}
.chat-scroll-btn.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.chat-scroll-btn:hover { background: var(--surface-3); }
.chat-scroll-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --------- خوش‌آمد --------- */
.chat-welcome {
  align-self: center; text-align: center;
  max-width: 440px;
  padding: 30px 20px;
  margin: auto 0;
}
.chat-welcome .welcome-icon {
  width: 76px; height: 76px; border-radius: 50%;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 50%, var(--pink));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 40px -12px rgba(34, 211, 238, 0.6), inset 0 2px 0 rgba(255,255,255,0.25);
  animation: floatY 3s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.chat-welcome .welcome-icon svg { width: 36px; height: 36px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-welcome h3 {
  font-size: 1.15rem; font-weight: 800; margin-bottom: 8px;
  background: linear-gradient(120deg, var(--text), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.chat-welcome p {
  font-size: 0.78rem; color: var(--text-dim); line-height: 1.8;
  margin-bottom: 20px;
}
.chat-welcome .suggestion-chips {
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: center;
}
.chat-welcome .suggestion-chip {
  position: relative; overflow: hidden;
  padding: 11px 16px; border-radius: 14px;
  background: linear-gradient(135deg,var(--surface),rgba(34,211,238,.035)); border: 1px solid var(--border);
  color: var(--text); font-size: 0.73rem; font-weight: 700;
  cursor: pointer; transition: all 0.22s ease;
  font-family: inherit; box-shadow: 0 5px 16px rgba(0,0,0,.08);
}
.chat-welcome .suggestion-chip:hover {
  background: linear-gradient(135deg,rgba(34,211,238,.12),rgba(167,139,250,.10)); color: var(--cyan);
  border-color: rgba(34,211,238,.48);
  box-shadow: 0 8px 22px -8px rgba(34,211,238,.5);
  transform: translateY(-2px);
}

/* --------- ریسپانسیو --------- */
@media (max-width: 640px) {
  .chat-header { padding: 10px 14px; }
  .chat-body { padding: 16px 12px; }
  .chat-footer { padding: 10px 12px 12px; }
  .chat-quick-replies { margin-bottom: 6px; }
  .chat-quick-replies-grid { gap: 5px; }
  .chat-quick-reply { padding: 6px 8px; font-size: 0.6rem; }
  .chat-msg { max-width: 88%; }
  .chat-welcome { padding: 20px 12px; }
  .chat-welcome .suggestion-chips { flex-direction: column; align-items: stretch; }
  .chat-welcome .suggestion-chip { text-align: center; }
  .chat-recording { padding: 8px 10px; }
  .chat-recording .rec-hint { display: none; }
}
.spinner-inline {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-left: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.locked-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
}
.locked-field .link-btn {
  color: var(--cyan);
  font-size: 0.75rem;
}

.welcome-back {
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 10px;
}

.signup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.signup-check {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(34,197,94,0.12);
  color: var(--green);
}
.signup-title { font-weight: 800; font-size: 0.95rem; }
.signup-sub { font-size: 0.75rem; color: var(--text-dimmer); }

.link-btn {
  background: none;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* LTR presentation: keep the Persian defaults above untouched. */
html[dir="ltr"] .cart-badge,
html[lang="en"] .cart-badge { left: auto; right: -5px; }
html[dir="ltr"] .card-price-row .price-tag,
html[lang="en"] .card-price-row .price-tag { margin-right: 0; margin-left: auto; }
html[dir="ltr"] .assistant,
html[lang="en"] .assistant { right: 24px; left: auto; }
html[dir="ltr"] .assistant-btn .online,
html[lang="en"] .assistant-btn .online { right: auto; left: 3px; }
html[dir="ltr"] .assistant-label { padding: 9px 13px 9px 15px; }
html[lang="en"] .assistant-label { padding: 9px 13px 9px 15px; }
html[dir="ltr"] .modal-close,
html[lang="en"] .modal-close { right: 16px; left: auto; }
html[dir="ltr"] .form-input,
html[lang="en"] .form-input { direction: ltr; text-align: left; }
html[dir="ltr"] .form-input::placeholder,
html[lang="en"] .form-input::placeholder { direction: ltr; text-align: left; }
html[dir="ltr"] textarea.form-input,
html[lang="en"] textarea.form-input,
html[dir="ltr"] select.form-input,
html[lang="en"] select.form-input { direction: ltr; text-align: left; }
html[dir="ltr"] .service-list,
html[lang="en"] .service-list { padding: 2px 2px 2px 4px; }
html[dir="ltr"] .up-stat.accent-cyan::before,
html[dir="ltr"] .up-stat.accent-violet::before,
html[dir="ltr"] .up-stat.accent-green::before,
html[dir="ltr"] .up-stat.accent-amber::before,
html[lang="en"] .up-stat.accent-cyan::before,
html[lang="en"] .up-stat.accent-violet::before,
html[lang="en"] .up-stat.accent-green::before,
html[lang="en"] .up-stat.accent-amber::before { right: 12px; left: auto; }
html[dir="ltr"] .wallet-topup-card,
html[lang="en"] .wallet-topup-card { background: radial-gradient(ellipse at top left, rgba(34,211,238,.09), transparent 55%), linear-gradient(145deg, var(--surface-2), var(--surface)); }
html[dir="ltr"] .ticket-modal .ticket-subject-select,
html[lang="en"] .ticket-modal .ticket-subject-select { padding-left: 12px; padding-right: 38px; background-position: right 14px center; }
html[dir="ltr"] .ticket-admin-reply,
html[lang="en"] .ticket-admin-reply { border-right: 1px solid rgba(34,211,238,.16); border-left: 3px solid var(--cyan); }
html[dir="ltr"] .chat-msg.incoming .msg-bubble,
html[lang="en"] .chat-msg.incoming .msg-bubble { border-top-right-radius: 18px; border-top-left-radius: 4px; }
html[dir="ltr"] .chat-msg.outgoing .msg-bubble,
html[lang="en"] .chat-msg.outgoing .msg-bubble { border-top-left-radius: 18px; border-top-right-radius: 4px; }
html[dir="ltr"] .chat-msg.incoming .msg-bubble ul,
html[lang="en"] .chat-msg.incoming .msg-bubble ul { padding-right: 0; padding-left: 18px; }
html[dir="ltr"] .chat-send-btn svg,
html[lang="en"] .chat-send-btn svg { transform: none; }
html[dir="ltr"] .toast,
html[lang="en"] .toast { right: 50%; left: auto; transform: translateX(50%) translateY(20px); }
html[dir="ltr"] .toast.show,
html[lang="en"] .toast.show { transform: translateX(50%) translateY(0); }
html[dir="ltr"] .crypto-note,
html[lang="en"] .crypto-note { border-right: 0; border-left: 3px solid rgba(245, 158, 11, 0.5); }
html[dir="ltr"] .ca-unit,
html[lang="en"] .ca-unit { margin-left: 0; margin-right: 6px; }
html[dir="ltr"] .pay-method,
html[lang="en"] .pay-method,
html[dir="ltr"] .receipt,
html[lang="en"] .receipt { text-align: left; }
html[dir="ltr"] .inv-txid,
html[lang="en"] .inv-txid { text-align: left; }

@media (max-width: 640px) {
  html[dir="ltr"] .assistant,
  html[lang="en"] .assistant { right: 18px; left: auto; }
}
/* ============================================================
   پنل کاربری تمام‌صفحه
   ============================================================ */
/* ============================================================
   پنل کاربری تمام‌صفحه
   ============================================================ */
.user-panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;   /* ← برای موبایل */
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    padding: 0;
    overflow: hidden;
}
.user-panel.active {
    display: flex;
    flex-direction: column;
}

.user-panel-card {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, var(--modal-bg-1), var(--modal-bg-2));
    border: 1px solid var(--border-2);
    box-shadow: 0 24px 70px var(--shadow-color);
    overflow: hidden;
    /* ⚠️ مهم: اجازه بده فرزندان overflow کنند */
    min-height: 0;
}

.user-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;   /* ← ثابت بماند */
    background: var(--modal-bg-1);
    position: sticky;
    top: 0;
    z-index: 10;
}
  html[data-theme="light"] .user-panel { background: rgba(15,23,42,.52); }
  html[data-theme="light"] .user-panel-card { background: #fff; border-color: rgba(15,23,42,.14); }
  html[data-theme="light"] .user-panel-header,
  html[data-theme="light"] .up-tabs { background: #fff; }

.up-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 16px 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;   /* ← ثابت بماند */
    scrollbar-width: none;
    background: var(--modal-bg-1);
    position: sticky;
    top: 60px;   /* زیر هدر */
    z-index: 9;
}
.up-tabs::-webkit-scrollbar { display: none; }

.up-tab {
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.up-tab svg { width: 14px; height: 14px; }
.up-tab:hover { color: var(--text); }
.up-tab.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

.up-body {
    flex: 1 1 auto;
    overflow-y: auto;          /* ← اسکرول عمودی */
    overflow-x: hidden;
    padding: 16px 16px 120px;  /* ← padding-bottom بیشتر برای دکمه‌های پایین */
    -webkit-overflow-scrolling: touch;   /* ← اسکرول نرم iOS */
    min-height: 0;             /* ← کلید حل مشکل flexbox */
    scrollbar-width: thin;
}
.up-body::-webkit-scrollbar { width: 6px; }
.up-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.up-pane { display: none; }
.up-pane.active { display: block; }

/* ============================================================
   کارت غیرفعال
   ============================================================ */
.card.is-disabled {
    opacity: 0.5;
    filter: grayscale(0.7);
    pointer-events: none;
    cursor: not-allowed;
    position: relative;
}
.card.is-disabled::after {
    content: "غیرفعال";
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ============================================================
   ویدئو در جزئیات سرویس
   ============================================================ */
.sd-video { margin: 20px 0; }
.sd-video-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}
.sd-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}
.sd-video-wrapper iframe,
.sd-video-wrapper video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ============================================================
   روش‌های پرداخت
   ============================================================ */
.pay-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px 0;
}
.pay-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: right;
    transition: all 0.2s;
    color: var(--text);
}
.pay-method:hover { border-color: var(--cyan); }
.pay-method.active {
    border-color: var(--cyan);
    background: rgba(6, 182, 212, 0.08);
}
.pm-icon svg { width: 24px; height: 24px; color: var(--cyan); }
.pm-text { display: flex; flex-direction: column; gap: 3px; }
.pm-text strong { font-size: 0.9rem; }
.pm-text small { font-size: 0.7rem; color: var(--text-dim); }

.pay-panel { display: none; }
.pay-panel.active { display: block; }

/* ============================================================
   رمز ارز
   ============================================================ */
.crypto-box {
    background: linear-gradient(135deg, rgba(38, 161, 123, 0.1), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(38, 161, 123, 0.3);
    border-radius: 14px;
    padding: 20px;
    margin-top: 10px;
}
.crypto-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.crypto-badge {
    background: #26a17b;
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.9rem;
}
.crypto-net {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
}
.crypto-amount {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    margin-bottom: 16px;
}
.ca-label { display: block; font-size: 0.75rem; color: var(--text-dim); margin-bottom: 6px; }
.ca-value { font-size: 1.6rem; color: var(--cyan); direction: ltr; display: inline-block; }
.ca-unit { font-size: 0.9rem; color: var(--text-dim); margin-left: 6px; }

.crypto-wallet label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.wallet-address {
    font-family: monospace;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    direction: ltr;
    text-align: left;
    word-break: break-all;
    margin-bottom: 8px;
    color: var(--cyan);
}
.btn-copy {
    width: 100%;
    padding: 10px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
    transition: all 0.2s;
}
.btn-copy:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-copy svg { width: 16px; height: 16px; }

.crypto-note {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 8px;
    border-right: 3px solid rgba(245, 158, 11, 0.5);
}

/* ============================================================
   فاکتورها
   ============================================================ */
.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.invoice-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.inv-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}
.inv-num { display: flex; align-items: center; gap: 10px; }
.inv-num strong { font-family: monospace; font-size: 0.85rem; }
.inv-status {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 700;
}
.inv-status.paid { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.inv-date { font-size: 0.75rem; color: var(--text-dim); }

.inv-items { display: flex; flex-direction: column; gap: 6px; }
.inv-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.inv-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}
.inv-method { font-size: 0.75rem; color: var(--text-dim); }
.inv-total { font-size: 0.95rem; font-weight: 800; color: var(--cyan); }
.inv-txid {
    font-size: 0.7rem;
    color: var(--text-dimmer);
    font-family: monospace;
    direction: ltr;
    text-align: left;
    word-break: break-all;
}

/* ============================================================
   آواتار در پروفایل
   ============================================================ */
.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 auto 12px;
    background-size: cover;
    background-position: center;
    border: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}
.avatar-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

/* user-chip avatar با تصویر */
.user-chip .avatar {
    background-size: cover;
    background-position: center;
}
.payment-loading {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.9);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: var(--text);
}
.payment-loading .spinner-inline {
    width: 40px;
    height: 40px;
    border-width: 4px;
}
.payment-loading .msg {
    font-size: 0.95rem;
    font-weight: 600;
}
.footer-linkedin {
    display: inline-flex;
    align-items: center;
    flex-direction: row;
    gap: 9px;
    padding: 7px 13px 7px 8px;
direction: ltr;
    color: #ffffff;
    text-decoration: none;

    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);

    border: 1px solid rgba(255, 255, 255, 0.10);

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.linkedin-icon {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: #0A66C2;

    flex-shrink: 0;
}

.linkedin-icon svg {
    width: 17px;
    height: 17px;

    fill: #ffffff;
    display: block;
}

.linkedin-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.footer-linkedin:hover {
    background: rgba(10, 102, 194, 0.16);
    border-color: rgba(10, 102, 194, 0.45);

    transform: translateY(-1px);
}

.footer-linkedin:hover .linkedin-icon {
    background: #0A66C2;
}

/* ============================================================
   جهت خودکار متن پیام‌های چت
   فارسی/عربی → rtl · انگلیسی → ltr  (مستقل از زبان خودِ سایت)
   ============================================================ */
.chat-msg .msg-bubble[dir="rtl"] { text-align: right; }
.chat-msg .msg-bubble[dir="ltr"] { text-align: left; }
html[dir] .chat-msg .msg-bubble[dir="rtl"] ul { padding: 0 18px 0 0; }
html[dir] .chat-msg .msg-bubble[dir="ltr"] ul { padding: 0 0 0 18px; }
html[dir] .chat-msg .msg-bubble[dir="rtl"] .chat-card-title { direction: rtl; }
html[dir] .chat-msg .msg-bubble[dir="ltr"] .chat-card-title { direction: ltr; }
.chat-textarea[dir="rtl"] { text-align: right; }
.chat-textarea[dir="ltr"] { text-align: left; }
.chat-textarea[dir="ltr"]::placeholder { direction: ltr; text-align: left; }

/* نشانگر «در حال بررسی» تا رسیدن اولین توکن پاسخ */
.chat-msg .thinking-text {
    display: inline-block;
    padding: 10px 14px;
    color: var(--text-dim);
    font-size: 0.78rem;
    letter-spacing: 0.2px;
}