* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #faf7f2;
  --warm-white: #fdf9f4;
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --gold-dark: #8b6914;
  --brown: #3d2b1f;
  --brown-mid: #6b4c35;
  --brown-light: #a07850;
  --text-main: #2c1810;
  --text-muted: #8b7355;
  --border: #e2d5c0;
  --shadow: rgba(61, 43, 31, 0.12);
}

body {
  font-family: "Vazirmatn", sans-serif;
  background: var(--cream);
  color: var(--text-main);
  min-height: 100vh;
  direction: rtl;
}

/* ── نوار بالا ── */
.topbar {
  background: var(--brown);
  padding: 0 2.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-brand {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-brand svg {
  width: 22px;
  height: 22px;
  fill: var(--gold);
}
.topbar-count {
  font-size: 0.78rem;
  color: var(--gold-light);
  opacity: 0.7;
  font-weight: 300;
}

/* ── هدر اصلی ── */
.hero {
  background: linear-gradient(160deg, var(--brown) 0%, var(--brown-mid) 100%);
  background-image: url(./pics/bg0.JPG);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; /* پیشنهاد می‌شود برای تنظیم بهتر تصویر */
  padding: 3.5rem 2.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      ellipse 60% 40% at 20% 50%,
      rgba(201, 168, 76, 0.08) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 40% 60% at 80% 30%,
      rgba(201, 168, 76, 0.06) 0%,
      transparent 70%
    );
}
.hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fdf9f4;
  font-weight: 400;
  position: relative;
  margin-bottom: 0.4rem;
}
.hero-title em {
  font-style: italic;
  color: var(--gold-light);
}
.hero-sub {
  font-size: 0.85rem;
  color: rgba(253, 249, 244, 0.55);
  font-weight: 300;
  letter-spacing: 0.06em;
  margin-bottom: 2.5rem;
  position: relative;
}
.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 2.5rem;
  position: relative;
}
.hero-divider::before,
.hero-divider::after {
  content: "◆";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 6px;
  color: var(--gold);
}
.hero-divider::before {
  right: -14px;
}
.hero-divider::after {
  left: -14px;
}

/* ── فیلترها ── */
.filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
}
.filter-label {
  font-size: 0.7rem;
  color: var(--gold-light);
  opacity: 0.7;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-right: 4px;
}
.filter-select {
  background: rgba(253, 249, 244, 0.07);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: #fdf9f4;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A84C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 34px;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}
.filter-select:focus {
  outline: none;
  border-color: var(--gold);
}
.filter-select option {
  background: var(--brown);
  color: #fdf9f4;
}
.filter-select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── نوار ابزار ── */
.toolbar {
  padding: 1.2rem 2.5rem;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.toolbar-info {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.toolbar-info strong {
  color: var(--text-main);
  font-weight: 600;
}
.view-btns {
  display: flex;
  gap: 4px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.view-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}
.view-btn:hover {
  background: var(--border);
  color: var(--text-main);
}
.view-btn.active {
  background: var(--brown);
  color: var(--gold-light);
}
.view-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* ── محتوا ── */
.content {
  padding: 2rem 2.5rem 4rem;
}

/* گرید کوچک */
.grid-small {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
/* گرید بزرگ */
.grid-large {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
/* کلاسور */
.binder-view {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.photo-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.22s,
    box-shadow 0.22s;
  position: relative;
}
.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
}
.photo-card img {
  width: 100%;
  display: block;
  object-fit: cover;
}
.grid-small .photo-card img {
  height: 150px;
}
.grid-large .photo-card img {
  height: 240px;
}
.photo-card .card-info {
  padding: 10px 12px;
}
.card-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 2px;
}
.card-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.photo-card .badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(61, 43, 31, 0.75);
  color: var(--gold-light);
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* ── اسلایدشو خودکار با تایمر ── */
.timer-bar-wrap {
  height: 3px;
  background: rgba(201, 168, 76, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}
.timer-bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width linear;
}
.auto-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.auto-ctrl-btn {
  background: var(--warm-white);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.auto-ctrl-btn:hover {
  background: #f0e8da;
  border-color: var(--gold-light);
}
.auto-ctrl-btn.active-pause {
  background: var(--brown);
  color: var(--gold-light);
  border-color: var(--brown);
}
.speed-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.speed-select {
  background: var(--warm-white);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 20px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
}
/* تمام‌صفحه اسلایدشو */
.fs-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.fs-overlay.open {
  display: flex;
}
.fs-overlay img {
  width: 100vw; /* عرض کامل صفحه */
  height: 100vh; /* ارتفاع کامل صفحه */
  object-fit: contain; /* تصویر کل فضا را اشغال می‌کند بدون اینکه دفرمه شود */
  transition: opacity 0.5s;
}
.fs-caption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  margin-top: 12px;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-style: italic;
}
.fs-counter {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  margin-top: 4px;
}
.fs-close {
  position: fixed;
  top: 18px;
  left: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.fs-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.fs-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.fs-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.fs-nav.prev {
  right: 20px;
}
.fs-nav.next {
  left: 20px;
}
.fs-timer-bar-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
}
.fs-timer-bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width linear;
}

/* ── اسلایدشو ── */
.slideshow-wrap {
  position: relative;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16/9;
  max-height: 72vh;
  /* تغییرات برای وسط‌چین شدن */
  margin: 0 auto;
  max-width: 900px; /* اضافه کردن یک عرض حداکثری برای زیبایی بیشتر */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.slideshow-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.5s;
}
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(61, 43, 31, 0.6);
  border: none;
  color: var(--gold-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.slide-nav:hover {
  background: rgba(61, 43, 31, 0.9);
}
.slide-nav.prev {
  right: 14px;
}
.slide-nav.next {
  left: 14px;
}
.slide-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.slide-caption {
  position: absolute;
  bottom: 50px;
  right: 0;
  left: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 0 2rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.slide-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}
.slide-dot.active {
  background: var(--gold);
  transform: scale(1.3);
}

/* ── لایت باکس ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 8, 0.95);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(201, 168, 76, 0.2);
}
.lightbox-info {
  text-align: center;
  color: rgba(253, 249, 244, 0.7);
  font-size: 0.85rem;
}
.lightbox-close {
  position: fixed;
  top: 20px;
  left: 20px;
  background: rgba(253, 249, 244, 0.1);
  border: 1px solid rgba(253, 249, 244, 0.2);
  color: #fdf9f4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover {
  background: rgba(253, 249, 244, 0.2);
}

/* ── empty state ── */
.empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.empty h3 {
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}
.empty p {
  font-size: 0.83rem;
}

/* انیمیشن */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.photo-card,
.binder-row {
  animation: fadeUp 0.3s both;
}

@media (max-width: 640px) {
  .hero {
    padding: 2.5rem 1.2rem 2rem;
  }
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-group {
    min-width: 0;
  }
  .toolbar,
  .content {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
  .topbar {
    padding: 0 1.2rem;
  }
}

/* ════════════════════════════════
         پنل ادمین — داخلی
         ════════════════════════════════ */
.admin-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brown);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--shadow);
  z-index: 300;
  transition: all 0.2s;
}
.admin-btn:hover {
  background: var(--brown-mid);
  transform: scale(1.08);
}

/* overlay */
.admin-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.6) !important;
  display: none !important; /* در حالت عادی مخفی */
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  transform: none !important; /* خنثی کردن جابجایی‌های اشتباه انیمیشن */
}

/* وقتی پنل باز می‌شود */
.admin-overlay.open {
  display: flex !important;
}

/* استایل بدنه پنل برای نمایش درست در وسط صفحه */
.admin-panel {
  background: var(--warm-white);
  border-radius: 16px;
  border: 1px solid var(--border);
  width: 90% !important;
  max-width: 780px !important;
  height: 85vh !important;
  max-height: 85vh !important;
  overflow: hidden;
  display: none; /* پیش‌فرض مخفی تا با جی‌اس باز شود */
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

/* login */
.login-card {
  background: var(--warm-white);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.login-card h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 0.3rem;
}
.login-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.login-field {
  margin-bottom: 1rem;
  text-align: right;
}
.login-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 5px;
}
.login-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.login-field input:focus {
  border-color: var(--gold);
}
.login-err {
  font-size: 0.78rem;
  color: #c0392b;
  min-height: 18px;
  margin-bottom: 0.5rem;
}

/* admin panel */
.admin-panel {
  background: var(--warm-white);
  border-radius: 16px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}
.ap-header {
  background: var(--brown);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ap-header h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ap-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* tabs */
.ap-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  flex-shrink: 0;
}
.ap-tab {
  padding: 0.7rem 1.2rem;
  border: none;
  background: transparent;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.ap-tab.active {
  color: var(--brown);
  border-bottom-color: var(--gold);
}

/* body */
.admin-panel .ap-body {
  padding: 1.5rem !important;
  overflow-y: auto !important;
  flex: 1 !important;
}

/* step pills */
.steps {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.step-pill {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
}
.step-pill.active {
  background: var(--brown);
  color: var(--gold-light);
  border-color: var(--brown);
}
.step-pill.done {
  background: var(--green, #2d7a4f);
  color: #fff;
  border-color: transparent;
}
.step-content {
  display: none;
}
.step-content.active {
  display: block;
}

/* settings */
.sfield {
  margin-bottom: 0.85rem;
}
.sfield label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
}
.sfield input,
.sfield select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.85rem;
  color: var(--text-main);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.sfield input:focus,
.sfield select:focus {
  border-color: var(--gold);
}
.sfield small {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
  display: block;
}

/* drop zone */
.ap-drop {
  border: 2px dashed var(--gold-light);
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 1rem;
  background: rgba(201, 168, 76, 0.04);
}
.ap-drop:hover,
.ap-drop.drag {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.09);
}
.ap-drop svg {
  width: 36px;
  height: 36px;
  fill: var(--gold);
  opacity: 0.5;
  margin-bottom: 0.5rem;
}
.ap-drop p {
  font-size: 0.83rem;
  color: var(--text-muted);
}
.ap-drop strong {
  color: var(--gold-dark);
}

/* photo queue */
.photo-queue {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.pq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.8rem;
  padding: 0.7rem;
  align-items: start;
  transition: border-color 0.2s;
}
.pq-item.st-uploading {
  border-color: var(--gold);
}
.pq-item.st-done {
  border-color: #2d7a4f;
}
.pq-item.st-error {
  border-color: #c0392b;
}
.pq-thumb {
  width: 72px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
  display: block;
}
.pq-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.pq-fields input,
.pq-fields select,
.pq-fields textarea {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.78rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.pq-fields input:focus,
.pq-fields select:focus,
.pq-fields textarea:focus {
  border-color: var(--gold);
}
.pq-fields .full {
  grid-column: 1/-1;
}
.pq-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
}
.pq-status {
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}
.st-pending .pq-status {
  color: var(--text-muted);
}
.st-uploading .pq-status {
  color: var(--gold-dark);
}
.st-done .pq-status {
  color: #2d7a4f;
}
.st-error .pq-status {
  color: #c0392b;
}
.pq-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px;
}
.pq-remove:hover {
  color: #c0392b;
}
.pq-progress {
  height: 2px;
  background: var(--gold-light);
  border-radius: 1px;
  margin-top: 4px;
  overflow: hidden;
  display: none;
}
.pq-progress.show {
  display: block;
}
.pq-progress-bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.3s;
}

/* github step */
.github-info {
  background: #f0faf5;
  border: 1px solid #b2dfcb;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-size: 0.8rem;
  color: #1a5c3a;
  margin-bottom: 1rem;
  line-height: 1.7;
}
.github-info code {
  background: rgba(0, 0, 0, 0.07);
  padding: 1px 5px;
  border-radius: 3px;
}

/* btn */
.abtn {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.83rem;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.abtn-brown {
  background: var(--brown);
  color: var(--gold-light);
}
.abtn-brown:hover {
  background: var(--brown-mid);
}
.abtn-gold {
  background: var(--gold);
  color: var(--brown);
}
.abtn-gold:hover {
  filter: brightness(0.92);
}
.abtn-green {
  background: #2d7a4f;
  color: #fff;
}
.abtn-green:hover {
  opacity: 0.9;
}
.abtn-red {
  background: #c0392b;
  color: #fff;
}
.abtn-sm {
  padding: 5px 11px;
  font-size: 0.75rem;
}
.abtn-block {
  width: 100%;
  justify-content: center;
  border: 1px solid blue;
}
.abtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* toast */
.ap-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--brown);
  color: var(--gold-light);
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  font-size: 0.82rem;
  opacity: 0;
  transition: all 0.28s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.ap-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ap-footer {
  padding: 0.9rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ap-counter {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ════════════════════════════════
   panel-box — پنل ادمین (admin_panel)
   ════════════════════════════════ */
.panel-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 20px 15px;
  margin-bottom: 20px;
  position: relative;
  background-color: var(--warm-white);
}
.box-title {
  position: absolute;
  top: -13px;
  right: 18px;
  background: #fff;
  padding: 0 12px;
  font-weight: 700;
  color: var(--brown-mid);
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 20px;
}
.form-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.input-field {
  flex: 1;
  min-width: 160px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.85rem;
  background: #fff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}
.input-field:focus {
  border-color: var(--gold);
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 16px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}
.photo-grid .photo-card img {
  height: 120px;
}
.photo-grid .photo-info {
  padding: 8px 10px;
  text-align: center;
  font-size: 0.76rem;
  background: var(--warm-white);
  border-top: 1px solid var(--border);
}
.photo-delete-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(192, 57, 43, 0.88);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 3px 9px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: "Vazirmatn", sans-serif;
}

.initial-login-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ── مودال تغییر رمز ── */
.pwd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 5, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10450;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pwd-overlay.open {
  display: flex;
}
.pwd-card {
  background: var(--warm-white);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.pwd-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  color: var(--brown);
  margin-bottom: 0.2rem;
  text-align: center;
}
.pwd-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  text-align: center;
}
.pwd-field {
  margin-bottom: 0.9rem;
}
.pwd-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
}
.pwd-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
  box-sizing: border-box;
}
.pwd-field input:focus {
  border-color: var(--gold);
}
.pwd-btns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.pwd-btns .abtn {
  flex: 1;
  justify-content: center;
}
