/* Import modern Google Font */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #0d9488;      /* Teal/Emerald Green */
  --primary-hover: #0f766e;
  --secondary-color: #0284c7;    /* Medical Blue */
  --secondary-hover: #0369a1;
  --accent-color: #f59e0b;       /* Soft Orange for CTAs */
  --bg-light: #f8fafc;           /* Cool Gray Light */
  --bg-white: #ffffff;
  --text-dark: #0f172a;          /* Slate 900 */
  --text-gray: #475569;          /* Slate 600 */
  --border-color: #e2e8f0;       /* Slate 200 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  margin-bottom: 80px;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --- Layout Elements --- */

/* Header & Navbar */
.navbar-custom {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: 0;
  z-index: 1020;
  transition: var(--transition-smooth);
}

.brand-title {
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-custom {
  font-weight: 500;
  color: var(--text-gray);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.nav-link-custom:hover, .nav-link-custom.active {
  color: var(--primary-color);
  background: rgba(13, 148, 136, 0.08);
}

/* Smart Search Container */
.search-container {
  position: relative;
  max-width: 450px;
  width: 100%;
}

.search-input {
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-color);
  padding: 0.6rem 1.5rem 0.6rem 3rem;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
  outline: none;
}

.search-icon-btn {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-gray);
  border: none;
  background: none;
  pointer-events: none;
}

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 1050;
  max-height: 350px;
  overflow-y: auto;
  margin-top: 8px;
  display: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: rgba(13, 148, 136, 0.05);
}

.search-result-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* Banner Hero Section */
.hero-banner {
  background: linear-gradient(135deg, #f0fdfa 0%, #e2fbf4 50%, #f0f9ff 100%);
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(13, 148, 136, 0.1);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-image {
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(13, 148, 136, 0.12);
  border: 4px solid #ffffff;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
  max-height: 280px;
  width: 100%;
  object-fit: cover;
}

.hero-image:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 20px 48px rgba(13, 148, 136, 0.22);
}

.hero-badge {
  background: rgba(13, 148, 136, 0.1);
  color: var(--primary-color);
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-title span {
  color: var(--primary-color);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-gray);
  margin-bottom: 2rem;
}

/* Feature Cards */
.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition-smooth);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13, 148, 136, 0.3);
}

.feature-icon-wrapper {
  width: 55px;
  height: 55px;
  border-radius: var(--radius-sm);
  background: rgba(13, 148, 136, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

/* Category Badges / Round items */
.category-item-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  display: block;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.category-item-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: scale(1.03);
  color: var(--primary-color);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: inline-block;
}

/* Product Cards */
.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13, 148, 136, 0.2);
}

.product-prescription-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.product-otc-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: rgba(13, 148, 136, 0.9);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.product-img-wrapper {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-cat {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6rem;
}

.product-name:hover {
  color: var(--primary-color);
}

.product-ingredient {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-meta {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.btn-add-cart-sm {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-add-cart-sm:hover {
  background: var(--primary-hover);
  transform: rotate(90deg);
}

/* Sidebar filter stylings */
.sidebar-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  position: sticky;
  top: 90px;
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-color);
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group-title {
  font-weight: 500;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-gray);
  cursor: pointer;
}

.filter-item input {
  cursor: pointer;
}

/* Detail view styling */
.product-detail-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
}

.detail-img-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f1f5f9;
  height: 400px;
}

.detail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.detail-ingredient {
  font-size: 1.1rem;
  color: var(--text-gray);
  margin-bottom: 20px;
}

.detail-price-box {
  background: rgba(13, 148, 136, 0.05);
  border-left: 4px solid var(--primary-color);
  padding: 15px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 25px;
}

.detail-price-label {
  font-size: 0.9rem;
  color: var(--text-gray);
}

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

.btn-custom {
  border-radius: var(--radius-lg);
  padding: 0.6rem 1.8rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

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

.btn-primary-custom:hover {
  background-color: var(--primary-hover);
  color: white;
}

.btn-secondary-custom {
  background-color: var(--bg-light);
  color: var(--text-dark);
  border: 1.5px solid var(--border-color);
}

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

.cart-qty-input {
  width: 70px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  padding: 0.35rem;
}

/* Pharmacy Store Locator */
.store-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition-smooth);
  cursor: pointer;
  margin-bottom: 15px;
}

.store-card:hover, .store-card.active {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  background: rgba(13, 148, 136, 0.02);
}

.store-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.store-info-line {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  height: 500px;
  position: sticky;
  top: 90px;
}

/* Post Cards */
.post-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(2, 132, 199, 0.2);
}

.post-img-wrapper {
  height: 180px;
  overflow: hidden;
}

.post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.post-card:hover .post-img {
  transform: scale(1.05);
}

.post-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 10px;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.3;
}

.post-title:hover {
  color: var(--secondary-color);
}

.post-summary {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-link {
  margin-top: auto;
  font-weight: 500;
  color: var(--secondary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
}

.post-link:hover {
  color: var(--secondary-hover);
}

/* Cart Badge count */
.cart-badge {
  background: var(--accent-color);
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  position: relative;
  top: -10px;
  left: -5px;
}

/* Footer Section */
.footer-custom {
  background: #0f172a;
  color: #94a3b8;
  padding: 4rem 0 2rem 0;
  margin-top: 5rem;
  border-top: 4px solid var(--primary-color);
}

.footer-title {
  color: white;
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: 0.85rem;
}

/* Administrative styling */
.admin-sidebar {
  background-color: #0f172a;
  color: #94a3b8;
  min-height: 100vh;
  padding: 20px;
}

.admin-nav-link {
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  margin-bottom: 8px;
  transition: var(--transition-smooth);
}

.admin-nav-link:hover, .admin-nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.table-custom {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.table-custom th {
  background-color: #f8fafc;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
}
/* ============================================
   AUTH PAGES (Login / Register)
   ============================================ */
.auth-page-wrapper {
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 40%, #f0f9ff 100%);
  min-height: calc(100vh - 80px);
  padding: 2rem 0;
}

/* Two-panel card for Register */
.auth-card {
  display: flex;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* Brand left panel */
.auth-brand-panel {
  background: linear-gradient(160deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 3rem 2.5rem;
  flex: 0 0 38%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.auth-brand-panel h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.auth-brand-panel p {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  opacity: 0.92;
}

.auth-benefits li i {
  font-size: 1rem;
  opacity: 0.85;
}

/* Right form panel */
.auth-form-panel {
  flex: 1;
  background: #fff;
  padding: 2.5rem 2.5rem;
  overflow-y: auto;
}

/* Single card for Login */
.auth-card-single {
  background: #fff;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.auth-form-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

.auth-form-header p {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-brand-logo-sm {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.3);
}

/* Inputs */
.auth-input-group {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-gray);
  font-size: 1rem;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0.65rem 1rem 0.65rem 2.7rem;
  font-size: 0.93rem;
  font-family: 'Outfit', sans-serif;
  transition: var(--transition-smooth);
  background: #f8fafc;
  color: var(--text-dark);
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.auth-error-msg {
  display: block;
  color: #ef4444;
  font-size: 0.78rem;
  margin-top: 4px;
  padding-left: 4px;
}

/* Auth button */
.auth-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: 'Outfit', sans-serif;
}

.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35);
  opacity: 0.95;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0;
  color: var(--text-gray);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.auth-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.demo-hint-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
}

/* User navbar dropdown button */
.btn-user-dropdown {
  background: rgba(13, 148, 136, 0.06);
  border: 1.5px solid rgba(13, 148, 136, 0.2);
  color: var(--primary-color);
  transition: var(--transition-smooth);
  font-family: 'Outfit', sans-serif;
}

.btn-user-dropdown:hover {
  background: rgba(13, 148, 136, 0.12);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .auth-card {
    flex-direction: column;
  }
  .auth-brand-panel {
    flex: unset;
    padding: 2rem 1.5rem;
  }
  .auth-form-panel {
    padding: 1.75rem 1.5rem;
  }
}

/* ============================================
   ORDER HISTORY PAGE
   ============================================ */
.history-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.history-avatar {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.history-stat-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition-smooth);
}

.history-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.history-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin: 0 auto 0.75rem;
}

.bg-primary-soft { background: rgba(13, 148, 136, 0.1); }
.bg-success-soft { background: rgba(34, 197, 94, 0.1); }
.bg-warning-soft { background: rgba(245, 158, 11, 0.1); }

.history-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.history-stat-label {
  font-size: 0.75rem;
  color: var(--text-gray);
  margin-top: 4px;
}

.history-order-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.history-order-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 148, 136, 0.3);
}

.history-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.history-order-items {
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f8fafc;
}

.history-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 10px 4px 4px;
}

.history-item-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.history-order-footer {
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-view-detail {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-view-detail:hover {
  color: var(--primary-hover);
  gap: 8px;
}

.order-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-status-pending {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.badge-status-shipping {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.badge-status-done {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.badge-status-canceled {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.history-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.history-empty-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin: 0 auto;
}

/* ============================================
   ORDER DETAIL PAGE (Customer View)
   ============================================ */
.order-detail-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.order-detail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.order-detail-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-color);
}

.order-detail-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.order-detail-item-img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
