/* ==========================================================================
   طراحی زندگی | استایل‌های داشبورد ارائه زنده دسکتاپ و پروجکتور (10-Foot UI)
   ========================================================================== */

.admin-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 18px 30px 40px 30px;
  max-width: 1700px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   نوار ابزار بالای پرزنتر (Navbar - Modern, Executive & Responsive)
   ========================================================================== */
.presenter-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--peach-border);
  box-shadow: 0 8px 30px rgba(111, 22, 38, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
  gap: 16px;
  transition: all var(--transition-normal);
}

/* برند و هویت رویداد */
.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo-badge {
  background: linear-gradient(135deg, var(--crimson-deep) 0%, var(--crimson-primary) 60%, var(--coral-dark) 100%);
  color: var(--white);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-size: 1.15rem;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(111, 22, 38, 0.22);
  white-space: nowrap;
  user-select: none;
}

.brand-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-event-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--crimson-deep);
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}

/* تب‌های تغییر نظرسنجی (Segmented Pill Controller) */
.survey-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(248, 231, 219, 0.75);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(240, 213, 195, 0.85);
  gap: 4px;
  box-shadow: inset 0 2px 4px rgba(111, 22, 38, 0.03);
}

.tab-btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--charcoal-soft);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  outline: none;
}

.tab-btn:hover {
  color: var(--crimson-deep);
  background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
  background: var(--white);
  color: var(--crimson-deep);
  box-shadow: 0 3px 10px rgba(111, 22, 38, 0.12);
  font-weight: 700;
}

.tab-icon {
  font-size: 1rem;
  line-height: 1;
}

.tab-kbd {
  background: rgba(111, 22, 38, 0.08);
  color: var(--crimson-deep);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

/* بخش اقدامات و مانیتورینگ زنده */
.presenter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* نشانگر اتصال SSE */
.presenter-actions .badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(39, 174, 96, 0.12);
  color: #196f3d;
  border: 1px solid rgba(39, 174, 96, 0.28);
  white-space: nowrap;
}

/* شمارنده زنده آرا */
.live-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--peach-border);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(111, 22, 38, 0.04);
  white-space: nowrap;
}

.counter-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.counter-number {
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: var(--crimson-deep);
  line-height: 1;
  font-weight: 800;
}

/* گروه دکمه‌های آیکونی ابزارها */
.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-icon-btn {
  background: var(--white);
  border: 1px solid var(--peach-border);
  color: var(--charcoal);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  outline: none;
}

.action-icon-btn:hover {
  background: var(--peach-surface);
  color: var(--crimson-deep);
  border-color: var(--coral-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(111, 22, 38, 0.1);
}

.action-icon-btn:active {
  transform: translateY(0);
}

.action-icon-btn.btn-danger-action {
  color: #A92339;
}

.action-icon-btn.btn-danger-action:hover {
  background: rgba(169, 35, 57, 0.08);
  border-color: #A92339;
  color: #801D33;
}

/* آمار کارت سوالات */
.card-footer-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(240, 213, 195, 0.6);
}

.card-avg-score {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--crimson-deep);
  background: rgba(111, 22, 38, 0.06);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  display: inline-block;
}

/* کانتینر اصلی نتایج */
.results-container {
  flex: 1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.35s ease-out;
}

/* ==========================================================================
   طراحی کارت‌های نظرسنجی ۱ در پروجکتور (۵ ذهنیت طراحانه)
   ========================================================================== */
.s1-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.s1-card-wide {
  grid-column: span 2;
}

.presenter-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 12px;
}

.card-q-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.45;
}

.card-mindset-pill {
  flex-shrink: 0;
  background: rgba(111, 22, 38, 0.08);
  color: var(--crimson-deep);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(111, 22, 38, 0.15);
}

/* میله‌های افقی توزیع آرا */
.bars-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}

.bar-label {
  width: 90px;
  flex-shrink: 0;
  font-weight: 600;
  color: var(--charcoal-soft);
  text-align: right;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: var(--peach-surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--peach-border);
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--crimson-deep) 0%, var(--coral-terracotta) 100%);
  width: 0%;
  transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bar-stat {
  width: 95px;
  flex-shrink: 0;
  text-align: left;
  font-weight: 700;
  color: var(--crimson-deep);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.bar-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* نمودار دوطرفه کششی برای سوال ۴ (مسیر در برابر مقصد) */
.tug-of-war-container {
  padding: 16px 0;
}

.tug-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 1.1rem;
}

.tug-label-path {
  color: var(--crimson-deep);
}

.tug-label-goal {
  color: var(--aubergine);
}

.tug-track {
  height: 38px;
  background: #EFE4DC;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  border: 2px solid var(--peach-border);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
}

.tug-segment-path {
  height: 100%;
  background: linear-gradient(90deg, var(--crimson-deep), var(--coral-terracotta));
  width: 50%;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-family: var(--font-title);
  font-size: 1.15rem;
}

.tug-segment-goal {
  height: 100%;
  background: linear-gradient(90deg, var(--aubergine), #6A2E65);
  width: 50%;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-family: var(--font-title);
  font-size: 1.15rem;
}

/* باکس بینش طراحانه زیر هر کارت */
.designer-insight-box {
  background: rgba(255, 255, 255, 0.6);
  border-right: 3px solid var(--coral-terracotta);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 10px;
}

/* ==========================================================================
   طراحی نظرسنجی ۲ در پروجکتور (داشبورد تراز زندگی: سلامت، کار، بازی، عشق)
   ========================================================================== */
/* ==========================================================================
   طراحی نظرسنجی ۲ در پروجکتور (داشبورد تراز کتاب: کار، بازی، عشق، سلامت)
   ========================================================================== */
.s2-book-dashboard-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 26px;
  align-items: stretch;
}

@media (max-width: 1200px) {
  .s2-book-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

.book-dashboard-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.book-dashboard-header {
  margin-bottom: 16px;
}

.book-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--peach-surface);
  color: var(--crimson-deep);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--peach-border);
  margin-bottom: 8px;
}

.book-dashboard-heading {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--crimson-deep);
  margin-bottom: 4px;
}

.book-dashboard-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.book-svg-container {
  width: 100%;
  max-width: 720px;
  margin: 8px auto 12px auto;
  background: #FCFCFD;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.book-dashboard-svg {
  width: 100%;
  height: auto;
  display: block;
}

.book-dashboard-caption {
  text-align: center;
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: #231f20;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

/* شبکه کارت‌های ۴ آمار ستون‌های زندگی */
.book-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .book-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.book-stat-item {
  background: var(--peach-surface);
  border: 1px solid var(--peach-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-fast);
}

.book-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-indicator-bar {
  width: 4px;
  height: 38px;
  border-radius: 4px;
  flex-shrink: 0;
}

.stat-info {
  flex: 1;
}

.stat-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 2px;
}

.stat-values {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-avg {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: #E6007E;
  line-height: 1;
}

.stat-denom {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-pct {
  margin-right: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: #E6007E;
  background: rgba(230, 0, 126, 0.1);
  padding: 2px 6px;
  border-radius: 999px;
}

/* کارت رادار چارت ۴ محوره تعادل زندگی */
.radar-display-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.radar-chart-title {
  font-size: 1.4rem;
  color: var(--crimson-deep);
  margin-bottom: 6px;
  text-align: center;
}

.radar-chart-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  text-align: center;
}

.radar-svg-wrapper {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   مدال بزرگ QR Code روی پرده سالن (Projector QR Modal)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 34, 36, 0.75);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
  animation: fadeIn 0.25s ease-out;
}

.qr-modal-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--coral-light);
  position: relative;
}

.qr-modal-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--peach-surface);
  color: var(--charcoal);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.qr-modal-close:hover {
  background: var(--crimson-deep);
  color: var(--white);
}

.qr-code-box {
  width: 260px;
  height: 260px;
  margin: 20px auto;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 2px dashed var(--coral-terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-url-text {
  font-family: monospace;
  direction: ltr;
  background: var(--peach-surface);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  color: var(--crimson-deep);
  font-weight: 700;
  margin-top: 14px;
}

/* دیالوگ ریست داده‌ها */
.reset-dialog-card {
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
}

/* انیمیشن پالس داده جدید */
@keyframes highlight-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); box-shadow: var(--shadow-glow); }
  100% { transform: scale(1); }
}

.pulse-update {
  animation: highlight-pulse 0.6s ease-out;
}

/* ==========================================================================
   قوانین ریسپانسیو فوق‌پیشرفته داشبورد پرزنتر (Responsive Breakpoints)
   ========================================================================== */

/* مانیتورهای متوسط و لپ‌تاپ‌ها (تا ۱۲۰۰ پیکسل) */
@media (max-width: 1200px) {
  .admin-layout {
    padding: 14px 20px 30px;
  }

  .presenter-navbar {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
  }

  .brand-section {
    order: 1;
  }

  .presenter-actions {
    order: 2;
  }

  .survey-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
  }
}

/* تبلت‌ها و صفحات کوچک (تا ۷۶۸ پیکسل) */
@media (max-width: 768px) {
  .admin-layout {
    padding: 10px 12px 24px;
  }

  .presenter-navbar {
    padding: 10px 12px;
    gap: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }

  .brand-logo-badge {
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 8px;
  }

  .brand-event-title {
    font-size: 0.95rem;
  }

  .tab-btn {
    font-size: 0.82rem;
    padding: 6px 10px;
    gap: 5px;
  }

  .tab-kbd {
    display: none;
  }

  .presenter-actions {
    gap: 6px;
  }

  .presenter-actions .badge-live {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .live-counter-badge {
    padding: 4px 8px;
    gap: 4px;
  }

  .counter-label {
    font-size: 0.75rem;
  }

  .counter-number {
    font-size: 1.1rem;
  }

  .action-icon-btn {
    width: 34px;
    height: 34px;
    font-size: 0.92rem;
    border-radius: 8px;
  }

  /* تک‌ستونه شدن کارت‌های نظرسنجی ۱ */
  .s1-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .s1-card-wide {
    grid-column: span 1;
  }

  .presenter-card {
    padding: 18px;
  }

  .card-q-text {
    font-size: 1.05rem;
  }

  /* نظرسنجی ۲ در تبلت */
  .book-dashboard-card {
    padding: 18px;
  }

  .book-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* موبایل‌های باریک (تا ۴۸۰ پیکسل) */
@media (max-width: 480px) {
  .presenter-navbar {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-section {
    justify-content: space-between;
    width: 100%;
  }

  .presenter-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .tab-btn {
    font-size: 0.78rem;
    padding: 5px 6px;
  }

  .book-stats-grid {
    grid-template-columns: 1fr;
  }
}
