/* ==========================================================================
   NEXT-GEN LUXURY EXECUTIVE ADMIN COMMAND CENTER
   High-Contrast Dark Glassmorphism with Manrope & Manrope
   Zero Emojis • Pure Lucide Vector Icons • Linear/Vercel Level Polish
   ========================================================================== */

.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* ==========================================================================
   EXECUTIVE SIDEBAR
   ========================================================================== */
.admin-sidebar {
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-medium);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.75rem 1.25rem;
  z-index: 100;
}

.admin-brand {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-brand .brand-logo .logo-main {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.admin-brand .brand-logo .logo-sub {
  font-family: var(--font-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-blue);
}

.admin-nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-pill);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.admin-nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform var(--transition-fast);
}

.admin-nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-subtle);
  transform: translateX(2px);
}

.admin-nav-item.active {
  color: #ffffff;
  background: #1e293b;
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .admin-nav-item.active {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #3b82f6;
}

.admin-nav-item.active svg {
  stroke: var(--accent-blue);
}

.admin-sidebar-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* ==========================================================================
   MAIN EXECUTIVE DASHBOARD AREA
   ========================================================================== */
.admin-main {
  flex: 1;
  padding: 2.5rem 3rem 5rem;
  max-width: 1380px;
  overflow-y: auto;
}

/* Top Header Bar */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 1.25rem;
}

.admin-topbar h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.admin-topbar p {
  color: var(--text-secondary);
  font-family: var(--font-pill);
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* ==========================================================================
   KPI METRIC CARDS (Linear / Vercel Glow Style)
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.metric-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.metric-label {
  font-family: var(--font-pill);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.metric-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
}

.metric-val {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.65rem;
}

.metric-trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-pill);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.metric-trend-positive {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   SECTIONS & EXECUTIVE CARDS
   ========================================================================== */
.admin-section {
  margin-bottom: 3.5rem;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header-row h2 {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Search & Filter Toolbar */
.admin-toolbar {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-surface);
  flex-wrap: wrap;
}

.admin-search-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  width: 320px;
  font-family: var(--font-pill);
}

.admin-search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  width: 100%;
}

/* ==========================================================================
   EXECUTIVE DATA TABLES
   ========================================================================== */
.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.admin-table th {
  background: var(--bg-surface);
  padding: 0.95rem 1.25rem;
  font-family: var(--font-pill);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-medium);
}

.admin-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--bg-card-hover);
}

/* Table Specific Components */
.table-product-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.table-product-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-medium);
}

.table-product-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.table-product-meta {
  font-family: var(--font-pill);
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Lead Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-vip {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.status-whatsapp {
  background: rgba(37, 211, 102, 0.12);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

/* Action Buttons */
.btn-table-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-pill);
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.btn-table-action:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn-table-wa {
  background: #25d366;
  color: #032d12;
  border-color: #25d366;
  font-weight: 800;
}

.btn-table-wa:hover {
  background: #20bd5a;
  color: #032d12;
}

/* ==========================================================================
   DEMAND ANALYTICS PROGRESS BARS
   ========================================================================== */
.analytics-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.analytics-panel {
  padding: 1.75rem;
}

.analytics-row {
  margin-bottom: 1.25rem;
}

.analytics-row:last-child {
  margin-bottom: 0;
}

.analytics-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-pill);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.analytics-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.analytics-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Modal Drawer for Add / Edit Streetwear */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 9, 12, 0.85);
  backdrop-filter: blur(16px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.admin-modal-overlay.active {
  display: flex;
}

.admin-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .analytics-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-main {
    padding: 1.5rem 1rem 4rem;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}
