/* =====================================================================
   سیستم طراحی «خانه صورتی» — فروشگاه لوازم خانه و آشپزخانه
   تم صورتی-طلایی با انرژی گرم و شاد
   ===================================================================== */

/* =====================================================================
   فونت وزیرمتن (در صورت وجود فایل)
   اگر فایل‌های فونت رو داخل assets/fonts/ قرار دادی،
   این بخش رو از حالت کامنت خارج کن:
   ===================================================================== */
/*
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
*/

:root {
  /* ===== رنگ‌های اصلی ===== */
  --pink-50:   #FDF2F5;
  --pink-100:  #FCE4EC;
  --pink-200:  #F8BBD0;
  --pink-300:  #F48FB1;
  --pink-400:  #EC407A;
  --pink-500:  #E91E63;
  --pink-600:  #D81B60;
  --pink-700:  #C2185B;
  --pink-800:  #AD1457;
  --pink-900:  #880E4F;

  --gold-100:  #FFF8E1;
  --gold-200:  #FFECB3;
  --gold-300:  #FFE082;
  --gold-400:  #FFD54F;
  --gold-500:  #FFC107;
  --gold-600:  #FFB300;
  --gold-700:  #F9A825;
  --gold-800:  #F57F17;

  --rose-50:   #FFF0F3;
  --rose-100:  #FFD9E0;
  --rose-200:  #FFB3C1;
  --rose-300:  #FF8AA3;

  --bg: #FDF2F5;
  --surface: #FFFFFF;
  --surface-alt: #FFF8FA;

  --ink: #3D1F2B;
  --ink-soft: #6B4A56;
  --muted: #A8828E;
  --border: #F5D6DE;
  --border-soft: #FBE4EA;

  --danger: #C62828;
  --danger-bg: #FFEBEE;
  --success: #2E7D32;
  --success-bg: #E8F5E9;
  --warn: #F57F17;
  --warn-bg: #FFF8E1;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(233, 30, 99, 0.08);
  --shadow-md: 0 12px 40px -8px rgba(233, 30, 99, 0.18);
  --shadow-lg: 0 20px 60px -12px rgba(233, 30, 99, 0.25);
  --sidebar-w: 268px;
}

/* ---------------------------------------------------------------------
   ریست پایه + تایپوگرافی
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  /* وقتی فونت وزیرمتن فعال شد، این خط رو عوض کن:
     font-family: 'Vazirmatn', "Segoe UI", Tahoma, Arial, sans-serif;
  */
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  max-width: 100%;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: .5rem;
  font-weight: 700;
  color: var(--pink-800);
  line-height: 1.3;
}
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }
p { margin-top: 0; margin-bottom: 1rem; }
a { color: var(--pink-600); text-decoration: none; }
a:hover { color: var(--pink-800); text-decoration: underline; }
img { max-width: 100%; vertical-align: middle; border-style: none; }
ul, ol { padding-right: 1.5rem; margin-top: 0; }
table { border-collapse: collapse; }
button { font-family: inherit; }
::selection { background: var(--gold-200); color: var(--pink-900); }

/* ---------------------------------------------------------------------
   گرید ساده
   --------------------------------------------------------------------- */
.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 1rem; }
.row { display: flex; flex-wrap: wrap; margin-inline: -0.5rem; max-width: 100%; }
.row > * { padding-inline: 0.5rem; margin-top: 0; width: 100%; }
.row.g-2 { row-gap: .5rem; }
.row.g-3 { row-gap: 1rem; }
.row.g-4 { row-gap: 1.5rem; }

.col-auto { flex: 0 0 auto; width: auto; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-12 { flex: 0 0 auto; width: 100%; }

.col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8,
.col-lg-4, .col-lg-8 { flex: 0 0 auto; width: 100%; }

@media (min-width: 768px) {
  .col-md-3 { width: 25%; }
  .col-md-4 { width: 33.3333%; }
  .col-md-5 { width: 41.6667%; }
  .col-md-6 { width: 50%; }
  .col-md-7 { width: 58.3333%; }
  .col-md-8 { width: 66.6667%; }
}
@media (min-width: 992px) {
  .col-lg-4 { width: 33.3333%; }
  .col-lg-8 { width: 66.6667%; }
}

/* ---------------------------------------------------------------------
   یوتیلیتی‌های عمومی
   --------------------------------------------------------------------- */
.d-flex { display: flex; }
.d-inline { display: inline; }
.flex-fill { flex: 1 1 auto; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.align-middle { vertical-align: middle; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: 1rem; }
.w-100 { width: 100%; }
.w-50 { width: 50%; }
.h-100 { height: 100%; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }
.mt-5 { margin-top: 3rem; }
.me-2 { margin-inline-start: .5rem; }
.ms-auto { margin-inline-start: auto; }
.mx-3 { margin-inline: 1rem; }
.py-2 { padding-block: .5rem; }
.py-3 { padding-block: 1rem; }
.py-4 { padding-block: 1.5rem; }
.border-0 { border: 0 !important; }
.border-bottom { border-bottom: 1px solid var(--border); }
.rounded { border-radius: var(--radius-sm); }
.text-center { text-align: center; }
.text-end { text-align: end; }
.text-nowrap { white-space: nowrap; }
.text-decoration-none { text-decoration: none; }
.small { font-size: .85rem; }
.fs-5 { font-size: 1.15rem; }
.fw-bold { font-weight: 700; }
.text-muted { color: var(--muted); }
.text-dark { color: var(--ink); }
.text-white { color: #fff; }
.text-white-50 { color: rgba(255,255,255,.6); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--pink-600); }
.text-warning { color: var(--gold-700); }
.bg-white { background: var(--surface); }
.bg-dark { background: var(--pink-900) !important; }
.img-fluid { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------------
   دکمه‌ها
   --------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 2px solid transparent;
  padding: .5rem 1.2rem;
  font-size: 1rem;
  border-radius: 50px;
  transition: all .25s ease;
  background: var(--surface-alt);
  color: var(--ink);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233, 30, 99, 0.2); }
.btn-sm { padding: .35rem .9rem; font-size: .82rem; border-radius: 50px; }
.btn-primary {
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  border-color: var(--pink-500);
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
  border-color: var(--pink-600);
  color: #fff;
  box-shadow: 0 6px 25px rgba(233, 30, 99, 0.35);
}
.btn-success {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border-color: var(--gold-500);
  color: var(--ink);
}
.btn-success:hover {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  border-color: var(--gold-600);
  color: var(--ink);
  box-shadow: 0 6px 25px rgba(255, 193, 7, 0.4);
}
.btn-secondary {
  background: var(--pink-100);
  border-color: var(--pink-200);
  color: var(--pink-700);
}
.btn-secondary:hover {
  background: var(--pink-200);
  border-color: var(--pink-300);
  color: var(--pink-800);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.15);
}
.btn-outline-primary {
  background: transparent;
  color: var(--pink-600);
  border-color: var(--pink-300);
}
.btn-outline-primary:hover {
  background: var(--pink-500);
  color: #fff;
  border-color: var(--pink-500);
}
.btn-outline-secondary {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--border);
}
.btn-outline-secondary:hover {
  background: var(--pink-50);
  color: var(--pink-700);
  border-color: var(--pink-300);
}
.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: #EF9A9A;
}
.btn-outline-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger);
}
.btn-link {
  background: transparent;
  border-color: transparent;
  color: var(--pink-600);
  text-decoration: underline;
  padding-inline: .25rem;
}
.btn-link:hover { color: var(--pink-800); background: transparent; transform: none; box-shadow: none; }

/* ---------------------------------------------------------------------
   فرم‌ها
   --------------------------------------------------------------------- */
.form-label {
  display: inline-block;
  margin-bottom: .4rem;
  font-weight: 600;
  font-size: .875rem;
  color: var(--ink-soft);
}
.form-control, .form-select {
  display: block;
  width: 100%;
  padding: .55rem .85rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus, .form-select:focus {
  outline: 0;
  border-color: var(--pink-300);
  box-shadow: 0 0 0 .25rem rgba(233, 30, 99, 0.12);
  background: var(--surface);
}
.form-control-sm, .form-select-sm { padding: .35rem .65rem; font-size: .85rem; }
textarea.form-control { min-height: 80px; }
select.form-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23A8828E' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left .7rem center;
  background-size: 14px 10px;
  padding-left: 2rem;
}

/* ---------------------------------------------------------------------
   تب‌های صفحه تنظیمات
   --------------------------------------------------------------------- */
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: .75rem;
}
.settings-tab-btn {
  border: 1px solid var(--border-soft);
  background: var(--surface-alt);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: .5rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.settings-tab-btn:hover { background: var(--pink-50); }
.settings-tab-btn.active {
  background: var(--pink-700);
  border-color: var(--pink-700);
  color: #fff;
}
.settings-panel { display: none; }
.settings-panel.active { display: block; }

/* ---------------------------------------------------------------------
   گالری عکس‌های کالا (پنل مدیریت)
   --------------------------------------------------------------------- */
.gallery-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb .cover-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: var(--pink-700);
  color: #fff;
  font-size: .6rem;
  padding: 1px 6px;
  border-radius: 20px;
}
.gallery-thumb-actions {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  background: rgba(0,0,0,.45);
  padding: 2px 4px;
}
.gallery-thumb-actions button {
  border: none;
  background: transparent;
  color: #fff;
  font-size: .8rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.gallery-thumb-actions button:hover { color: var(--pink-100, #fbd2e0); }

/* ---------------------------------------------------------------------
   گالری عکس صفحه محصول (فروشگاه)
   --------------------------------------------------------------------- */
.product-gallery {
  position: relative;
  border: 3px solid var(--pink-500);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--surface-alt);
}
.product-gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .4s ease;
}
.product-gallery-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}
.product-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  color: var(--pink-700);
  border: 1px solid var(--pink-300);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  z-index: 2;
  user-select: none;
}
.product-gallery-arrow:hover { background: var(--pink-500); color: #fff; }
.product-gallery-arrow.next { left: 8px; }
.product-gallery-arrow.prev { right: 8px; }
.product-gallery-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}
.product-gallery-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--pink-500);
  cursor: pointer;
}
.product-gallery-dots span.active { background: var(--pink-700); }

/* ---------------------------------------------------------------------
   انتخاب رنگ کالا (صفحه محصول فروشگاه)
   --------------------------------------------------------------------- */
.variant-swatch {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid var(--border-soft);
  cursor: pointer;
  transition: all .15s ease;
  padding: 0;
}
.variant-swatch:hover { transform: translateY(-2px); }
.variant-swatch.active {
  border-color: var(--pink-700);
  box-shadow: 0 0 0 2px var(--pink-100, #fbd2e0);
}

/* ---------------------------------------------------------------------
   پیشنهاد شگفت‌انگیز (صفحه اصلی)
   --------------------------------------------------------------------- */
.deal-section {
  background: linear-gradient(135deg, var(--pink-700), var(--pink-500));
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 24px;
}
.deal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.deal-section-header h2 {
  color: #fff;
  font-size: 1.15rem;
  margin: 0;
}
.deal-countdown {
  background: rgba(0,0,0,.25);
  color: #fff;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}
.deal-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.deal-card {
  position: relative;
  flex: 0 0 150px;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  scroll-snap-align: start;
  transition: transform .15s ease;
}
.deal-card:hover { transform: translateY(-3px); }
.deal-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.deal-card-soldout { filter: contrast(80%) saturate(65%); }
.deal-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--pink-700);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  z-index: 2;
}
.deal-card-body { padding: 8px; }
.deal-card-name {
  font-size: .78rem;
  line-height: 1.3;
  height: 2.5em;
  overflow: hidden;
  margin-bottom: 4px;
}
.deal-card-prices { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.deal-price { color: var(--pink-700); font-weight: 700; font-size: .85rem; }
.deal-old-price { color: var(--muted); font-size: .72rem; text-decoration: line-through; }
.deal-stock-bar { background: var(--border-soft); border-radius: 20px; height: 6px; overflow: hidden; }
.deal-stock-fill { height: 100%; background: linear-gradient(90deg, var(--pink-500), var(--pink-700)); }
.deal-soldout-label { color: #b91c4a; font-size: .7rem; font-weight: 700; }

/* ---------------------------------------------------------------------
   کارت‌ها
   --------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  transition: all .3s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.card-header {
  background: linear-gradient(135deg, var(--pink-50), var(--rose-50));
  border-bottom: 1px solid var(--border-soft);
  font-weight: 700;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: .9rem 1.1rem;
  color: var(--pink-800);
}
.card-footer {
  padding: .9rem 1.1rem;
  border-top: 1px solid var(--border-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.card-body { flex: 1 1 auto; padding: 1.1rem; }
.card-title { margin-bottom: .5rem; font-size: 1.05rem; }
.card-img-top {
  width: 100%;
  border-top-right-radius: var(--radius-lg);
  border-top-left-radius: var(--radius-lg);
  object-fit: cover;
}

/* ---------------------------------------------------------------------
   جدول‌ها
   --------------------------------------------------------------------- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--ink);
  border-color: var(--border);
}
.table thead th {
  background: linear-gradient(135deg, var(--pink-50), var(--rose-50));
  color: var(--pink-700);
  font-weight: 700;
  font-size: .8rem;
  border-bottom: 2px solid var(--pink-200);
  text-align: right;
}
.table td, .table th {
  vertical-align: middle;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--border-soft);
}
.table-sm td, .table-sm th { padding: .45rem .6rem; }
.table-hover tbody tr:hover { background: var(--pink-50); }

/* ---------------------------------------------------------------------
   ناوبری تب‌دار
   --------------------------------------------------------------------- */
.nav { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.nav-item { margin: 0; }
.nav-link {
  display: block;
  padding: .5rem 1rem;
  color: var(--pink-600);
  text-decoration: none;
  border-radius: 50px 50px 0 0;
  font-weight: 600;
}
.nav-tabs {
  border-bottom: 2px solid var(--border);
  gap: .25rem;
}
.nav-tabs .nav-link {
  color: var(--muted);
  border: none;
  border-radius: 50px 50px 0 0;
  padding: .5rem 1.2rem;
}
.nav-tabs .nav-link.active {
  color: var(--pink-700);
  background: var(--surface);
  border-bottom: 3px solid var(--gold-400);
  font-weight: 700;
}

/* ---------------------------------------------------------------------
   هشدارها
   --------------------------------------------------------------------- */
.alert {
  position: relative;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
}
.alert-success {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  color: var(--success);
  border-right: 4px solid var(--success);
}
.alert-danger {
  background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
  color: var(--danger);
  border-right: 4px solid var(--danger);
}
.alert-info {
  background: linear-gradient(135deg, var(--pink-50), var(--rose-50));
  color: var(--pink-700);
  border-right: 4px solid var(--pink-300);
}
.alert-warning {
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  color: var(--warn);
  border-right: 4px solid var(--gold-400);
}
.alert-jewel { border-radius: var(--radius-md); }

/* ---------------------------------------------------------------------
   لیست‌ها
   --------------------------------------------------------------------- */
.list-group {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  border-radius: var(--radius-md);
  list-style: none;
}
.list-group-flush .list-group-item { border-inline: 0; border-radius: 0; }
.list-group-item {
  padding: .6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
}
.list-group-item + .list-group-item { border-top-width: 0; }

/* ---------------------------------------------------------------------
   مودال ساده
   --------------------------------------------------------------------- */
.modal {
  display: none;
  position: fixed; inset: 0; z-index: 1050;
  align-items: center; justify-content: center;
  background: rgba(136, 14, 79, 0.45);
  padding: 1rem;
}
.modal.is-open { display: flex; }
.modal-dialog { width: 100%; max-width: 420px; }
.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(135deg, var(--pink-50), var(--rose-50));
}
.modal-title { margin: 0; font-size: 1rem; color: var(--pink-800); }
.modal-close {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.modal-body { padding: 1.1rem; }
.modal-footer {
  padding: .9rem 1.1rem;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

/* =====================================================================
   پنل مدیریت — قالب اصلی (با تم صورتی)
   ===================================================================== */
.admin-body { background: var(--bg); min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  background: linear-gradient(135deg, var(--pink-700), var(--pink-800));
  padding: .85rem 1.25rem;
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.25);
}
.topbar-title {
  font-size: 1.15rem;
  margin: 0;
  flex: 1;
  color: #fff;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
  white-space: nowrap;
}
.topbar-user .user-name {
  font-weight: 700;
  color: #fff;
}
.topbar-user .user-role {
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: .15rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.btn-logout {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
}
.btn-logout:hover {
  background: var(--pink-50);
  color: var(--pink-700);
}

.sidebar-toggle {
  display: none;
  width: 38px; height: 34px;
  border: none;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.sidebar-toggle span {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.sidebar {
  position: fixed; top: 0; bottom: 0; right: 0;
  width: var(--sidebar-w);
  background: linear-gradient(190deg, var(--pink-800), var(--pink-900) 75%);
  color: #fff;
  display: flex; flex-direction: column;
  z-index: 40;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.25rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand-gem { color: var(--gold-400); font-size: 1.1rem; }
.brand-text {
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
}

.sidebar-nav { padding: .75rem; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem .8rem;
  border-radius: 12px;
  color: rgba(255,255,255,0.78);
  font-weight: 600;
  font-size: .88rem;
  white-space: nowrap;
  text-decoration: none;
  transition: all .2s ease;
}
.sidebar-nav .nav-link .ic { flex: 0 0 auto; font-size: 1rem; width: 22px; text-align: center; }
.sidebar-nav .nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.sidebar-nav .nav-link.active {
  background: linear-gradient(90deg, rgba(255,193,7,0.25), rgba(255,193,7,0.06));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--gold-400);
}
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.1); margin: .6rem .8rem; }
.sidebar-nav .nav-link-view-site {
  background: rgba(46, 204, 113, 0.15);
  color: #6fe3a0;
  box-shadow: inset 3px 0 0 #2ecc71;
}
.sidebar-nav .nav-link-view-site:hover {
  background: rgba(46, 204, 113, 0.28);
  color: #fff;
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(136, 14, 79, 0.45);
  z-index: 35;
}
.sidebar-overlay.is-visible { display: block; }

.admin-main { margin-right: var(--sidebar-w); min-height: 100vh; }
.content { padding: 1.5rem; max-width: 1400px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 992px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}
.stat-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--accent, var(--pink-400));
}
.stat-card .stat-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: .6rem;
  background: var(--accent-bg, var(--pink-100));
}
.stat-card .stat-label {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .15rem;
}
.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pink-800);
}
.stat-card.accent-sale     { --accent: #D81B60; --accent-bg: #F8BBD0; }
.stat-card.accent-purchase { --accent: #AD1457; --accent-bg: #F48FB1; }
.stat-card.accent-debt     { --accent: #F9A825; --accent-bg: #FFECB3; }
.stat-card.accent-credit   { --accent: #C62828; --accent-bg: #FFCDD2; }

.mini-stat {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.mini-stat .label {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}
.mini-stat .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--pink-800);
  margin-top: .2rem;
}
.mini-stat .value.danger { color: var(--danger); }

@media (max-width: 992px) {
  .sidebar { transform: translateX(100%); transition: transform .25s ease; box-shadow: var(--shadow-md); }
  .sidebar.is-open { transform: translateX(0); }
  .admin-main { margin-right: 0; }
  .sidebar-toggle { display: inline-flex; }
  .content { padding: 1rem; }
  .topbar-user .user-role { display: none; }
}
@media (max-width: 420px) { .topbar-user .user-name { display: none; } }

/* =====================================================================
   صفحه ورود / نصب اولیه
   ===================================================================== */
.auth-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,193,7,0.12), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(233,30,99,0.15), transparent 45%),
    linear-gradient(160deg, var(--pink-800), var(--pink-900) 60%, var(--pink-800));
  padding: 1.5rem;
}
.auth-wrap { width: 100%; max-width: 400px; }
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.75rem;
}
.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 800;
  color: var(--pink-700);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}
.auth-brand .brand-gem { color: var(--gold-500); font-size: 1.2rem; }
.auth-wrap p.text-muted,
.auth-wrap p.text-muted a { color: rgba(255,255,255,0.75) !important; }
.auth-wrap p.text-muted a {
  color: var(--gold-400) !important;
  font-weight: 600;
}

/* =====================================================================
   فروشگاه (بخش عمومی سایت) — تم صورتی-طلایی
   ===================================================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 0;
}
.navbar.navbar-dark.bg-dark {
  background: linear-gradient(135deg, var(--pink-700), var(--pink-900)) !important;
  padding-inline: 1rem;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
}
.navbar-brand:hover { color: var(--gold-300); }
body:not(.admin-body) .card {
  transition: all .3s ease;
  border-radius: var(--radius-lg);
}
body:not(.admin-body) .card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
body:not(.admin-body) .card .card-footer .btn-primary {
  border-radius: 50px;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
}
body:not(.admin-body) .card .card-footer .btn-primary:hover {
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
}

/* منوی دسته‌بندی فروشگاه */
.bg-white.border-bottom {
  background: var(--surface) !important;
  border-bottom: 2px solid var(--border-soft) !important;
}
.bg-white.border-bottom a {
  color: var(--ink-soft) !important;
  font-weight: 500;
  padding: .3rem .8rem;
  border-radius: 50px;
  transition: all .2s ease;
}
.bg-white.border-bottom a:hover {
  color: var(--pink-600) !important;
  background: var(--pink-50);
  text-decoration: none;
}

/* لینک‌های هدر فروشگاه */
.navbar .text-white {
  color: rgba(255,255,255,0.9) !important;
}
.navbar .text-white:hover {
  color: var(--gold-300) !important;
  text-decoration: none;
}
.navbar .text-warning {
  color: var(--gold-300) !important;
}
.navbar .text-warning:hover {
  color: var(--gold-200) !important;
}

/* جستجو در هدر فروشگاه */
.navbar .form-control {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50px;
}
.navbar .form-control::placeholder {
  color: rgba(255,255,255,0.6);
}
.navbar .form-control:focus {
  background: rgba(255,255,255,0.18);
  border-color: var(--gold-400);
  box-shadow: 0 0 0 0.25rem rgba(255,193,7,0.15);
}

/* =====================================================================
   نوار دسته‌بندی‌ها (زیر هدر)
   ===================================================================== */
.category-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
}
@media (min-width: 576px) {
  .category-nav { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
  .category-nav { grid-template-columns: repeat(6, 1fr); }
}
.category-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 3rem;
  padding: .5rem .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  color: var(--ink);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
  transition: all .2s ease;
}
.category-chip:hover {
  background: var(--pink-50);
  border-color: var(--pink-300);
  color: var(--pink-800);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.category-chip.active {
  background: var(--pink-700);
  border-color: var(--pink-700);
  color: #fff;
}

/* =====================================================================
   فیلد تاریخ شمسی
   ===================================================================== */
.jalali-date-field { display: flex; gap: .4rem; }
.jalali-date-field select { flex: 1 1 0; min-width: 0; }
.jalali-date-field .jd-month { flex: 1.5 1 0; }

/* =====================================================================
   جدول جمع‌بندی فاکتور
   ===================================================================== */
.invoice-summary { width: 100%; }
@media (min-width: 768px) {
  .invoice-summary { width: 50%; margin-inline-start: auto; }
}

#itemsTable { min-width: 640px; }

/* =====================================================================
   کارت‌های محصول در فروشگاه — حاشیه صورتی
   ===================================================================== */
body:not(.admin-body) .card .card-img-top {
  border-bottom: 3px solid var(--pink-100);
}

body:not(.admin-body) .card .card-title {
  color: var(--pink-800);
}

body:not(.admin-body) .card .fw-bold.text-primary {
  color: var(--pink-600) !important;
}

/* دکمه «افزودن به سبد خرید» در کارت محصولات */
body:not(.admin-body) .card .btn-primary {
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  border: none;
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
}
body:not(.admin-body) .card .btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--ink);
  transform: scale(1.02);
}

/* دکمه «ثبت نهایی سفارش» در checkout */
.btn-success {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border: none;
  color: var(--ink);
  border-radius: 50px;
}
.btn-success:hover {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: var(--ink);
}

/* =====================================================================
   فوتر فروشگاه
   ===================================================================== */
footer.bg-dark {
  background: linear-gradient(135deg, var(--pink-800), var(--pink-900)) !important;
  border-top: 3px solid var(--gold-400);
}
footer.bg-dark .text-white-50 {
  color: rgba(255,255,255,0.7) !important;
}