/* =========================================
   استایل مدرن و دارک پلتفرم الکترو هوم
   نسخه بهینه‌شده و دسته‌بندی‌شده - MyElectro 2026
========================================= */

/* =========================================
   ۱. متغیرها، فونت‌ها و استایل‌های پایه (Variables & Base)
========================================= */
:root {
  --gap-size: 10px;
  --row-height: 110px; /* ارتفاع هر ردیف در دسکتاپ */
}

* {
  box-sizing: border-box;
  -ms-overflow-style: none; /* برای مرورگرهای IE و Edge قدیمی */
  scrollbar-width: none; /* برای مرورگر Firefox */
  -webkit-tap-highlight-color: transparent; /* 🔴 حذف هاله آبی هنگام تاچ در موبایل */
}

*::-webkit-scrollbar {
  display: none; /* برای مرورگرهای Chrome، Safari و نسخه های جدید Edge */
}

body {
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  background-attachment: fixed;
  color: #e2e8f0;
  font-family: "Vazirmatn", sans-serif;
  min-height: 100vh;
  margin: 0;
  direction: rtl;
  overflow-x: hidden;

  /* 🔴 غیرفعال کردن انتخاب متن (آبی شدن) در کل سایت */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 🔴 پس‌زمینه تار شونده برای پاپ‌آپ‌ها (مدیریت شده توسط جاوااسکریپت) */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 10, 15, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999; /* زیر پاپ‌آپ‌ها قرار می‌گیرد (پاپ‌آپ‌ها 1000 هستند) */
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  pointer-events: none;
}
body.modal-open::after {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* دریافت کلیک برای بسته شدن پاپ‌آپ */
}

/* 🔴 آزاد کردن قابلیت انتخاب متن فقط برای فیلدهای ورودی و متن‌های خاص (مثل توکن) */
input,
select,
textarea,
.selectable-text {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* 🔴 اعمال فونت استاندارد سایت (وزیرمتن) به تمامی فیلدهای فرم، دکمه‌ها و منوها */
input,
select,
textarea,
button,
option {
  font-family: "Vazirmatn", sans-serif;
}

/* مخفی کردن دکمه‌های بالا و پایین در فیلدهای عددی */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* =========================================
   ۲. پس‌زمینه و المان‌های تزئینی (Background Elements)
========================================= */
/* خط جداکننده لیزری و متحرک */
.sleek-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 30px 0;
  position: relative;
  overflow: hidden;
  border-radius: 5px;
}

.sleek-divider::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100px;
  width: 100px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #38bdf8,
    #818cf8,
    transparent
  );
  animation: laserScan 3s infinite linear;
}

@keyframes laserScan {
  0% {
    left: -100px;
  }
  100% {
    left: 100%;
  }
}

/* =========================================
   ۳. صفحات ورود و ثبت‌نام (Auth Sections)
========================================= */
#login-section,
#register-section,
#dashboard-section,
#admin-section {
  display: none;
}

/* =========================================
   لودینگ اولیه (Initial Loader)
========================================= */
#initial-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  z-index: 999999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.loader-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top-color: #38bdf8;
  border-bottom-color: #fbbf24;
  border-left-color: rgba(56, 189, 248, 0.2);
  border-right-color: rgba(251, 191, 36, 0.2);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 999999;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.bg-logo.center-stage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  z-index: 1000000;
  filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.9));
}

.bg-logo.moving {
  position: fixed;
  z-index: 1000000;
  transition: all 1.2s ease-in-out;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.7));
}

.main-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

@keyframes authCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
    filter: blur(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes authItemFadeIn {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes breathingGlow {
  0% {
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.5),
      0 0 15px rgba(56, 189, 248, 0.05);
    transform: translateY(0);
  }
  50% {
    box-shadow:
      0 25px 60px rgba(0, 0, 0, 0.6),
      0 0 35px rgba(56, 189, 248, 0.2);
    transform: translateY(-4px);
  }
  100% {
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.5),
      0 0 15px rgba(56, 189, 248, 0.05);
    transform: translateY(0);
  }
}

.auth-card {
  background: rgba(20, 25, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px;
  border-radius: 25px;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  backdrop-filter: blur(20px);
  animation:
    authCardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    breathingGlow 6s ease-in-out infinite 0.8s;
}

.auth-card h2 {
  margin-bottom: 25px;
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.auth-card > * {
  opacity: 0;
  animation: authItemFadeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.auth-card > *:nth-child(1) {
  animation-delay: 0.1s;
}
.auth-card > *:nth-child(2) {
  animation-delay: 0.2s;
}
.auth-card > *:nth-child(3) {
  animation-delay: 0.3s;
}
.auth-card > *:nth-child(4) {
  animation-delay: 0.4s;
}
.auth-card > *:nth-child(5) {
  animation-delay: 0.5s;
}
.auth-card > *:nth-child(6) {
  animation-delay: 0.6s;
}

.input-field {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 15, 30, 0.5);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  font-family: "Vazirmatn", sans-serif;
}
.input-field:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  background: rgba(10, 15, 30, 0.8);
}

/* =========================================
   استایل‌های سیستم نمایش رمز عبور
========================================= */
.password-container {
  position: relative;
  width: 100%;
  margin-bottom: 15px; /* انتقال فاصله به کادر بیرونی برای رفع مشکل وسط‌چین نبودن */
}
.password-container .input-field {
  padding-left: 45px; /* باز کردن فضا برای آیکون چشم */
  padding-right: 45px; /* حفظ تقارن متن در وسط */
  margin-bottom: 0; /* حذف فاصله از فیلد داخلی */
}
.password-toggle-icon {
  position: absolute;
  top: 50%;
  right: 15px; /* قرارگیری در سمت راست کادر */
  transform: translateY(-50%);
  color: #94a3b8;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
}
.password-toggle-icon:hover {
  color: #38bdf8;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.3s;
  margin-bottom: 10px;
  box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
  transform: translateY(-3px);
}
.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-secondary {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(165, 180, 252, 0.3);
  border-radius: 12px;
  color: #a5b4fc;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.3s;
}
.btn-secondary:hover {
  border-color: #38bdf8;
  color: #fff;
  background: rgba(56, 189, 248, 0.1);
}

/* =========================================
   ۴. ساختار اصلی داشبورد و هدر (Header & Layout)
========================================= */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background: rgba(9, 10, 15, 0.8);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

#header-username {
  color: #a5b4fc;
  font-weight: bold;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-decoration: none;
  direction: ltr;
  padding: 5px 10px;
}

.bg-logo {
  width: 58px;
  height: auto;
  z-index: 1;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.7));
}

.logo-wrapper .brand-text {
  font-family: "Orbitron", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
  z-index: 1;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.8);
  position: relative;
  display: flex;
}

.letter {
  display: inline-block;
  animation: wave-motion 3.5s ease-in-out infinite;
}

.char-1 {
  animation-delay: 0s;
}
.char-2 {
  animation-delay: 0.1s;
}
.char-3 {
  animation-delay: 0.2s;
}
.char-4 {
  animation-delay: 0.3s;
}
.char-5 {
  animation-delay: 0.4s;
}
.char-6 {
  animation-delay: 0.5s;
}
.char-7 {
  animation-delay: 0.6s;
}
.char-8 {
  animation-delay: 0.7s;
}
.char-9 {
  animation-delay: 0.8s;
}
.char-10 {
  animation-delay: 0.9s;
}
.char-11 {
  animation-delay: 1s;
}

@keyframes wave-motion {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.logout-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fda4af;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  display: none;
}
.logout-btn:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

/* استایل دکمه پشتیبانی در هدر (هماهنگ با دکمه خروج) */
.support-header-btn {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px); /* برطرف کردن خط زرد مربوط به سافاری */
}
.support-header-btn i {
  font-size: 1.1rem;
}
.support-header-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

/* استایل نشانگر وضعیت دستگاه */
.device-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 15px;
  transition: all 0.3s ease;
  font-family: "Vazirmatn", sans-serif;
  letter-spacing: 0;
}
.device-status.checking {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.device-status.online {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}
.device-status.offline {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* =========================================
   ۵. سیستم تب‌ها (Tabs Navigation)
========================================= */
.tabs-header {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 15px;
}
.tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 1.1rem;
  padding: 12px 30px;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}
.tab-btn i {
  margin-left: 8px;
}
.tab-btn.active {
  color: #38bdf8;
  font-weight: bold;
  background: rgba(56, 189, 248, 0.15);
}
.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -17px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #38bdf8;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 -5px 15px rgba(56, 189, 248, 0.5);
}
.account-tabs-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 15px;
  margin: 0 auto 35px auto;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}
.acc-tab-btn {
  background: rgba(20, 25, 40, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 14px 26px;
  cursor: pointer;
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

/* نوار نئونی بالای دکمه‌ها در حالت فعال */
.acc-tab-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* رنگ‌بندی اختصاصی تب‌های حساب کاربری */
.acc-tab-btn.tab-sub.active {
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow:
    0 10px 25px rgba(251, 191, 36, 0.2),
    inset 0 0 20px rgba(251, 191, 36, 0.05);
  transform: translateY(-4px);
}
.acc-tab-btn.tab-sub.active::before {
  background: #fbbf24;
  box-shadow: 0 0 15px #fbbf24;
  opacity: 1;
}
.acc-tab-btn.tab-sec.active {
  background: rgba(244, 63, 94, 0.08);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow:
    0 10px 25px rgba(244, 63, 94, 0.2),
    inset 0 0 20px rgba(244, 63, 94, 0.05);
  transform: translateY(-4px);
}
.acc-tab-btn.tab-sec.active::before {
  background: #f43f5e;
  box-shadow: 0 0 15px #f43f5e;
  opacity: 1;
}
.acc-tab-btn.tab-tok.active {
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow:
    0 10px 25px rgba(16, 185, 129, 0.2),
    inset 0 0 20px rgba(16, 185, 129, 0.05);
  transform: translateY(-4px);
}
.acc-tab-btn.tab-tok.active::before {
  background: #34d399;
  box-shadow: 0 0 15px #34d399;
  opacity: 1;
}
.acc-tab-btn:hover:not(.active) {
  background: rgba(30, 35, 50, 0.8);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.tab-content.active-tab {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.sub-tabs-container {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  overflow-x: auto;
  padding-bottom: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.sub-tabs-container::-webkit-scrollbar {
  display: none;
}

.sub-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 8px 20px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}
.sub-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
  font-weight: bold;
}

#sub-tabs-content-area {
  position: relative;
  min-height: 250px;
}
.sub-tab-content {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  width: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sub-tab-content.active {
  position: relative;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.acc-tab-content {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* =========================================
   ۶. گرید و کارت‌های ویجت‌ها (Widgets & Grid System)
========================================= */
.myelectro-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: var(--row-height);
  gap: var(--gap-size);
  position: relative;
  width: 100%;
}

.builder-mode {
  background-color: rgba(10, 14, 25, 0.8);
  border: 2px dashed rgba(251, 191, 36, 0.5);
  border-radius: 15px;
  padding: var(--gap-size);
  min-height: 450px;
}

.myelectro-cell {
  border: 2px dashed rgba(255, 165, 0, 0.5);
  background-color: rgba(255, 165, 0, 0.05);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition:
    opacity 0.2s,
    background-color 0.2s;
}
.builder-mode.is-dragging .myelectro-cell {
  opacity: 1;
  pointer-events: auto;
}
.myelectro-cell.hover {
  background-color: rgba(255, 165, 0, 0.4);
  border: 2px solid #ff5722;
}

.myelectro-widget {
  position: relative;
  z-index: 2;
  border-radius: 15px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.builder-mode .myelectro-widget {
  touch-action: none;
  cursor: grab;
}
.builder-mode .myelectro-widget:active {
  cursor: grabbing;
}
.myelectro-widget.dragging {
  opacity: 0.9;
  z-index: 1000 !important;
  pointer-events: none;
  border-color: #fbbf24;
  box-shadow: 0 15px 30px rgba(251, 191, 36, 0.4);
}

.widget-content-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  container-type: size;
  container-name: widget;
}

/* دستگیره تغییر سایز */
.resizer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: auto !important;
  width: 26px;
  height: 26px;
  cursor: sw-resize;
  background-color: #fbbf24;
  border-radius: 0 100% 0 15px !important;
  box-shadow: 1px -1px 10px rgba(251, 191, 36, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.2);
  z-index: 20;
  opacity: 0.8;
  transition:
    opacity 0.2s,
    background-color 0.2s;
}
.resizer:hover {
  opacity: 1;
  background-color: #fcd34d;
}

/* =========================================
   استایل‌های ترمینال مانیتور سریال (Debugger)
========================================= */
.debug-terminal-mini {
  width: 100%;
  height: 65%;
  background: #050a15;
  border-radius: 8px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 5px 8px;
  font-family: monospace;
  font-size: max(0.6rem, 8cqmin);
  color: #34d399;
  overflow: hidden;
  text-align: left;
  direction: ltr;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
  line-height: 1.4;
}

.debug-terminal-expanded {
  width: 100%;
  height: 350px;
  background: #020610;
  border-radius: 12px;
  border: 1px solid #34d399;
  padding: 15px;
  font-family: monospace;
  font-size: 0.95rem;
  color: #34d399;
  overflow-y: auto;
  text-align: left;
  direction: ltr;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9);
  line-height: 1.6;
  white-space: pre-wrap;

  /* 🔴 آزاد کردن قابلیت انتخاب و کپی متن فقط در این کادر */
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

.term-prefix {
  color: #fbbf24;
  margin-right: 8px;
  user-select: none;
  font-weight: bold;
}

.debug-terminal-expanded::-webkit-scrollbar {
  width: 6px;
}
.debug-terminal-expanded::-webkit-scrollbar-thumb {
  background: rgba(52, 211, 153, 0.4);
  border-radius: 3px;
}

/* =========================================
   ۷. استایل اختصاصی اجزای ویجت‌ها (Sensors, Relays, Digital)
========================================= */
.widget-inner-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: max(4px, 2cqmin);
  padding: 2px;
}

.widget-title {
  margin: 0 !important;
  padding: 0 !important;
  color: #a5b4fc;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 95%;
  font-size: clamp(0.8rem, 9cqmin, 1.05rem);
  flex-shrink: 0;
  line-height: 1.2;
}

.widget-btn,
.widget-badge {
  margin: 0 auto !important;
  width: 90% !important;
  min-width: unset !important;
  padding: max(6px, 3cqmin) max(8px, 4cqmin) !important;
  font-size: max(0.8rem, 9cqmin) !important;
  border-radius: max(8px, 3cqmin) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 1;
  max-height: 65%;
}

.widget-icon {
  font-size: clamp(1.4rem, 18cqmin, 2.6rem) !important;
  margin: 0 !important;
}

.widget-value {
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 3px !important;
  font-weight: 900;
  font-size: clamp(0.9rem, 14cqmin, 1.8rem) !important;
  margin: 0 !important;
  line-height: 1.2;
  white-space: nowrap !important;
  direction: ltr !important;
  width: 100%;
}
.widget-value span:last-child {
  font-size: clamp(0.65rem, 8cqmin, 1.1rem) !important;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.widget-expand-hint {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 0.6rem;
  color: #64748b;
  white-space: nowrap; /* جلوگیری قطعی از دو خط شدن */
}

.section-title {
  margin-bottom: 25px;
  color: #e2e8f0;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 24px;
  background: linear-gradient(to bottom, #38bdf8, #6366f1);
  border-radius: 6px;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

/* کارت‌های قدیمی سنسور/رله (در صورت استفاده خارج از گرید استودیو) */
.sensors-grid,
.relays-grid {
  display: grid;
  gap: 25px;
}
.sensors-grid {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 45px;
}
.relays-grid {
  grid-template-columns: repeat(2, 1fr);
}

.sensor-card,
.relay-card,
.digital-card {
  background: rgba(20, 25, 40, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  transition: 0.3s;
  backdrop-filter: blur(15px);
}
.sensor-card {
  padding: 35px;
  border-radius: 25px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.sensor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}
.sensor-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}
.sensor-value {
  font-size: 3.2rem;
  font-weight: 900;
  font-family: "Orbitron", sans-serif;
}
.temp-color {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}
.hum-color {
  color: #38bdf8;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.relay-card,
.digital-card {
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.relay-card:hover,
.digital-card:hover {
  background: rgba(30, 35, 50, 0.6);
  border-color: rgba(56, 189, 248, 0.3);
}
.relay-info h4,
.digital-info h4 {
  margin: 0;
  color: #f8fafc;
}
.relay-info h4 {
  font-size: 1.25rem;
}
.digital-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.digital-info h4 {
  font-size: 1.15rem;
}
.digital-icon {
  font-size: 1.6rem;
  color: #a5b4fc;
}

.state-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  min-width: 135px;
}
.btn-off {
  background: rgba(10, 15, 30, 0.8);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-on {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
  transform: scale(1.05);
  border: 1px solid transparent;
}

.status-badge {
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1rem;
  min-width: 110px;
  text-align: center;
  transition: all 0.3s;
  letter-spacing: 0.5px;
}
.status-0 {
  background: rgba(127, 29, 29, 0.9);
  color: #fca5a5;
  border: 1px solid #991b1b;
  box-shadow: 0 0 15px rgba(127, 29, 29, 0.4);
}
.status-1 {
  background: rgba(20, 83, 45, 0.9);
  color: #86efac;
  border: 1px solid #166534;
  box-shadow: 0 0 15px rgba(20, 83, 45, 0.4);
}

/* =========================================
   استایل کلیدهای کشویی خروجی‌ها (Relay Switches)
========================================= */
.modern-relay-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
  margin-top: 5px;
  transition:
    width 0.3s ease,
    height 0.3s ease; /* انیمیشن نرم برای تغییر جهت کشویی */
}

/* مخفی کردن چک‌باکس زشتِ پیش‌فرض مرورگر */
.modern-relay-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

/* پس‌زمینه کلید (حالت خاموش) */
.relay-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 15, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 34px;
  transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* انیمیشن فنری */
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* دکمه‌ی دایره‌ای متحرک */
.relay-slider .knob {
  position: absolute;
  height: 24px;
  width: 24px;
  right: 3px; /* در سایت راست‌چین، خاموش سمت راست است */
  bottom: 3px; /* 🔴 اصلاح شد: توپ دقیقاً در وسط کادر قرار گرفت */
  background-color: #64748b;
  border-radius: 50%;
  transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* =========================================
   حالت کشیده افقی کلیدها (وقتی عرض ۲ و ارتفاع ۱ است)
========================================= */
.myelectro-widget[data-w="2"][data-h="1"] .modern-relay-switch {
  width: 80px; /* کشیده‌تر شدن در حالت افقی */
}
.myelectro-widget[data-w="2"][data-h="1"]
  .modern-relay-switch
  input:checked
  + .relay-slider
  .knob {
  transform: translateX(-48px); /* تنظیم دقیق جابجایی دایره */
}

/* =========================================
   حالت عمودی کلیدها (وقتی عرض ۱ و ارتفاع ۲ است)
========================================= */
.myelectro-widget[data-w="1"][data-h="2"] .modern-relay-switch {
  width: 32px;
  height: 80px; /* کشیده‌تر شدن در حالت عمودی */
}
.myelectro-widget[data-w="1"][data-h="2"]
  .modern-relay-switch
  input:checked
  + .relay-slider
  .knob {
  transform: translateY(-48px); /* تنظیم دقیق جابجایی دایره به سمت بالا */
}

/* =========================================
   استایل‌های داینامیک و حرفه‌ای دکمه RGB بر اساس سایز ویجت
========================================= */
.myelectro-widget .rgb-color-btn {
  background: linear-gradient(
    145deg,
    rgba(15, 20, 30, 0.8),
    rgba(25, 30, 45, 0.9)
  ) !important;
  border: 2px solid rgba(255, 255, 255, 0.05); /* بدون !important برای اعمال رنگ انتخابی با JS */
  border-radius: 16px !important;
  box-shadow:
    inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 5px 15px rgba(0, 0, 0, 0.3); /* بدون !important */
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.3s,
    border-color 0.3s,
    box-shadow 0.3s !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
  overflow: hidden;
  width: 85% !important;
  max-height: 75% !important;
}

.myelectro-widget .rgb-color-btn:hover {
  transform: scale(1.05) translateY(-2px) !important;
  filter: brightness(1.2);
}

.myelectro-widget .rgb-color-btn i {
  font-size: max(1.6rem, 18cqmin) !important;
  z-index: 1;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
  margin: 0 !important;
}

/* =========================================
   حالت کشیده افقی (عرض ۲ - ارتفاع ۱)
========================================= */
.myelectro-widget[data-w="2"][data-h="1"] .rgb-color-btn {
  width: 90% !important;
  height: 60% !important;
  border-radius: 25px !important;
  flex-direction: row !important; /* چینش افقی */
}
.myelectro-widget[data-w="2"][data-h="1"] .rgb-color-btn i {
  font-size: 1.8rem !important;
}

/* =========================================
   حالت کشیده عمودی (عرض ۱ - ارتفاع ۲)
========================================= */
.myelectro-widget[data-w="1"][data-h="2"] .rgb-color-btn {
  width: 70% !important;
  height: 80% !important;
  border-radius: 30px !important;
}
.myelectro-widget[data-w="1"][data-h="2"] .rgb-color-btn i {
  font-size: 2.2rem !important;
}

/* =========================================
   حالت بزرگ و مستر (عرض ۲ - ارتفاع ۲)
========================================= */
.myelectro-widget[data-w="2"][data-h="2"] .rgb-color-btn {
  width: 75% !important;
  height: 70% !important;
  border-radius: 40px !important; /* کپسولی زیبا */
}
.myelectro-widget[data-w="2"][data-h="2"] .rgb-color-btn i {
  font-size: 3.5rem !important;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

/* =========================================
   حالت بزرگ کلیدها (وقتی عرض ۲ و ارتفاع ۲ است)
========================================= */
.myelectro-widget[data-w="2"][data-h="2"] .modern-relay-switch {
  width: 100px;
  height: 52px;
}
.myelectro-widget[data-w="2"][data-h="2"] .relay-slider .knob {
  width: 40px; /* بزرگ‌تر شدن دایره سوئیچ */
  height: 40px; /* بزرگ‌تر شدن دایره سوئیچ */
  right: 5px;
  bottom: 5px;
}
.myelectro-widget[data-w="2"][data-h="2"]
  .modern-relay-switch
  input:checked
  + .relay-slider
  .knob {
  transform: translateX(
    -48px
  ); /* محاسبه دقیق برای رسیدن دایره به انتهای مسیر */
}

/* =========================================
   حالت روشن شدن کلید (سبز رنگ و جابجایی)
========================================= */
.modern-relay-switch input:checked + .relay-slider {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.modern-relay-switch input:checked + .relay-slider .knob {
  transform: translateX(-28px); /* جابجایی دایره به سمت چپ */
  background-color: #ffffff;
}

/* =========================================
   استایل‌های پتانسیومتر (خطی و چرخشی)
========================================= */
.circular-slider-container { display: none; }
.linear-slider-container {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  position: relative;
  min-height: 0;
}

/* مقدار متنی اسلایدر */
.linear-val, .circular-val {
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  color: #fbbf24 !important;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
  font-size: clamp(1.2rem, 14cqmin, 1.6rem) !important;
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.2;
}

/* --- حالت عمودی (پیش‌فرض 1x2) الهام گرفته از افقی --- */
.vertical-slider {
  -webkit-appearance: none;
  appearance: none;
  /* ترفند مدرن برای اعمال استایل‌های افقی روی اسلایدر عمودی */
  writing-mode: vertical-lr;
  direction: rtl; /* باعث می‌شود مقدار صفر در پایین قرار بگیرد */
  width: 14px;
  height: 100%;
  max-height: 100%;
  min-height: 70px;
  background: #050a15; /* پس زمینه تیره و عمیق */
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 20px;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.8), 0 0 10px rgba(251, 191, 36, 0.05);
  transition: all 0.3s ease;
  position: relative;
  touch-action: none; /* جلوگیری از اسکرول صفحه در موبایل هنگام کار با اسلایدر */
}
.vertical-slider:hover {
  border-color: rgba(251, 191, 36, 0.8);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.8), 0 0 15px rgba(251, 191, 36, 0.2);
}
/* دکمه اسلایدر عمودی (Webkit) */
.vertical-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 42px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(90deg, #0f172a 0%, #334155 50%, #0f172a 100%);
  border: 2px solid #fbbf24;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8), 0 0 12px rgba(251, 191, 36, 0.5), inset 0 0 8px rgba(255, 255, 255, 0.2);
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
}
.vertical-slider::-webkit-slider-thumb:hover { transform: scaleX(1.1) scaleY(1.15); border-color: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.8), 0 0 20px rgba(251, 191, 36, 0.8); }
.vertical-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scaleX(1.15) scaleY(1.2); border-color: #fff; }
/* دکمه اسلایدر عمودی (Firefox) */
.vertical-slider::-moz-range-thumb {
  width: 42px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(90deg, #0f172a 0%, #334155 50%, #0f172a 100%);
  border: 2px solid #fbbf24;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8), 0 0 12px rgba(251, 191, 36, 0.5), inset 0 0 8px rgba(255, 255, 255, 0.2);
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
}
.vertical-slider::-moz-range-thumb:hover { transform: scaleX(1.1) scaleY(1.15); border-color: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.8), 0 0 20px rgba(251, 191, 36, 0.8); }
.vertical-slider::-moz-range-thumb:active { cursor: grabbing; transform: scaleX(1.15) scaleY(1.2); border-color: #fff; }

/* =========================================
   حالت افقی اسلایدر خطی (2x1)
========================================= */
.myelectro-widget[data-w="2"][data-h="1"] .linear-slider-container {
  flex-direction: column;
  gap: 12px;
  padding: 0 30px;
}
.myelectro-widget[data-w="2"][data-h="1"] .vertical-slider {
  -webkit-appearance: none;
  appearance: none;
  writing-mode: horizontal-tb; /* بازگشت به حالت افقی */
  direction: ltr;
  width: 100%;
  height: 14px;
  min-height: unset;
}
.myelectro-widget[data-w="2"][data-h="1"] .vertical-slider::-webkit-slider-thumb {
  width: 20px;
  height: 42px;
  background: linear-gradient(0deg, #0f172a 0%, #334155 50%, #0f172a 100%);
}
.myelectro-widget[data-w="2"][data-h="1"] .vertical-slider::-moz-range-thumb {
  width: 20px;
  height: 42px;
  background: linear-gradient(0deg, #0f172a 0%, #334155 50%, #0f172a 100%);
}

/* =========================================
   حالت چرخشی دایره‌ای پتانسیومتر (2x2)
========================================= */
.myelectro-widget[data-w="2"][data-h="2"] .linear-slider-container { display: none; }
.myelectro-widget[data-w="2"][data-h="2"] .circular-slider-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
}
.knob-surround {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.05) 0%, transparent 70%);
  border-radius: 50%;
}
.knob-dial {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #334155, #0a0f1a);
  border: 3px solid #1e293b;
  cursor: pointer;
  z-index: 2;
  box-shadow: 
    0 15px 25px rgba(0,0,0,0.8), 
    inset 0 2px 5px rgba(255,255,255,0.1),
    inset 0 -5px 15px rgba(0,0,0,0.8);
  transform: rotate(-135deg);
  touch-action: none;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.knob-dial:hover {
  border-color: #fbbf24;
  box-shadow: 
    0 15px 30px rgba(0,0,0,0.9), 
    0 0 20px rgba(251, 191, 36, 0.3),
    inset 0 2px 5px rgba(255,255,255,0.3);
}
.knob-pointer {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 18px;
  background: #fbbf24;
  border-radius: 3px;
  box-shadow: 0 0 10px #fbbf24, 0 0 20px #fbbf24;
}
.knob-arc-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
}
.knob-arc-bg {
  stroke: rgba(0, 0, 0, 0.6);
  stroke-width: 10;
  stroke-linecap: round;
  filter: drop-shadow(inset 0 2px 5px rgba(0,0,0,1));
}
.knob-arc-active {
  stroke: #fbbf24;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 188.5;
  stroke-dashoffset: 188.5;
  transition: stroke-dashoffset 0.1s ease-out;
}

/* =========================================
   ج - گرافیک نمایشگرهای سنسور (ساده، حلقه، گیج)
========================================= */

/* ۱. استایل حلقه پیشرفت (Ring) */
.sensor-ring-container {
  position: relative;
  width: 100%;
  flex: 1; /* پر کردن تمام فضای خالی زیر عنوان */
  min-height: 0; /* جلوگیری از باگ‌های فلکس */
  max-height: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
}
.sensor-ring-container svg {
  width: 100%;
  height: 100%;
  max-height: 100%; /* برای مقیاس‌پذیری بی‌نقص در همه سایزها */
  transform: rotate(-90deg);
  overflow: visible;
}
.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 6;
}
.ring-progress {
  fill: none;
  stroke: url(#ring-gradient);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 251.2; /* محیط دایره با شعاع 40 */
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.5));
}
.ring-text {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: flex !important;
  flex-direction: row !important; /* قرارگیری عدد و واحد در یک سطر */
  align-items: baseline !important; /* هم‌ترازی دقیق از پایین متن */
  gap: 2px !important; /* فاصله ریز بین عدد و واحد */
  direction: ltr !important; /* استانداردسازی چپ‌چین برای اعداد */
  justify-content: center !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  width: 80% !important; /* جلوگیری از بیرون زدن متن و برخورد با حلقه */
}
.ring-text.widget-value {
  font-size: max(0.95rem, 16cqmin) !important; /* بزرگ‌تر شدن عدد داخل حلقه */
}
.ring-text.widget-value span:last-child {
  font-size: max(0.65rem, 9cqmin) !important;
}

/* ۲. استایل گیج عقربه‌ای (Gauge / Speedometer) */
.sensor-gauge-container {
  position: relative;
  width: 100%;
  height: 45cqmin; /* کمی ارتفاع را بهینه‌تر کردیم */
  max-height: 90px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: 5px;
  margin-bottom: 25px !important; /* 🔴 جادوی اول: باز کردن فضای خالی در زیر گیج برای قرارگیری متن */
}
.sensor-gauge-container svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 10;
  stroke-linecap: round;
}
.gauge-progress {
  fill: none;
  stroke: url(#gauge-gradient);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 125.6; /* محیط نیم‌دایره */
  stroke-dashoffset: 125.6;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.gauge-needle {
  position: absolute;
  bottom: 8%;
  left: 50%;
  width: 4px;
  height: 65%;
  background: linear-gradient(to top, #fbbf24, #f59e0b);
  border-radius: 4px;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(-90deg); /* از -90 تا +90 */
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
  z-index: 2;
}
.gauge-needle::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.gauge-labels {
  position: absolute;
  bottom: -12px !important; /* مقدار قبلی -5px بود که به -12px تغییر کرد */
  width: 85%;
  display: flex;
  justify-content: space-between;
  font-size: max(0.65rem, 9cqmin);
  color: #94a3b8;
  font-family: "Orbitron", sans-serif;
}
.gauge-text {
  position: absolute;
  bottom: -30px !important; /* 🔴 جادوی دوم: کشیدن متن اصلی به زیرِ عقربه */
  left: 50%;
  transform: translateX(-50%); /* مرکزچین کردن دقیق متن */
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  width: 100%;
  font-family: "Orbitron", sans-serif;
  z-index: 3;
}

/* =========================================
   ۸. استایل‌های اختصاصی ماژول رنگ (RGB Components)
========================================= */
.rgb-card {
  background: rgba(20, 25, 40, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  transition: all 0.3s;
  backdrop-filter: blur(15px);
}
.rgb-card:hover {
  background: rgba(30, 35, 50, 0.6);
  border-color: rgba(165, 180, 252, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.rgb-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}
.rgb-info h4 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.1rem;
}
.rgb-icon {
  font-size: 1.5rem;
  background: -webkit-linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* استایل گرید حساب کاربری در دسکتاپ */
.account-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

/* کلاس کارت‌های حساب کاربری وقتی تکی هستند */
.single-account-card {
  max-width: 850px;
  margin: 0 auto;
  border-radius: 24px !important;
  padding: 35px !important;
  position: relative;
  background: linear-gradient(
    145deg,
    rgba(15, 22, 35, 0.8),
    rgba(8, 12, 20, 0.95)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    inset 0 2px 10px rgba(255, 255, 255, 0.03) !important;
}
/* خطوط تزئینی سخت‌افزاری بالا و پایین کارت */
.single-account-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
}
.single-account-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
}

/* =========================================
   استایل‌های کارت‌های حساب کاربری (اشتراک و امنیت)
========================================= */
.account-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.account-status-box,
.account-security-box {
  margin-bottom: 25px;
  flex-grow: 1; /* پر کردن فضای خالی برای تراز شدن دکمه‌ها در پایین */
  display: flex;
  flex-direction: column;
}
/* استایل اختصاصی فرم‌های بخش امنیت تا جذاب‌تر شوند */
.account-security-box .modern-input {
  background: rgba(5, 10, 15, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}
.account-security-box .modern-input:focus {
  border-color: #f43f5e !important;
  box-shadow:
    0 0 15px rgba(244, 63, 94, 0.2),
    inset 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}
.account-btn-gold {
  background: linear-gradient(135deg, #fbbf24, #d97706) !important;
  color: #0f172a !important;
  border: none !important;
  box-shadow: 0 5px 15px rgba(251, 191, 36, 0.3) !important;
  font-weight: 800 !important;
  margin-top: auto !important; /* هل دادن قطعی دکمه به کف کارت */
}
.account-btn-gold:hover {
  box-shadow: 0 10px 25px rgba(251, 191, 36, 0.5) !important;
  transform: translateY(-3px) !important;
}
.account-btn-red {
  background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 5px 15px rgba(244, 63, 94, 0.3) !important;
  font-weight: 800 !important;
  margin-top: auto !important; /* هل دادن قطعی دکمه به کف کارت */
}
.account-btn-red:hover {
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.5) !important;
  transform: translateY(-3px) !important;
}

/* =========================================
   استایل‌های کارت توکن (API Token Card)
========================================= */
.token-premium-card {
  background: linear-gradient(
    145deg,
    rgba(16, 185, 129, 0.08),
    rgba(5, 46, 22, 0.4)
  );
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 35px;
  border-radius: 24px;
  text-align: center;
  backdrop-filter: blur(15px);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.4),
    inset 0 2px 15px rgba(16, 185, 129, 0.05);
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}
.token-premium-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #34d399, transparent);
}
.token-desc {
  color: #a5b4fc;
  margin-bottom: 25px;
  font-size: 0.95rem;
  line-height: 1.8;
}
.copy-token-btn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3) !important;
  border: 1px solid rgba(52, 211, 153, 0.5) !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* =========================================
   طراحی اختصاصی پنل‌های داخلی تب‌های کاربر (Cyber Panels)
========================================= */
.cyber-token-wrapper {
  background: rgba(5, 10, 15, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  box-shadow: inset 0 0 30px rgba(52, 211, 153, 0.15);
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.cyber-token-wrapper::before,
.cyber-token-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  border-radius: 4px;
}
.cyber-token-wrapper::before {
  right: -3px;
}
.cyber-token-wrapper::after {
  left: -3px;
}

.cyber-token-wrapper .api-key-value {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 1.2rem !important; /* کاهش اندازه فونت برای جلوگیری از بیرون‌زدگی */
  padding: 0 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important; /* تغییر به hidden برای فعال‌سازی ellipsis */
  -ms-overflow-style: none; /* مخفی کردن اسکرول‌بار اضافی */
  scrollbar-width: none;
  text-overflow: ellipsis !important; /* نمایش سه نقطه در صورت طولانی بودن متن */
}
.cyber-token-wrapper .api-key-value::-webkit-scrollbar {
  display: none;
}

.cyber-status-panel {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-right: 4px solid #fbbf24;
  padding: 20px;
  border-radius: 12px;
  margin-top: 10px;
  box-shadow: inset 0 0 20px rgba(251, 191, 36, 0.05);
}

/* =========================================
   هولوگرام متحرک الماس (Premium Badge)
========================================= */
.premium-badge-container {
  position: relative;
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.premium-hologram {
  font-size: 2.2rem;
  color: #fbbf24;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
  animation: floatHologram 4s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
.premium-badge-container::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(251, 191, 36, 0.4);
  border-radius: 50%;
  animation: spinHologram 15s linear infinite;
}
.premium-badge-container::after {
  content: "";
  position: absolute;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.2), transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: floatHologram 4s ease-in-out infinite reverse;
}
@keyframes floatHologram {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
  }
  50% {
    transform: translateY(-5px) scale(1.1);
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 1));
  }
}
@keyframes spinHologram {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cyber-security-panel {
  background: rgba(244, 63, 94, 0.05);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-right: 4px solid #f43f5e;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  position: relative;
}

.cyber-security-panel .modern-input {
  background: rgba(10, 15, 25, 0.8) !important;
  border-color: rgba(244, 63, 94, 0.2) !important;
}
.cyber-security-panel .modern-input:focus {
  border-color: #f43f5e !important;
  box-shadow:
    0 0 15px rgba(244, 63, 94, 0.2),
    inset 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

/* =========================================
   چیدمان افقی و عریض برای تب‌های کاربر
========================================= */
.cyber-row-layout {
  display: flex;
  flex-direction: row;
  gap: 25px;
  align-items: center;
  justify-content: space-between;
}
.cyber-col-info {
  flex: 1.2;
  text-align: right;
  min-width: 0;
}
.cyber-col-action {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.rgb-controls-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  margin-top: 15px;
}

.rgb-switch {
  position: relative;
  display: inline-block;
  width: 65px;
  height: 36px;
  flex-shrink: 0;
}
.rgb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.rgb-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 36px;
}
.rgb-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 3px;
  bottom: 3px;
  background-color: #94a3b8;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}
input:checked + .rgb-slider {
  border-color: transparent;
}
input:checked + .rgb-slider:before {
  transform: translateX(29px);
  background-color: #fff;
}

.rgb-color-btn-wrapper {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-right: 0;
  margin-top: -20px;
  margin-bottom: -20px;
  margin-left: -20px;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rgb-controls-container.is-on .rgb-color-btn-wrapper {
  max-width: 220px;
  opacity: 1;
  margin-right: 0px;
}

.rgb-color-btn {
  background: linear-gradient(
    145deg,
    rgba(20, 25, 40, 0.8),
    rgba(30, 35, 50, 0.9)
  );
  color: #fff;
  border: 2px solid transparent;
  padding: 10px 20px;
  border-radius: 12px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform 0.2s;
  margin: 20px 15px 20px 20px;
}
.rgb-color-btn:hover {
  transform: scale(1.05);
}
.rgb-color-btn i {
  font-size: 1.2rem;
  background: -webkit-linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.IroSlider {
  margin-top: 25px !important;
}

.rgb-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.preset-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.preset-btn:hover {
  transform: scale(1.15);
  border-color: #fff;
}
.preset-btn:active {
  transform: scale(0.95);
}

/* =========================================
   ۹. پنل تنظیمات و استودیو چیدمان (Settings & Admin UI)
========================================= */
.api-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.api-card h3 {
  color: #34d399;
  margin-bottom: 15px;
  font-size: 1.4rem;
}
.token-action-box {
  display: flex;
  gap: 15px;
  align-items: stretch;
  justify-content: center;
}
.api-key-value {
  font-family: "Orbitron", monospace;
  font-size: 1.4rem;
  letter-spacing: 3px;
  color: #34d399;
  background: rgba(5, 30, 20, 0.4);
  padding: 15px 20px;
  border-radius: 15px;
  border: 1px dashed rgba(52, 211, 153, 0.6);
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
  margin: 0;
  flex: 1;
  text-align: center;
  cursor: text;
  display: flex;
  align-items: center;
  justify-content: center;
}
.token-action-box .btn-primary {
  width: auto;
  margin: 0;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.1rem;
}

.admin-table-container {
  background: rgba(20, 25, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 25px;
  overflow-x: auto;
  backdrop-filter: blur(15px);
}
.admin-table-container table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: right;
}
.admin-table-container th,
.admin-table-container td {
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.admin-table-container th {
  color: #fbbf24;
  font-size: 1.1rem;
  font-weight: bold;
}
.admin-table-container td {
  color: #e2e8f0;
}
.admin-table-container tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.badge-free {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #e2e8f0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}
.badge-free:hover {
  background: rgba(255, 255, 255, 0.2);
}
.badge-plus {
  background: rgba(251, 191, 36, 0.2);
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #fbbf24;
  border: 1px solid #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
  cursor: pointer;
  transition: all 0.3s;
}
.badge-plus:hover {
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
}
.btn-details {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-details:hover {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.settings-wrapper {
  background: linear-gradient(
    145deg,
    rgba(15, 20, 35, 0.7),
    rgba(10, 12, 20, 0.9)
  );
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(56, 189, 248, 0.05);
  backdrop-filter: blur(15px);
}
.settings-wrapper-title {
  color: #38bdf8;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid rgba(56, 189, 248, 0.1);
  padding-bottom: 15px;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.modern-row {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}
.modern-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: #38bdf8;
  box-shadow: 0 0 15px #38bdf8;
  opacity: 0;
  transition: opacity 0.3s;
}
.modern-row:hover {
  background: rgba(15, 25, 45, 0.8);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
.modern-row:hover::before {
  opacity: 1;
}

.modern-row-title {
  display: inline-block;
  color: #818cf8;
  margin-bottom: 15px;
  font-size: 1rem;
  font-weight: bold;
  background: rgba(129, 140, 248, 0.1);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(129, 140, 248, 0.2);
}

.modern-inputs-container {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.modern-input {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  margin-bottom: 0 !important;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s !important;
  color: #f8fafc !important;
  border-radius: 12px !important;
  padding: 12px 15px !important;
  font-size: 0.95rem !important;
  font-family: "Vazirmatn", sans-serif !important;
}
.modern-input:focus,
.modern-input:hover {
  background: rgba(15, 25, 45, 0.9) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2) !important;
  outline: none !important;
}

select.modern-input,
select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: left 15px center !important;
  background-size: 16px !important;
  padding-left: 40px !important;
  cursor: pointer;
}
select.modern-input option,
select.input-field option {
  background: #0f172a;
  color: #fff;
  padding: 10px;
}

.settings-color-input {
  width: 35px;
  height: 35px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  background: transparent;
}
.settings-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.settings-color-input::-webkit-color-swatch {
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.settings-nav-scroll {
  overflow-x: hidden;
  margin-bottom: 35px;
  padding-bottom: 10px;
}
.settings-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: transparent;
  padding: 5px;
  border-radius: 0;
  gap: 15px;
  border: none;
  width: 100%;
}
.set-nav-btn {
  background: linear-gradient(
    145deg,
    rgba(20, 25, 40, 0.7),
    rgba(10, 15, 25, 0.9)
  );
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px 5px;
  border-radius: 20px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 10px;
  box-shadow:
    0 5px 15px rgba(0, 0, 0, 0.3),
    inset 0 2px 5px rgba(255, 255, 255, 0.02);
  position: relative;
}
.set-nav-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: #38bdf8;
  box-shadow: 0 0 15px #38bdf8;
  transition: width 0.3s ease;
  border-radius: 0 0 5px 5px;
}
.set-nav-btn i {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.set-nav-btn span {
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: color 0.3s;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
  line-height: 1.3;
}
.set-nav-btn:hover {
  background: linear-gradient(
    145deg,
    rgba(30, 35, 55, 0.8),
    rgba(15, 20, 35, 0.9)
  );
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.2);
}
.set-nav-btn:hover i {
  color: rgba(56, 189, 248, 0.5);
  transform: scale(1.1);
}
.set-nav-btn.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow:
    0 10px 25px rgba(56, 189, 248, 0.15),
    inset 0 0 20px rgba(56, 189, 248, 0.05);
  color: #fff;
  transform: translateY(-5px);
}
.set-nav-btn.active::before {
  width: 60%;
}
.set-nav-btn.active i {
  color: #38bdf8;
  transform: scale(1.2);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.8));
}
.set-nav-btn.active span {
  color: #38bdf8;
}
.set-nav-btn.builder-btn {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px dashed rgba(251, 191, 36, 0.3);
}
.set-nav-btn.builder-btn::before {
  background: #fbbf24;
  box-shadow: 0 0 15px #fbbf24;
}
.set-nav-btn.builder-btn:hover {
  border-color: rgba(251, 191, 36, 0.4);
}
.set-nav-btn.builder-btn:hover i {
  color: rgba(251, 191, 36, 0.5);
}
.set-nav-btn.builder-btn.active {
  background: rgba(251, 191, 36, 0.1);
  border-color: #fbbf24;
  border-style: solid;
  box-shadow:
    0 10px 25px rgba(251, 191, 36, 0.15),
    inset 0 0 20px rgba(251, 191, 36, 0.05);
}
.set-nav-btn.builder-btn.active i {
  color: #fbbf24;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.8));
}
.set-nav-btn.builder-btn.active span {
  color: #fbbf24;
}
.set-page {
  animation: fadeIn 0.4s;
}

.builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 15px;
  border-radius: 15px;
  margin-bottom: 15px;
}
.canvas-area {
  background-color: rgba(10, 14, 25, 0.8);
  border-radius: 15px;
  border: 2px dashed rgba(251, 191, 36, 0.5);
  padding: 10px;
  min-height: 400px;
}

/* =========================================
   ۱۰. پاپ‌آپ‌ها، مودال‌ها و توست‌ها (Modals & Notifications)
========================================= */
.premium-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: linear-gradient(
    135deg,
    rgba(20, 25, 40, 0.9),
    rgba(10, 15, 25, 0.9)
  );
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  width: 90%;
  max-width: 380px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.premium-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(56, 189, 248, 0.2),
    transparent 70%
  );
  filter: blur(20px);
  z-index: 1;
}

.modal-content {
  position: relative;
  z-index: 10;
  padding: 30px 25px 25px;
  color: #fff;
  text-align: right;
  font-family: "Vazirmatn", sans-serif;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.modal-main-icon {
  font-size: 2.2rem;
  color: #fbbf24;
  vertical-align: middle;
  margin-left: 10px;
}
.close-modal-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
}
.close-modal-btn:hover {
  color: #fff;
  transform: rotate(90deg);
}

.modal-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 8px 15px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.3s;
  flex: 1;
}
.modal-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: bold;
}

.modal-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 15px 0 30px 0 !important;
}

#global-color-picker {
  display: flex; /* 🔴 !important حذف شد تا جاوا اسکریپت بتواند آن را مخفی کند */
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  text-align: center !important;
}

.IroColorPicker {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

.iro__wheel {
  border: 2px solid rgba(255, 255, 255, 0.05) !important;
}
.iro__slider {
  border: 1px solid rgba(255, 255, 255, 0.03) !important;
  border-radius: 8px !important;
}

#global-color-picker.color-picker-off .iro__wheel {
  filter: brightness(0) saturate(0) !important;
  opacity: 0.3 !important;
  transition: all 0.3s ease;
  cursor: not-allowed !important;
}
#global-color-picker.color-picker-off .iro__slider {
  filter: grayscale(100%) brightness(0.7) !important;
  opacity: 1 !important;
}

.modal-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  width: 100%;
}
.action-btn {
  flex: 1;
  padding: 14px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.off-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.off-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.2);
}
.save-btn {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}
.save-btn:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(251, 191, 36, 0.2);
}

.modern-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(150px);
  background: linear-gradient(
    145deg,
    rgba(20, 25, 40, 0.95),
    rgba(15, 20, 30, 0.95)
  );
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(15px);
  padding: 14px 28px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modern-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}
.modern-toast.success {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(16, 185, 129, 0.2);
}
.modern-toast.error {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(239, 68, 68, 0.2);
}
.toast-icon {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modern-toast.loading .toast-icon {
  color: #38bdf8;
}
.modern-toast.success .toast-icon {
  color: #34d399;
}
.modern-toast.error .toast-icon {
  color: #ef4444;
}
.toast-text {
  color: #f8fafc;
  font-family: "Vazirmatn", sans-serif;
  font-size: 1rem;
  font-weight: bold;
  white-space: nowrap;
}

/* =========================================
   استایل‌های شرطی (مخفی‌سازی برای کاربران پلاس)
========================================= */
body.is-premium .free-user-notice {
  display: none !important;
}

/* =========================================
   ۱۱. استایل‌های واکنش‌گرا و موبایل (Responsive & Mobile)
========================================= */
@media (max-width: 768px) {
  :root {
    --gap-size: 6px;
    --row-height: 85px;
  }

  .widget-inner-box {
    gap: 2px !important;
    padding: 2px !important;
  }
  .widget-title {
    font-size: clamp(0.65rem, 11cqmin, 0.9rem) !important;
  }
  .widget-icon {
    font-size: clamp(1.2rem, 18cqmin, 2.2rem) !important;
  }
  .widget-value {
    font-size: clamp(0.85rem, 15cqmin, 1.4rem) !important;
  }
  .widget-value span:last-child {
    font-size: clamp(0.55rem, 8cqmin, 0.9rem) !important;
  }
  .widget-btn,
  .widget-badge {
    font-size: max(0.7rem, 10cqmin) !important;
    padding: 4px 2px !important;
  }

  .resizer {
    width: 20px !important;
    height: 20px !important;
    box-shadow: 1px -1px 6px rgba(251, 191, 36, 0.2) !important;
  }

  .dashboard-header {
    padding: 10px;
    gap: 5px;
  }
  .logo-wrapper {
    padding: 0;
    gap: 5px;
  }
  .bg-logo {
    width: 28px;
  }
  .logo-wrapper .brand-text {
    font-size: 0.9rem;
  }
  .header-right {
    width: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  #header-username {
    font-size: 0.7rem;
    text-align: right;
  }
  .logout-btn {
    padding: 4px 8px;
    font-size: 0.65rem;
    border-radius: 6px;
  }

  .support-header-btn {
    padding: 4px 8px;
    border-radius: 8px;
    gap: 0;
  }
  
  .support-header-btn i {
    font-size: 1rem;
  }
  
  .support-header-btn .support-text {
    display: none; /* مخفی کردن متن در موبایل برای جلوگیری از شلوغی هدر */
  }

  .tabs-header {
    flex-wrap: nowrap;
    gap: 5px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    overflow-x: auto; /* اگر تب‌ها زیاد شدند اسکرول شوند نه اینکه صفحه را بزرگ کنند */
    overflow-y: hidden; /* 🔴 جلوگیری قطعی از اسکرول عمودی ناخواسته */
    max-width: 100vw;
    -webkit-overflow-scrolling: touch;
  }
  .tab-btn {
    width: auto;
    flex: 1;
    padding: 6px 2px;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border-radius: 8px;
  }
  .tab-btn i {
    margin: 0;
    font-size: 1rem;
  }
  /* 🔴 اصلاح خط آبی زیر تب فعال در موبایل تا بیرون نزند */
  .tab-btn.active::after {
    bottom: -12px;
  }

  .account-tabs-header {
    width: 100%;
    flex-direction: row;
    gap: 8px;
  }
  .acc-tab-btn {
    flex: 1 1 30%;
    min-width: 90px;
    justify-content: center;
    padding: 10px 5px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .sub-tabs-container {
    margin-bottom: 15px;
  }
  .sub-tab-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 10px !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
  }

  .main-container {
    margin: 10px auto 20px;
    padding: 0 8px;
  }
  .auth-card,
  .api-card,
  .admin-table-container {
    padding: 15px !important;
    border-radius: 15px !important;
  }

  .token-premium-card {
    padding: 25px !important;
    border-radius: 20px !important;
  }

  .api-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }
  .api-card p {
    font-size: 0.8rem !important;
    margin-bottom: 15px !important;
  }
  .token-action-box {
    flex-direction: column;
    gap: 8px;
  }
  .api-key-value {
    font-size: 0.9rem !important;
    padding: 10px !important;
    letter-spacing: 1px !important;
    line-height: 1.2 !important; /* تضمین تک خط بودن */
    border-radius: 10px !important;
  }

  .settings-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 5px;
    border-radius: 12px;
    width: 100% !important;
    min-width: 0 !important;
  }
  .set-nav-btn {
    min-width: 0 !important;
    padding: 10px 2px !important;
    gap: 6px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .set-nav-btn i {
    font-size: 1.3rem !important;
  }
  .set-nav-btn span {
    font-size: 0.6rem !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    word-wrap: break-word !important;
  }

  .settings-wrapper {
    padding: 12px !important;
    margin-bottom: 15px !important;
    border-radius: 15px !important;
  }
  .settings-wrapper-title {
    font-size: 1rem !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }
  .modern-row {
    padding: 12px !important;
    margin-bottom: 10px !important;
    border-radius: 12px !important;
  }
  .modern-row-title {
    font-size: 0.8rem !important;
    padding: 4px 8px !important;
    margin-bottom: 10px !important;
  }
  .modern-inputs-container {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .modern-inputs-container > input,
  .modern-inputs-container > select {
    width: 100% !important;
    flex: none !important;
  }

  .modern-input,
  .input-field {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
  }
  select.modern-input,
  select.input-field {
    background-position: left 10px center !important;
    padding-left: 30px !important;
  }

  .premium-modal .modal-content {
    padding: 25px 15px !important;
    width: 100% !important;
  }
  .premium-modal h3 {
    font-size: 1.1rem;
  }

  #chart-modal .modal-actions {
    flex-wrap: wrap;
  }
  #chart-modal .action-btn {
    flex: 1 1 45%;
    font-size: 0.8rem !important;
    padding: 10px !important;
  }

  .device-status {
    font-size: 0.65rem;
    padding: 4px 8px;
    margin-right: auto;
  }

  /* اصلاح قطعی و بی‌نقص ویجت وضعیت دیجیتال در موبایل */
  .status-badge {
    min-width: 0 !important; /* 🔴 مقصر اصلی: غیرفعال کردن سایزِ اجباریِ دسکتاپ */
    width: fit-content !important;
    margin: 0 auto !important;
    align-self: center !important; /* میخکوب کردن قطعی در مرکزِ ویجت */
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    border-radius: 8px !important;
    max-width: 90% !important; /* حالا دیگه 90 درصد با موفقیت اعمال میشه */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .widget-expand-hint {
    font-size: 0.5rem; /* کوچکتر کردن در موبایل تا از کادر بیرون نزند */
    bottom: 2px;
    right: 4px;
  }

  .sensor-ring-container {
    max-height: 95%; /* ماکزیمم استفاده از فضا در گوشی */
    margin-top: 2px;
  }
  .ring-bg,
  .ring-progress {
    stroke-width: 4.5; /* ظریف‌تر شدن خط حلقه برای باز شدن فضای داخلی در موبایل */
  }
  .ring-text.widget-value {
    font-size: max(
      0.7rem,
      13cqmin
    ) !important; /* کوچک کردن سایز پایه برای جلوگیری از برخورد با لبه‌ها */
  }
  .ring-text.widget-value span:last-child {
    font-size: max(0.5rem, 8cqmin) !important;
  }

  .sensor-gauge-container {
    height: 38cqmin; /* کمی کوچک‌تر کردن شعاع گیج برای باز شدن فضا */
    margin-bottom: 22px !important; /* باز کردن فضای پایین فقط به اندازه نیاز */
  }

  /* =========================================
     طراحی ویژه موبایل برای کارت‌های حساب کاربری
  ========================================= */
  .account-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding: 5px;
  }
  .cyber-row-layout {
    flex-direction: column;
    align-items: stretch;
  }
  .cyber-col-info {
    text-align: center;
  }
  .account-status-box {
    flex-direction: column !important;
  }
  .account-card {
    padding: 25px !important;
    border-radius: 24px !important;
    width: 100%;
    box-sizing: border-box;
  }
  .account-status-box {
    padding: 15px;
    column-gap: 15px;
    margin-bottom: 20px;
  }
  .premium-badge-container {
    width: 60px;
    height: 60px;
  }
  .premium-hologram {
    font-size: 1.8rem;
  }
  .account-status-label {
    font-size: 0.8rem;
  }
  .account-status-text {
    font-size: 1.15rem;
  }
  .account-security-desc {
    font-size: 0.8rem;
    padding: 12px;
    margin-bottom: 15px;
  }
  .account-btn-gold,
  .account-btn-red {
    font-size: 0.95rem !important;
    padding: 14px !important;
    width: 100% !important;
  }
  .password-container .input-field {
    padding-left: 35px !important;
    padding-right: 35px !important;
  }

  .gauge-labels {
    bottom: -10px !important; /* نزدیک کردن لیبل‌های ۰ و ۱۰۰ به نمودار */
    font-size: max(0.55rem, 8cqmin) !important;
  }

  .gauge-text {
    bottom: -22px !important; /* کشیدن عدد اصلی به داخل کادر ویجت تا در سایز ۱x۱ هم کامل خوانا باشد */
  }

  /* 🔴 اصلاح سایز اسلایدر خطی و دایره‌ای مخصوص موبایل */
  .linear-slider-container { padding: 2px 0; }
  .vertical-slider { min-height: 50px; width: 10px; }
  .vertical-slider::-webkit-slider-thumb { width: 34px; height: 16px; }
  .vertical-slider::-moz-range-thumb { width: 34px; height: 16px; }

  .knob-surround { width: 95px !important; height: 95px !important; margin-top: 5px !important; }
  .knob-dial { width: 60px !important; height: 60px !important; border-width: 2px; }
  .knob-pointer { width: 4px !important; height: 14px !important; top: 6px; }
  .knob-arc-bg, .knob-arc-active { stroke-width: 8 !important; }

  .myelectro-widget[data-w="2"][data-h="1"] .linear-slider-container { padding: 0 10px; gap: 12px; }
  .myelectro-widget[data-w="2"][data-h="1"] .vertical-slider { height: 10px; }
  .myelectro-widget[data-w="2"][data-h="1"] .vertical-slider::-webkit-slider-thumb { width: 16px; height: 34px; }
  .myelectro-widget[data-w="2"][data-h="1"] .vertical-slider::-moz-range-thumb { width: 16px; height: 34px; }

  /* =========================================
     طراحی مینیمال و کارتی جداول ادمین در موبایل (جلوگیری از اسکرول افقی)
  ========================================= */
  .admin-table-container {
    padding: 10px !important;
    background: transparent !important;
    border: none !important;
    overflow-x: hidden !important;
  }
  .admin-table-container table,
  .admin-table-container tbody,
  .admin-table-container tr,
  .admin-table-container td {
    display: block;
    width: 100%;
  }
  .admin-table-container thead {
    display: none; /* حذف هدر جدول در موبایل */
  }
  .admin-table-container tr {
    background: rgba(15, 20, 30, 0.8) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    border-radius: 15px;
    margin-bottom: 15px;
    padding: 15px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  }
  .admin-table-container td {
    padding: 4px 0 !important;
    border: none !important;
    text-align: right !important;
  }

  /* --- استایل کارتی مخصوص پیام‌های پشتیبانی --- */
  #admin-messages-list td:nth-child(1) { position: absolute; top: 15px; left: 15px; width: auto; }
  #admin-messages-list td:nth-child(2) { padding-left: 35px !important; font-size: 1.05rem !important; margin-bottom: 8px; line-height: 1.4; }
  #admin-messages-list td:nth-child(3) { font-size: 0.85rem; color: #94a3b8 !important; display: inline-block; width: auto; }
  #admin-messages-list td:nth-child(3)::before { content: "📱 "; }
  #admin-messages-list td:nth-child(4) { display: inline-block; float: left; width: auto; text-align: left !important; }
  #admin-messages-list td:nth-child(5) { margin-top: 12px; padding-top: 12px !important; border-top: 1px dashed rgba(255, 255, 255, 0.1) !important; display: flex !important; justify-content: space-between !important; gap: 10px; }
  #admin-messages-list td:nth-child(5) button { flex: 1; padding: 10px !important; font-size: 0.9rem !important; justify-content: center; }

  /* --- استایل کارتی مخصوص لیست کاربران --- */
  #admin-users-list td:nth-child(1) { display: none; }
  #admin-users-list td:nth-child(2) { font-size: 1.1rem !important; margin-bottom: 10px; text-align: center !important; }
  #admin-users-list td:nth-child(3) { display: flex !important; justify-content: center !important; border-top: 1px dashed rgba(255, 255, 255, 0.1) !important; padding-top: 12px !important; margin-top: 8px; }
  #admin-users-list td:nth-child(3) button { width: 100% !important; padding: 10px !important; font-size: 0.95rem !important; justify-content: center; }
}

/* =========================================
   ۱۲. استایل‌های ویژه حالت افقی گوشی (Landscape Mobile)
========================================= */
@media (max-height: 600px) and (orientation: landscape) {
  .premium-modal {
    top: 3vh !important;
    transform: translate(-50%, 0) scale(0.9) !important;
    max-height: 94vh !important;
    overflow-y: auto !important; /* فعال‌سازی اسکرول برای پاپ‌آپ‌های طولانی */
    -webkit-overflow-scrolling: touch;
  }
  .premium-modal.show {
    transform: translate(-50%, 0) scale(1) !important;
  }

  .modal-content {
    padding: 15px !important;
  }

  .modal-header {
    margin-bottom: 10px !important;
  }
  .modal-header h3 {
    font-size: 1.1rem !important;
  }

  /* --- بهینه‌سازی پاپ‌آپ نمودار --- */
  #chart-modal .modal-content > div:nth-child(2) {
    padding: 10px !important;
    margin-bottom: 10px !important;
  }
  #expanded-chart-canvas {
    height: 55vh !important; /* ارتفاع متناسب با صفحه افقی برای دیدن کامل نمودار */
    min-height: 180px;
  }

  /* --- بهینه‌سازی پاپ‌آپ دیباگر --- */
  .debug-terminal-expanded {
    height: 55vh !important;
    min-height: 150px;
    padding: 10px !important;
  }

  /* --- بهینه‌سازی پاپ‌آپ نورپردازی --- */
  .rgb-console .modal-body {
    margin: 5px 0 15px 0 !important;
  }

  .modal-actions {
    margin-top: 10px !important;
  }
  .action-btn {
    padding: 8px 15px !important;
    font-size: 0.85rem !important;
  }
}
.char-12 {
  animation-delay: 0.66s;
}
.char-13 {
  animation-delay: 0.72s;
}
.char-14 {
  animation-delay: 0.78s;
}
.char-15 {
  animation-delay: 0.84s;
}

/* =========================================
   ۱۳. پنل فرماندهی ادمین (Admin Command Center)
========================================= */
.admin-view {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 25px;
}
.admin-menu-card {
  background: linear-gradient(145deg, rgba(30, 20, 10, 0.8), rgba(20, 10, 5, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 25px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(245, 158, 11, 0.05);
}
.admin-menu-card:hover {
  transform: translateY(-8px);
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 15px 40px rgba(245, 158, 11, 0.2), inset 0 0 30px rgba(245, 158, 11, 0.15);
}
.admin-menu-icon {
  font-size: 2.4rem;
  color: #f59e0b;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.5));
  transition: transform 0.3s;
}
.admin-menu-card:hover .admin-menu-icon {
  transform: scale(1.1);
}
.admin-menu-title {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 800;
}
.admin-menu-desc {
  font-size: 0.8rem;
  color: #fbbf24;
  opacity: 0.8;
  line-height: 1.5;
}
.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}
.admin-back-btn {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Vazirmatn';
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-back-btn:hover {
  background: #f59e0b;
  color: #111;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  transform: translateX(-5px);
}
.admin-panel-container {
  background: rgba(15, 10, 5, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 20px;
  padding: 30px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}
.admin-panel-container.large {
  max-width: 800px;
}

@media (max-width: 768px) {
  .admin-menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .admin-menu-card {
    padding: 15px 10px;
    border-radius: 12px;
  }
  .admin-menu-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }
  .admin-menu-title {
    font-size: 0.85rem;
    margin-bottom: 5px;
  }
  .admin-menu-desc {
    font-size: 0.65rem;
    line-height: 1.4;
  }
}
