/* ------------------------------------------------------------------
   افزوده‌های کنار Tailwind کامپایل‌شده (assets/css/tailwind.css)
   - تعریف متغیر فونت
   - چند کلاس کمکی کوچک
   - استایل اختصاصی پنل مدیریت
   ------------------------------------------------------------------ */

:root {
  --font-vazirmatn: "Vazirmatn", ui-sans-serif, system-ui, "Segoe UI", Tahoma, sans-serif;
}

html {
  font-family: var(--font-sans);
}

/* لینک‌های ساده */
.link-plain {
  color: inherit;
  text-decoration: none;
}

/* پنهان‌کردن دکمه‌های وابسته به جاوااسکریپت وقتی JS نیست */
html:not(.js) .js-only {
  display: none !important;
}

/* ---------- پنل مدیریت ---------- */

.admin-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  background: #f5f1e9;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
}

.admin-sidebar {
  background: #16181d;
  color: #a9b0bc;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #f5f1e9;
  font-weight: 900;
  padding: 0.25rem 0.5rem;
}

.admin-sidebar__brand span.logo-box {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: #b4482a;
  color: #f5f1e9;
  font-size: 1.1rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  color: #a9b0bc;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.admin-nav a:hover {
  background: #24272e;
  color: #f5f1e9;
}

.admin-nav a.is-active {
  background: #b4482a;
  color: #fff;
}

.admin-nav .pill {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0 0.45rem;
  font-size: 0.68rem;
  line-height: 1.5;
}

.admin-main {
  padding: 1.75rem clamp(1rem, 3vw, 2.5rem) 3rem;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.admin-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #16181d;
}

.admin-subtitle {
  font-size: 0.78rem;
  color: #878f9d;
  margin-top: 0.15rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.stat-card {
  background: #fff;
  border: 1px solid #e7e0d3;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}

.stat-card b {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: #b4482a;
}

.stat-card small {
  display: block;
  font-size: 0.72rem;
  color: #656d7c;
  margin-top: 0.25rem;
}

/* جدول‌های مدیریت */
.table-wrap {
  background: #fff;
  border: 1px solid #e7e0d3;
  border-radius: 1rem;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 640px;
}

.admin-table th {
  text-align: right;
  background: #efe9dd;
  color: #454b57;
  font-weight: 700;
  padding: 0.7rem 0.9rem;
  white-space: nowrap;
  font-size: 0.74rem;
}

.admin-table td {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid #efe9dd;
  color: #2b2f38;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #fbf9f5;
}

.admin-table .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* فرم‌ها */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.field {
  display: block;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #454b57;
  margin-bottom: 0.4rem;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field input[type="url"],
.field input[type="email"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #d9d0bf;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.62rem 0.8rem;
  font-size: 0.82rem;
  color: #16181d;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
  resize: vertical;
  line-height: 1.9;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #de8d71;
  box-shadow: 0 0 0 3px rgba(246, 219, 208, 0.7);
}

.field .hint {
  display: block;
  font-size: 0.7rem;
  color: #878f9d;
  margin-top: 0.3rem;
}

.field .error {
  display: block;
  font-size: 0.72rem;
  color: #bf3b2b;
  margin-top: 0.3rem;
  font-weight: 600;
}

.field input.has-error,
.field select.has-error,
.field textarea.has-error {
  border-color: #bf3b2b;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #454b57;
}

.checkbox-row input {
  width: 1rem;
  height: 1rem;
  accent-color: #b4482a;
}

.color-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.color-row input[type="color"] {
  width: 100%;
  height: 2.6rem;
  padding: 0.15rem;
  border: 1px solid #d9d0bf;
  border-radius: 0.65rem;
  background: #fff;
}

/* دکمه‌ها */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.75rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  line-height: 1.4;
}

.btn-primary {
  background: #b4482a;
  color: #fff;
}

.btn-primary:hover {
  background: #9a3820;
}

.btn-dark {
  background: #1e2128;
  color: #f5f1e9;
}

.btn-dark:hover {
  background: #b4482a;
}

.btn-ghost {
  border-color: #d9d0bf;
  color: #454b57;
  background: #fff;
}

.btn-ghost:hover {
  border-color: #1e2128;
}

.btn-danger {
  border-color: #ecb8a5;
  color: #bf3b2b;
  background: #fff;
}

.btn-danger:hover {
  background: #bf3b2b;
  color: #fff;
  border-color: #bf3b2b;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  border-radius: 0.6rem;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* پیام‌ها */
.flash {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid;
}

.flash-success {
  background: #dff0e7;
  border-color: #b9dcc9;
  color: #22644a;
}

.flash-error {
  background: #fbeee9;
  border-color: #ecb8a5;
  color: #9a3820;
}

.badge {
  display: inline-block;
  border-radius: 0.4rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.badge-on {
  background: #dff0e7;
  color: #22644a;
}

.badge-off {
  background: #f2f4f7;
  color: #656d7c;
}

.badge-new {
  background: #fbeee9;
  color: #9a3820;
}

/* پیام‌های خالی */
.empty-state {
  background: #fff;
  border: 1px dashed #d9d0bf;
  border-radius: 1rem;
  padding: 3rem 1rem;
  text-align: center;
  color: #878f9d;
  font-size: 0.85rem;
}

/* صفحه‌ی نصب */
.install-wrap {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem 4rem;
}

.install-card {
  background: #fff;
  border: 1px solid #e7e0d3;
  border-radius: 1.25rem;
  padding: 1.75rem;
}

@media (max-width: 640px) {
  .install-card {
    padding: 1.25rem;
  }
}

/* ------------------------------------------------------------------
   اسلایدر بنر اصلی
   ------------------------------------------------------------------ */

.hero-slide {
  position: absolute;
  inset: 1.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.hero-slide.is-active {
  position: relative;
  inset: auto;
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 640px) {
  .hero-slide {
    inset: 2.5rem;
  }

  .hero-slide.is-active {
    inset: auto;
  }
}

.hero-slide .hero-anim {
  opacity: 0;
}

.hero-slide.is-active .hero-anim {
  animation: fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-cover.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-dot span {
  display: block;
  height: 0.25rem;
  width: 1rem;
  border-radius: 9999px;
  background: #d9d0bf;
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot:hover span {
  background: #a9b0bc;
}

.hero-dot.is-active span {
  width: 2.25rem;
  background: #b4482a;
}

/* ------------------------------------------------------------------
   چند utility کوچک که در نسخه‌ی Next استفاده نشده بود و در فایل
   کامپایل‌شده وجود ندارد.
   ------------------------------------------------------------------ */

.max-w-xs {
  max-width: 20rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.min-h-screen {
  min-height: 100vh;
}

.object-cover {
  object-fit: cover;
}

.w-auto {
  width: auto;
}

.cursor-pointer {
  cursor: pointer;
}

.max-h-72 {
  max-height: 18rem;
}

.overflow-y-auto {
  overflow-y: auto;
}

.uppercase {
  text-transform: uppercase;
}

.w-28 {
  width: 7rem;
}

.text-right {
  text-align: right;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.gap-x-8 {
  column-gap: 2rem;
}

.space-y-2 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.5rem;
}

.divide-line > :not([hidden]) ~ :not([hidden]) {
  border-color: #e7e0d3;
}

.border-alert-500 {
  border-color: #bf3b2b;
}

/* چیدمان دوستونی فرم‌های پنل */
.admin-cols {
  display: grid;
  gap: 1.25rem;
}

.admin-cols--narrow {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .admin-cols {
    grid-template-columns: 380px 1fr;
  }

  .admin-cols--narrow {
    grid-template-columns: 360px 1fr;
  }
}

.admin-cover-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .admin-cover-grid {
    grid-template-columns: 200px 1fr;
  }
}

