/* SDS Pharma Custom Styles - Matching React Design */

:root {
  --primary: #0a4d68;
  --primary-dark: #083d52;
  --secondary: #05bdbd;
  --accent: #d4af37;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #1e293b;
  --text-gray: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
}

/* Header Styles */
.main-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
}

.logo-icon {
  color: var(--primary);
  width: 32px;
  height: 32px;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin: 0;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-gray);
  line-height: 1;
}

.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
  padding: 0.5rem 1rem;
}

.nav-link:hover {
  color: var(--primary);
}

.cart-icon-btn {
  position: relative;
  padding: 0.5rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
}

.cart-icon-btn:hover {
  background: var(--bg-light);
}

.badge-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--danger);
  color: white;
  border-radius: 10px;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Button Styles */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.625rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border);
  padding: 0.625rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text-dark);
}

.btn-success {
  background: var(--success);
  color: white;
  border: none;
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #0a6e8f 100%);
  color: white;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>')
    repeat;
  animation: float 20s linear infinite;
}

@keyframes float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100px);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent) 0%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
}

.hero-search-box {
  max-width: 700px;
  margin: 0 auto 2.5rem;
  display: flex;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.hero-search-box input {
  flex: 1;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
}

.hero-search-box .btn-primary {
  margin: 0.5rem;
  border-radius: 8px;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Category Cards */
.category-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  text-decoration: none;
  color: var(--text-dark);
  display: block;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  color: var(--text-dark);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Feature Cards */
.feature-card {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  height: 100%;
}

.feature-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin: 0 auto 1.5rem;
}

/* Stats Section */
.stats-section {
  background: var(--primary);
  color: white;
  padding: 4rem 0;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-year {
  position: absolute;
  left: -3rem;
  width: 4rem;
  height: 4rem;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.timeline-content {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Product Cards */
.product-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s;
  height: 100%;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.product-image {
  height: 150px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.product-info {
  padding: 1.25rem;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.badge-small {
  padding: 0.25rem 0.625rem;
  background: var(--bg-light);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-gray);
  font-weight: 500;
  display: inline-block;
  margin-right: 0.25rem;
}

.stock-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.stock-badge.in-stock {
  background: #d1fae5;
  color: var(--success);
}

.stock-badge.low-stock {
  background: #fed7aa;
  color: var(--warning);
}

/* Dashboard Sidebar */
.dashboard-sidebar {
  background: #0a4d68;
  border-right: 1px solid var(--border);    
  min-height: calc(100vh - 76px);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
}

.menu-item:hover,
.menu-item.active {
  background: var(--bg-light);
  color: var(--primary);
}

.menu-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}

/* Stat Cards */
.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat-icon {
  font-size: 2.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 0.25rem;
}

/* Order Cards */
.order-card {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.status-badge.status-in-transit {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.status-delivered {
  background: #d1fae5;
  color: #047857;
}

.status-badge.status-pending {
  background: #fed7aa;
  color: #c2410c;
}

/* Forms */
.form-control,
.form-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 77, 104, 0.1);
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Auth Pages */
.auth-card {
  background: white;
  padding: 3rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  margin: 2rem auto;
}

/* Footer */
.main-footer {
  background: var(--text-dark);
  color: white;
  padding: 4rem 0 1rem;
  margin-top: 4rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: white;
}

/* Admin Styles */
.admin-sidebar {
  background: linear-gradient(135deg, var(--primary) 0%, #0a6e8f 100%);
  color: white;
}

.admin-sidebar .menu-item {
  color: rgba(255, 255, 255, 0.8);
}

.admin-sidebar .menu-item:hover,
.admin-sidebar .menu-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.admin-sidebar .menu-item.active::before {
  background: var(--accent);
}

/* Table Styles */
.table {
  background: white;
}

.table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
}

/* Utilities */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-dark);
}

.page-header {
  text-align: center;
  margin-bottom: 4rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--text-gray);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-search-box {
    flex-direction: column;
  }

  .dashboard-sidebar {
    display: none;
  }
}

/* Product Detail Page */
.badge-sm {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

.product-card a {
  transition: none;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Admin Sidebar Improvements */
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
}

.menu-item.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-left-color: var(--accent);
}

.menu-item .badge {
  font-size: 0.7rem;
}

/* Table improvements */
.table th {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.table td {
  font-size: 0.9rem;
  vertical-align: middle;
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
  font-size: 0.9rem;
}

.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

/* Stock badge improvement */
.badge-small {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
  background: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border);
  margin-bottom: 2px;
}

.stock-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

.stock-badge.in-stock {
  background: #d1fae5;
  color: #065f46;
}

.stock-badge.low-stock {
  background: #fef3c7;
  color: #92400e;
}
