:root {
  --brand: #6c5ce7;
  --brand-dark: #5344c9;
  --bg: #f5f6fb;
}

* { font-family: 'Vazirmatn', sans-serif; }

body {
  background: var(--bg);
}

.text-brand { color: var(--brand); }

.app-navbar {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}
.app-navbar .navbar-brand, .app-navbar .nav-link { color: #fff !important; }
.app-navbar .nav-link:hover { opacity: .8; }

.guest-navbar { padding: 24px 0; }

.balance-pill {
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 600;
  font-size: .9rem;
}

.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(30,30,60,.06);
}

.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.auth-wrapper {
  max-width: 440px;
  margin: 40px auto;
}

.stat-card {
  border-radius: 18px;
  padding: 22px;
  color: #fff;
}
.stat-card.balance { background: linear-gradient(135deg,#6c5ce7,#a29bfe); }
.stat-card.orders  { background: linear-gradient(135deg,#00b894,#55efc4); }
.stat-card.pending { background: linear-gradient(135deg,#e17055,#fab1a0); }

.service-card { cursor: pointer; transition: .15s; }
.service-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,30,60,.12); }

.flash-toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  min-width: 280px;
  text-align: center;
}

.badge-status { font-size: .78rem; padding: 6px 10px; border-radius: 20px; }

.tg-login-wrap { display:flex; justify-content:center; margin: 12px 0; }

.pretty-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #fff5f5, #ffecec);
  border: 1px solid #ffd4d4;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.pretty-error .pretty-error__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ff5c5c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.pretty-error .pretty-error__text {
  color: #b42318;
  font-size: 0.92rem;
  line-height: 1.9;
  padding-top: 4px;
}

.pretty-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #f3fff6, #eafff0);
  border: 1px solid #bdf0ce;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.pretty-success .pretty-success__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #17b26a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.pretty-success .pretty-success__text {
  color: #05603a;
  font-size: 0.92rem;
  line-height: 1.9;
  padding-top: 4px;
}

.pay-method {
  border: 2px solid #eef0f7;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: .15s;
  height: 100%;
}
.pay-method:hover { border-color: #c9c3f7; }
.pay-method input:checked ~ .pay-method__body,
.pay-method.active { border-color: var(--brand); background: #f8f7ff; }
.pay-method input { display: none; }
.pay-method.disabled { opacity: .5; cursor: not-allowed; }

/* =========================================================
   سیستم تیکت پشتیبانی — طراحی جدید
   ========================================================= */

/* --- هدر صفحات پشتیبانی --- */
.support-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 26px 28px;
  margin-bottom: 22px;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand) 60%, #8b7ff0);
  color: #fff;
  box-shadow: 0 10px 30px rgba(108,92,231,.25);
}
.support-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 90% -10%, rgba(255,255,255,.18), transparent 55%),
                     radial-gradient(circle at 10% 120%, rgba(255,255,255,.12), transparent 50%);
  pointer-events: none;
}
.support-hero__row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.support-hero__icon {
  width: 52px; height: 52px; border-radius: 15px;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.support-hero h4, .support-hero h5 { color: #fff; margin: 0; }
.support-hero__sub { color: rgba(255,255,255,.85); font-size: .87rem; margin-top: 2px; }
.support-hero .btn-light-brand {
  background: #fff; color: var(--brand-dark); font-weight: 600; border: none;
  white-space: nowrap;
}
.support-hero .btn-light-brand:hover { background: #f1efff; color: var(--brand-dark); }
.support-hero .btn-outline-lightline {
  border: 1.5px solid rgba(255,255,255,.55); color: #fff; background: transparent;
}
.support-hero .btn-outline-lightline:hover { background: rgba(255,255,255,.15); color: #fff; }

.support-stats { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; margin-top: 18px; }
.support-stat {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  padding: 8px 16px;
  min-width: 96px;
  text-align: center;
}
.support-stat strong { display: block; font-size: 1.15rem; line-height: 1.5; }
.support-stat span { font-size: .74rem; color: rgba(255,255,255,.85); }

/* --- لیست تیکت‌ها --- */
.ticket-list { display: flex; flex-direction: column; gap: 10px; }
.ticket-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #eef0f7;
  border-radius: 16px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: .15s;
}
.ticket-row:hover {
  border-color: #d9d3fb;
  box-shadow: 0 8px 22px rgba(30,30,60,.08);
  transform: translateY(-1px);
  color: inherit;
}
.ticket-row__icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: #f4f3fb; color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}
.ticket-row__body { flex: 1; min-width: 0; }
.ticket-row__subject { font-weight: 700; font-size: .96rem; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-row__meta { font-size: .78rem; color: #8a8aa3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ticket-row__meta .dot { width: 3px; height: 3px; background: #c9c9dd; border-radius: 50%; display: inline-block; }
.ticket-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.ticket-row__time { font-size: .74rem; color: #a9a9c0; }
.ticket-row__chevron { color: #c7c4e6; font-size: 18px; }

.ticket-empty {
  text-align: center;
  padding: 56px 20px;
}
.ticket-empty__icon {
  width: 84px; height: 84px; border-radius: 50%;
  background: #f4f3fb; color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin: 0 auto 18px;
}
.ticket-empty p { color: #9391ab; margin-bottom: 18px; }

/* --- کارت انتخاب (دسته‌بندی / اولویت) --- */
.choice-card {
  position: relative;
  display: block;
  border: 1.5px solid #eef0f7;
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: .15s;
  height: 100%;
}
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card__icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: #f4f3fb; color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 8px;
}
.choice-card__label { font-weight: 700; font-size: .88rem; }
.choice-card:hover { border-color: #d9d3fb; }
.choice-card input:checked ~ .choice-card__check,
.choice-card.active { border-color: var(--brand); background: #f8f7ff; }
.choice-card__check {
  position: absolute; top: 10px; left: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid #d8d5ec; background: #fff;
}
.choice-card input:checked ~ .choice-card__check {
  border-color: var(--brand); background: var(--brand);
  box-shadow: inset 0 0 0 3px #fff;
}

/* --- انتخاب اولویت (پیل) --- */
.priority-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.priority-pill {
  position: relative;
  border: 1.5px solid #eef0f7;
  border-radius: 30px;
  padding: 8px 18px;
  font-size: .86rem;
  font-weight: 600;
  color: #6b6b83;
  cursor: pointer;
  transition: .15s;
}
.priority-pill input { position: absolute; opacity: 0; pointer-events: none; }
.priority-pill:hover { border-color: #d9d3fb; }
.priority-pill.low { }
.priority-pill.high:hover { border-color: #f3c6c0; }
.priority-pill input:checked ~ .priority-pill__dot { }
.priority-pill:has(input:checked) {
  border-color: var(--brand); background: var(--brand); color: #fff;
}
.priority-pill.high:has(input:checked) { background: #e0574a; border-color: #e0574a; }
.priority-pill.low:has(input:checked) { background: #6b6b83; border-color: #6b6b83; }

/* --- آپلود فایل به سبک dropzone --- */
.file-drop {
  border: 1.5px dashed #d9d3fb;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  background: #fbfaff;
  cursor: pointer;
  transition: .15s;
  position: relative;
}
.file-drop:hover { border-color: var(--brand); background: #f8f7ff; }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop__icon { font-size: 22px; color: var(--brand); margin-bottom: 4px; display: block; }
.file-drop__text { font-size: .82rem; color: #8a8aa3; }
.file-drop__name { font-size: .82rem; color: var(--brand-dark); font-weight: 600; margin-top: 4px; word-break: break-all; }

/* --- راهنمای کناری --- */
.support-tips { background: #f9f9fd; border: 1px solid #eef0f7; border-radius: 16px; padding: 18px; }
.support-tips h6 { font-weight: 700; font-size: .88rem; margin-bottom: 12px; }
.support-tips ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.support-tips li { display: flex; align-items: flex-start; gap: 8px; font-size: .82rem; color: #6b6b83; line-height: 1.7; }
.support-tips li i { color: var(--brand); margin-top: 2px; }

/* --- گفتگوی تیکت --- */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 560px;
  overflow-y: auto;
  padding: 6px 4px 10px;
}
.chat-row { display: flex; align-items: flex-end; gap: 10px; margin: 8px 0; }
.chat-row.me { flex-direction: row-reverse; }
.chat-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  background: #f4f3fb; color: var(--brand);
}
.chat-row.me .chat-avatar { background: var(--brand); color: #fff; }
.chat-bubble {
  max-width: min(72%, 480px);
  padding: 11px 15px;
  border-radius: 16px;
  line-height: 1.85;
  font-size: .92rem;
  background: #f4f3fb;
  border: 1px solid #eceafa;
  border-bottom-right-radius: 4px;
}
.chat-row.me .chat-bubble {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 16px;
}
.chat-bubble-body { white-space: pre-line; word-break: break-word; }
.chat-meta { font-size: .72rem; color: #a9a9c0; margin: 2px 4px; }
.chat-row.me .chat-meta { text-align: left; }
.chat-attachment img {
  max-width: 200px; border-radius: 12px; margin-top: 8px; display: block;
  border: 1px solid rgba(0,0,0,.06);
}

.chat-day-sep {
  text-align: center; font-size: .72rem; color: #a9a9c0;
  margin: 14px 0 6px; position: relative;
}

/* --- کادر ارسال پاسخ --- */
.composer-card { border-radius: 18px; }
.composer-card textarea { resize: none; border-radius: 14px; }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.composer-attach-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; color: #6b6b83; cursor: pointer;
  border: 1px solid #eef0f7; border-radius: 10px; padding: 7px 12px;
  position: relative; overflow: hidden;
}
.composer-attach-btn:hover { border-color: #d9d3fb; color: var(--brand-dark); }
.composer-attach-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.composer-attach-name { font-size: .78rem; color: var(--brand-dark); font-weight: 600; }

.ticket-closed-note {
  display: flex; align-items: center; gap: 12px;
  background: #f9f9fd; border: 1px dashed #dcd8f2;
  border-radius: 14px; padding: 14px 16px;
}
.ticket-closed-note i { font-size: 20px; color: #9391ab; }

/* =========================================================
   هدر عمومی صفحات (سرویس‌ها و غیره)
   ========================================================= */
.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 26px 28px;
  margin-bottom: 22px;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand) 60%, #8b7ff0);
  color: #fff;
  box-shadow: 0 10px 30px rgba(108,92,231,.25);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 90% -10%, rgba(255,255,255,.18), transparent 55%),
                     radial-gradient(circle at 10% 120%, rgba(255,255,255,.12), transparent 50%);
  pointer-events: none;
}
.page-hero__row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.page-hero__icon {
  width: 52px; height: 52px; border-radius: 15px;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.page-hero h4 { color: #fff; margin: 0; }
.page-hero__sub { color: rgba(255,255,255,.85); font-size: .87rem; margin-top: 2px; }

.hero-search { position: relative; z-index: 1; margin-top: 18px; max-width: 420px; }
.hero-search input {
  width: 100%; border: none; border-radius: 14px;
  padding: 12px 44px 12px 16px; background: rgba(255,255,255,.95); font-size: .9rem;
}
.hero-search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.hero-search i { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: #9391ab; }

/* =========================================================
   صفحه لیست سرویس‌ها
   ========================================================= */
.cat-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.cat-chip {
  border: 1.5px solid #eef0f7; background: #fff; border-radius: 30px;
  padding: 8px 18px; font-size: .85rem; font-weight: 600; color: #6b6b83;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.cat-chip:hover { border-color: #d9d3fb; color: var(--brand-dark); }
.cat-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.services-group { margin-bottom: 26px; }
.services-group__title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1rem; margin-bottom: 12px; }
.services-group__title .badge-count { background: #f4f3fb; color: var(--brand); font-size: .72rem; padding: 3px 10px; border-radius: 20px; font-weight: 700; }

.svc-card {
  background: #fff; border: 1px solid #eef0f7; border-radius: 18px;
  padding: 18px; height: 100%; display: flex; flex-direction: column;
  transition: .15s;
}
.svc-card:hover { border-color: #d9d3fb; box-shadow: 0 10px 26px rgba(30,30,60,.08); transform: translateY(-2px); }
.svc-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.svc-card__name { font-weight: 700; font-size: .95rem; line-height: 1.6; }
.svc-card__id { font-size: .7rem; color: #a9a9c0; background: #f7f7fb; border-radius: 8px; padding: 2px 8px; flex-shrink: 0; white-space: nowrap; }
.svc-card__desc {
  font-size: .82rem; color: #8a8aa3; line-height: 1.8; margin-bottom: 12px; flex-grow: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.svc-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.svc-tag { font-size: .72rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.svc-tag.price { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; font-weight: 700; }
.svc-tag.minmax { background: #f4f3fb; color: #6b6b83; }
.svc-tag.time { background: #eef7ff; color: #1f7ac9; }
.svc-tag.refill { background: #eafff0; color: #17b26a; }
.svc-tag.cancel { background: #fff5eb; color: #c9821f; }
.svc-tag.dripfeed { background: #f5f0ff; color: #7d4fd6; }
.svc-card__actions { display: flex; gap: 8px; margin-top: auto; }
.svc-card__actions .btn { flex: 1; font-size: .85rem; }

.services-empty, .services-nomatch { text-align: center; padding: 56px 20px; }
.services-empty__icon, .services-nomatch__icon {
  width: 84px; height: 84px; border-radius: 50%; background: #f4f3fb; color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 36px; margin: 0 auto 18px;
}

.svc-modal .modal-content { border-radius: 18px; border: none; }
.svc-modal .modal-header { border-bottom: 1px solid #f0f0f7; }
.svc-modal .modal-body { font-size: .9rem; line-height: 1.9; color: #57576b; white-space: pre-line; }
