/* Droplet Admin UI - Professional Dashboard Styles */

:root {
  /* Droplet Brand Colors */
  --primary: #64BCAC;
  --primary-dark: #4fa99a;
  --primary-light: #8DD4C8;
  --primary-bg: rgba(100, 188, 172, 0.08);
  --secondary: #32373c;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --light: #F8F9FA;
  --dark: #1a1a2e;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.5;
  font-weight: 500;
}

/* ==================== HEADER ==================== */
.header {
  background: var(--white);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo h1 {
  font-size: 1.35rem;
  color: var(--dark);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.logo-tagline {
  font-size: 0.7rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.selection-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.selected-count {
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
}

.nav-tab {
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  color: var(--gray-500);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-tab:hover {
  color: var(--dark);
  background: var(--gray-100);
}

.nav-tab.active {
  color: var(--primary-dark);
  background: var(--primary-bg);
}

.nav-icon {
  font-size: 1rem;
}

/* ==================== DASHBOARD STATS BAR ==================== */
.dashboard-stats {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

/* Decorative background elements */
.dashboard-stats::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(100, 188, 172, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-stats::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: 20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(141, 212, 200, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  min-width: 160px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(100, 188, 172, 0.3);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 1.75rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.stat-icon-products {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
}
.stat-icon-synced {
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
}
.stat-icon-variants {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.15);
}
.stat-icon-supplier {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
}
.stat-icon-time {
  color: #f472b6;
  background: rgba(244, 114, 182, 0.15);
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.75px;
  font-weight: 500;
}

.supplier-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-400);
}

.status-indicator.active {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* ==================== PAGE TITLE BAR ==================== */
.page-title-bar {
  background: var(--white);
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.page-subtitle {
  color: var(--gray-500);
  font-size: 0.875rem;
  font-weight: 400;
}

.page-title-actions {
  display: flex;
  gap: 0.75rem;
}

/* ==================== BUTTONS ==================== */
.btn {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-200);
}

.btn-outline {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--border);
}

.btn-outline:hover:not(:disabled) {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-full {
  width: 100%;
}

.btn-icon-only {
  padding: 0.5rem;
  min-width: 36px;
}

.btn-sync {
  padding: 0.6rem 1.5rem;
}

.btn-icon {
  font-size: 1rem;
}

/* ==================== MAIN LAYOUT ==================== */
.main-content {
  display: flex;
  min-height: calc(100vh - 200px);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: 280px;
  background: var(--white);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 57px;
  height: calc(100vh - 200px);
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--gray-50);
}

.sidebar-header h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.clear-link {
  color: var(--primary);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.clear-link:hover {
  text-decoration: underline;
}

/* Active Filters Pills */
.active-filters {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--primary-bg);
}

.active-filters-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--dark);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}

.filter-pill .remove {
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray-400);
  line-height: 1;
}

.filter-pill .remove:hover {
  color: var(--danger);
}

/* Filter Accordion */
.filter-section {
  border-bottom: 1px solid var(--border);
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.filter-header:hover {
  background: var(--gray-50);
}

.filter-header h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-header .chevron {
  font-size: 0.75rem;
  color: var(--gray-400);
  transition: transform 0.2s;
}

.filter-section.open .chevron {
  transform: rotate(180deg);
}

.filter-content {
  display: none;
  padding: 0 1.25rem 1rem;
}

.filter-section.open .filter-content {
  display: block;
}

/* Category Checkboxes */
.category-list {
  list-style: none;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  cursor: pointer;
}

.category-item:hover label {
  color: var(--primary);
}

.category-item input[type="checkbox"],
.category-item input[type="radio"] {
  width: 16px;
  height: 16px;
  margin-right: 0.75rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.category-item label {
  flex: 1;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.supplier-name {
  font-weight: 500;
}

.supplier-status-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.supplier-status-badge.ready {
  background: var(--success-bg);
  color: var(--success);
}

.supplier-status-badge.pending {
  background: var(--gray-100);
  color: var(--gray-500);
}

.supplier-pending {
  opacity: 0.5;
}

/* Search Input */
.sidebar-search {
  display: flex;
  gap: 0.5rem;
}

.sidebar-search input {
  flex: 1;
  padding: 0.6rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  transition: var(--transition);
}

.sidebar-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.sidebar-search button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-search button:hover {
  background: var(--primary-dark);
}

/* Sidebar Select */
.sidebar-select {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--white);
  cursor: pointer;
}

.sidebar-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ==================== CONTENT AREA ==================== */
.content {
  flex: 1;
  padding: 1.5rem 2rem;
  background: var(--light);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.content-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-count-badge {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
}

.view-options {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2px;
}

.view-btn {
  padding: 0.4rem 0.6rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  color: var(--gray-400);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn:hover {
  color: var(--gray-600);
}

.view-btn.active {
  background: var(--primary);
  color: white;
}

/* ==================== LOADING STATE ==================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.loading-content {
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.loading-subtext {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ==================== PRODUCT GRID ==================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-grid.list-view {
  grid-template-columns: 1fr;
}

/* ==================== PRODUCT CARD ==================== */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  animation: fadeInUp 0.3s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--gray-300);
}

.product-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-bg), var(--shadow-md);
}

.product-card .checkbox {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  width: 24px;
  height: 24px;
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.product-card:hover .checkbox {
  border-color: var(--gray-400);
}

.product-card.selected .checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.product-card.selected .checkbox::after {
  content: '\2713';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.product-image {
  position: relative;
  width: 100%;
  height: 200px;
  background: var(--gray-50);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: 1rem 1.25rem 1.25rem;
}

.product-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dark);
}

.product-sku {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
  font-family: 'SF Mono', Monaco, monospace;
}

.product-category {
  font-size: 0.7rem;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.product-variants {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.5rem;
}

/* Product card variant badge */
.product-card .variant-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--dark);
  color: white;
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  z-index: 2;
}

.product-card .variant-badge:hover {
  background: var(--gray-700);
  transform: scale(1.05);
}

.product-card .variant-selected-badge {
  background: var(--primary);
}

/* Sync badge */
.product-card .sync-badge {
  position: absolute;
  top: 0.75rem;
  left: 3rem;
  background: var(--success);
  color: white;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 2;
}

.product-card .sync-badge::before {
  content: "\2713";
  font-size: 0.7rem;
}

.product-card.is-synced {
  border: 2px solid var(--success);
}

.product-card.is-synced .product-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--success-bg);
  pointer-events: none;
}

/* List View */
.list-view .product-card {
  display: flex;
  align-items: center;
}

.list-view .product-image {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.list-view .product-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.list-view .checkbox {
  position: relative;
  top: auto;
  left: auto;
  margin-right: 1rem;
}

/* ==================== PAGINATION ==================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination button {
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
  background: var(--gray-100);
}

.pagination button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==================== MODAL ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-family: 'SF Mono', Monaco, monospace;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--gray-400);
  padding: 0.25rem;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--gray-600);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--gray-50);
}

/* Sync Summary */
.sync-summary {
  background: var(--gray-50);
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.sync-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sync-summary-label {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.sync-summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.sync-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sync-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.sync-option:hover {
  background: var(--gray-50);
}

.sync-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.sync-option-text {
  font-size: 0.9rem;
  color: var(--gray-700);
}

.sync-progress {
  margin-top: 1.5rem;
}

.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--gray-600);
  text-align: center;
}

/* ==================== VARIANT MODAL ==================== */
.modal-large {
  max-width: 900px;
}

.variant-info {
  background: var(--gray-50);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 2rem;
}

.variant-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.variant-info-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.variant-info-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}

.variant-info-selected {
  color: var(--primary);
}

.variant-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.variant-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.variant-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.variant-card.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.variant-card img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.variant-card .variant-sku {
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
  font-family: 'SF Mono', Monaco, monospace;
}

.variant-card .variant-color {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark);
}

.variant-card .color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.25rem;
  border: 1px solid var(--border);
  vertical-align: middle;
}

/* Stock display in variant cards */
.variant-stock {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  margin-top: 0.4rem;
  font-weight: 600;
}

.variant-stock.stock-available {
  background: var(--success-bg);
  color: var(--success);
}

.variant-stock.stock-out {
  background: var(--danger-bg);
  color: var(--danger);
}

.variant-stock.stock-unknown {
  background: var(--gray-100);
  color: var(--gray-500);
}

.variant-arrival {
  font-size: 0.6rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
}

.variant-card.stock-out {
  opacity: 0.6;
}

.variant-card.stock-out:hover {
  opacity: 0.8;
}

/* ==================== SYNCED PRODUCTS PAGE ==================== */
.synced-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.synced-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.synced-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.synced-stats {
  display: flex;
  gap: 1.5rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  min-width: 120px;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.synced-actions {
  display: flex;
  gap: 0.75rem;
}

.synced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-500);
  font-size: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
}

/* Synced product card */
.synced-product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.synced-product-card:hover {
  box-shadow: var(--shadow-md);
}

.synced-product-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--gray-50);
}

.synced-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.synced-product-info {
  padding: 1rem;
}

.synced-product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.synced-product-sku {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  font-family: 'SF Mono', Monaco, monospace;
}

.synced-product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.synced-product-actions {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  background: var(--gray-50);
}

.synced-product-actions .btn {
  flex: 1;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
}

/* Synced Product Card - Selection */
.synced-product-card {
  position: relative;
  cursor: pointer;
}

.synced-product-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-bg), var(--shadow-md);
}

.synced-checkbox {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
}

.synced-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Small button variant */
.btn-sm {
  padding: 0.35rem 0.6rem !important;
  font-size: 0.7rem !important;
}

/* Synced page actions */
.synced-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.synced-actions .btn {
  white-space: nowrap;
}

/* Filter tabs */
.synced-filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Sync status badge */
.sync-status-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.sync-status-badge.synced {
  background: var(--success-bg);
  color: var(--success);
}

.sync-status-badge.unsynced {
  background: var(--warning-bg);
  color: var(--warning);
}

/* Unsynced product card styling */
.synced-product-card.unsynced {
  opacity: 0.85;
  border-color: var(--warning);
}

.synced-product-card.unsynced .synced-product-image {
  filter: grayscale(30%);
}

/* Success button */
.btn-success {
  background: var(--success);
  color: var(--white);
  border: none;
}

.btn-success:hover {
  background: #0ea271;
}

/* Error Message */
.error-message {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--danger-bg);
  border-radius: var(--radius);
  color: var(--danger);
}

.error-message p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.no-products {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-500);
  grid-column: 1 / -1;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .dashboard-stats {
    flex-wrap: wrap;
  }

  .stat-item {
    min-width: auto;
    flex: 1;
  }
}

@media (max-width: 1024px) {
  .sidebar {
    width: 260px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .header {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .dashboard-stats {
    flex-direction: column;
    gap: 0.75rem;
  }

  .stat-item {
    width: 100%;
  }
}
