/* ==========================================================================
   Taavoni — استایل اصلی و یکپارچه برنامه (Blazor WebAssembly)
   این فایل حاصل ادغام و پاکسازی استایل‌های صفحات قبلی (index/wizard/catalog/
   history/customer/public) است. توکن‌های رنگی جدا در tokens.css قرار دارند.
   ========================================================================== */

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

html, body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background: var(--page-bg);
  color: var(--ink-900);
  direction: rtl;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; }

#app { min-height: 100vh; }


/* ====== از styles.css ====== */

.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

/* ============ Sidebar ============ */
.sidebar {
  background: var(--brand-green-50);
  border-inline-start: 1px solid var(--border);
  color: var(--ink-900);
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.sidebar-card .icon-box {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--brand-green-600);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-card .texts { line-height: 1.5; }
.sidebar-card .texts .title { font-weight: 700; font-size: 14.5px; color: var(--ink-900); }
.sidebar-card .texts .sub { font-size: 12px; color: var(--ink-500); }

.sidebar-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--brand-green-600); color: #fff; text-decoration: none;
  border: none; width: 100%;
  border-radius: 10px; padding: 11px 14px; font-size: 13.5px; font-weight: 700;
  margin-bottom: 22px; cursor: pointer;
}
.sidebar-cta:hover { background: var(--brand-green-500); }

.sidebar-menu-label {
  font-size: 11.5px; color: var(--ink-300); font-weight: 600;
  margin-bottom: 8px; padding: 0 4px;
}

.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 4px; flex: 1; }

.sidebar-menu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--ink-700);
  text-decoration: none;
  font-size: 14px;
  position: relative;
  transition: background .15s ease, color .15s ease;
}
.sidebar-menu li a svg { flex-shrink: 0; }
.sidebar-menu li a:hover { background: var(--brand-green-100); color: var(--brand-green-700); }
.sidebar-menu li a.active {
  background: var(--brand-green-600);
  color: #ffffff;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.sidebar-menu li a.active:hover { background: var(--brand-green-600); }
.sidebar-menu li a .badge-dot {
  margin-inline-start: auto;
  background: var(--danger-bg);
  color: #fff;
  font-size: 11px;
  min-width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-menu li a.active .badge-dot { background: #ffffff; color: var(--danger-bg); }

.sidebar-footer {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brand-green-700);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-size: 12.5px;
}
.sidebar-footer .phone { font-weight: 700; font-size: 14px; margin-top: 2px; display: block; color: var(--ink-900); }

.sidebar-logout {
  display: block;
  text-align: center;
  color: var(--ink-500);
  font-size: 13px;
  margin-top: 14px;
  text-decoration: none;
  transition: color .15s ease;
}
.sidebar-logout:hover { color: var(--danger-bg); }

/* ============ Main ============ */
.main { padding: 22px 28px 40px; min-width: 0; }

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-green-100); color: var(--brand-green-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.btn-outline {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; padding: 8px 14px; font-size: 13.5px;
  color: var(--ink-700); cursor: pointer;
}
.bell {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.bell .dot {
  position: absolute; top: -3px; right: -3px;
  background: var(--danger-bg); color: #fff; font-size: 10.5px;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.topbar-left { text-align: left; display: flex; align-items: center; gap: 10px; }
.topbar-left .texts { text-align: right; }
.topbar-left .title { font-weight: 700; font-size: 15.5px; }
.topbar-left .sub { font-size: 12.5px; color: var(--ink-500); }
.topbar-left .mini-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand-green-600);
}

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.page-head h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.page-head p { color: var(--ink-500); font-size: 13.5px; }

.refresh-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 16px; font-size: 13.5px;
  color: var(--ink-700); cursor: pointer; height: fit-content;
}

/* ---- Stat cards ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon.purple { background: var(--accent-purple-bg); color: var(--accent-purple-fg); }
.stat-icon.blue   { background: var(--accent-blue-bg);   color: var(--accent-blue-fg); }
.stat-icon.orange { background: var(--accent-orange-bg); color: var(--accent-orange-fg); }
.stat-icon.teal   { background: var(--accent-teal-bg);   color: var(--accent-teal-fg); }

.stat-texts .label { font-size: 12.5px; color: var(--ink-500); margin-bottom: 4px; }
.stat-texts .value { font-size: 19px; font-weight: 800; }
.stat-texts .hint { font-size: 11.5px; color: var(--ink-300); margin-top: 2px; }

/* ---- Notice ---- */
.notice {
  background: var(--brand-green-50);
  border: 1px solid var(--brand-green-100);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}
.notice-phone {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 14px;
}
.notice-phone button {
  border: none; background: transparent; cursor: pointer; color: var(--ink-500);
}
.notice-text { display: flex; align-items: center; gap: 8px; flex: 1; }
.notice-text strong { font-size: 13.5px; }
.notice-text p { font-size: 12.5px; color: var(--ink-700); }
.notice-text .info-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-green-100); color: var(--brand-green-700);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---- Toolbar ---- */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.btn-primary {
  background: var(--brand-green-600); color: #fff; border: none;
  border-radius: 10px; padding: 10px 18px; font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; gap: 6px; cursor: pointer;
}
.btn-primary:hover { background: var(--brand-green-500); }
.btn-ghost {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 16px; font-size: 13.5px; color: var(--ink-700);
  cursor: pointer;
}
.select {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; color: var(--ink-700);
  cursor: pointer;
}
.search {
  flex: 1; min-width: 220px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; padding: 9px 14px; color: var(--ink-500);
}
.search input { border: none; outline: none; background: transparent; width: 100%; color: var(--ink-900); }

/* ---- Table ---- */
.table-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: right; font-size: 12.5px; color: var(--ink-500);
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  font-weight: 600; white-space: nowrap;
}
tbody td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; vertical-align: middle; white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fbfcfb; }

.product-cell { display: flex; align-items: center; gap: 10px; }
.product-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand-green-100);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.product-cell .name { font-weight: 700; font-size: 13.5px; }

.sample-cell .name { font-weight: 600; }
.sample-cell .sub { font-size: 12px; color: var(--ink-500); }

.price-cell { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.price-cell .cash { font-weight: 700; font-size: 13.5px; color: var(--ink-900); }
.price-cell .term { color: var(--ink-500); }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
}
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.status-badge.available { background: var(--status-available-bg); color: var(--status-available-fg); }
.status-badge.available .dot { background: var(--status-available-dot); }
.status-badge.half { background: var(--status-half-bg); color: var(--status-half-fg); }
.status-badge.half .dot { background: var(--status-half-dot); }

.table-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; font-size: 12.5px; color: var(--ink-500);
}

/* ---- Mobile hamburger button (hidden on desktop) ---- */
.hamburger-btn { display: none; }

/* ---- Drawer backdrop (mobile sidebar overlay) ---- */
.drawer-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(15, 25, 20, .45);
  z-index: 40;
}
.drawer-backdrop.open { display: block; }

.sidebar-close-btn { display: none; }

/* ---- Bottom nav (mobile only) ---- */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; right: 0; left: 0; z-index: 45;
  background: var(--surface); border-top: 1px solid var(--border);
  align-items: center; justify-content: space-around;
  padding: 7px 4px calc(env(safe-area-inset-bottom, 0px) + 8px);
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: transparent; cursor: pointer;
  color: var(--ink-300); font-size: 10.5px; text-decoration: none;
  padding: 4px 10px;
}
.mobile-nav-item.active { color: var(--brand-green-600); font-weight: 700; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }

  .hamburger-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--ink-700); cursor: pointer; flex-shrink: 0;
  }

  .sidebar {
    position: fixed; top: 0; bottom: 0; right: 0;
    width: 280px; max-width: 82vw; height: 100vh;
    z-index: 50;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-md);
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-close-btn {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--page-bg); border: none; color: var(--ink-500);
    cursor: pointer; margin-bottom: 12px; margin-inline-start: auto;
  }

  .main { padding: 16px 16px 90px; }
  .btn-outline { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  table { min-width: 720px; }
  .table-card { overflow-x: auto; }

  .mobile-bottom-nav { display: flex; }
}

@media (min-width: 1001px) {
  .mobile-bottom-nav { display: none !important; }
  .drawer-backdrop { display: none !important; }
}


/* ====== از wizard.css ====== */

/* ============ صفحه ثبت کالای جدید — ویزارد چندمرحله‌ای ============ */

.wizard-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.wizard-head h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.wizard-head p { color: var(--ink-500); font-size: 13.5px; }

.cancel-link {
  display: flex; align-items: center; gap: 6px;
  color: var(--ink-500); text-decoration: none; font-size: 13.5px;
  margin-bottom: 14px; width: fit-content;
}
.cancel-link:hover { color: var(--danger-bg); }

/* ---- Stepper ---- */
.stepper {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 18px;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 18px;
  overflow-x: auto;
}
.step {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease;
}
.step .num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--page-bg); color: var(--ink-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.step .label { font-size: 13.5px; color: var(--ink-500); font-weight: 600; white-space: nowrap; }

.step.current { background: var(--brand-green-50); border-color: var(--brand-green-100); }
.step.current .num { background: var(--brand-green-600); color: #fff; }
.step.current .label { color: var(--brand-green-700); }

.step.done .num { background: var(--brand-green-600); color: #fff; }
.step.done .label { color: var(--ink-700); }

.step-line { flex: 1; min-width: 22px; height: 2px; background: var(--border); border-radius: 2px; }
.step-line.done { background: var(--brand-green-600); }

/* ---- Step card shell ---- */
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 26px 28px 24px;
  box-shadow: var(--shadow-sm);
}
.step-card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.step-sparkle {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--brand-green-50); color: var(--brand-green-600);
  display: flex; align-items: center; justify-content: center;
}
.step-of { font-size: 12.5px; color: var(--ink-300); }
.step-title { font-size: 19px; font-weight: 800; margin: 12px 0 6px; }
.step-sub { font-size: 13.5px; color: var(--ink-500); margin-bottom: 20px; }

/* ---- Recap chip / breadcrumb ---- */
.recap {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--brand-green-50); border: 1px solid var(--brand-green-100);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
}
.recap .recap-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.recap .recap-texts .title { font-weight: 700; font-size: 14px; }
.recap .recap-texts .sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

.recap-chain {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--brand-green-50); border: 1px solid var(--brand-green-100);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 18px;
  font-size: 13px;
}
.recap-chain .chain-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ink-500); width: 100%; margin-bottom: 4px;
}
.recap-chain .crumb { color: var(--ink-700); font-weight: 600; }
.recap-chain .crumb.accent {
  background: var(--brand-green-600); color: #fff;
  padding: 3px 10px; border-radius: 999px; font-weight: 700;
}
.recap-chain .sep { color: var(--ink-300); }

.notice-inline {
  display: flex; align-items: center; gap: 8px;
  background: var(--brand-green-50); border: 1px solid var(--brand-green-100);
  color: var(--brand-green-700); border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px; margin-bottom: 18px;
}
.notice-inline .icon { flex-shrink: 0; }

/* ---- Search input (step 1 / step 2) ---- */
.step-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; padding: 11px 14px; color: var(--ink-500);
  margin-bottom: 20px;
}
.step-search input { border: none; outline: none; background: transparent; width: 100%; color: var(--ink-900); font-size: 13.5px; }

/* ---- Option grid ---- */
.option-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.option-card {
  position: relative;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 18px 16px;
  text-align: right; cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s ease, background .15s ease;
}
.option-card:hover { border-color: var(--brand-green-500); }
.option-card.selected { border-color: var(--brand-green-600); background: var(--brand-green-50); }
.option-card .opt-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand-green-100); color: var(--brand-green-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
}
.option-card .opt-title { font-weight: 700; font-size: 14px; }
.option-card .opt-sub { font-size: 12px; color: var(--ink-500); }
.option-card .check {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-green-600); color: #fff;
  display: none; align-items: center; justify-content: center;
}
.option-card.selected .check { display: flex; }

.option-grid.compact { grid-template-columns: repeat(4, 1fr); }
.option-grid.two-col { grid-template-columns: repeat(2, 1fr); }

/* ---- Step 6: pricing + inventory form ---- */
.form-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-panel {
  border: 1px solid var(--border); border-radius: 14px; padding: 18px;
}
.form-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.form-panel-head h3 { font-size: 14.5px; font-weight: 700; }
.form-panel-head .icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand-green-100); color: var(--brand-green-700);
  display: flex; align-items: center; justify-content: center;
}

.price-field { margin-bottom: 14px; }
.price-field:last-child { margin-bottom: 0; }
.price-field-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.price-field-label .name { font-size: 13.5px; font-weight: 600; }
.price-field-label .badge-active {
  background: var(--brand-green-600); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
}
.price-field .hint { font-size: 11.5px; color: var(--ink-500); margin-bottom: 6px; }
.field-input {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 13.5px; color: var(--ink-900); background: var(--surface);
}
.field-input:focus { outline: none; border-color: var(--brand-green-500); }

.field-group { margin-bottom: 16px; }
.field-group:last-child { margin-bottom: 0; }
.field-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }

textarea.field-input { resize: vertical; min-height: 90px; font-family: inherit; }

.notice-warning {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--accent-orange-bg); color: #9a5417;
  border-radius: 10px; padding: 12px 14px; font-size: 12.5px; margin-bottom: 18px;
}
.notice-warning .icon { flex-shrink: 0; margin-top: 1px; }

/* ---- Success screen ---- */
.success-screen { text-align: center; padding: 30px 10px 10px; }
.success-screen .check-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--status-available-bg); color: var(--status-available-fg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.success-screen h2 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.success-screen p { font-size: 13.5px; color: var(--ink-500); margin-bottom: 24px; }
.success-actions { display: flex; align-items: center; justify-content: center; gap: 10px; }

/* ---- Footer nav ---- */
.step-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 22px; gap: 12px; flex-wrap: wrap;
}
.step-footer .preview {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-500);
}
.step-footer .preview code {
  background: var(--page-bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 8px; font-family: inherit; direction: ltr; unicode-bidi: embed;
}
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary:disabled:hover { background: var(--brand-green-600); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .option-grid, .option-grid.compact { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .stepper .label { display: none; }
}

/* ====== از catalog.css ====== */

/* ============ صفحه تعریف اطلاعات پایه (کالا/نمونه/نوع محصول/بسته‌بندی) ============ */

.catalog-head { margin-bottom: 18px; }
.catalog-head h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.catalog-head p { color: var(--ink-500); font-size: 13.5px; }

/* ---- Tabs ---- */
.catalog-tabs {
  display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; margin-bottom: 20px;
  width: fit-content; overflow-x: auto;
}
.catalog-tab {
  display: flex; align-items: center; gap: 7px;
  border: none; background: transparent; cursor: pointer;
  padding: 9px 16px; border-radius: 9px; font-size: 13.5px; color: var(--ink-500);
  white-space: nowrap;
}
.catalog-tab .count {
  background: var(--page-bg); color: var(--ink-500);
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px;
}
.catalog-tab.active { background: var(--brand-green-600); color: #fff; font-weight: 700; }
.catalog-tab.active .count { background: rgba(255,255,255,.25); color: #fff; }

/* ---- Toolbar ---- */
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.catalog-toolbar .search { max-width: 320px; }

/* ---- Add / edit panel ---- */
.catalog-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px 24px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: none;
}
.catalog-panel.open { display: block; }
.catalog-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.catalog-panel-head h3 { font-size: 15.5px; font-weight: 700; }
.close-panel {
  border: none; background: var(--page-bg); color: var(--ink-500);
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.catalog-form-grid {
  display: grid; grid-template-columns: 160px 1fr; gap: 22px;
}
.catalog-fields { display: flex; flex-direction: column; gap: 14px; }
.catalog-fields label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.status-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.status-toggle-row .label { font-size: 13px; font-weight: 600; }
.status-toggle-row .hint { font-size: 11.5px; color: var(--ink-500); }
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; background: var(--border); border-radius: 999px;
  cursor: pointer; transition: background .15s ease;
}
.switch .track::before {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 3px; right: 3px; transition: transform .15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--brand-green-600); }
.switch input:checked + .track::before { transform: translateX(-18px); }

.panel-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; }

/* ---- Avatar uploader ---- */
.avatar-upload {
  width: 140px; height: 140px; border-radius: 14px;
  border: 1.5px dashed var(--border); background: var(--page-bg);
  cursor: pointer; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.avatar-upload:hover { border-color: var(--brand-green-500); }
.avatar-upload-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--ink-500); text-align: center; padding: 10px;
}
.avatar-upload-inner .icon { color: var(--brand-green-600); }
.avatar-upload-inner .txt { font-size: 12px; font-weight: 600; color: var(--ink-700); }
.avatar-upload-inner .hint { font-size: 10.5px; color: var(--ink-300); }

.avatar-upload img { width: 100%; height: 100%; object-fit: cover; }
.avatar-remove {
  position: absolute; top: 6px; left: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(20, 20, 20, .55); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.avatar-change-hint {
  position: absolute; bottom: 0; right: 0; left: 0;
  background: rgba(15, 40, 25, .65); color: #fff;
  font-size: 10.5px; text-align: center; padding: 4px 0;
}

/* ---- Item grid ---- */
.catalog-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.catalog-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; text-align: center;
  position: relative;
}
.catalog-item .thumb {
  width: 100%; aspect-ratio: 1.4/1; border-radius: 10px;
  background: var(--brand-green-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin-bottom: 10px; overflow: hidden;
}
.catalog-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.catalog-item .name { font-weight: 700; font-size: 13.5px; }
.catalog-item .meta { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.catalog-item .item-actions {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 4px; opacity: 0; transition: opacity .15s ease;
}
.catalog-item:hover .item-actions { opacity: 1; }
.catalog-item .item-actions button {
  width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-500); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.catalog-item .item-actions button:hover { border-color: var(--brand-green-500); color: var(--brand-green-600); }
.catalog-item .status-dot {
  position: absolute; top: 10px; right: 10px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--status-available-dot);
}
.catalog-item.inactive .status-dot { background: var(--ink-300); }
.catalog-item.inactive { opacity: .55; }

.add-item-card {
  border: 1.5px dashed var(--border); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 14px; cursor: pointer; color: var(--ink-500);
  min-height: 168px;
  background: transparent;
}
.add-item-card:hover { border-color: var(--brand-green-500); color: var(--brand-green-600); }
.add-item-card .plus {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-green-100); color: var(--brand-green-700);
  display: flex; align-items: center; justify-content: center;
}
.add-item-card span.txt { font-size: 12.5px; font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .catalog-form-grid { grid-template-columns: 1fr; }
  .avatar-upload { width: 100%; height: 150px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
}

/* ====== از history.css ====== */

/* ============ صفحه تاریخچه تغییرات ============ */

.history-head { margin-bottom: 18px; }
.history-head h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.history-head p { color: var(--ink-500); font-size: 13.5px; }

/* ---- Toolbar ---- */
.history-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.history-toolbar .search { flex: 1; min-width: 220px; }

/* ---- Timeline ---- */
.timeline-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 6px 26px 22px;
  box-shadow: var(--shadow-sm);
}

.day-group { position: relative; }
.day-label {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface);
  display: flex; align-items: center; gap: 10px;
  padding: 18px 0 12px;
  font-size: 13px; font-weight: 700; color: var(--ink-700);
}
.day-label .count {
  font-size: 11px; font-weight: 600; color: var(--ink-500);
  background: var(--page-bg); border-radius: 999px; padding: 2px 9px;
}

.entries { position: relative; padding-inline-start: 26px; }
.entries::before {
  content: ""; position: absolute; top: 4px; bottom: 4px;
  inset-inline-start: 8px; width: 2px; background: var(--border);
}

.entry {
  position: relative; display: flex; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.entries .entry:last-child { border-bottom: none; }

.entry-dot {
  position: absolute; inset-inline-start: -26px; top: 18px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--brand-green-600);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--brand-green-600);
}
.entry.type-delete .entry-dot { border-color: var(--danger-bg); color: var(--danger-bg); }
.entry.type-status .entry-dot { border-color: var(--accent-orange-fg); color: var(--accent-orange-fg); }
.entry.type-create .entry-dot { border-color: var(--accent-blue-fg); color: var(--accent-blue-fg); }

.entry-icon {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--brand-green-50); color: var(--brand-green-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}

.entry-body { flex: 1; min-width: 0; }
.entry-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.entry-desc { font-size: 13.5px; color: var(--ink-900); line-height: 1.7; }
.entry-desc b { font-weight: 700; }
.entry-time { font-size: 11.5px; color: var(--ink-300); white-space: nowrap; flex-shrink: 0; }

.entry-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.actor-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ink-500);
}
.actor-chip .av {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-green-100); color: var(--brand-green-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700;
}
.entity-tag {
  font-size: 11px; color: var(--ink-500);
  background: var(--page-bg); border-radius: 999px; padding: 2px 10px;
}

.diff-row {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  font-size: 12.5px; flex-wrap: wrap;
}
.diff-old {
  color: var(--ink-300); text-decoration: line-through;
  background: var(--page-bg); border-radius: 6px; padding: 3px 9px;
}
.diff-new {
  color: var(--brand-green-700); font-weight: 700;
  background: var(--brand-green-50); border-radius: 6px; padding: 3px 9px;
}
.diff-arrow { color: var(--ink-300); }

.entry[data-hidden="true"] { display: none; }

.empty-state {
  text-align: center; color: var(--ink-500); font-size: 13px; padding: 40px 0;
}

/* ====== از customer.css ====== */

/* ============ اپلیکیشن مشتری (موبایل) — انتخاب نمایندگی و لیست کالاها ============ */

body { background: var(--page-bg); }

.app-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--surface);
  position: relative;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.screen { display: none; flex-direction: column; min-height: 100vh; }
.screen.active { display: flex; }

/* ---- Header ---- */
.app-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.app-header .icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: none; background: var(--page-bg); color: var(--ink-700);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0;
}
.app-header h1 { font-size: 16px; font-weight: 800; }

.app-search {
  margin: 12px 16px 4px;
  display: flex; align-items: center; gap: 8px;
  background: var(--page-bg); border: 1px solid var(--border);
  border-radius: 11px; padding: 10px 14px; color: var(--ink-500);
}
.app-search input { border: none; outline: none; background: transparent; width: 100%; font-size: 13.5px; color: var(--ink-900); }

/* ---- Representative list ---- */
.rep-list { padding: 6px 16px 20px; flex: 1; }
.rep-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 10px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent;
}
.rep-row + .rep-row { border-top: 1px solid var(--border); border-radius: 0; }
.rep-row.selected { background: var(--brand-green-50); border: 1px solid var(--brand-green-100); border-radius: 12px; }
.rep-row .pin {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-green-100); color: var(--brand-green-700);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rep-row .texts { flex: 1; }
.rep-row .texts .name { font-weight: 700; font-size: 14px; }
.rep-row .texts .loc { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.rep-row .check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-green-600); color: #fff;
  display: none; align-items: center; justify-content: center; flex-shrink: 0;
}
.rep-row.selected .check { display: flex; }

.show-all {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--brand-green-600); font-weight: 700; font-size: 13px;
  padding: 16px 0 6px; cursor: pointer;
}

/* ---- Detail header extras ---- */
.updated-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; font-size: 12px; color: var(--ink-500);
  background: var(--brand-green-50); border-bottom: 1px solid var(--brand-green-100);
}

.app-tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.app-tab {
  border: none; background: transparent; cursor: pointer; white-space: nowrap;
  font-size: 12.5px; color: var(--ink-500); padding: 8px 12px; border-radius: 999px;
  display: flex; align-items: center; gap: 5px;
}
.app-tab.active { background: var(--brand-green-600); color: #fff; font-weight: 700; }
.app-tab .badge {
  background: rgba(255,255,255,.3); font-size: 10.5px; border-radius: 999px; padding: 0 6px;
}
.app-tab:not(.active) .badge { background: var(--page-bg); color: var(--ink-500); }

/* ---- Product list ---- */
.product-list { flex: 1; padding: 6px 16px 90px; }
.product-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.product-row .p-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-green-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.product-row .p-body { flex: 1; min-width: 0; }
.product-row .p-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--status-available-fg);
  margin-bottom: 3px;
}
.product-row .p-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--status-available-dot); }
.product-row .p-status.half { color: var(--status-half-fg); }
.product-row .p-status.half .dot { background: var(--status-half-dot); }
.product-row .p-name { font-weight: 700; font-size: 14px; }
.product-row .p-sub { font-size: 11.5px; color: var(--ink-500); margin-top: 1px; margin-bottom: 8px; }

.price-row { display: flex; gap: 18px; }
.price-block { text-align: center; }
.price-block .p-label { font-size: 10px; color: var(--ink-300); margin-bottom: 2px; }
.price-block .p-value { font-size: 12.5px; color: var(--ink-700); font-weight: 600; }
.price-block.cash .p-value { font-size: 14px; color: var(--brand-green-700); font-weight: 800; }

/* ---- Bottom nav ---- */
.app-bottom-nav {
  position: sticky; bottom: 0; z-index: 5;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 8px 4px 10px;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: transparent; cursor: pointer;
  color: var(--ink-300); font-size: 10.5px;
}
.nav-item.active { color: var(--brand-green-600); font-weight: 700; }

@media (min-width: 431px) {
  body { padding: 24px 0; }
}

/* ==========================================================================
   حالت دسکتاپ — نمایش هم‌زمان لیست نمایندگی‌ها (سایدبار) و کالاها (پنل اصلی)
   ========================================================================== */
.mobile-only { display: inline-flex; }
.desktop-only { display: none; }

@media (min-width: 900px) {
  body { padding: 40px 20px; background: var(--page-bg); }

  .app-shell {
    max-width: 1180px;
    min-height: 0;
    height: calc(100vh - 80px);
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 360px 1fr;
    align-items: stretch;
  }

  .mobile-only { display: none !important; }

  .screen {
    display: flex !important;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  /* ---- ستون راست: انتخاب نمایندگی (سایدبار) ---- */
  #screenSelect {
    border-inline-start: 1px solid var(--border);
    background: var(--page-bg);
  }
  #screenSelect .app-header h1 { font-size: 15px; }
  #screenSelect .rep-list { overflow-y: auto; }

  /* ---- ستون چپ: پنل کالاها ---- */
  #screenDetail { background: var(--surface); }
  #screenDetail .app-header h1 { font-size: 18px; }
  #screenDetail .product-list {
    overflow-y: auto;
    padding: 18px 28px 32px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 24px;
    align-content: start;
  }
  #screenDetail .product-row { padding: 16px 0; }
  #screenDetail .app-tabs { padding: 12px 24px; }
  #screenDetail .updated-bar { padding: 10px 24px; }

  .app-bottom-nav { display: none; }
}

@media (min-width: 1240px) {
  .app-shell { max-width: 1280px; }
}


/* ====== از public.css ====== */

/* ============ صفحه عمومی نمایندگی — استایل‌های اختصاصی ============ */

.public-body { background: var(--page-bg); }
.public-wrap { max-width: 1360px; margin: 0 auto; padding: 22px 28px 60px; }

/* ---- Top bar ---- */
.public-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 34px; flex-wrap: wrap; gap: 14px;
}
.public-topbar-left { display: flex; align-items: center; gap: 14px; }
.back-link {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 16px; font-size: 13.5px;
  color: var(--ink-700); text-decoration: none;
}
.public-phone {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--ink-700); text-decoration: none;
}

.public-topbar-right { display: flex; align-items: center; gap: 12px; }
.public-topbar-right .texts { text-align: right; line-height: 1.7; }
.public-topbar-right .company { font-weight: 700; font-size: 15.5px; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-green-100); color: var(--brand-green-700);
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; margin-top: 4px;
}
.badge-pill .label-muted { color: var(--ink-500); font-weight: 400; }

.public-logo {
  position: relative;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-green-600);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.public-logo .live-dot {
  position: absolute; bottom: -3px; left: -3px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--status-available-dot);
  border: 2px solid var(--page-bg);
}

/* ---- Hero + quick card row ---- */
.hero-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; margin-bottom: 26px; flex-wrap: wrap;
}
.quick-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 14px;
  min-width: 240px;
}
.quick-card .updated-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-500);
}
.quick-card .updated-value { font-size: 15px; font-weight: 700; margin-top: 2px; }
.quick-card .quick-stats { display: flex; gap: 26px; border-top: 1px solid var(--border); padding-top: 12px; }
.quick-card .quick-stat { text-align: center; }
.quick-card .quick-stat .label {
  display: flex; align-items: center; gap: 4px; justify-content: center;
  font-size: 11.5px; color: var(--ink-500); margin-bottom: 2px;
}
.quick-card .quick-stat .value { font-size: 17px; font-weight: 800; }

.hero { text-align: right; flex: 1; min-width: 280px; }
.hero h1 {
  font-size: 40px; font-weight: 800; line-height: 1.35; margin-top: 10px; margin-bottom: 12px;
}
.hero h1 .accent { color: var(--brand-green-500); opacity: .55; }
.hero p { font-size: 14.5px; color: var(--ink-500); max-width: 620px; line-height: 1.9; }

/* ---- Filter / price toolbar ---- */
.public-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.public-toolbar .filters { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 280px; }

.price-tabs { display: flex; align-items: center; gap: 10px; }
.price-tabs .tabs-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-500); }
.price-tabs .tabs-group {
  display: flex; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; gap: 2px;
}
.price-tabs button {
  border: none; background: transparent; cursor: pointer;
  padding: 7px 14px; border-radius: 8px; font-size: 13px; color: var(--ink-700);
}
.price-tabs button.active { background: var(--brand-green-600); color: #fff; font-weight: 700; }

/* ---- Features row ---- */
.features-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin: 26px 0;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
  display: flex; align-items: center; gap: 12px;
}
.feature-card .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-green-100); color: var(--brand-green-700);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feature-card .title { font-weight: 700; font-size: 13.5px; }
.feature-card .sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

/* ---- CTA banner ---- */
.cta-banner {
  background: var(--brand-green-900);
  border-radius: 18px; padding: 26px 30px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 40px;
}
.cta-banner .texts { text-align: right; color: #eaf3ee; }
.cta-banner .texts h3 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.cta-banner .texts p { font-size: 13px; color: #b9d3c4; }
.cta-banner .cta-phone {
  display: flex; align-items: center; gap: 8px;
  background: #ffffff; color: var(--brand-green-700);
  border-radius: 10px; padding: 12px 20px;
  font-weight: 700; font-size: 15px; text-decoration: none; flex-shrink: 0;
}

/* ---- Footer ---- */
.public-footer { border-top: 1px solid var(--border); padding-top: 30px; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px;
  margin-bottom: 24px;
}
.footer-col { text-align: right; }
.footer-col h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 10px; }
.footer-col p { font-size: 12.5px; color: var(--ink-500); line-height: 1.9; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col li {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  font-size: 13px; color: var(--ink-700);
}
.footer-col li .icon { color: var(--brand-green-600); flex-shrink: 0; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 16px;
  font-size: 12px; color: var(--ink-300); flex-wrap: wrap; gap: 8px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .public-wrap { padding: 16px 16px 40px; }
  .hero h1 { font-size: 28px; }
  .features-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  table { min-width: 680px; }
  .table-card { overflow-x: auto; }
}

/* ==========================================================================
   بخش‌های اختصاصی Blazor: صفحه Login، Loading قبل از WASM، خطای Blazor
   ========================================================================== */

/* ---- App Shell Loading (داخل index.html، مستقل از MudBlazor) ---- */
.app-shell-loading {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  background: var(--page-bg, #f4f7f5);
  font-family: Tahoma, sans-serif;
  color: #6b7670;
}
.app-shell-loading-logo {
  width: 56px; height: 56px; border-radius: 16px;
  background: #1a8449;
  display: flex; align-items: center; justify-content: center;
}
.app-shell-loading-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid #e4e9e6; border-top-color: #1a8449;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- اسپینر عمومی (LoadingSpinner.razor / route Navigating) ---- */
.loading-row, .route-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 40px 0; color: var(--ink-500); font-size: 13.5px;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--border); border-top-color: var(--brand-green-600);
  animation: spin 0.8s linear infinite;
}

/* ---- صفحه ورود ---- */
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--page-bg);
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 32px 28px; text-align: center;
  box-shadow: var(--shadow-md);
}
.login-logo {
  width: 52px; height: 52px; border-radius: 14px; background: var(--brand-green-600);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.login-card h1 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.login-card p { font-size: 12.5px; color: var(--ink-500); margin-bottom: 24px; }
.login-card .field-group { text-align: right; margin-bottom: 14px; }
.login-card .field-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.login-hint { margin-top: 16px; font-size: 11px; color: var(--ink-300); }

/* ---- خطای Blazor (المان استاندارد #blazor-error-ui) ---- */
#blazor-error-ui {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: #fff3cd; color: #664d03;
  border-top: 1px solid #ffe69c;
  padding: 12px 16px; font-size: 13px; text-align: center;
}
#blazor-error-ui .reload { color: var(--brand-green-700, #15532f); font-weight: 700; margin-inline-start: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; margin-inline-start: 12px; }
