/* tabrizjoo — shared styles
   همان توکن‌های رنگی و فونت صفحه اصلی، به‌علاوه کامپوننت‌های فرم/جدول/کارت
   برای صفحات ثبت‌نام، ورود، پنل و ادمین. */

:root{
  --bg: #ffffff;
  --ink: #1c2333;
  --ink-soft: #5b6270;
  --line: #e7e6e2;
  --turquoise: #12a6a0;
  --saffron: #e2a63a;
  --pomegranate: #c0483f;
  --navy: #2c3a63;
  --panel: #f7f6f3;
  --focus: #12a6a0;
  --danger: #c0483f;
  --ok: #12a6a0;
}

*{ box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%; /* جلوگیری از بزرگ‌نمایی خودکار فونت توسط اندروید/کروم که باعث می‌شد صفحه «زوم‌شده» به‌نظر برسه */
  text-size-adjust: 100%;
  overflow-x:hidden; /* جلوگیری از اسکرول/زوم افقی کل صفحه در موبایل، اگه یه عنصر عرضش بزنه بیرون */
  width:100%;
}

html,body{
  margin:0; padding:0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Vazirmatn', sans-serif;
  min-height:100%;
}

body{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  width:100%;
  overflow-x:hidden; /* جلوگیری از اسکرول افقی کل صفحه در موبایل، اگه یه عنصر عرضش بزنه بیرون */
}

a{ color: inherit; text-decoration:none; }

/* شبکه‌ی ایمنی: هیچ عکس/svg/ویدیو/آیفریمی نباید عریض‌تر از ظرفش بشه و صفحه رو به‌هم بریزه */
img, svg, video, iframe{ max-width:100%; }

/* ---------- top bar (shared across inner pages) ---------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 16px 28px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.topbar .right{
  display:flex;
  gap:22px;
  align-items:center;
  color: var(--ink-soft);
}
.topbar .right a:hover{ color: var(--ink); text-decoration: underline; }

.corner-brand{
  font-weight:700;
  font-size: 15px;
  color: var(--pomegranate);
  font-family:'Outfit', sans-serif;
  display:flex;
  align-items:center;
  gap:2px;
}
.corner-brand span{ direction:ltr; }

.topbar .left{
  display:flex;
  gap:12px;
  align-items:center;
}

/* ---------- دکمه‌ها: شیشه‌ای (glassmorphism) و هم‌اندازه در کل سایت ---------- */
.btn-ghost,
.btn-solid,
.btn-outline,
.btn-danger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  height: 40px;
  padding: 0 20px;
  border-radius: 11px;
  font-weight:600;
  font-family:'Vazirmatn', sans-serif;
  font-size:14px;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease, color .18s ease;
}
.btn-ghost:active,
.btn-solid:active,
.btn-outline:active,
.btn-danger:active{ transform: translateY(1px); }

.btn-ghost{
  color: var(--ink-soft);
  background: rgba(28,35,51,0.055);
  border: 1px solid rgba(28,35,51,0.16);
  box-shadow: 0 2px 8px rgba(28,35,51,0.06), inset 0 1px 0 rgba(255,255,255,0.6);
}
.btn-ghost:hover{ background: rgba(28,35,51,0.10); color: var(--ink); border-color: rgba(28,35,51,0.24); }

.btn-solid{
  background: linear-gradient(135deg, rgba(18,166,160,0.82), rgba(15,147,142,0.88));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 4px 16px rgba(18,166,160,0.28), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-solid:hover{ background: linear-gradient(135deg, rgba(15,147,142,0.9), rgba(13,130,126,0.92)); box-shadow: 0 6px 18px rgba(18,166,160,0.34), inset 0 1px 0 rgba(255,255,255,0.3); }

.btn-outline{
  background: rgba(18,166,160,0.10);
  color: var(--turquoise);
  border: 1px solid rgba(18,166,160,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-outline:hover{ background: rgba(18,166,160,0.18); border-color: var(--turquoise); }

.btn-danger{
  background: rgba(192,72,63,0.10);
  color: var(--pomegranate);
  border: 1px solid rgba(192,72,63,0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-danger:hover{ background: rgba(192,72,63,0.18); border-color: var(--pomegranate); }

.btn-ghost:disabled, .btn-solid:disabled, .btn-outline:disabled, .btn-danger:disabled{
  opacity:.55; cursor:default; transform:none;
}

/* دکمه‌های کوچک‌تر داخل ردیف‌ها (مثل جدول‌ها) هم از همون خانواده‌ی شیشه‌ای، ولی جمع‌وجورتر */
.row-actions .btn-outline,
.row-actions .btn-danger,
.row-actions .btn-ghost{
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

/* ---------- layout shell for inner pages ---------- */
.page{
  flex:1;
  width:100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}
.page.narrow{ max-width: 460px; }
.page.wide{ max-width: 1120px; }

h1.page-title{
  font-size: 24px;
  margin: 0 0 6px;
}
p.page-sub{
  color: var(--ink-soft);
  margin: 0 0 30px;
  font-size: 14px;
}

/* ---------- cards / panels ---------- */
.card{
  background:#fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 2px 10px rgba(28,35,51,0.04);
}
.card + .card{ margin-top: 18px; }

/* ---------- forms ---------- */
.field{ margin-bottom: 18px; }
.field label{
  display:block;
  font-size: 13px;
  font-weight:600;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.field .hint{
  font-size:12px;
  color:#9aa0ab;
  margin-top:5px;
}
.field input,
.field select,
.field textarea{
  width:100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family:'Vazirmatn', sans-serif;
  font-size: 16px;
  color: var(--ink);
  background:#fff;
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(18,166,160,0.12);
}
.field textarea{ resize: vertical; min-height: 90px; }
.field-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width:560px){ .field-row{ grid-template-columns: 1fr; } }

/* ---------- repeater (add/remove multiple values) ---------- */
.repeater-row{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:8px;
}
.repeater-row input{
  flex:1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family:'Vazirmatn', sans-serif;
  font-size: 16px;
  color: var(--ink);
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.repeater-row input:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(18,166,160,0.12);
}
.repeater-row .remove-row{
  flex:none;
  width:40px; height:40px;
  border-radius:11px;
  border:1px solid rgba(192,72,63,0.30);
  background: rgba(192,72,63,0.08);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  color: var(--pomegranate);
  font-size:15px;
  cursor:pointer;
}
.repeater-row .remove-row:hover{ background: rgba(192,72,63,0.16); border-color: var(--pomegranate); }
.btn-add-row{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px dashed rgba(18,166,160,0.45);
  background: rgba(18,166,160,0.08);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  color: var(--turquoise);
  font-family:'Vazirmatn', sans-serif;
  font-size: 13.5px;
  font-weight:600;
  cursor:pointer;
}
.btn-add-row:hover{ border-color: var(--turquoise); background: rgba(18,166,160,0.16); }

/* ---------- ردیف آدرس + دکمه‌ی مکان‌یابی GPS ---------- */
.addr-block{ margin-bottom: 10px; }
.addr-block .repeater-row{ margin-bottom: 4px; }
.locate-btn{
  flex:none;
  width:40px; height:40px;
  border-radius:11px;
  border:1px solid rgba(28,35,51,0.16);
  background: rgba(28,35,51,0.055);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 2px 8px rgba(28,35,51,0.06), inset 0 1px 0 rgba(255,255,255,0.6);
  font-size:15px;
  cursor:pointer;
  transition: border-color .15s ease, background .15s ease;
}
.locate-btn:hover{ border-color: var(--turquoise); background: rgba(18,166,160,0.10); }
.locate-btn:disabled{ opacity:.6; cursor:default; }
.locate-btn.map-btn{
  width:auto;
  padding: 0 14px;
  white-space: nowrap;
  font-family:'Vazirmatn', sans-serif;
  font-size: 13.5px;
  font-weight:600;
  color: var(--ink);
}
@media (max-width:560px){
  .locate-btn.map-btn{ font-size:12.5px; padding:0 10px; }
}
.addr-status{
  font-size:12px;
  color: var(--ink-soft);
  padding-inline-start: 2px;
  min-height: 14px;
}
.addr-status.ok{ color: var(--turquoise); font-weight:600; }
.addr-status.err{ color: var(--pomegranate); }

/* ---------- مودال انتخاب موقعیت روی نقشه ---------- */
.map-picker-search-row{
  display:flex;
  gap:8px;
  margin-bottom:10px;
}
.map-picker-search-row input{
  flex:1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family:'Vazirmatn', sans-serif;
  font-size: 16px;
  color: var(--ink);
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.map-picker-search-row input:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(18,166,160,0.12);
}
.map-picker-map{
  height: 320px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.map-picker-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}
.map-picker-actions .addr-status{ flex:1; min-width:180px; }
@media (max-width:560px){
  .map-picker-map{ height: 260px; }
  .map-picker-search-row{ flex-direction:column; }
}


.error-text{
  color: var(--pomegranate);
  font-size: 13px;
  margin-top: 8px;
  display:none;
}
.error-text.show{ display:block; }

.form-footer{
  margin-top: 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.muted-link{
  font-size:13px;
  color: var(--ink-soft);
}
.muted-link a{ color: var(--turquoise); font-weight:600; }
.muted-link a:hover{ text-decoration:underline; }

/* ---------- badges / status ---------- */
.badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight:600;
}
.badge.ok{ background: rgba(18,166,160,0.12); color: var(--turquoise); }
.badge.pending{ background: rgba(226,166,58,0.15); color: #a4741f; }
.badge.free{ background: var(--panel); color: var(--ink-soft); }
.badge.premium{ background: rgba(192,72,63,0.10); color: var(--pomegranate); }
.badge.suspended{ background: rgba(91,98,112,0.14); color: var(--ink-soft); }

/* ---------- tables ---------- */
table.data-table{
  width:100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data-table th{
  text-align: right;
  font-size:12px;
  color: var(--ink-soft);
  font-weight:600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
table.data-table td{
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data-table tr:last-child td{ border-bottom:none; }
table.data-table tr:hover td{ background: var(--panel); }

.spec-table{ width:100%; border-collapse: collapse; table-layout:fixed; }
.spec-table td{
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  word-break: break-word;
  overflow-wrap: break-word;
}
.spec-table td:first-child{
  color: var(--ink-soft);
  width: 130px;
  font-weight:600;
}
.spec-table tr:last-child td{ border-bottom:none; }

/* هر ردیف تلفن/آدرس داخل جدول مشخصات، همراه با دکمه‌ی عملیاتی کنارش */
.spec-row-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.spec-row-item + .spec-row-item{ margin-top:8px; }
.spec-row-item .spec-val{ flex:1; word-break:break-word; }
.spec-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  flex:none;
  height:34px;
  padding:0 14px;
  border-radius:10px;
  font-size:12.5px;
  font-weight:600;
  font-family:'Vazirmatn', sans-serif;
  border:1px solid rgba(18,166,160,0.45);
  color: var(--turquoise);
  background: rgba(18,166,160,0.10);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
  transition: background .15s ease, color .15s ease;
}
.spec-action-btn:hover{ background: var(--turquoise); color:#fff; }
.spec-action-btn svg{ width:14px; height:14px; flex:none; }

/* ---------- search results list ---------- */
.result-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor:pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.result-item:hover{
  border-color: var(--turquoise);
  box-shadow: 0 2px 10px rgba(18,166,160,0.08);
}
.result-item + .result-item{ margin-top: 10px; }
.result-name{ font-weight:700; font-size:15px; }
.result-meta{ font-size:12.5px; color: var(--ink-soft); margin-top:3px; }
.result-cat-dot{ width:8px; height:8px; border-radius:50%; flex:none; }

.empty-state{
  text-align:center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

/* ---------- modal ---------- */
.modal-overlay{
  position: fixed; inset:0;
  background: rgba(28,35,51,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay.open{ display:flex; }
.modal-box{
  background:#fff;
  border-radius: 16px;
  max-width: 520px;
  width:100%;
  max-height: 86vh;
  overflow-y:auto;
  overflow-x:hidden;
  box-sizing:border-box;
  padding: 28px;
  position: relative;
  animation: modal-in .18s ease-out;
}
@keyframes modal-in{
  0%{ opacity:0; transform: translateY(8px) scale(.98); }
  100%{ opacity:1; transform: translateY(0) scale(1); }
}
.modal-close{
  position:absolute; top:16px; left:16px;
  width:32px; height:32px;
  border-radius:50%;
  border:1px solid rgba(28,35,51,0.16);
  background: rgba(28,35,51,0.055);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  cursor:pointer;
  color: var(--ink-soft);
  font-size:16px;
  line-height:1;
}
.modal-close:hover{ background: rgba(28,35,51,0.10); }
.modal-title{ font-size:18px; font-weight:700; margin: 0 0 4px; padding-left: 36px; }
.modal-cat{ font-size:13px; color: var(--turquoise); margin-bottom:18px; }

/* ---------- misc ---------- */
.section-title{
  font-size:15px;
  font-weight:700;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.toast{
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color:#fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  opacity:0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events:none;
  z-index: 200;
}
.toast.show{ opacity:1; transform: translateY(0); }

.sub-menu-wrap{ position:relative; }


.cart-badge{
  display:none;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding: 0 5px;
  margin-inline-start: 6px;
  border-radius: 999px;
  background: var(--pomegranate);
  color:#fff;
  font-size: 11px;
  font-weight:700;
  line-height:1;
}

.plans{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width:560px){ .plans{ grid-template-columns: 1fr; } }
.plan-card{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  min-width: 0; /* اجازه می‌ده کارت داخل گرید جمع بشه و باعث بیرون‌زدگی از صفحه نشه */
  box-sizing: border-box;
}
.plan-card .btn-outline,
.plan-card .btn-ghost{
  white-space: normal; /* متن دکمه در صورت نیاز به خط بعد بشکنه، به‌جای اینکه کارت رو عریض کنه */
  line-height: 1.4;
  height: auto;
  min-height: 40px;
  padding: 8px 12px;
}
.plan-card.active{ border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(18,166,160,0.10); }
.plan-name{ font-weight:700; font-size:15px; margin-bottom:4px; overflow-wrap:break-word; }
.plan-price{ font-size: 22px; font-weight:700; color: var(--navy); margin-bottom: 12px; }
.plan-price small{ font-size:12px; color: var(--ink-soft); font-weight:500; }
.plan-card ul{ margin:0 0 16px; padding-inline-start: 18px; font-size:13px; color: var(--ink-soft); line-height:1.9; }

footer{
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 14px 28px;
  font-size: 13px;
  color: var(--ink-soft);
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 10px;
}
footer .fright, footer .fleft{ display:flex; gap: 20px; flex-wrap:wrap; }
footer a:hover{ text-decoration:underline; color:var(--ink); }

/* ---------- تیکتینگ پشتیبانی ---------- */
.ticket-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px; border:1px solid var(--line); border-radius:12px;
  cursor:pointer; background:#fff; margin-bottom:10px;
}
.ticket-row:hover{ border-color: var(--turquoise); }
.ticket-row .ticket-main{ min-width:0; }
.ticket-row .ticket-subject{ font-weight:700; font-size:14px; display:flex; align-items:center; gap:8px; }
.ticket-row .ticket-meta{ font-size:12px; color: var(--ink-soft); margin-top:4px; }
.ticket-row .ticket-biz{ font-size:12.5px; color: var(--ink-soft); margin-top:2px; }
.unread-dot{
  width:8px; height:8px; border-radius:50%; background: var(--pomegranate); flex:none;
}
.badge.answered{ background: rgba(44,58,99,0.10); color: var(--navy); }
.badge.open{ background: rgba(226,166,58,0.15); color:#a4741f; }
.badge.closed{ background: var(--panel); color: var(--ink-soft); }

.ticket-row-end{ display:flex; align-items:center; gap:8px; flex:none; }
.ticket-delete-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; flex:none; border-radius:10px;
  background: rgba(192,72,63,0.10); color: var(--pomegranate);
  border: 1px solid rgba(192,72,63,0.42); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
  cursor:pointer; transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.ticket-delete-btn:hover{ background: rgba(192,72,63,0.18); border-color: var(--pomegranate); }
.ticket-delete-btn:active{ transform: scale(0.94); }
.ticket-delete-btn svg{ width:16px; height:16px; }

.ticket-thread{
  display:flex; flex-direction:column; gap:12px;
  max-height:50vh; overflow-y:auto; overflow-x:hidden; padding:4px 2px; margin-bottom:14px;
}
/* سقف مطلق برای هر عکسی داخل بدنه‌ی گفتگوی تیکت، صرفاً به‌عنوان یک لایه‌ی
   اطمینان اضافه بر قانون دقیق‌تر .tmsg-file img؛ تحت هیچ شرایطی عکس نباید
   از عرض حباب یا صفحه‌ی موبایل بیرون بزند. */
.ticket-thread img{ max-width:100%; height:auto; }
.tmsg{
  max-width:78%; padding:10px 14px; border-radius:14px; font-size:13.5px; line-height:1.8;
  word-wrap:break-word;
  box-sizing:border-box;
}
.tmsg-owner{
  align-self:flex-start; background: var(--panel); color: var(--ink); border-bottom-left-radius:4px;
}
.tmsg-admin{
  align-self:flex-end; background: var(--turquoise); color:#fff; border-bottom-right-radius:4px;
}
.tmsg-admin .tmsg-time{ color: rgba(255,255,255,0.75); }
.tmsg-time{ font-size:11px; color: var(--ink-soft); margin-top:6px; }
.tmsg-file{
  display:inline-flex; align-items:center; gap:6px; margin-top:8px;
  max-width:100%;
  padding:6px 10px; border-radius:8px; background: rgba(0,0,0,0.06);
  font-size:12.5px; text-decoration:none; color:inherit;
  box-sizing:border-box;
}
.tmsg-admin .tmsg-file{ background: rgba(255,255,255,0.18); }
/* نکته: چون tmsg-file یه inline-flex بدون عرض مشخصه، max-width درصدی روی img
   عملاً بی‌اثر می‌مونه و عکس با اندازه‌ی واقعی (احتمالاً خیلی بزرگ) نمایش داده
   می‌شه. به‌جاش از یه سقف ثابت به پیکسل استفاده می‌کنیم که روی همه‌ی صفحه‌ها درست کار کنه. */
.tmsg-file img{ max-width:220px; max-height:220px; width:auto; height:auto; border-radius:8px; display:block; margin-top:8px; object-fit:cover; }

.ticket-reply-row{ display:flex; gap:8px; align-items:flex-end; }
.ticket-reply-row textarea{
  flex:1; min-height:44px; max-height:120px; resize:vertical;
  padding:10px 14px; border-radius:12px; border:1px solid var(--line);
  font-family:'Vazirmatn',sans-serif; font-size:16px;
}
.attach-btn{
  width:44px; height:44px; border-radius:12px; border:1px solid rgba(28,35,51,0.16);
  background: rgba(28,35,51,0.055);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 2px 8px rgba(28,35,51,0.06), inset 0 1px 0 rgba(255,255,255,0.6);
  cursor:pointer; font-size:18px; flex:none; color: var(--ink-soft);
}
.attach-btn:hover{ border-color: var(--turquoise); color: var(--turquoise); background: rgba(18,166,160,0.10); }
.attach-chip{
  display:none; align-items:center; gap:8px; font-size:12px; color: var(--ink-soft);
  margin-top:8px; background: var(--panel); padding:6px 10px; border-radius:8px;
}
.attach-chip.show{ display:inline-flex; }
.attach-chip .remove-attach{ cursor:pointer; color: var(--pomegranate); font-weight:700; }

/* ==========================================================================
   ریسپانسیو موبایل — پنل کاربر و پنل ادمین (و بقیه‌ی صفحات مشترک)
   هدف: دکمه‌ها هم‌اندازه و یکدست، مودال‌ها جمع‌وجور، جدول/فیلترها مرتب،
   و حباب‌های چت تیکت با اندازه‌ی درست.
   ========================================================================== */
@media (max-width: 720px){
  .page{ padding: 20px 14px 60px; }
  .page.wide, .page.narrow{ max-width: 100%; }

  .topbar{
    padding: 12px 14px;
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .topbar .right{ gap:12px; }
  .topbar .left{ gap:8px; flex-wrap:wrap; }
  .corner-brand{ font-size:14px; }

  .card{ padding: 18px; border-radius: 12px; }
  .card + .card{ margin-top: 14px; }

  h1.page-title{ font-size:20px; }
  p.page-sub{ font-size:13px; margin-bottom:20px; }
  .section-title{ font-size:14px; }

  /* دکمه‌ها: پدینگ، سایز فونت و گردی گوشه یکسان روی همه‌ی انواع دکمه */
  .btn-ghost, .btn-solid, .btn-outline, .btn-danger{
    height: 38px;
    padding: 0 16px;
    font-size: 13.5px;
    border-radius: 10px;
  }
  .row-actions{ gap:6px; }
  .row-actions .btn-outline,
  .row-actions .btn-danger,
  .row-actions .btn-ghost{
    height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .form-footer{ flex-direction:column; align-items:stretch; }
  .form-footer .btn-solid,
  .form-footer .btn-outline{ width:100%; text-align:center; }

  /* فیلترها و جستجو */
  .filter-row{ gap:6px; }
  .filter-row button{ height:32px; padding:0 12px; font-size:12.5px; border-radius:16px; }
  .admin-search{ width:100%; flex:1 1 100%; margin-right:0; margin-top:4px; }

  /* جلوگیری از زوم خودکار سافاری روی موبایل هنگام فوکوس روی فیلدها
     (وقتی فونت ورودی کمتر از ۱۶px باشه، آیفون خودکار زوم می‌کنه) */
  .field input,
  .field select,
  .field textarea,
  .repeater-row input,
  .admin-search,
  .ticket-reply-row textarea,
  .plan-select{
    font-size: 16px;
  }

  /* جدول‌ها روی موبایل: به‌جای اسکرول افقیِ نامرتب، هر ردیف یک کارت جمع‌وجور می‌شه */
  .card:has(> table.data-table),
  .card > div > table.data-table{ overflow:visible; }
  table.data-table{ font-size:13px; }
  table.data-table thead{ display:none; }
  table.data-table, table.data-table tbody, table.data-table tr, table.data-table td{
    display:block;
    width:100%;
  }
  table.data-table tr{
    background:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    padding:4px 14px;
    margin-bottom:10px;
  }
  table.data-table td{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:9px 0;
    border-bottom:1px dashed var(--line);
    white-space:normal;
    text-align:left;
  }
  table.data-table td:last-child{ border-bottom:none; }
  table.data-table td[data-label]::before{
    content: attr(data-label);
    flex:none;
    font-size:12px;
    font-weight:600;
    color: var(--ink-soft);
  }
  table.data-table td:has(.row-actions){
    display:block;
    padding-top:12px;
  }
  table.data-table td:has(.row-actions)::before{ content:none; }
  table.data-table td:has(.row-actions) .row-actions{ justify-content:flex-end; }
  table.data-table td:has(.plan-select){
    display:block;
  }
  table.data-table td:has(.plan-select)::before{
    display:block;
    margin-bottom:6px;
  }
  table.data-table td:has(.empty-state){ display:block; text-align:center; }
  .plan-select{ max-width:100%; width:100%; }
  .banner-upload-row{ flex-direction:column; align-items:stretch; }
  .banner-upload-row .field{ min-width:0; }
  .banner-grid{ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap:10px; }
  .banner-item img{ height:90px; }

  /* مودال‌ها: به شکل شیت پایین صفحه، جمع‌وجور و بدون فضای اضافه */
  .modal-overlay{ padding:0; align-items:flex-end; }
  .modal-box{
    max-width:100%;
    width:100%;
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
    padding: 22px 16px 26px;
  }
  .modal-title{ font-size:16.5px; }

  /* مودال‌هایی که باید وسط صفحه باز شوند (نه به‌شکل شیت پایین) */
  .modal-overlay.modal-center{ padding:20px; align-items:center; }
  .modal-overlay.modal-center .modal-box{
    max-width: 520px;
    border-radius: 16px;
    max-height: 86vh;
    padding: 28px;
  }
  .modal-overlay.modal-center .modal-title{ font-size:18px; }

  /* پشتیبانی / تیکت‌ها */
  .ticket-row{ padding:12px 14px; }
  .ticket-row .ticket-subject{ font-size:13.5px; }
  .ticket-thread{ max-height: 44vh; gap:10px; }
  .tmsg{ max-width:88%; font-size:13px; padding:9px 12px; }
  .tmsg-file img{ max-width:170px; max-height:170px; }

  .ticket-reply-row{ gap:6px; }
  .ticket-reply-row textarea{ min-height:40px; font-size:16px; padding:9px 12px; }
  .attach-btn{ width:40px; height:40px; font-size:16px; border-radius:10px; }
}

@media (max-width: 420px){
  .topbar .left{ gap:6px; }
  .btn-ghost, .btn-solid, .btn-outline, .btn-danger{
    padding: 8px 11px;
    font-size: 12.5px;
  }
  .corner-brand{ font-size:13px; }
  h1.page-title{ font-size:18px; }
  .tmsg{ max-width:92%; }
  .tmsg-file img{ max-width:150px; max-height:150px; }
}
