/* ── Admin Layout ───────────────────────────────────────── */
.admin-body { background: #F0F2F5; margin: 0; }

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 250px;
  background: var(--navy-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  transition: transform 0.3s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: white;
  font-family: var(--font-heading);
}
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}
.sidebar-link:hover { background: rgba(255,255,255,0.08); color: white; }
.sidebar-link.active { background: var(--blue-600); color: white; }
.sidebar-link i { font-size: 1rem; width: 20px; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }

/* Main Content */
.admin-main { margin-left: 250px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* Top Bar */
.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.admin-topbar-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--navy-900); }
.sidebar-toggle { background: none; border: none; cursor: pointer; padding: 6px; display: none; }

.admin-content { padding: 28px; flex: 1; }

/* Stats Cards */
.admin-stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
}
.admin-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.admin-stat-num { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: var(--navy-900); }
.admin-stat-label { font-size: 0.82rem; color: var(--gray-500); font-weight: 500; }

/* Cards */
.admin-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}
.admin-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-900);
}

/* Tables */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  padding: 12px 16px;
  background: var(--gray-50);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-400);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.875rem;
  color: var(--gray-700);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--gray-50); }
.admin-table tr:last-child td { border-bottom: none; }

/* Product Thumbnail */
.admin-product-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--gray-100);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}
.status-new { background: var(--blue-100); color: var(--blue-600); }
.status-contacted { background: #FEF9C3; color: #854D0E; }
.status-in_progress { background: #DBEAFE; color: #1D4ED8; }
.status-quoted { background: var(--success-light); color: #065F46; }
.status-closed_won { background: var(--success-light); color: #065F46; }
.status-closed_lost { background: var(--danger-light); color: #991B1B; }
.status-in_stock { background: var(--success-light); color: #065F46; }
.status-out_of_stock { background: var(--danger-light); color: #991B1B; }
.status-made_to_order { background: var(--warning-light); color: #92400E; }

/* Form Sections */
.form-section-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-bottom: 20px;
}
.form-section-title {
  background: var(--gray-50);
  padding: 14px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-body { padding: 20px; }

/* Admin Login */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  padding: 20px;
}
.admin-login-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}

/* Bulk Pricing Row */
.bulk-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bulk-row .form-control { font-size: 0.875rem; }

/* Image Upload */
.img-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-50);
}
.img-upload-area:hover { border-color: var(--blue-600); background: var(--blue-100); }

/* Responsive */
@media (max-width: 991.98px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .admin-topbar { padding: 12px 16px; }
  .admin-content { padding: 16px; }
}
