/* =====================================================================
   Zenve BI — Zenve Fashion & Haute Couture Executive Control Center
   Suite (10 Subdomains):
     1. Fashion Dashboard      (#fashion-dashboard / #zenve-fashion)
     2. Fashion Products       (#fashion-products)
     3. Fashion Orders         (#fashion-orders)
     4. Fashion Customers      (#fashion-customers)
     5. Fashion Inventory      (#fashion-inventory)
     6. Fashion Showrooms      (#fashion-showrooms)
     7. Online Fashion Sales   (#online-fashion-sales)
     8. Fashion Revenue        (#fashion-revenue)
     9. Fashion Profitability  (#fashion-profitability)
     10. Fashion Collections   (#fashion-collections)
   ===================================================================== */

html.zfsh-locked,
body.zfsh-locked {
  overflow: hidden !important;
  height: 100% !important;
}

#zfsh-root {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 224px !important;
  width: calc(100vw - 224px) !important;
  max-width: calc(100vw - 224px) !important;
  height: 100vh !important;
  max-height: 100vh !important;
  z-index: 60 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
  background: var(--background, #f8fafc) !important;
  color: var(--foreground, #0f172a) !important;
  font-family: var(--font-sans, "Manrope", sans-serif);
  display: none;
  animation: zfshFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
  scrollbar-color: #cbd5e1 #f8fafc !important;
}

#zfsh-root.zfsh-open,
#zfsh-root.zpanel-open {
  display: block !important;
}

#zfsh-root::-webkit-scrollbar {
  width: 8px !important;
}

#zfsh-root::-webkit-scrollbar-track {
  background: #f8fafc !important;
}

#zfsh-root::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 6px !important;
}

#zfsh-root::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

@keyframes zfshFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1023px) {
  #zfsh-root {
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }
}

#zfsh-root * {
  box-sizing: border-box;
}

#zfsh-root button,
#zfsh-root input,
#zfsh-root select {
  font-family: inherit;
  color: inherit;
}

/* Header */
.zfsh-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: color-mix(in oklab, var(--background, #ffffff) 96%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  flex-wrap: wrap;
}

.zfsh-head-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.zfsh-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.zfsh-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--foreground, #0f172a);
  white-space: nowrap;
}

.zfsh-sub {
  font-size: 12px;
  margin: 0;
  color: var(--muted-foreground, #64748b);
  line-height: 1.4;
}

.zfsh-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.14);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #db2777;
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.zfsh-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #db2777;
  box-shadow: 0 0 8px #db2777;
  animation: zfshPulse 1.8s infinite;
}

@keyframes zfshPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(1.4);
  }
}

.zfsh-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.zfsh-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  background: var(--card, #ffffff);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground, #0f172a);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  white-space: nowrap;
}

.zfsh-btn:hover {
  background: var(--accent, #f1f5f9);
  border-color: rgba(0, 0, 0, 0.2);
}

.zfsh-btn.primary {
  background: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.5);
  color: #db2777;
}

.zfsh-btn.primary:hover {
  background: rgba(236, 72, 153, 0.25);
  color: #be185d;
}

.zfsh-btn.success {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: #059669;
}

.zfsh-btn.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #dc2626;
}

/* Tabs Bar (10 Subdomains) */
.zfsh-tabs-bar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.zfsh-tabs-bar::-webkit-scrollbar {
  display: none;
}

.zfsh-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--muted-foreground, #64748b);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
  margin-bottom: -1px;
}

.zfsh-tab:hover {
  color: var(--foreground, #0f172a);
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px 6px 0 0;
}

.zfsh-tab.active {
  color: #db2777;
  border-bottom-color: #db2777;
  background: rgba(236, 72, 153, 0.08);
  border-radius: 6px 6px 0 0;
}

.zfsh-tab-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  color: #475569;
}

.zfsh-tab-badge.warn {
  background: rgba(245, 158, 11, 0.18);
  color: #d97706;
}

.zfsh-tab-badge.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.zfsh-tab.active .zfsh-tab-badge {
  background: rgba(236, 72, 153, 0.18);
  color: #be185d;
}

/* Body Content */
.zfsh-body,
#zfsh-root .zfsh-body,
#zfsh-root div.zfsh-body,
#zfsh-root main.zfsh-body {
  padding: 24px 28px 64px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

/* KPI Grid */
.zfsh-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.zfsh-kpi {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s, border-color 0.15s;
}

.zfsh-kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(236, 72, 153, 0.4);
}

.zfsh-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zfsh-kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted-foreground, #64748b);
  letter-spacing: 0.05em;
  font-family: "IBM Plex Mono", monospace;
}

.zfsh-kpi-icon {
  font-size: 18px;
}

.zfsh-kpi-val {
  font-size: 24px;
  font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
  color: var(--foreground, #0f172a);
}

.zfsh-kpi-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.zfsh-delta {
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 600;
}

.zfsh-delta.up {
  color: #059669;
  background: rgba(16, 185, 129, 0.15);
}

.zfsh-delta.down {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.15);
}

.zfsh-delta.warn {
  color: #d97706;
  background: rgba(245, 158, 11, 0.15);
}

.zfsh-subtext {
  color: var(--muted-foreground, #64748b);
}

/* Card Panels */
.zfsh-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.zfsh-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.zfsh-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--foreground, #0f172a);
}

.zfsh-card-sub {
  font-size: 12px;
  color: var(--muted-foreground, #64748b);
  margin-top: 3px;
  line-height: 1.4;
}

/* Grid splits */
.zfsh-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 18px;
}

.zfsh-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

/* Data Tables */
.zfsh-table-wrap {
  overflow-x: auto;
  margin: 0 -24px -22px;
}

.zfsh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.zfsh-table th {
  padding: 11px 14px;
  text-align: left;
  background: var(--muted, #f8fafc);
  color: var(--muted-foreground, #475569);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  white-space: nowrap;
}

.zfsh-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.06));
  vertical-align: middle;
  color: var(--foreground, #0f172a);
}

.zfsh-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

/* Status Badges */
.zfsh-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.zfsh-tag.green {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.zfsh-tag.pink {
  background: rgba(236, 72, 153, 0.15);
  color: #db2777;
}

.zfsh-tag.blue {
  background: rgba(56, 189, 248, 0.15);
  color: #0284c7;
}

.zfsh-tag.purple {
  background: rgba(167, 139, 250, 0.15);
  color: #7c3aed;
}

.zfsh-tag.amber {
  background: rgba(251, 191, 36, 0.15);
  color: #d97706;
}

.zfsh-tag.red {
  background: rgba(248, 113, 113, 0.15);
  color: #dc2626;
}

.zfsh-tag.gray {
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
}

/* Filter Controls */
.zfsh-filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.zfsh-input,
.zfsh-select {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  background: var(--card, #ffffff);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.16));
  border-radius: 6px;
  color: var(--foreground, #0f172a);
  outline: none;
}

.zfsh-input:focus,
.zfsh-select:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

.zfsh-select {
  background: var(--card, #ffffff);
  cursor: pointer;
  color: var(--foreground, #0f172a);
}

/* Modals */
.zfsh-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.zfsh-modal {
  background: var(--card, #ffffff);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
  color: var(--foreground, #0f172a);
  animation: zfshFadeIn 0.2s ease;
}

.zfsh-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.zfsh-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--foreground, #0f172a);
  margin: 0;
}

.zfsh-form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zfsh-form-group label {
  font-size: 11px;
  color: var(--muted-foreground, #64748b);
  font-weight: 600;
  text-transform: uppercase;
}

.zfsh-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}