/* ============================================
   منظومه — سبک‌های «منظومه‌ی من» و فهرست سیستم‌ها
   ============================================ */

/* ---------- دروازه (ورود/عضویت) ---------- */
.gate-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 18px 60px;
}
.gate-grid {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 26px;
  align-items: start;
}
@media (max-width: 860px) { .gate-grid { grid-template-columns: 1fr; } }

.gate-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.gtab {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #223156;
  background: #0c1428;
  color: #8ea2cc;
  font: 600 14px Vazirmatn, sans-serif;
  cursor: pointer;
  transition: all .15s;
}
.gtab.on {
  background: linear-gradient(140deg, #12203f, #0e1830);
  color: #7dd3fc;
  border-color: #7dd3fc66;
  box-shadow: 0 0 18px #7dd3fc22 inset;
}
.gate-card { max-width: none; width: 100%; }

/* ---------- فهرست منظومه‌ها ---------- */
.dir-h { color: #e8f2ff; font-size: 20px; margin: 2px 0 6px; }
.dir-p { margin: 0 0 14px; font-size: 13px; }
.dir-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
  padding-inline-end: 4px;
}
.dir-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #223156;
  background: linear-gradient(140deg, #101a33cc, #0a1122cc);
  text-decoration: none;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.dir-chip:hover {
  transform: translateY(-2px);
  border-color: #7dd3fc88;
  box-shadow: 0 8px 26px rgba(125, 211, 252, .12);
}
.dir-chip.main { border-color: #fbbf2466; }
.dir-chip b { color: #e8f2ff; font-size: 14.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-chip .c {
  color: #7dd3fc;
  font-size: 12px;
  background: #12203f;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.dir-chip.main .c { color: #fbbf24; background: #2a1f0d; }
.dir-chip small { color: #62739b; font-size: 11.5px; direction: ltr; unicode-bidi: embed; flex: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- نوار عنوان منظومه ---------- */
.sys-title-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
  background: #0c1428;
  border: 1px solid #223156;
  border-radius: 12px;
  padding: 10px 16px;
  max-width: 560px;
}
.sys-title-field span { color: #8ea2cc; font-size: 13px; white-space: nowrap; }
.sys-title-field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #e8f2ff;
  font: 600 15px Vazirmatn, sans-serif;
}
.count-badge {
  font: 400 12px Vazirmatn, sans-serif;
  color: #62739b;
  background: #12203f;
  border-radius: 999px;
  padding: 2px 10px;
}

/* ---------- انتخاب مدل سیاره ---------- */
.skin-row { align-items: center; }
.skin-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.skin-thumb {
  width: 92px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #223156;
  background: radial-gradient(circle at 50% 42%, #1a2a4e, #0a1122);
}
.skin-name { min-width: 120px; }

/* ==== v1.6: بازیابی، ایمیل، حذف حساب ==== */
.linklike {
  background: none; border: none;
  color: #7dd3fc; font: 400 12.5px Vazirmatn, sans-serif;
  cursor: pointer; padding: 6px;
  text-decoration: none;
  align-self: center;
}
.linklike:hover { text-decoration: underline; }
.okmsg { color: #4ade80; font-size: 13px; margin: 2px 0 6px; }
.btn.danger {
  background: linear-gradient(140deg, #4a1420, #241016);
  border-color: #7f1d1d;
  color: #fca5a5;
}
.btn.danger:hover { border-color: #ef4444; box-shadow: 0 6px 20px rgba(239, 68, 68, .18); }

.sys-fields {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin: 4px 0 18px;
}
.sys-fields .sys-title-field { margin: 0; flex: 1; min-width: 240px; }

.danger-zone {
  margin-top: 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px;
  border: 1px dashed #7f1d1d88;
  border-radius: 14px;
  background: rgba(36, 16, 22, .35);
  flex-wrap: wrap;
}
.danger-zone h3 { margin: 0 0 4px; color: #fca5a5; font-size: 15px; }
.danger-zone p { margin: 0; font-size: 12.5px; }


/* ==== v1.8: ریسپانسیو پنل کاربر ==== */
@media (max-width: 680px) {
  .admin-top { padding: 12px 14px; flex-wrap: wrap; gap: 10px; }
  .topnav { width: 100%; flex-wrap: wrap; gap: 6px; }
  .topnav .btn { font-size: 11.5px; padding: 7px 10px; }
  .gate-wrap { padding: 16px 12px 40px; }
  .gate-grid { grid-template-columns: 1fr; gap: 16px; }
  .wrap { padding-inline: 10px; }
  .panel-bar { flex-direction: column; gap: 10px; }
  .bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .bar-actions .btn { font-size: 12px; }
  .sys-fields { flex-direction: column; align-items: stretch; }
  .sys-fields .sys-title-field { min-width: 0; }
  .cards { grid-template-columns: 1fr; }
  .row3, .row2 { display: block; }
  .row3 > label, .row2 > label { display: block; margin-bottom: 10px; }
  .row2 > .skin-wrap { margin-bottom: 10px; }
  .danger-zone { flex-direction: column; align-items: stretch; gap: 12px; }
}


/* ==== v1.8.1: ضد-بیرون‌زدگی موبایل ==== */
@media (max-width: 680px) {
  /* ۱۶px = بدون زوم ناگهانی آیفون هنگام تایپ */
  input[type="text"], input[type="password"], input[type="email"], input[type="number"], textarea { font-size: 16px !important; }
  .gtab { font-size: 12.5px; padding: 9px 6px; }
  .dir-list { max-height: 56vh; }
  .skin-thumb { width: 72px; height: 40px; }
  .card { padding: 14px; }
  .login-card { padding: 26px 18px; }
  .sys-title-field { padding: 9px 12px; max-width: 100%; }
}

@media (max-width: 380px) {
  .gate-wrap { padding-inline: 8px; }
  .admin-top { padding: 10px 8px; }
  .wrap { padding-inline: 6px; }
}
