/* =========================================================================
   ARIAN CABLE — PROFESSIONAL ADMIN PANEL UI/UX SYSTEM
   Scoped strictly to .admin-workspace and .admin-submodal-overlay
   ========================================================================= */

.admin-workspace {
  --adm-navy: #0F172A;
  --adm-navy-2: #1E293B;
  --adm-blue: #2563EB;
  --adm-blue-soft: #EFF6FF;
  --adm-amber: #F59E0B;
  --adm-amber-soft: #FFFBEB;
  --adm-bg: #F8FAFC;
  --adm-surface: #FFFFFF;
  --adm-border: #E2E8F0;
  --adm-text: #0F172A;
  --adm-muted: #475569;
  --adm-dim: #64748B;
  --adm-success: #059669;
  --adm-success-bg: #ECFDF5;
  --adm-warning: #D97706;
  --adm-warning-bg: #FFFBEB;
  --adm-danger: #DC2626;
  --adm-danger-bg: #FEF2F2;
  --adm-radius: 14px;
  --adm-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --adm-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  background: var(--adm-bg);
  color: var(--adm-text);
}

/* Top Header Bar */
.admin-workspace .admin-top-bar {
  background: var(--adm-navy);
  color: #FFFFFF;
  border-bottom: 2px solid var(--adm-amber);
  padding: 0 20px;
  height: 64px;
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.16);
  z-index: 20;
}

.admin-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-topbar-logo {
  height: 34px;
  width: auto;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 3px 8px;
  flex-shrink: 0;
}

.admin-topbar-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-topbar-badge {
  background: rgba(245, 158, 11, 0.14);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  position: relative;
  flex-shrink: 0;
}

.admin-icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

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

.admin-topbar-search {
  flex: 1;
  max-width: 340px;
  position: relative;
}

.admin-topbar-search input {
  width: 100%;
  height: 36px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 0 36px 0 12px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.83rem;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.admin-topbar-search input::placeholder {
  color: #94A3B8;
}

.admin-topbar-search input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--adm-amber);
}

.admin-topbar-search svg {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  pointer-events: none;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-bot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E2E8F0;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.admin-bot-pill:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.admin-bot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.admin-bot-dot.offline {
  background: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}

.admin-header-pill-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--adm-navy);
}

.admin-topbar-btn-site {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  padding: 0 12px !important;
  height: 36px;
  border-radius: 10px !important;
  font-family: inherit;
  font-size: 0.8rem !important;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.admin-topbar-btn-site:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

.admin-topbar-btn-logout {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #FCA5A5 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  padding: 0 12px !important;
  height: 36px;
  border-radius: 10px !important;
  font-family: inherit;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.admin-topbar-btn-logout:hover {
  background: rgba(239, 68, 68, 0.32) !important;
  color: #FFFFFF !important;
}

/* Workspace Body & Sidebar */
.admin-workspace .admin-workspace-body {
  display: flex;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 64px);
  overflow: hidden;
  background: var(--adm-bg);
}

.admin-workspace .admin-sidebar {
  width: 268px;
  background: var(--adm-surface);
  border-left: 1px solid var(--adm-border);
  padding: 14px 12px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto !important;
  max-height: calc(100vh - 64px);
  position: relative;
  top: 0;
  transition: width 0.22s ease, padding 0.22s ease, transform 0.22s ease;
}

.admin-nav-group-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94A3B8;
  padding: 12px 10px 4px;
  letter-spacing: 0.2px;
  user-select: none;
}

.admin-nav-group-label:first-child {
  padding-top: 4px;
}

.admin-workspace .admin-tab-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--adm-muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
  text-align: right;
  width: 100%;
  position: relative;
}

.admin-workspace .admin-tab-item svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.admin-workspace .admin-tab-item span:first-of-type {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-workspace .admin-tab-item:hover {
  background: #F1F5F9;
  border-color: transparent;
  color: var(--adm-navy);
}

.admin-workspace .admin-tab-item.active {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-color: #0F172A;
  color: #FFFFFF;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

.admin-workspace .admin-tab-item.active svg {
  color: var(--adm-amber);
  opacity: 1;
}

.admin-workspace .admin-badge-count {
  background: var(--adm-blue);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
  line-height: 1.3;
}

/* Collapsed Desktop Sidebar */
.admin-workspace.sidebar-collapsed .admin-sidebar {
  width: 74px;
  padding: 14px 8px;
}

.admin-workspace.sidebar-collapsed .admin-nav-group-label,
.admin-workspace.sidebar-collapsed .admin-tab-item span {
  display: none;
}

.admin-workspace.sidebar-collapsed .admin-tab-item {
  justify-content: center;
  padding: 11px;
}

/* Main Panel */
.admin-workspace .admin-main-panel {
  flex: 1;
  padding: 24px 28px 48px;
  overflow-y: auto;
  background: var(--adm-bg);
  min-width: 0;
}

/* Cards, KPIs, Charts & Tables */
.admin-workspace .admin-form-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow-sm);
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.admin-kpi-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 18px;
  box-shadow: var(--adm-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.admin-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--adm-shadow);
  border-color: #CBD5E1;
}

.admin-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-kpi-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--adm-dim);
}

.admin-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-kpi-value {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--adm-navy);
  line-height: 1.2;
}

.admin-kpi-sub {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--adm-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-dash-grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-dash-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--adm-navy);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-bar-label {
  width: 120px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--adm-muted);
  flex-shrink: 0;
}

.admin-bar-track {
  flex: 1;
  height: 10px;
  background: #F1F5F9;
  border-radius: 999px;
  overflow: hidden;
}

.admin-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.admin-bar-val {
  width: 64px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--adm-navy);
  flex-shrink: 0;
}

.admin-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.admin-quick-btn {
  background: #F8FAFC;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--adm-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.16s ease;
}

.admin-quick-btn:hover {
  background: var(--adm-navy);
  color: #FFFFFF;
  border-color: var(--adm-navy);
}

/* Tables */
.admin-workspace .admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-workspace .admin-table th {
  background: #F8FAFC;
  color: var(--adm-muted);
  font-size: 0.79rem;
  font-weight: 800;
  padding: 12px 14px;
  border-bottom: 1px solid var(--adm-border);
  text-align: right;
  white-space: nowrap;
}

.admin-workspace .admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.84rem;
  color: var(--adm-text);
  vertical-align: middle;
}

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

/* Status Pills */
.adm-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}
.adm-pill.success { background: var(--adm-success-bg); color: var(--adm-success); }
.adm-pill.warning { background: var(--adm-warning-bg); color: var(--adm-warning); }
.adm-pill.danger  { background: var(--adm-danger-bg);  color: var(--adm-danger); }
.adm-pill.info    { background: var(--adm-blue-soft);  color: var(--adm-blue); }

/* Mobile Sidebar Backdrop */
.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 25;
}

.admin-sidebar-backdrop.active {
  display: block;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-dash-grid-2 {
    grid-template-columns: 1fr;
  }
  .admin-topbar-badge {
    display: none;
  }
}

@media (max-width: 992px) {
  .admin-mobile-only {
    display: inline-flex;
  }
  .admin-desktop-only {
    display: none !important;
  }
  .admin-topbar-search {
    display: none;
  }
  .admin-workspace .admin-sidebar {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    width: 280px;
    z-index: 30;
    transform: translateX(100%);
    box-shadow: -8px 0 28px rgba(15, 23, 42, 0.18);
  }
  .admin-workspace .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .admin-workspace .admin-main-panel {
    padding: 16px 14px 36px;
  }
  .admin-bot-pill {
    display: none;
  }
}

@media (max-width: 600px) {
  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }
  .admin-workspace .admin-top-bar {
    padding: 0 12px;
  }
  .admin-topbar-title {
    font-size: 0.9rem;
  }
  .admin-topbar-btn-site span,
  .admin-topbar-btn-logout span {
    display: none;
  }
  .admin-workspace .admin-form-card {
    overflow-x: auto;
    padding: 14px;
  }
}

/* Unified Pricing, Forms, Modals & Yekan Bakh FaNum Tabular Polish */
.admin-workspace,
.admin-workspace input,
.admin-workspace select,
.admin-workspace textarea,
.admin-workspace button,
.admin-submodal-overlay,
.admin-submodal-box,
.admin-submodal-box input,
.admin-submodal-box select,
.admin-submodal-box textarea,
.admin-submodal-box button {
  font-family: 'Yekan Bakh', 'Vazirmatn', sans-serif !important;
  font-variant-numeric: tabular-nums;
}

.admin-workspace .input-field-group label,
.admin-submodal-box .input-field-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.admin-workspace .form-input-control,
.admin-submodal-box .form-input-control {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
  box-sizing: border-box;
}

.admin-workspace .form-input-control:focus,
.admin-submodal-box .form-input-control:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.admin-submodal-box .form-input-control.adm-readonly-field {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0F172A;
  font-weight: 800;
  cursor: default;
}

.admin-submodal-overlay {
  backdrop-filter: blur(4px);
}

.admin-submodal-box {
  border-radius: 18px !important;
  border: 1px solid #E2E8F0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22) !important;
}

.adm-price-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.35;
}

.adm-base-price {
  font-size: 0.78rem;
  color: #94A3B8;
  text-decoration: line-through;
  font-weight: 600;
}

.adm-base-price-plain {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 700;
}

.adm-final-price {
  font-size: 0.96rem;
  color: #0F172A;
  font-weight: 900;
}

.adm-disc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  white-space: nowrap;
}

.adm-disc-pill.none {
  background: #F1F5F9;
  color: #64748B;
  border-color: #E2E8F0;
}

.adm-pricing-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
}

.adm-pricing-box-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adm-pricing-preview-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 2px 10px;
  border-radius: 999px;
}

/* Crisp Code Badge inside true table-cell */
.adm-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.84rem;
  color: #92400E;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  padding: 4px 10px;
  border-radius: 7px;
  direction: ltr;
  white-space: nowrap;
}

/* Admin Catalog Filter & Action Strip */
.adm-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.adm-filter-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}

.adm-filter-select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--adm-border);
  border-radius: 9px;
  background: #F8FAFC;
  color: #0F172A;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  min-width: 170px;
  max-width: 260px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.adm-filter-select:focus {
  border-color: var(--adm-accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.adm-filter-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Products Table Pro Alignment & Compact Geometry */
.admin-products-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.admin-products-table thead th {
  background: #F8FAFC;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 11px 12px;
  border-bottom: 1.5px solid var(--adm-border);
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}

.admin-products-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  font-size: 0.88rem;
  color: #0F172A;
}

.admin-products-table tbody tr:hover {
  background: #F8FAFC;
}

.adm-prod-title {
  font-weight: 800;
  color: #0F172A;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 4px;
}

.adm-prod-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.adm-prod-cat-chip {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 2px 8px;
  border-radius: 6px;
}

.adm-prod-brand-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  padding: 2px 8px;
  border-radius: 6px;
}

.adm-specs-cell {
  font-size: 0.79rem;
  color: #475569;
  line-height: 1.6;
  max-width: 220px;
}

.adm-stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 800;
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
  white-space: nowrap;
}

.adm-stock-pill.out {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FECACA;
}

.adm-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.adm-batch-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E3A8A;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.83rem;
  font-weight: 800;
  margin-bottom: 14px;
}


/* =========================================================================
   WIDE PRODUCT MODALS, JALALI SHAMSI PICKER & VISUAL PRODUCT DROPDOWN
   ========================================================================= */
.admin-submodal-box {
  max-width: min(1100px, 96vw) !important;
  width: min(1100px, 96vw) !important;
  max-height: 92vh !important;
  padding: 28px 30px !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}
.admin-submodal-box.submodal-compact {
  max-width: 680px !important;
  width: min(680px, 95vw) !important;
}
.admin-workspace .admin-form-card,
.admin-workspace .admin-form-grid,
.admin-submodal-box .admin-form-grid,
.admin-workspace .input-field-group,
.admin-submodal-box .input-field-group {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.admin-table-responsive {
  width: 100%;
  overflow-x: auto;
  max-width: 100%;
}
.adm-code-ltr-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Vazirmatn', monospace !important;
  font-feature-settings: "ss01" 0, "tnum" 1;
  direction: ltr;
  text-align: left;
}

/* Interactive Jalali (Shamsi) Calendar Picker */
.jalali-picker-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
.jalali-input-display {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-weight: 700 !important;
  cursor: text;
}
.jalali-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 42px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #1E293B;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.jalali-trigger-btn:hover {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #1D4ED8;
}
.arian-jalali-popover {
  position: fixed;
  z-index: 20500;
  width: min(340px, 94vw);
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 14px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.24);
  padding: 14px;
  direction: rtl;
  font-family: 'Yekan Bakh', 'Vazirmatn', sans-serif;
}
.jcal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}
.jcal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #0F172A;
  font-weight: 900;
  cursor: pointer;
}
.jcal-nav-btn:hover {
  background: #E2E8F0;
}
.jcal-select {
  flex: 1;
  height: 32px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 0 6px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  background: #FFFFFF;
  color: #0F172A;
}
.jcal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: #64748B;
}
.jcal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.jcal-day {
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #F8FAFC;
  color: #0F172A;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jcal-day:hover {
  background: #DBEAFE;
  color: #1D4ED8;
}
.jcal-day.today {
  border-color: #F59E0B;
  background: #FFFBEB;
  color: #92400E;
}
.jcal-day.selected {
  background: #1D4ED8;
  color: #FFFFFF;
  font-weight: 900;
}
.jcal-day.empty {
  background: transparent;
  cursor: default;
  pointer-events: none;
}
.jcal-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #E2E8F0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}
.jcal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 10px;
}

/* Visual Accordion / Dropdown Product Search */
.adm-visual-search-wrap {
  position: relative;
  width: 100%;
}
.admin-topbar-search.adm-visual-search-wrap .adm-visual-dropdown {
  right: 0;
  left: auto;
  text-align: right;
  color: #0F172A;
}
.adm-visual-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 10600;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  max-height: 330px;
  overflow-y: auto;
  display: none;
}
.adm-visual-dropdown.open {
  display: block;
}
.adm-visual-dropdown-hdr {
  padding: 7px 12px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  font-size: 0.75rem;
  font-weight: 800;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.adm-visual-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #F1F5F9;
  cursor: pointer;
  transition: background 0.14s ease;
  text-align: right;
  width: 100%;
  background: #FFFFFF;
  border-left: none;
  border-right: none;
  border-top: none;
}
.adm-visual-item:hover,
.adm-visual-item.selected {
  background: #EFF6FF;
}
.adm-visual-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  flex-shrink: 0;
  padding: 2px;
}
.adm-visual-info {
  flex: 1;
  min-width: 0;
}
.adm-visual-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-visual-sub {
  font-size: 0.74rem;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}
.adm-visual-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.adm-visual-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 9px;
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0F172A;
}
.adm-visual-chip img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: contain;
  background: #FFFFFF;
}
.adm-visual-chip button {
  background: #FEE2E2;
  color: #DC2626;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.adm-nearby-accordion {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 14px;
}
.adm-nearby-accordion summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 800;
  color: #1E3A8A;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.adm-nearby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
@media (max-width: 768px) {
  .admin-submodal-box {
    padding: 18px 14px !important;
    width: 97vw !important;
  }
  .admin-submodal-box .admin-form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Studio Image Strip & Interactive Hover Calibrator */
.adm-studio-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.adm-studio-tile {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 14px;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  flex-shrink: 0;
}

.adm-studio-tile:hover {
  border-color: #2563EB;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.14);
}

.adm-studio-tile.is-primary {
  border-color: #2563EB;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.adm-studio-tile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.adm-studio-primary-badge {
  position: absolute;
  bottom: 4px;
  right: 6px;
  left: 6px;
  background: rgba(37, 99, 235, 0.92);
  color: #FFFFFF;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
  padding: 2px 4px;
  border-radius: 6px;
  pointer-events: none;
}

.adm-studio-tile-hover {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  opacity: 0;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

.adm-studio-tile:hover .adm-studio-tile-hover {
  opacity: 1;
}

.adm-studio-tile-actions {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  display: flex;
  justify-content: space-between;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.adm-studio-tile:hover .adm-studio-tile-actions {
  opacity: 1;
}

.adm-studio-mini-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(15, 23, 42, 0.78);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.adm-studio-mini-btn.star:hover { background: #2563EB; }
.adm-studio-mini-btn.del:hover  { background: #DC2626; }

.adm-studio-add-tile {
  width: 104px;
  height: 104px;
  border-radius: 14px;
  border: 2px dashed #94A3B8;
  background: #FFFFFF;
  color: #475569;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 800;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
  flex-shrink: 0;
}

.adm-studio-add-tile:hover {
  border-color: #2563EB;
  background: #EFF6FF;
  color: #1D4ED8;
}

.adm-img-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 22000;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.adm-img-editor-modal {
  width: min(1020px, 96vw);
  max-height: 92vh;
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid #CBD5E1;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.38);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  direction: rtl;
}

.adm-img-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.adm-img-editor-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.95fr);
  overflow-y: auto;
  flex: 1;
}

.adm-img-editor-stage-col {
  padding: 18px;
  background: #F1F5F9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-left: 1px solid #E2E8F0;
}

.adm-img-canvas-frame {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 2px solid #94A3B8;
  background-image:
    linear-gradient(45deg, #E2E8F0 25%, transparent 25%),
    linear-gradient(-45deg, #E2E8F0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #E2E8F0 75%),
    linear-gradient(-45deg, transparent 75%, #E2E8F0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #FFFFFF;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

#admCalibCanvas {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: grab;
  touch-action: none;
}

#admCalibCanvas.grabbing {
  cursor: grabbing;
}

.adm-calib-preview-card {
  width: min(440px, 100%);
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.adm-img-editor-ctrl-col {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FFFFFF;
}

.adm-ctrl-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-ctrl-card-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.adm-tool-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-tool-btn {
  flex: 1;
  min-width: 68px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #1E293B;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  transition: all 0.14s ease;
}

.adm-tool-btn:hover {
  border-color: #2563EB;
  color: #1D4ED8;
  background: #EFF6FF;
}

.adm-tool-btn.active {
  background: #1D4ED8;
  border-color: #1D4ED8;
  color: #FFFFFF;
}

.adm-range-row {
  display: grid;
  grid-template-columns: 96px 1fr 48px;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
}

.adm-range-row input[type="range"] {
  width: 100%;
  accent-color: #2563EB;
  cursor: pointer;
}

.adm-range-val {
  direction: ltr;
  text-align: center;
  font-family: ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 800;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 2px 4px;
  color: #0F172A;
}

.adm-img-editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
}

@media (max-width: 820px) {
  .adm-img-editor-body {
    grid-template-columns: 1fr;
  }
  .adm-img-editor-stage-col {
    border-left: none;
    border-bottom: 1px solid #E2E8F0;
  }
}

/* Variants, Wire Colors & Earth Model Differential Pricing Builder */
.adm-variants-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px;
}
.adm-variants-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F1F5F9;
}
.adm-variants-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.adm-preset-btn {
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  color: #0F172A;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.adm-preset-btn:hover {
  border-color: #2563EB;
  background: #EFF6FF;
  color: #1D4ED8;
}
.adm-preset-btn.earth {
  border-color: #86EFAC;
  background: #F0FDF4;
  color: #166534;
}
.adm-preset-btn.earth:hover {
  border-color: #16A34A;
  background: #DCFCE7;
}
.adm-variant-row {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adm-variant-row.is-earth {
  border-color: #86EFAC;
  background: #F0FDF4;
}
.adm-variant-top-grid {
  display: grid;
  grid-template-columns: 34px 160px minmax(150px, 1fr) 210px 125px 34px;
  gap: 8px;
  align-items: center;
}
.adm-variant-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed #CBD5E1;
}
.adm-variant-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #94A3B8;
  flex-shrink: 0;
}
.adm-earth-swatch {
  background: linear-gradient(135deg, #FACC15 0%, #FACC15 50%, #16A34A 50%, #16A34A 100%) !important;
  border-color: #15803D !important;
}
.adm-prod-variant-chip {
  display: inline-block;
  font-size: 0.71rem;
  font-weight: 800;
  color: #166534;
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  padding: 2px 7px;
  border-radius: 6px;
}
@media (max-width: 820px) {
  .adm-variant-top-grid {
    grid-template-columns: 32px 1fr 1fr;
  }
  .adm-variant-price-grid {
    grid-template-columns: 1fr;
  }
}
