/* ============================================================
   SallaDrop - Shared Styles
   ============================================================ */

:root {
  --primary: #004165;
  --primary-light: #005d8f;
  --accent: #00c9a7;
  --accent-hover: #00b397;
  --sidebar-w: 250px;
  --bg: #f4f6f9;
  --gradient: linear-gradient(135deg, #004165, #006a9e);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
}

/* ========== Landing Page ========== */
.hero {
  background: var(--gradient);
  color: white;
  min-height: 80vh;
  display: flex;
  align-items: center;
}
.hero h1 { font-size: 3rem; font-weight: 700; }
.hero .lead { font-size: 1.3rem; opacity: 0.9; }

.btn-salla {
  background: var(--accent);
  color: var(--primary);
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 1.1rem;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-salla:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,201,167,0.4);
  color: var(--primary);
}

.feature-card {
  border: none;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
  height: 100%;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.stats-section { background: #f8f9fa; }
.stat-number-hero { font-size: 2.5rem; font-weight: 700; color: var(--primary); }

/* ========== Dashboard Layout ========== */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--primary); color: white;
  padding: 1.5rem 0; z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease;
}
.sidebar .brand {
  font-size: 1.3rem; font-weight: 700;
  padding: 0 1.5rem; margin-bottom: 2rem;
}
.sidebar .brand span { color: var(--accent); }
.sidebar .nav-link {
  color: rgba(255,255,255,0.7);
  padding: 0.7rem 1.5rem;
  display: flex; align-items: center;
  gap: 0.75rem; font-size: 0.95rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: white;
  background: rgba(255,255,255,0.1);
  border-left-color: var(--accent);
}
.sidebar .nav-link i {
  font-size: 1.1rem; width: 20px; text-align: center;
}

.main { margin-left: var(--sidebar-w); padding: 1.5rem 2rem; }

/* Mobile sidebar */
.sidebar-toggle {
  display: none;
  position: fixed; top: 0.75rem; left: 0.75rem;
  z-index: 1100; background: var(--primary);
  border: none; color: white; font-size: 1.5rem;
  width: 42px; height: 42px; border-radius: 8px;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.sidebar-overlay {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 999;
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .sidebar-overlay.show { display: block; }
  .main { margin-left: 0; padding: 1rem; padding-top: 3.5rem; }
}

/* ========== Top Bar ========== */
.topbar {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 1.5rem;
}
.topbar h4 { font-weight: 600; margin: 0; }

/* ========== Stat Cards ========== */
.stat-card {
  background: white; border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
}
.stat-card .stat-number {
  font-size: 1.8rem; font-weight: 700; color: var(--primary);
}
.stat-card .stat-label { color: #6c757d; font-size: 0.85rem; }
.stat-card .stat-icon { font-size: 2rem; opacity: 0.2; }

/* ========== Cards ========== */
.card {
  border: none; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: white;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}

/* ========== Tables ========== */
.table th {
  font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; color: #6c757d;
  border-top: none;
}

/* ========== Badges ========== */
.badge-status { font-size: 0.75rem; padding: 4px 10px; border-radius: 20px; }
.badge-active { background: #d4edda; color: #155724; }
.badge-draft { background: #e2e3e5; color: #383d41; }
.badge-error { background: #f8d7da; color: #721c24; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-shipped { background: #cce5ff; color: #004085; }
.badge-fulfilled { background: #d4edda; color: #155724; }

/* ========== Import Section ========== */
.import-box {
  background: white; border: 2px dashed #dee2e6;
  border-radius: var(--radius); padding: 2rem;
  text-align: center;
}
.import-box:hover { border-color: var(--accent); }

/* ========== Search Results ========== */
.product-search-card {
  border: 1px solid #eee; border-radius: 8px;
  padding: 0.75rem; margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}
.product-search-card:hover { border-color: var(--accent); }
.product-search-card img {
  width: 70px; height: 70px;
  object-fit: cover; border-radius: 6px;
}

/* ========== Activity Log ========== */
.activity-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.activity-item:last-child { border: none; }

/* ========== Buttons ========== */
.btn-accent {
  background: var(--accent); color: var(--primary);
  font-weight: 600; border: none;
}
.btn-accent:hover { background: var(--accent-hover); color: white; }

/* ========== Sections ========== */
.section { display: none; }
.section.active { display: block; }

/* ========== Loading Spinner ========== */
.spinner-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.spinner-overlay.hidden { display: none; }

/* ========== Toast ========== */
.toast-container {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
}

/* ========== Pagination ========== */
.pagination-controls {
  display: flex; justify-content: center;
  align-items: center; gap: 0.5rem;
  padding: 1rem; border-top: 1px solid #eee;
}
.pagination-controls .page-info {
  font-size: 0.85rem; color: #6c757d;
}

/* ========== AE Connection Banner ========== */
.ae-connect-banner {
  background: linear-gradient(135deg, #fff3cd, #ffeeba);
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ae-connected-badge {
  background: #d4edda;
  border: 1px solid #28a745;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

/* ========== Error Page ========== */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.error-page .error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.3;
}
.error-page .error-message {
  font-size: 1.3rem;
  color: #6c757d;
}
