/* ==========================================================================
   انتخاب ترین‌های کلاس | جشن فارغ‌التحصیلی بچه‌های مدیریت صنعتی ورودی ۱۴۰۱
   Design System & Mobile-First UI
   ========================================================================== */

:root {
  --primary: #6C5CE7;
  --primary-hover: #5843ED;
  --primary-light: #F0EDFF;
  --primary-glow: rgba(108, 92, 231, 0.28);
  
  --hero-bg: #FFB800;
  --hero-bg-dark: #FF8A00;
  
  --surface: #FFFFFF;
  --surface-alt: #F8F9FD;
  --surface-border: #EAEBF2;
  
  --text-main: #1E1B4B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-full: 9999px;
  
  --shadow-card: 0 3px 12px rgba(26, 26, 67, 0.04);
  --shadow-elevated: 0 10px 25px -5px rgba(108, 92, 231, 0.3);
  --shadow-floating-bar: 0 10px 30px rgba(15, 23, 42, 0.15), 0 2px 8px rgba(15, 23, 42, 0.05);

  --font-title: 'Lalezar', cursive, system-ui, sans-serif;
  --font-body: 'Estedad', system-ui, -apple-system, sans-serif;

  --transition-fast: 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: #0F172A;
}

body {
  font-family: var(--font-body);
  direction: rtl;
  text-align: right;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Always align at top on mobile */
  padding: 0;
  overflow-x: hidden;
}

/* ==========================================================================
   App Frame Container
   ========================================================================== */
.app-container {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--surface);
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 480px) {
  body {
    padding: 0;
    background: radial-gradient(circle at center, #1E1B4B 0%, #0F172A 100%);
  }
  .app-container {
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.4);
  }
}

/* ==========================================================================
   Screen Management (Crucial: Hide inactive screens completely!)
   ========================================================================== */
.screen {
  display: none !important;
  width: 100%;
  flex-direction: column;
  flex: 1;
}

.screen.active {
  display: flex !important;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   FULL-SCREEN STORY ONBOARDING (Spotify / Instagram Style)
   ========================================================================== */
.story-screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: #FFFFFF;
  overflow: hidden;
  user-select: none;
}

/* Dynamic Themes */
.story-theme-1 {
  background: linear-gradient(165deg, #FFB800 0%, #FF8A00 50%, #E65100 100%);
}

.story-theme-2 {
  background: linear-gradient(165deg, #7C3AED 0%, #6366F1 50%, #312E81 100%);
}

.story-theme-3 {
  background: linear-gradient(165deg, #059669 0%, #0D9488 50%, #134E4A 100%);
}

.story-theme-4 {
  background: linear-gradient(165deg, #1E1B4B 0%, #31104B 50%, #0F172A 100%);
}

/* Top Progress Bars (Stories Segments) */
.story-progress-wrapper {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 40;
}

.story-bar-segment {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.story-bar-fill {
  width: 0%;
  height: 100%;
  background: #FFFFFF;
  border-radius: var(--radius-full);
  transition: width 0.3s ease-out;
}

.story-bar-segment.completed .story-bar-fill,
.story-bar-segment.active .story-bar-fill {
  width: 100%;
}

/* Story Top Actions */
.story-top-actions {
  position: absolute;
  top: 26px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 40;
}

.story-badge-tag {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.story-skip-btn {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.story-skip-btn:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Story Slide Content (Fits 100% inside Viewport without Vertical Overflow) */
.story-slide {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: 56px 16px 80px; /* 56px top below header, 80px bottom above fixed footer */
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
}

.story-slide.active {
  display: flex;
  animation: storyIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes storyIn {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Story Visual (Center) */
.story-visual-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 2px 0 6px;
  position: relative;
}

.story-hero-frame {
  width: clamp(88px, 14vh, 120px);
  height: clamp(88px, 14vh, 120px);
  border-radius: 50%;
  padding: 4px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  animation: pulseHero 4s ease-in-out infinite;
}

@keyframes pulseHero {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.02); }
}

.story-hero-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.story-floating-emoji {
  position: absolute;
  font-size: 24px;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25));
}

.story-floating-emoji.e1 { top: -2px; right: 12px; }
.story-floating-emoji.e2 { bottom: 4px; left: 14px; }

/* Story Typography */
.story-title {
  font-family: var(--font-title);
  font-size: clamp(22px, 3.8vh, 27px);
  line-height: 1.25;
  color: #FFFFFF;
  text-align: center;
  margin-bottom: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.story-desc {
  font-size: clamp(11.5px, 1.8vh, 13px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  margin-bottom: 8px;
  font-weight: 500;
  padding: 0 6px;
}

/* Story Highlight Cards */
.story-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 6px;
}

.story-glass-card {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.story-card-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.story-card-title {
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 1px;
}

.story-card-subtitle {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
}

/* Persistent Fixed Bottom Story Navigation Bar */
.story-fixed-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  padding: 10px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45) 30%, rgba(0, 0, 0, 0.85) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 45;
}

.btn-story-next {
  flex: 1;
  background: #FFFFFF;
  color: #1E1B4B;
  border: none;
  border-radius: var(--radius-full);
  padding: 13px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-fast);
}

.btn-story-next:active {
  transform: scale(0.97);
}

.btn-story-back {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  backdrop-filter: blur(10px);
}

/* Student ID Glass Card */
.student-glass-card {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
}

.glass-input-group {
  margin-bottom: 8px;
}

.glass-input-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.glass-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.95);
  font-family: var(--font-body);
  font-size: 16px;
  color: #1E1B4B;
  outline: none;
  transition: all var(--transition-fast);
}

.glass-input-code {
  letter-spacing: 2px;
  font-weight: 800;
  font-size: 18px;
  text-align: center;
  direction: ltr;
}

.glass-input:focus {
  background: #FFFFFF;
  border-color: #A78BFA;
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.4);
}

.glass-input-hint {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 8px;
  line-height: 1.5;
}

/* ==========================================================================
   Screen 2: Voting & Question Flow
   ========================================================================== */
.voting-screen {
  background: #FFFFFF;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 140px; /* Generous space so bottom bar NEVER covers cards */
  position: relative;
}

/* Top Progress Header (Flush at the top) */
.voting-top-bar {
  background: #FFFFFF;
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.voting-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.step-indicator {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.step-badge {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--primary);
  line-height: 1;
}

.step-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 800;
}

.btn-overview {
  background: var(--surface-alt);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background var(--transition-fast);
}

.btn-overview:hover {
  background: #EEF2F6;
}

/* Progress bar */
.progress-track {
  width: 100%;
  height: 6px;
  background: #EEF2F6;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 6.25%;
  background: linear-gradient(90deg, #FFB800 0%, var(--primary) 100%);
  border-radius: var(--radius-full);
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Question Banner */
.question-card {
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, #F8F9FE 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--surface-border);
}

.question-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.question-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #EDE9FE;
  color: var(--primary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 800;
}

.selection-counter-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
  transition: all var(--transition-fast);
}

.selection-counter-badge.full {
  background: #ECFDF5;
  color: #059669;
  border-color: #A7F3D0;
}

.question-title {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 4px;
}

.question-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  font-weight: 500;
}

/* Search Box */
.search-container {
  padding: 10px 16px;
  position: sticky;
  top: 59px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  z-index: 20;
  border-bottom: 1px solid rgba(234, 235, 242, 0.9);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  right: 12px;
  color: var(--text-light);
  pointer-events: none;
  font-size: 15px;
}

.search-input {
  width: 100%;
  padding: 9px 36px 9px 32px;
  background: var(--surface-alt);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-clear-btn {
  position: absolute;
  left: 12px;
  background: #CBD5E1;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #FFFFFF;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
}

.search-clear-btn.visible {
  display: flex;
}

.search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

/* ==========================================================================
   Members 3-Columns Grid
   ========================================================================== */
.members-list-container {
  padding: 10px 12px 20px;
  flex: 1;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.member-card {
  background: #FFFFFF;
  border: 1.5px solid var(--surface-border);
  border-radius: 16px;
  padding: 10px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  position: relative;
  user-select: none;
  min-height: 102px;
}

.member-card:hover {
  border-color: #CBD5E1;
  transform: translateY(-2px);
}

.member-card:active {
  transform: scale(0.95);
}

.member-card.selected {
  border: 2px solid var(--primary);
  background: #F6F3FF;
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: translateY(-2px);
}

.member-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13.5px;
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 7px;
  position: relative;
  flex-shrink: 0;
  border: 2px solid #FFFFFF;
  background-color: #F1F5F9;
}

.member-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.review-tag-img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.member-card.selected .member-avatar {
  border-color: var(--primary);
  box-shadow: 0 0 0 2.5px var(--primary-glow);
}

.selection-order-pill {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 19px;
  height: 19px;
  background: var(--primary);
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.4);
}

.member-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 2px;
}

.member-first-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.25;
}

.member-last-name {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.25;
  margin-top: 1px;
}

.member-card.selected .member-last-name {
  color: var(--primary);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
}

.no-results-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

/* ==========================================================================
   Floating Bottom Navigation Bar
   ========================================================================== */
.floating-bottom-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 416px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 50;
  box-shadow: var(--shadow-floating-bar);
}

.btn-nav-prev {
  background: var(--surface-alt);
  border: 1px solid var(--surface-border);
  color: var(--text-main);
  border-radius: var(--radius-full);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.btn-nav-next {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  padding: 11px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-elevated);
}

/* ==========================================================================
   Screen 3: Review & Summary Screen
   ========================================================================== */
#reviewScreen {
  background: #FFFFFF;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 120px;
}

.review-header {
  padding: 20px 18px 14px;
  background: linear-gradient(180deg, #F5F3FF 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--surface-border);
  text-align: center;
}

.review-title {
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.review-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.review-list {
  padding: 14px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-item {
  background: #FFFFFF;
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-item-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-item-icon {
  font-size: 20px;
}

.review-item-title {
  font-family: var(--font-title);
  font-size: 17px;
  color: var(--text-main);
  line-height: 1.2;
}

.btn-edit-item {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.review-item-body {
  padding-right: 28px;
}

.review-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F1F3FB;
  border: 1px solid #E2E8F0;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main);
}

.review-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.review-item-empty {
  font-size: 11.5px;
  color: #94A3B8;
  font-style: italic;
}

/* ==========================================================================
   Screen 4: Success & Celebration
   ========================================================================== */
.success-screen {
  text-align: center;
  padding: 40px 20px 30px;
  justify-content: center;
  align-items: center;
  background: #FFFFFF;
  min-height: 100vh;
  min-height: 100dvh;
}

.success-badge-icon {
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 38px;
  color: #FFFFFF;
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.3);
}

.success-title {
  font-family: var(--font-title);
  font-size: 32px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.success-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto 20px;
}

.privacy-seal-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 24px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.privacy-seal-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  background: #DCFCE7;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.privacy-seal-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.privacy-seal-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #15803D;
}

.privacy-seal-desc {
  font-size: 11.5px;
  color: #166534;
  line-height: 1.4;
}

.success-actions-single {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.btn-edit-votes {
  width: 100%;
  padding: 13px 20px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  color: var(--text-main);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-edit-votes:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-elevated);
}

/* ==========================================================================
   Overview Questions Drawer / Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.drawer-content {
  background: #FFFFFF;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 22px 18px 28px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--transition-smooth);
}

.modal-overlay.active .drawer-content {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.drawer-title {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--text-main);
}

.drawer-close {
  background: #EEF2F6;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  overflow-y: auto;
  padding-bottom: 10px;
}

.drawer-q-item {
  background: var(--surface-alt);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
}

.drawer-q-item.completed {
  background: #ECFDF5;
  border-color: #10B981;
}

.drawer-q-item.current {
  border-color: var(--primary);
  background: var(--primary-light);
}

.drawer-q-num {
  font-family: var(--font-title);
  font-size: 17px;
  display: block;
  line-height: 1;
  color: var(--text-main);
}

.drawer-q-item.completed .drawer-q-num {
  color: #059669;
}

.drawer-q-item.current .drawer-q-num {
  color: var(--primary);
}

.drawer-q-icon {
  font-size: 15px;
  margin-top: 3px;
  display: block;
}

.drawer-q-count {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  display: block;
  margin-top: 2px;
}

/* Toast Message */
.toast-msg {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1E1B4B;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-smooth);
  z-index: 200;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  max-width: 90%;
  text-align: center;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Member Photo Zoom Modal (Long-Press Preview)
   ========================================================================== */
.photo-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.photo-preview-modal.active {
  display: flex;
  opacity: 1;
}

.photo-preview-card {
  background: #FFFFFF;
  border-radius: 28px;
  padding: 26px 20px 20px;
  width: 100%;
  max-width: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.85);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-preview-modal.active .photo-preview-card {
  transform: scale(1);
}

.preview-close-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F5F9;
  border: none;
  font-size: 14px;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.preview-close-btn:hover {
  background: #E2E8F0;
}

.preview-avatar-wrap {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 14px;
  border: 4px solid #FFFFFF;
  box-shadow: 0 10px 30px rgba(108, 92, 231, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.preview-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-avatar-initial {
  font-size: 48px;
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.preview-name {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 4px;
}

.preview-meta {
  font-size: 12px;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.btn-preview-select {
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-elevated);
}
