/* ==================================================================
   css/auth.css — استایل‌های صفحات احراز هویت (login/register)،
   پروفایل کاربر (profile.php) و پنل مدیریت (admin/)
   تم و توکن‌ها عیناً همان پروژه: زمینه #050806 ، زمردی #14f195 ،
   طلایی #e7c873 ، کارت #0c1a14 (تعریف در css/base.css)
   کلاس‌ها namespaced هستند (qa-* / prof-* / adm-*) تا با استایل‌های
   scoped موجود (qb-site و…) هیچ تداخلی نداشته باشند.
   ================================================================== */

/* ------------------ مشترک: چیدمان صفحه‌ی مستقل ------------------ */
.qa-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(20, 241, 149, 0.07), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(231, 200, 115, 0.05), transparent 55%),
    #050806;
}
.qa-page > .qa-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 28px;
}
.qa-page > .qa-foot {
  margin-top: auto;
}

/* ------------------ کارت لاگین/ثبت‌نام ------------------ */
.qa-card {
  width: min(430px, 100%);
  background: linear-gradient(170deg, rgba(12, 26, 20, 0.97), rgba(8, 18, 12, 0.98));
  border: 1px solid rgba(20, 241, 149, 0.16);
  border-radius: 20px;
  padding: 30px 26px 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}
.qa-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.qa-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  flex: none;
  background: linear-gradient(145deg, #14f195, #063a26 75%);
  box-shadow: 0 0 0 1px rgba(20, 241, 149, 0.35), 0 8px 22px rgba(20, 241, 149, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 19px;
  color: #031a11;
}
.qa-brand-name {
  font-weight: 900;
  font-size: 17px;
  color: #eafff3;
}
.qa-brand-sub {
  font-size: 11.5px;
  color: var(--gold, #e7c873);
  font-weight: 700;
  margin-top: 2px;
}
.qa-title {
  font-size: 21px;
  font-weight: 900;
  color: #eafff3;
  margin: 2px 0 6px;
}
.qa-sub {
  font-size: 12.5px;
  color: var(--muted-foreground, #9ecdb3);
  line-height: 2;
  margin-bottom: 18px;
}
.qa-field {
  margin-bottom: 14px;
}
.qa-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #cdeeda;
  margin-bottom: 7px;
}
.qa-input {
  width: 100%;
  background: rgba(5, 10, 7, 0.75);
  border: 1px solid rgba(20, 241, 149, 0.18);
  border-radius: 12px;
  color: #eafff3;
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px; /* لمس‌پذیر */
}
.qa-input::placeholder {
  color: var(--text-faint, #5d8571);
}
.qa-input:focus {
  border-color: rgba(20, 241, 149, 0.55);
  box-shadow: 0 0 0 3px rgba(20, 241, 149, 0.12);
}
.qa-input[dir="ltr"] {
  text-align: left;
}
.qa-btn {
  width: 100%;
  margin-top: 6px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(150deg, #17f79e, #0dbd76);
  color: #031a11;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 900;
  padding: 13px 16px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
  box-shadow: 0 10px 28px rgba(20, 241, 149, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  min-height: 44px;
}
.qa-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(20, 241, 149, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}
.qa-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.qa-error {
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
  color: #ff9c9c;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.9;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.qa-hint {
  font-size: 10.5px;
  color: var(--text-faint, #5d8571);
  line-height: 1.9;
  margin-top: 6px;
}
.qa-alt {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(20, 241, 149, 0.18);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-foreground, #9ecdb3);
}
.qa-alt a,
.qa-sub a {
  color: var(--emerald-glow, #39ffb0);
  font-weight: 800;
  text-decoration: none;
}
.qa-alt a:hover,
.qa-sub a:hover {
  text-decoration: underline;
}
.qa-back {
  margin-top: 14px;
  text-align: center;
  font-size: 11.5px;
}
.qa-back a {
  color: var(--text-faint, #5d8571);
  text-decoration: none;
  font-weight: 700;
}
.qa-back a:hover {
  color: #cdeeda;
}

/* پیام موفقیت (مثلاً ساخت ادمین اول) */
.qa-ok {
  border: 1px solid rgba(20, 241, 149, 0.35);
  background: rgba(20, 241, 149, 0.08);
  color: var(--emerald-glow, #39ffb0);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.9;
  padding: 10px 14px;
  margin-bottom: 14px;
}

/* ------------------ پروفایل کاربر (profile.php) ------------------ */
.qa-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 26px 16px 40px;
  width: 100%;
}
.prof-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.prof-avatar {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  flex: none;
  background: linear-gradient(145deg, #14f195, #063a26 75%);
  box-shadow: 0 0 0 1px rgba(20, 241, 149, 0.35), 0 8px 22px rgba(20, 241, 149, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 25px;
  color: #031a11;
}
.prof-head-info {
  flex: 1;
  min-width: 220px;
}
.prof-name {
  font-size: 20px;
  font-weight: 900;
  color: #eafff3;
}
.prof-email {
  direction: ltr;
  text-align: right;
  display: block;
  font-size: 12.5px;
  color: var(--muted-foreground, #9ecdb3);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.prof-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.prof-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(20, 241, 149, 0.3);
  background: rgba(20, 241, 149, 0.1);
  color: var(--emerald-glow, #39ffb0);
}
.prof-badge.gold {
  border-color: rgba(231, 200, 115, 0.3);
  background: rgba(231, 200, 115, 0.08);
  color: var(--gold, #e7c873);
}
.prof-badge.off {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-faint, #5d8571);
}
.prof-acts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.prof-btn {
  border: 1px solid rgba(20, 241, 149, 0.25);
  background: rgba(20, 241, 149, 0.07);
  color: var(--emerald-glow, #39ffb0);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  min-height: 38px;
}
.prof-btn:hover {
  background: rgba(20, 241, 149, 0.14);
  border-color: rgba(20, 241, 149, 0.4);
}
.prof-btn.gold {
  border-color: rgba(231, 200, 115, 0.28);
  background: rgba(231, 200, 115, 0.07);
  color: var(--gold, #e7c873);
}
.prof-btn.gold:hover {
  background: rgba(231, 200, 115, 0.14);
}
.prof-btn.danger {
  border-color: rgba(255, 107, 107, 0.28);
  background: rgba(255, 107, 107, 0.05);
  color: #ff6b6b;
}
.prof-btn.danger:hover {
  background: rgba(255, 107, 107, 0.12);
}

.prof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.prof-stat {
  border: 1px solid rgba(20, 241, 149, 0.14);
  border-radius: 15px;
  background: rgba(12, 26, 20, 0.6);
  padding: 14px 16px;
}
.prof-stat .k {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-faint, #5d8571);
  margin-bottom: 6px;
}
.prof-stat .v {
  font-size: 17px;
  font-weight: 900;
  color: #eafff3;
}
.prof-stat .v small {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-foreground, #9ecdb3);
}

.prof-sec {
  border: 1px solid rgba(20, 241, 149, 0.13);
  border-radius: 17px;
  background: linear-gradient(165deg, rgba(12, 26, 20, 0.75), rgba(8, 18, 12, 0.65));
  padding: 18px 18px 14px;
  margin-bottom: 18px;
}
.prof-sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.prof-sec-title {
  font-size: 15px;
  font-weight: 900;
  color: #eafff3;
  flex: 1;
}
.prof-sec-count {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(20, 241, 149, 0.12);
  border: 1px solid rgba(20, 241, 149, 0.3);
  color: var(--emerald-glow, #39ffb0);
}
.prof-sec-link {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--emerald-glow, #39ffb0);
  text-decoration: none;
}
.prof-sec-link:hover {
  text-decoration: underline;
}
.prof-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 560px;
}
.prof-table th {
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-faint, #5d8571);
  padding: 8px 10px;
  border-bottom: 1px solid rgba(20, 241, 149, 0.14);
  white-space: nowrap;
}
.prof-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(20, 241, 149, 0.07);
  color: var(--muted-foreground, #9ecdb3);
  vertical-align: top;
}
.prof-table tr:last-child td {
  border-bottom: none;
}
.prof-table td b {
  color: #eafff3;
  font-weight: 700;
}
.prof-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.prof-pill.safe {
  color: var(--emerald-glow, #39ffb0);
  border-color: rgba(20, 241, 149, 0.35);
  background: rgba(20, 241, 149, 0.09);
}
.prof-pill.mid {
  color: var(--gold, #e7c873);
  border-color: rgba(231, 200, 115, 0.32);
  background: rgba(231, 200, 115, 0.07);
}
.prof-pill.reach {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.07);
}
.prof-empty {
  border: 1px dashed rgba(20, 241, 149, 0.22);
  background: rgba(20, 241, 149, 0.035);
  border-radius: 13px;
  color: var(--muted-foreground, #9ecdb3);
  font-size: 12px;
  line-height: 2;
  padding: 16px 18px;
  text-align: center;
}
.prof-empty a {
  color: var(--emerald-glow, #39ffb0);
  font-weight: 800;
  text-decoration: none;
}
.prof-empty a:hover {
  text-decoration: underline;
}
.prof-pag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.prof-pag a,
.prof-pag span {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(20, 241, 149, 0.18);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted-foreground, #9ecdb3);
  text-decoration: none;
  transition: all 0.18s;
}
.prof-pag a:hover {
  border-color: rgba(20, 241, 149, 0.4);
  color: #eafff3;
}
.prof-pag .cur {
  background: rgba(20, 241, 149, 0.12);
  border-color: rgba(20, 241, 149, 0.4);
  color: var(--emerald-glow, #39ffb0);
}
.prof-pag .dis {
  opacity: 0.35;
}
details.prof-raw {
  margin-top: 4px;
}
details.prof-raw summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold, #e7c873);
  user-select: none;
}
details.prof-raw summary:hover {
  text-decoration: underline;
}
details.prof-raw pre {
  direction: ltr;
  text-align: left;
  max-height: 260px;
  overflow: auto;
  font-size: 10.5px;
  line-height: 1.7;
  background: rgba(5, 10, 7, 0.8);
  border: 1px solid rgba(20, 241, 149, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  color: #9ecdb3;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
details.prof-raw pre::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
details.prof-raw pre::-webkit-scrollbar-thumb {
  background: rgba(20, 241, 149, 0.22);
  border-radius: 10px;
}

/* ------------------ پنل مدیریت (admin/) ------------------ */
.adm-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 8, 6, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(20, 241, 149, 0.14);
}
.adm-topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.adm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 15px;
  color: #eafff3;
  text-decoration: none;
}
.adm-brand .qa-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 15px;
}
.adm-brand small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--gold, #e7c873);
}
.adm-subnav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 200px;
}
.adm-subnav a {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted-foreground, #9ecdb3);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.18s;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.adm-subnav a:hover {
  color: #eafff3;
  border-color: rgba(20, 241, 149, 0.25);
}
.adm-subnav a.active {
  color: var(--emerald-glow, #39ffb0);
  background: rgba(20, 241, 149, 0.1);
  border-color: rgba(20, 241, 149, 0.32);
}
.adm-userchip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted-foreground, #9ecdb3);
}
.adm-userchip b {
  color: #eafff3;
}
.adm-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  width: 100%;
  flex: 1;
}
.adm-foot {
  border-top: 1px solid rgba(20, 241, 149, 0.1);
  padding: 14px 16px;
  text-align: center;
  font-size: 10.5px;
  color: var(--text-faint, #5d8571);
  line-height: 1.9;
}
.adm-title {
  font-size: 20px;
  font-weight: 900;
  color: #eafff3;
  margin: 4px 0 4px;
}
.adm-sub {
  font-size: 12px;
  color: var(--muted-foreground, #9ecdb3);
  line-height: 2;
  margin-bottom: 20px;
}

/* کارت‌های آماری داشبورد */
.adm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.adm-card {
  border: 1px solid rgba(20, 241, 149, 0.14);
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(12, 26, 20, 0.8), rgba(8, 18, 12, 0.6));
  padding: 14px 16px;
}
.adm-card .k {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-faint, #5d8571);
  margin-bottom: 7px;
}
.adm-card .v {
  font-size: 22px;
  font-weight: 900;
  color: var(--emerald-glow, #39ffb0);
  font-variant-numeric: tabular-nums;
}
.adm-card .v small {
  font-size: 11px;
  color: var(--muted-foreground, #9ecdb3);
  font-weight: 700;
}
.adm-card.gold .v {
  color: var(--gold, #e7c873);
}

/* بلوک‌های داشبورد (نمودار/جدول‌ها) */
.adm-sec {
  border: 1px solid rgba(20, 241, 149, 0.13);
  border-radius: 17px;
  background: linear-gradient(165deg, rgba(12, 26, 20, 0.75), rgba(8, 18, 12, 0.65));
  padding: 18px;
  margin-bottom: 18px;
}
.adm-sec-title {
  font-size: 14.5px;
  font-weight: 900;
  color: #eafff3;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.adm-sec-title small {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint, #5d8571);
}
.adm-chart-wrap {
  position: relative;
  height: 260px;
}
.adm-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 900px) {
  .adm-cols {
    grid-template-columns: 1fr;
  }
}

/* جدول‌های ادمین */
.adm-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 700px;
}
.adm-table th {
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-faint, #5d8571);
  padding: 9px 10px;
  border-bottom: 1px solid rgba(20, 241, 149, 0.16);
  white-space: nowrap;
}
.adm-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(20, 241, 149, 0.07);
  color: var(--muted-foreground, #9ecdb3);
  vertical-align: middle;
}
.adm-table tr:last-child td {
  border-bottom: none;
}
.adm-table tr:hover td {
  background: rgba(20, 241, 149, 0.03);
}
.adm-table td b {
  color: #eafff3;
  font-weight: 700;
}
.adm-table .ltr {
  direction: ltr;
  text-align: right;
  overflow-wrap: anywhere;
}
.adm-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 241, 149, 0.3);
  background: rgba(20, 241, 149, 0.1);
  color: var(--emerald-glow, #39ffb0);
  white-space: nowrap;
}
.adm-badge.gold {
  border-color: rgba(231, 200, 115, 0.3);
  background: rgba(231, 200, 115, 0.08);
  color: var(--gold, #e7c873);
}
.adm-badge.off {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.07);
  color: #ff6b6b;
}
.adm-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.adm-mini {
  border: 1px solid rgba(20, 241, 149, 0.22);
  background: rgba(20, 241, 149, 0.07);
  color: var(--emerald-glow, #39ffb0);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: all 0.18s;
}
.adm-mini:hover {
  background: rgba(20, 241, 149, 0.14);
}
.adm-mini.gold {
  border-color: rgba(231, 200, 115, 0.28);
  background: rgba(231, 200, 115, 0.07);
  color: var(--gold, #e7c873);
}
.adm-mini.danger {
  border-color: rgba(255, 107, 107, 0.28);
  background: rgba(255, 107, 107, 0.05);
  color: #ff6b6b;
}
.adm-mini.danger:hover {
  background: rgba(255, 107, 107, 0.12);
}

/* فرم جست‌وجوی کاربران */
.adm-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
}
.adm-search .qa-field {
  margin-bottom: 0;
  flex: 1;
  min-width: 170px;
}
.adm-search select.qa-input {
  min-width: 120px;
  appearance: none;
  background-image: none;
  cursor: pointer;
}
.adm-search .qa-btn {
  width: auto;
  min-width: 110px;
  margin-top: 0;
  padding: 11px 22px;
}
.adm-reset {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-foreground, #9ecdb3);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  transition: all 0.18s;
}
.adm-reset:hover {
  color: #eafff3;
  border-color: rgba(20, 241, 149, 0.25);
}

/* صفحه‌بندی ادمین */
.adm-paginfo {
  font-size: 11px;
  color: var(--text-faint, #5d8571);
  margin: 12px 0 0;
  text-align: center;
}

/* فرم‌های داخل جدول (toggle/delete) */
.adm-rowform {
  display: inline;
}
.adm-rowform button {
  font: inherit;
}
