/* PROMPT 202 — Admin IA foundation (UI only). Vazirmatn / RTL / enterprise cards. */

.pe202-nav.command-center-nav {
  padding: 10px 0 1.75rem;
}

.pe202-group-btn {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.pe202-group-items {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 0 0 10px 10px;
  margin: 0 6px 6px;
  padding: 2px 0 4px;
}

.pe202-group-items > a {
  font-size: 12.5px;
}

/* PROMPT 205-B — sidebar polish only (no IA redesign, no flex!important on links) */
.command-center-nav > a,
.command-center-nav > .nav-group-btn,
.pe202-nav.command-center-nav > a,
.pe202-nav.command-center-nav > .nav-group-btn {
  min-height: 44px;
  padding-top: 11px;
  padding-bottom: 11px;
  gap: 10px;
  border-radius: 0 10px 10px 0;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.command-center-nav > a svg,
.command-center-nav > .nav-group-btn svg:first-child,
.pe202-nav.command-center-nav > a svg,
.pe202-nav.command-center-nav > .nav-group-btn svg:first-child {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.88;
  align-self: center;
}

.command-center-nav > a.active,
.sb-nav a.active {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 18px rgba(255, 255, 255, 0.12);
  border-right-color: #fff;
}

.command-center-nav > .nav-group-btn.open {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.06);
}

.command-center-nav .nav-group-items.open,
.pe202-nav .nav-group-items.open,
.pe202-nav .pe202-group-items {
  /* collapse support stays display:block when open; spacing only */
  margin-bottom: 6px;
}

.command-center-nav .nav-group-items > a {
  min-height: 38px;
  align-items: center;
  gap: 8px;
}

/* Hide via attribute/class only — never force display:flex on hidden nav links */
.command-center-nav a.pe202-hidden,
.command-center-nav a[hidden],
.pe202-nav a.pe202-hidden,
.pe202-nav a[hidden] {
  display: none !important;
}

/* Hub pages */
.pe202-hub {
  direction: rtl;
  font-family: 'Vazirmatn', Vazir, Tahoma, system-ui, sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4px 4px 2rem;
  color: #0f172a;
}

.pe202-hub-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pe202-hub-lead {
  margin: 0 0 1.25rem;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 40rem;
}

.pe202-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.pe202-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: right;
  width: 100%;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border-radius: 16px;
  padding: 14px 14px 14px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.pe202-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}

.pe202-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  color: #4338ca;
  flex-shrink: 0;
}

.pe202-card-body {
  flex: 1;
  min-width: 0;
}

.pe202-card-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pe202-card-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}

.pe202-card-arrow {
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 4px;
}

.pe202-card-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}

/* Dashboard quick actions */
.pe202-dash-actions {
  margin: 0 0 1rem;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.pe202-dash-actions-title {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.pe202-dash-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pe202-chip {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  color: #334155;
  cursor: pointer;
}

.pe202-chip:hover {
  border-color: #a5b4fc;
  background: #eef2ff;
  color: #3730a3;
}

.pe202-dash-hint {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* Offers foundation */
.pe202-offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 1rem;
}

.pe202-offer {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.pe202-offer-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.pe202-offer-top h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.pe202-muted {
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 10px;
}

.pe202-offer-price {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 12px;
}

.pe202-old {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 0.85rem;
}

.pe202-new {
  font-weight: 800;
  font-size: 1.15rem;
  color: #1d4ed8;
}

.pe202-disc {
  font-size: 0.75rem;
  font-weight: 700;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 2px 8px;
}

.pe202-offer-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.8rem;
}

.pe202-offer-meta dt {
  color: #94a3b8;
  font-weight: 600;
  margin: 0;
}

.pe202-offer-meta dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.pe202-st {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.pe202-st-ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.pe202-st-warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.pe202-st-bad {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.pe202-footnote {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0;
}

.pe202-offer-form {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
  background: #f8fafc;
}

.pe202-offer-form summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
}

.pe202-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.pe202-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.pe202-form-grid input {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.85rem;
  color: #0f172a;
}

.pe202-btn {
  appearance: none;
  border: 0;
  background: #4f46e5;
  color: #fff;
  border-radius: 10px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.pe202-btn:hover {
  background: #4338ca;
}

.pe202-empty {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
}

/* Homepage offer banner (public) */
.pe-offer-banner {
  direction: rtl;
  font-family: 'Vazirmatn', Vazir, Tahoma, system-ui, sans-serif;
  position: relative;
  z-index: 5;
  margin: 0 auto;
  max-width: 1120px;
  padding: 0 16px;
}

.pe-offer-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(90deg, #eef2ff, #f5f3ff 50%, #ecfeff);
  border: 1px solid #c7d2fe;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
}

.pe-offer-banner__text {
  flex: 1;
  min-width: 200px;
}

.pe-offer-banner__title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #312e81;
  margin: 0 0 2px;
}

.pe-offer-banner__sub {
  margin: 0;
  font-size: 0.82rem;
  color: #4338ca;
}

.pe-offer-banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.82rem;
  border: 0;
  cursor: pointer;
}

.pe-offer-banner__cta:hover {
  background: #4338ca;
}

.pe-offer-banner__close {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.7);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: #64748b;
  flex-shrink: 0;
}

.pe-offer-banner__close:hover {
  background: #fff;
  color: #0f172a;
}

.pe-offer-banner[hidden],
.pe-offer-banner.is-dismissed {
  display: none !important;
}

@media (max-width: 640px) {
  .pe202-offer-meta {
    grid-template-columns: 1fr;
  }
  .pe-offer-banner__inner {
    padding: 12px;
  }
}
