/* ==========================================================================
   1. متغیرها و ریست کلی (Variables & Global Reset)
   ========================================================================== */
:root {
  --green: #173f35;
  --green-2: #245b4c;
  --lime: #c9e86b;
  --cream: #f5f1e7;
  --paper: #fffcf5;
  --ink: #18201d;
  --muted: #69746f;
  --white: #ffffff;
  --red: #cf5545;
  --line: rgba(23, 63, 53, 0.13);
  --shadow: 0 24px 70px rgba(20, 55, 46, 0.13);
}

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

body {
  font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

button, input, textarea, select {
  font: inherit;
}

button, a {
  cursor: pointer;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   2. استایل‌های صفحات احراز هویت (Auth Pages)
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

/* بخش گرافیکی سمت راست */
.auth-visual {
  background: linear-gradient(145deg, #0d2b23, #245b4c);
  color: #fff;
  padding: 55px 6vw;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-visual::before {
  width: 460px;
  height: 460px;
  border: 95px solid rgba(201, 232, 107, 0.07);
  left: -170px;
  top: -170px;
}

.auth-visual::after {
  width: 260px;
  height: 260px;
  background: rgba(201, 232, 107, 0.07);
  right: -130px;
  bottom: -100px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.brand-mark {
  width: 55px;
  height: 55px;
  border-radius: 50% 50% 47% 53%;
  background: var(--lime);
  color: var(--green);
  display: grid;
  place-items: center;
  transform: rotate(-7deg);
}

.brand-mark i,
.brand-mark svg {
  width: 28px;
  height: 28px;
}

.brand strong {
  font-size: 21px;
  display: block;
}

.brand small {
  font-size: 9px;
  letter-spacing: 2.5px;
  color: #aec4bd;
}

.auth-message {
  position: relative;
  z-index: 2;
  max-width: 540px;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  padding: 7px 14px;
  color: var(--lime);
  font-size: 12px;
  margin-bottom: 18px;
}

.auth-eyebrow i,
.auth-eyebrow svg {
  width: 15px;
  height: 15px;
}

.auth-message h1 {
  font-size: clamp(34px, 4.5vw, 62px);
  line-height: 1.35;
  font-weight: 900;
}

.auth-message h1 em {
  font-style: normal;
  color: var(--lime);
}

.auth-message p {
  font-size: 14px;
  color: #c4d5d0;
  line-height: 2;
  margin-top: 16px;
  max-width: 470px;
}

.auth-perks {
  display: flex;
  gap: 24px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.auth-perks span {
  font-size: 12px;
  color: #bfd0cb;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-perks i,
.auth-perks svg {
  width: 18px;
  height: 18px;
  color: var(--lime);
}

/* پنل فرم سمت چپ */
.auth-panel {
  padding: 40px 8vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(460px, 100%);
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 30px;
  transition: color 0.2s;
}

.back-home:hover {
  color: var(--green);
}

.back-home i,
.back-home svg {
  width: 16px;
  height: 16px;
}

.auth-card h2 {
  font-size: 28px;
  color: var(--green);
  margin-bottom: 6px;
}

.auth-card > p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* تب‌ها */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--cream);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 24px;
}

.auth-tab {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 4px 14px rgba(23, 63, 53, 0.08);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  margin-bottom: 16px;
}

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

.field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  display: block;
  margin-bottom: 8px;
}

/* حل قطعی مشکل تراز آیکون‌ها و فیلدهای متنی */
.input-wrap {
  position: relative;
  width: 100%;
  display: block;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0 44px;
  outline: 0;
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block;
}

.input-wrap input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.08);
}

.input-wrap > i,
.input-wrap > svg {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #8d9a94;
  pointer-events: none;
  z-index: 2;
}

/* دکمه نمایش / مخفی‌سازی رمز عبور */
.password-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  z-index: 3;
  transition: color 0.2s, background-color 0.2s;
}

.password-toggle:hover {
  color: var(--green);
  background-color: var(--cream);
}

.password-toggle i,
.password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

/* متادیتا و دکمه ارسال */
.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 20px;
}

.checkbox-label,
.terms {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.form-meta a {
  color: var(--green);
  font-weight: 700;
}

.form-meta a:hover {
  text-decoration: underline;
}

.terms {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.submit-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-btn:hover:not(:disabled) {
  background: var(--green-2);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(23, 63, 53, 0.16);
}

.submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.submit-btn i,
.submit-btn svg {
  width: 18px;
  height: 18px;
}

.admin-entry {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.admin-entry a {
  color: var(--green);
  font-weight: 800;
}

/* اعلان Toast */
.auth-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--green);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(30px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.auth-toast.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   3. استایل‌های پنل ادمین (Admin Panel)
   ========================================================================== */
.admin-body {
  background: #f3f5ef;
  min-height: 100vh;
}

.admin-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 270px;
  background: #102e27;
  color: #fff;
  padding: 23px 15px;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
  direction: rtl;
}

.admin-sidebar::-webkit-scrollbar {
  width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
  background: #1a423b;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: #c9e86b;
  border-radius: 10px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
  background: #b5d656;
}

.admin-sidebar .brand {
  padding: 0 9px 20px;
  border-bottom: 1px solid rgba(201, 232, 107, 0.15);
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 5px;
  padding: 12px;
  background: rgba(201, 232, 107, 0.08);
  border-radius: 14px;
  border: 1px solid rgba(201, 232, 107, 0.15);
}

.admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--lime);
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.admin-user strong {
  font-size: 13px;
  display: block;
  color: #fff;
}

.admin-user small {
  font-size: 10px;
  color: #9fb4ad;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  flex: 1;
}

.admin-nav button {
  border: 0;
  background: transparent;
  color: #aebfba;
  padding: 11px 12px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s ease;
  width: 100%;
}

.admin-nav button.active,
.admin-nav button:hover {
  background: rgba(201, 232, 107, 0.16);
  color: var(--lime);
  transform: translateX(-2px);
}

.admin-nav button i,
.admin-nav button svg {
  width: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 232, 107, 0.1);
}

.sidebar-footer a,
.sidebar-footer button {
  border: 0;
  border-radius: 11px;
  background: rgba(201, 232, 107, 0.1);
  color: #bed0ca;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: 0.2s ease;
}

.sidebar-footer a:hover,
.sidebar-footer button:hover {
  background: rgba(201, 232, 107, 0.2);
  color: var(--lime);
  transform: translateX(-2px);
}

.sidebar-footer a i,
.sidebar-footer button i,
.sidebar-footer a svg,
.sidebar-footer button svg {
  width: 17px;
}

.admin-main {
  grid-column: 2;
  padding: 0 30px 45px;
}

.admin-top {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(243, 245, 239, 0.91);
  backdrop-filter: blur(14px);
  z-index: 40;
}

.admin-top h1 {
  font-size: 22px;
  color: var(--green);
}

.admin-top p {
  font-size: 12px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 8px;
}

.top-action {
  height: 39px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.top-action.primary {
  background: var(--green);
  color: #fff;
}

.top-action i,
.top-action svg {
  width: 16px;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.welcome-card {
  background: linear-gradient(120deg, #173f35, #2d6556);
  color: #fff;
  border-radius: 25px;
  padding: 27px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.welcome-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 45px solid rgba(201, 232, 107, 0.08);
  border-radius: 50%;
  left: -65px;
  top: -95px;
}

.welcome-card h2 {
  font-size: 23px;
  margin-bottom: 5px;
}

.welcome-card p {
  font-size: 13px;
  color: #c3d4cf;
}

.welcome-card i,
.welcome-card svg {
  width: 55px;
  height: 55px;
  color: var(--lime);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin: 17px 0;
}

.admin-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.stat-symbol {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #edf4df;
  color: var(--green);
  display: grid;
  place-items: center;
}

.stat-symbol i,
.stat-symbol svg {
  width: 20px;
}

.admin-stat b {
  display: block;
  font-size: 18px;
  color: var(--green);
}

.admin-stat small {
  font-size: 12px;
  color: var(--muted);
}

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

.quick-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  text-align: right;
}

.quick-card i,
.quick-card svg {
  width: 25px;
  color: var(--green);
  margin-bottom: 18px;
}

.quick-card strong {
  display: block;
  color: var(--green);
  font-size: 12px;
}

.quick-card small {
  font-size: 9px;
  color: var(--muted);
}

.editor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 17px;
}

.editor-head h2 {
  color: var(--green);
  font-size: 22px;
}

.editor-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.editor-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 14px;
}

.editor-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 17px;
}

.editor-card-title strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 14px;
}

.editor-card-title i,
.editor-card-title svg {
  width: 18px;
}

.item-number {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: var(--cream);
  display: grid;
  place-items: center;
  font-size: 9px;
  color: var(--green);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
}

.admin-field.full {
  grid-column: 1 / -1;
}

.admin-field label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 6px;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fafbf7;
  border-radius: 11px;
  padding: 10px 12px;
  outline: 0;
  font-size: 13px;
}

.admin-field textarea {
  min-height: 85px;
  resize: vertical;
  line-height: 1.9;
}

.admin-field input:focus,
.admin-field textarea:focus {
  border-color: var(--green);
  background: #fff;
}

.repeater-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.repeater-item {
  border: 1px solid var(--line);
  background: #fafbf7;
  border-radius: 15px;
  padding: 14px;
}

.repeater-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.icon-preview {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #edf4df;
  color: var(--green);
  display: grid;
  place-items: center;
}

.icon-preview i,
.icon-preview svg {
  width: 15px;
}

.save-bar {
  position: sticky;
  bottom: 14px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(13px);
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(23, 63, 53, 0.13);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  z-index: 30;
}

.save-bar span {
  font-size: 9px;
  color: var(--muted);
  padding-right: 7px;
}

.save-button {
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 11px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
}

.save-button i,
.save-button svg {
  width: 16px;
}

.mobile-admin-menu {
  display: none;
}

/* ==========================================================================
   4. تقویم شمسی Jalali Date Picker
   ========================================================================== */
.jp-wrap {
  position: fixed;
  z-index: 9999;
  width: 310px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(23, 63, 53, 0.16);
  padding: 14px;
  display: none;
  direction: rtl;
  left: auto;
  right: auto;
}

.jp-wrap.jp-open {
  display: block;
  animation: jpFade 0.2s ease;
}

@keyframes jpFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

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

.jp-title {
  border: 0;
  background: var(--cream);
  color: var(--green);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.jp-title:hover {
  background: #e2edd0;
}

.jp-nav {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--green);
}

.jp-nav:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.jp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}

.jp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.jp-empty {
  height: 34px;
}

.jp-day {
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  transition: 0.15s;
}

.jp-day:hover {
  background: var(--cream);
  color: var(--green);
}

.jp-today {
  color: var(--green);
  font-weight: 800;
  border: 1px solid var(--green);
}

.jp-selected {
  background: var(--green) !important;
  color: #fff !important;
  font-weight: 800;
}

.jp-disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
}

/* ── بخش ساعت ────────────────────────────────────────────── */
.jp-time {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.jp-time-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
  justify-content: center;
}

.jp-time-label i,
.jp-time-label svg { width: 13px; height: 13px; }

.jp-time-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  direction: ltr;
}

.jp-time-spin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.jp-tspin-up,
.jp-tspin-dn {
  width: 32px;
  height: 26px;
  border: 1px solid var(--line);
  background: #fafbf7;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--green);
  cursor: pointer;
  transition: all 0.15s;
}

.jp-tspin-up:hover,
.jp-tspin-dn:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.jp-tspin-up i, .jp-tspin-up svg,
.jp-tspin-dn i, .jp-tspin-dn svg { width: 13px; height: 13px; }

.jp-th,
.jp-tm {
  width: 52px;
  height: 36px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  background: #fff;
  outline: 0;
  font-family: inherit;
}

.jp-th:focus,
.jp-tm:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(201, 232, 107, 0.35);
}

.jp-colon {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  padding-bottom: 2px;
}

/* ── فوتر تقویم ─────────────────────────────────────────── */
.jp-footer {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.jp-today-btn,
.jp-clear-btn,
.jp-confirm-btn {
  border: 0;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.jp-today-btn {
  background: var(--cream);
  color: var(--green);
}

.jp-today-btn:hover { background: #e2edd0; }

.jp-clear-btn {
  background: rgba(207, 85, 69, 0.1);
  color: var(--red);
}

.jp-clear-btn:hover {
  background: var(--red);
  color: #fff;
}

.jp-confirm-btn {
  background: var(--green);
  color: #fff;
}

.jp-confirm-btn:hover {
  background: var(--green-2);
  transform: translateY(-1px);
}

/* ==========================================================================
   5. جدول محصولات و دکمه‌ها (Products Table & Extra)
   ========================================================================== */
.responsive-table-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 15px;
  border: 1px solid var(--line);
}

.modern-admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

.modern-admin-table th, 
.modern-admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.modern-admin-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  background: #f9fafb;
}

.badge-green { background: #e0f2fe; color: #0284c7; padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; }
.badge-red { background: #fee2e2; color: #ef4444; padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; }
.badge-orange { background: #ffedd5; color: #f97316; padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; }

.small-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.edit-product-btn { background: #f3f4f6; color: #374151; font-weight: 600; }
.delete-product-btn { background: #fef2f2; color: #ef4444; font-weight: 600; }
.action-btns-container { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   استایل‌های افزودنی برای فرم محصول
   ========================================================================== */

/* عنوان بخش‌های فرم */
.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--green);
  font-weight: 800;
  font-size: 14px;
  margin: 20px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.form-section-title i,
.form-section-title svg {
  width: 18px;
  height: 18px;
  margin-left: 8px;
}

/* دکمه افزودن مشخصه و گالری */
.btn-add-spec {
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-spec:hover {
  background: var(--green-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(23, 63, 53, 0.2);
}

.btn-add-spec i,
.btn-add-spec svg {
  width: 14px;
  height: 14px;
}

/* ردیف مشخصات (Specs Row) */
.spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  background: #fafbf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  transition: all 0.2s ease;
}

.spec-row:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(23, 63, 53, 0.08);
}

.spec-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 9px 11px;
  outline: 0;
  font-size: 12px;
  color: var(--ink);
  transition: border-color 0.2s;
}

.spec-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.08);
}

.spec-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.spec-remove {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(207, 85, 69, 0.3);
  background: rgba(207, 85, 69, 0.1);
  color: var(--red);
  border-radius: 9px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.spec-remove:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  transform: scale(1.05);
}

.spec-remove i,
.spec-remove svg {
  width: 14px;
  height: 14px;
}

/* باکس آپلود تصویر */
.upload-box {
  width: 100%;
}

.upload-preview {
  width: 100%;
  height: 180px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: #fafbf7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
}

.upload-preview:hover {
  border-color: var(--green);
  background: #f5f7f0;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

#uploadPlaceholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  pointer-events: none;
}

#uploadPlaceholder i,
#uploadPlaceholder svg {
  width: 32px;
  height: 32px;
}

#uploadPlaceholder span {
  font-size: 12px;
}

#uploadStatus {
  font-size: 11px;
  margin-top: 6px;
  display: none;
}

/* گالری تصاویر */
#galleryList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 50px;
}

#galleryList > div {
  position: relative;
  width: 100px;
  height: 100px;
}

#galleryList img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--line);
}

#galleryList button {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(207, 85, 69, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

#galleryList button:hover {
  background: var(--red);
  transform: scale(1.1);
}

#galleryList button i,
#galleryList button svg {
  width: 12px;
  height: 12px;
}

#galleryList span {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--green);
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 700;
  z-index: 10;
}

/* چک‌باکس‌های سفارشی */
.admin-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--green);
}

.admin-field label {
  cursor: pointer;
  user-select: none;
}

/* ==========================================================================
   6. طراحی واکنش‌گرا (Responsive)
   ========================================================================== */
@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    min-height: 330px;
    padding: 35px 25px;
  }
  .auth-message h1 {
    font-size: 38px;
  }
  .auth-perks {
    display: none;
  }
  .auth-panel {
    padding: 35px 20px;
  }
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    transform: translateX(105%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    grid-column: 1;
    padding: 0 15px 40px;
  }
  .mobile-admin-menu {
    display: grid;
    width: 39px;
    height: 39px;
    border: 0;
    background: #fff;
    border-radius: 11px;
    place-items: center;
    color: var(--green);
    position: relative;
    z-index: 51;
  }
  .admin-stats,
  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-form-grid,
  .repeater-grid {
    grid-template-columns: 1fr;
  }
  .admin-field.full {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .auth-visual {
    min-height: 290px;
  }
  .auth-message h1 {
    font-size: 31px;
  }
  .auth-message p {
    font-size: 11px;
  }
  .auth-panel {
    align-items: flex-start;
  }
  .input-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .auth-toast {
    right: 15px;
    left: 15px;
    bottom: 15px;
    text-align: center;
  }
}