/* FarmaLink AM — Modern High-Performance Pharmacy E-Commerce Styles */
:root {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #ccfbf1;
  --secondary: #0284c7;
  --secondary-hover: #0369a1;
  --accent-green: #10b981;
  --accent-orange: #f97316;
  --accent-red: #ef4444;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #0d9488;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 75px; /* Space for mobile bottom bar */
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------------- Top Announcement Bar ---------------- */
.top-bar {
  background: linear-gradient(135deg, #042f2e, #064e3b);
  color: #f0fdf4;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: #34d399;
}

.status-pulse {
  width: 7px;
  height: 7px;
  background-color: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.separator {
  color: #475569;
}

.top-bar-address {
  font-size: 0.75rem;
  color: #cbd5e1;
}

.top-promo-link {
  color: #fef08a;
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------------- Sticky Header ---------------- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .header-container {
    padding: 12px 16px;
    gap: 16px;
    flex-wrap: nowrap;
  }
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 3px 8px rgba(13, 148, 136, 0.3);
}

@media (min-width: 768px) {
  .brand-icon-box {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
  }
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .brand-title {
    font-size: 1.18rem;
  }
}

.brand-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

/* Search Wrapper Mobile & Desktop */
.search-wrapper {
  order: 3;
  width: 100%;
  margin-top: 4px;
}

@media (min-width: 768px) {
  .search-wrapper {
    order: 2;
    flex: 1;
    max-width: 520px;
    margin-top: 0;
  }
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 8px 34px 8px 36px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-subtle);
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
}

@media (min-width: 768px) {
  .search-box input {
    padding: 10px 38px 10px 40px;
    font-size: 0.9rem;
  }
}

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

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 4px;
}

/* Header Actions */
.header-actions {
  order: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

@media (min-width: 768px) {
  .header-actions {
    order: 3;
    gap: 8px;
    margin-left: 0;
  }
}

.btn-action-ghost {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.82rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.btn-action-ghost:hover {
  background: #e2e8f0;
  color: var(--primary-dark);
}

@media (min-width: 768px) {
  .btn-action-ghost {
    display: inline-flex;
  }
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: #25d366;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
  transition: var(--transition);
}

.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-1px);
}

.btn-cart {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: var(--transition);
}

@media (min-width: 768px) {
  .btn-cart {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }
}

.btn-cart:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.cart-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--accent-orange);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  border: 2px solid #fff;
}

/* ---------------- Layout Container ---------------- */
.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px;
}

@media (min-width: 768px) {
  .page-container {
    padding: 20px 16px;
  }
}

/* ---------------- Quick Action Cards ---------------- */
.quick-actions-section {
  margin-bottom: 20px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 768px) {
  .quick-actions-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

.action-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
}

@media (min-width: 768px) {
  .action-card {
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    gap: 12px;
  }
}

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

.action-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .action-card-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }
}

.action-card-teal .action-card-icon { background: #ccfbf1; color: #0f766e; }
.action-card-blue .action-card-icon { background: #e0f2fe; color: #0369a1; }
.action-card-green .action-card-icon { background: #dcfce7; color: #15803d; }
.action-card-amber .action-card-icon { background: #fef3c7; color: #b45309; }

.action-card-content h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 2px;
}

@media (min-width: 768px) {
  .action-card-content h3 {
    font-size: 0.95rem;
  }
}

.action-card-content p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.action-card-arrow {
  display: none;
  margin-left: auto;
  color: var(--text-light);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .action-card-arrow {
    display: block;
  }
}

/* ---------------- Promotions Section ---------------- */
.promotions-section {
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .promotions-section {
    padding: 24px;
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
  }
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.section-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .section-heading {
    font-size: 1.35rem;
  }
}

.section-subheading {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .section-subheading {
    font-size: 0.88rem;
  }
}

.carousel-nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.carousel-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  .carousel-btn {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }
}

.carousel-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.promo-carousel-wrapper {
  position: relative;
  overflow: hidden;
  padding: 4px 0 8px;
}

.promo-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.promo-carousel-track::-webkit-scrollbar {
  display: none;
}

/* Flyer Slide Card */
.promo-slide {
  flex: 0 0 78vw;
  max-width: 260px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  .promo-slide {
    flex: 0 0 250px;
    border-radius: var(--radius-lg);
  }
}

@media (min-width: 992px) {
  .promo-slide {
    flex: 0 0 280px;
  }
}

.promo-slide:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.promo-img-container {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 14;
  overflow: hidden;
  background: #e2e8f0;
}

.promo-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.promo-slide:hover .promo-img-container img {
  transform: scale(1.03);
}

.promo-overlay-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.promo-card-footer {
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promo-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
}

.promo-card-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: var(--transition);
  cursor: pointer;
}

.carousel-dot.active {
  width: 20px;
  border-radius: 4px;
  background: var(--primary);
}

/* ---------------- Categories Bar ---------------- */
.categories-section {
  margin-bottom: 20px;
}

.categories-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: var(--transition);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .cat-pill {
    padding: 8px 16px;
    font-size: 0.85rem;
    gap: 8px;
  }
}

.cat-pill:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.3);
}

.subcategories-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 2px;
  scrollbar-width: none;
  animation: fadeIn 0.25s ease;
}

.subcategories-scroll::-webkit-scrollbar {
  display: none;
}

.subcat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.subcat-pill:hover {
  background: #e2e8f0;
  color: var(--text-dark);
}

.subcat-pill.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

/* ---------------- Products Grid ---------------- */
.catalog-section {
  margin-bottom: 40px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

/* Product Card */
.product-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

@media (min-width: 768px) {
  .product-card {
    border-radius: var(--radius-lg);
  }
}

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

.product-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}

@media (min-width: 768px) {
  .product-thumb-box {
    padding: 12px;
  }
}

.product-real-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

/* Fallback Product Icon Placeholder (Clean & Elegant) */
.product-placeholder-icon {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #f0fdfa, #f8fafc);
  color: var(--primary);
  border-radius: var(--radius-sm);
}

.product-placeholder-icon i {
  font-size: 2rem;
  opacity: 0.8;
}

.product-placeholder-icon span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.badge-discount {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent-orange);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.badge-rx {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #fef2f2;
  color: var(--accent-red);
  border: 1px solid #fecaca;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

.product-details {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (min-width: 768px) {
  .product-details {
    padding: 12px;
  }
}

.product-brand {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 2px;
}

.product-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .product-name {
    font-size: 0.92rem;
  }
}

.product-presentation {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.product-price-box {
  margin-top: auto;
  margin-bottom: 8px;
}

.price-regular {
  font-size: 0.72rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-right: 4px;
}

.price-final {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
}

.price-final.highlight {
  color: #047857;
}

.badge-brand-promo {
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-promo-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  letter-spacing: 0.02em;
}

.product-promo-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #065f46;
  background: #ecfdf5;
  border: 1px dashed #10b981;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  line-height: 1.2;
}

.price-consultar-promo {
  color: #0284c7 !important;
  font-weight: 800 !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-add-cart {
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition);
}

.btn-add-cart:hover {
  background: var(--primary-hover);
}

.btn-add-cart.in-cart {
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
}

/* Skeleton Loading */
.product-skeleton {
  height: 240px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-md);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 36px 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.empty-state i {
  font-size: 2.5rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.empty-state h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ---------------- Modals ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.show {
  display: flex;
  opacity: 1;
}

.modal-backdrop.modal-stacked {
  z-index: 1100;
}

.btn-quick-add {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary, #0d9488);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-quick-add:hover {
  background: rgba(13, 148, 136, 0.1);
  color: var(--primary-dark, #0f766e);
}

.modal-dialog {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.modal-title-box h3 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-dark);
}

.modal-title-box p {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #e2e8f0;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Lightbox Flyer Modal */
.modal-flyer-dialog {
  max-width: 440px;
  background: #0f172a;
  color: #fff;
  border-radius: var(--radius-lg);
  position: relative;
}

.modal-flyer-dialog .modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  z-index: 10;
}

.flyer-zoom-content img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
}

.flyer-modal-footer {
  padding: 14px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.flyer-info-text h4 {
  font-size: 0.9rem;
  font-weight: 800;
}

.flyer-info-text p {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
}

.form-group input, .form-group textarea, .form-group select {
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  font-family: inherit;
  font-size: 0.85rem;
  transition: var(--transition);
}

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

.file-drop-area {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px 12px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: var(--transition);
}

.file-drop-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-drop-area input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.file-icon {
  font-size: 1.8rem;
  color: var(--primary);
}

.file-text {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-dark);
}

.file-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Buttons */
.btn-primary {
  padding: 9px 16px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

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

.btn-secondary {
  padding: 9px 16px;
  border-radius: var(--radius-md);
  background: #e2e8f0;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 0.84rem;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

/* Duty Pharmacies List */
.duty-item-card {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.duty-item-card.own {
  background: #f0fdf4;
  border-color: #86efac;
}

.duty-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.duty-item-addr {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.duty-call-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* Delivery info block */
.info-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

.info-icon {
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: 2px;
}

.info-block h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.info-block p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------------- Shopping Cart Drawer ---------------- */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cart-drawer-backdrop.show {
  display: block;
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: #fff;
  z-index: 1010;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-title-box h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.cart-counter-pill {
  font-size: 0.7rem;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.cart-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
}

.cart-item-thumb {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.cart-item-price {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border-color);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.cart-drawer-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
  border-top: 1px dashed var(--border-color);
  padding-top: 6px;
}

.checkout-inputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.checkout-inputs input, .checkout-inputs select {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  font-family: inherit;
}

.btn-whatsapp-checkout {
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-md);
  background: #25d366;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.35);
  transition: var(--transition);
}

.btn-whatsapp-checkout:hover {
  background: #20bd5a;
}

/* ---------------- Mobile Bottom Navigation ---------------- */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 99;
}

@media (min-width: 992px) {
  .mobile-bottom-bar {
    display: none;
  }
}

.mobile-bar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  flex: 1;
}

.mobile-bar-btn i {
  font-size: 1.15rem;
}

.mobile-whatsapp-btn {
  color: #25d366;
}

.mobile-cart-btn {
  color: var(--primary);
}

.mobile-badge {
  position: absolute;
  top: -4px;
  right: calc(50% - 18px);
  background: var(--accent-orange);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

/* ---------------- Footer ---------------- */
.main-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 36px 16px 20px;
  border-top: 1px solid #1e293b;
  margin-top: 40px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .footer-container {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.footer-brand i {
  color: #2dd4bf;
}

.footer-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 12px;
  max-width: 380px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
  font-size: 0.9rem;
}

.footer-socials a:hover {
  background: var(--primary);
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-col p {
  font-size: 0.8rem;
  margin-bottom: 6px;
  color: #94a3b8;
}

.footer-col a {
  color: #38bdf8;
}

.footer-bottom {
  max-width: 1280px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.74rem;
  color: #64748b;
}

.footer-bottom a {
  color: #2dd4bf;
}

/* ---------------- Toast Notifications ---------------- */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 992px) {
  .toast-container {
    bottom: 24px;
  }
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.25s ease;
}

.toast.success {
  background: #065f46;
  border-left: 4px solid #34d399;
}

.toast.error {
  background: #991b1b;
  border-left: 4px solid #f87171;
}

@keyframes toast-in {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ---------------- Authentication Modal ---------------- */
.modal-auth-dialog {
  max-width: 420px;
}

.auth-role-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  margin-bottom: 8px;
}

.auth-role-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.auth-role-tab.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}



/* ---------------- Portals (Patient & Owner) ---------------- */
.modal-portal-dialog {
  max-width: 820px;
}

.modal-backoffice-dialog {
  width: 96vw;
  max-width: 1440px;
  height: 94vh;
  max-height: 96vh;
}

.modal-order-dialog {
  width: 95vw;
  max-width: 980px;
  max-height: 94vh;
}

.modal-rx-dialog {
  width: 95vw;
  max-width: 1100px;
  max-height: 94vh;
}

.portal-header {
  background: #f8fafc;
}

.backoffice-header {
  background: #f1f5f9;
}

.backoffice-icon {
  background: #0284c7;
  color: #fff;
}

.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-logout {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.btn-logout:hover {
  background: #fecaca;
}

.user-role-badge {
  font-size: 0.7rem;
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.bo-role-badge {
  font-size: 0.7rem;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.bo-user-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Backoffice Metrics Ribbon */
.bo-metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .bo-metrics-ribbon {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px 18px;
  }
}

.bo-metric-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.metric-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1;
}

.metric-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Portal Nav Bar Tabs */
.portal-nav-bar {
  display: flex;
  gap: 4px;
  background: #fff;
  border-bottom: 2px solid var(--border-color);
  padding: 4px 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.portal-nav-bar::-webkit-scrollbar {
  display: none;
}

.portal-tab-btn {
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.portal-tab-btn:hover {
  color: var(--primary);
}

.portal-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-tabs-bar {
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  background: #f8fafc;
  display: flex;
}

.auth-tabs-bar .portal-tab-btn {
  flex: 1;
  justify-content: center;
  padding: 10px 12px;
  font-size: 0.85rem;
}

.portal-tab-pane {
  display: none;
}

.portal-tab-pane.active {
  display: block;
}

.pane-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.pane-action-bar h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
}

.pane-help-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* Portal Cards List */
.portal-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}

.portal-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.portal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.portal-card-id {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-dark);
}

.portal-card-date {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Order Status Timeline & Badges */
.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-pill.new { background: #fef3c7; color: #b45309; }
.status-pill.confirmed { background: #e0f2fe; color: #0369a1; }
.status-pill.preparing { background: #ffedd5; color: #c2410c; }
.status-pill.ready { background: #dcfce7; color: #15803d; }
.status-pill.dispatched { background: #ede9fe; color: #6d28d9; }
.status-pill.completed { background: #d1fae5; color: #047857; }
.status-pill.cancelled { background: #fee2e2; color: #b91c1c; }

.order-tracker-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 6px;
  padding: 8px 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow-x: auto;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-light);
  flex: 1;
  text-align: center;
  position: relative;
}

.timeline-step.done {
  color: #047857;
}

.timeline-step.active {
  color: var(--primary-dark);
}

.timeline-icon-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.timeline-step.done .timeline-icon-dot {
  background: #10b981;
}

.timeline-step.active .timeline-icon-dot {
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

/* Backoffice Table / Orders Rows */
.bo-order-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bo-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.bo-order-cust {
  font-size: 0.88rem;
  font-weight: 700;
}

.bo-order-details {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.bo-order-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}

.bo-status-select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  background: #fff;
}

/* Backoffice Promotions Grid */
.bo-promos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .bo-promos-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

.bo-promo-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bo-promo-thumb {
  width: 100%;
  aspect-ratio: 9 / 12;
  background: #e2e8f0;
  overflow: hidden;
}

.bo-promo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bo-promo-meta {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bo-promo-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.btn-del-sm {
  align-self: flex-end;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.btn-del-sm:hover {
  background: #fecaca;
}

.btn-edit-sm {
  align-self: flex-end;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-edit-sm:hover {
  background: #bae6fd;
}

.bo-promo-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* Backoffice Sub-Tabs for Promociones & Descuentos */
.bo-subtabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: var(--bg-subtle, #f1f5f9);
  padding: 6px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border-color, #e2e8f0);
}

.bo-subtab-btn {
  flex: 1;
  padding: 9px 14px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.bo-subtab-btn:hover {
  color: var(--text-main, #0f172a);
  background: rgba(255, 255, 255, 0.6);
}

.bo-subtab-btn.active {
  background: #fff;
  color: var(--brand-color, #0d9488);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Discount Promos List */
.bo-discounts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bo-discount-card {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 12px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.bo-discount-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.bo-discount-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.bo-discount-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bo-discount-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
}

.bo-discount-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
}

.bo-discount-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bo-discount-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
}

.bo-discount-badge.brand {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.bo-discount-badge.rubro {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.bo-discount-badge.subrubro {
  background: #faf5ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.bo-discount-badge.percent {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 0.85rem;
  font-weight: 900;
}

.bo-discount-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.bo-discount-dates {
  font-size: 0.78rem;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
}

.status-chip.active {
  background: #dcfce7;
  color: #15803d;
}

.status-chip.upcoming {
  background: #e0f2fe;
  color: #0369a1;
}

.status-chip.expired {
  background: #f1f5f9;
  color: #64748b;
}

@media (min-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* ---------------- Order Preparation Checklist Modal ---------------- */
.modal-order-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .modal-order-body {
    padding: 20px 24px;
    gap: 18px;
  }
}

.od-summary-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.od-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
}

.od-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-right: 4px;
}

.btn-wa-direct {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.btn-wa-direct:hover {
  background: #bbf7d0;
}

/* Status Switcher Ribbon */
.od-status-bar {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.od-status-buttons {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.od-status-btn {
  padding: 6px 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  transition: var(--transition);
}

.od-status-btn:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.od-status-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

/* Checklist Section */
.od-checklist-section {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.od-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.od-section-header h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.od-progress-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #475569;
}

.od-progress-badge.all-done {
  background: #dcfce7;
  color: #15803d;
}

.od-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.od-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  transition: var(--transition);
  gap: 10px;
}

.od-item-card.prepared {
  background: #f0fdf4;
  border-color: #86efac;
}

.od-item-card.missing {
  background: #fef2f2;
  border-color: #fca5a5;
}

.od-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.od-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.od-item-info {
  display: flex;
  flex-direction: column;
}

.od-item-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-dark);
}

.od-item-card.prepared .od-item-name {
  color: #15803d;
}

.od-item-card.missing .od-item-name {
  color: #b91c1c;
  text-decoration: line-through;
}

.od-item-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.od-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-missing-toggle {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: var(--transition);
}

.btn-missing-toggle:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.btn-missing-toggle.active {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.btn-alert-wa {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: #25d366;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

/* Footer & Notes */
.od-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .od-footer-grid {
    grid-template-columns: 3fr 2fr;
    gap: 16px;
  }
}

.od-notes-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.od-totals-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.od-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.od-total-row.grand-total {
  border-top: 1px dashed var(--border-color);
  padding-top: 6px;
  font-weight: 800;
  font-size: 1.05rem;
}

/* ---------------- Integrated Rx Viewer Modal ---------------- */
.modal-rx-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .modal-rx-body {
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    padding: 20px 24px;
  }
}

.rx-image-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #0f172a;
  border-radius: var(--radius-md);
  padding: 12px;
}

.rx-image-container {
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: #020617;
  border-radius: var(--radius-sm);
}

.rx-viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
  user-select: none;
}

.rx-img-error {
  color: #f87171;
  text-align: center;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rx-viewer-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.btn-tool {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #334155;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-tool:hover {
  background: #475569;
}

.btn-tool-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  margin-left: 8px;
}

.rx-info-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rx-ctrl-box {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.rx-quote-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.od-missing-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 6px;
  border: 1px solid #fca5a5;
}

.od-missing-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #16a34a;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  margin-left: auto;
  transition: var(--transition);
}

.od-missing-wa-link:hover {
  background: #15803d;
  color: #fff;
}

/* ---------------- Backoffice Products & Stock ---------------- */
.bo-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.bo-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  flex: 1;
  min-width: 220px;
}

.bo-search-box i {
  color: var(--text-muted);
}

.bo-search-box input {
  border: none;
  outline: none;
  font-size: 0.85rem;
  width: 100%;
}

.bo-filter-select {
  max-width: 200px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.bo-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bo-pill {
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.bo-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.bo-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.bo-products-table-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.bo-product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  gap: 10px;
  transition: var(--transition);
}

@media (min-width: 768px) {
  .bo-product-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.bo-product-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.bo-product-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.bo-product-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.bo-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bo-product-info h5 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 2px;
}

.bo-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bo-product-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
}

.stock-pill.normal {
  background: #dcfce7;
  color: #15803d;
}

.stock-pill.low {
  background: #ffedd5;
  color: #c2410c;
}

.stock-pill.out {
  background: #fee2e2;
  color: #b91c1c;
}

.quick-stock-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.quick-stock-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-stock-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-xs {
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

/* ---------------- Backoffice Settings Form ---------------- */
.bo-settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.settings-card-header i {
  color: var(--primary);
  font-size: 1.05rem;
}

.settings-card-header h5 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
}

.settings-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.color-picker-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-color-box {
  width: 44px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
}

.input-color-hex {
  font-family: monospace;
  font-weight: 700;
  text-transform: uppercase;
  max-width: 120px;
}

.color-preview-banner {
  margin-top: 14px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.color-preview-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-info strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-dark);
}

.toggle-info p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.settings-submit-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 0;
}

/* ---------------- Product Edit Modal ---------------- */
.modal-product-dialog {
  max-width: 680px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 600px) {
  .form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.product-preview-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-img-preview-container {
  width: 100%;
  height: 90px;
  background: #f8fafc;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img-preview-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  font-size: 0.75rem;
}

.checkbox-options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-top: 8px;
}

.custom-chk-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-dark);
  cursor: pointer;
}

.od-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.btn-wa-action {
  transition: transform 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}

.btn-wa-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-wa-action:active {
  transform: translateY(0);
}

/* Promo Tabs Bar & Type Badges */
.promo-tabs-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.promo-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.promo-tab-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.promo-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.badge-promo-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 4px;
}

.badge-promo-type.tarjeta {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-promo-type.laboratorio {
  background: #fdf2f8;
  color: #be185d;
}

.badge-promo-type.categoria {
  background: #fef3c7;
  color: #b45309;
}

.duty-city-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Notifications Center Styles (Bell Button, Badges & Notification List)
   ========================================================================== */

.notif-bell-btn {
  position: relative !important;
  color: var(--text-dark);
  font-size: 1rem;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  line-height: 1;
  padding: 0 4px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
  z-index: 2;
  transition: transform 0.2s ease;
}

.mobile-bar-btn .mobile-badge {
  position: absolute;
  top: 4px;
  right: 18px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
}

.modal-notif-dialog {
  max-width: 540px !important;
  width: 95%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.notif-modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
}

.notif-modal-body {
  padding: 16px 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.notif-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.notif-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: #cbd5e1;
}

.notif-item.unread {
  background: #f0fdfa;
  border-color: #99f6e4;
}

.notif-item.unread::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0d9488;
  box-shadow: 0 0 6px rgba(13, 148, 136, 0.6);
}

.notif-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.notif-icon-box.order {
  background: #ccfbf1;
  color: #0f766e;
}

.notif-icon-box.prescription {
  background: #ede9fe;
  color: #7c3aed;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.notif-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.notif-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.notif-message {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.4;
  margin: 0 0 8px;
  word-break: break-word;
}

.notif-footer-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: capitalize;
}

.notif-status-badge.new { background: #e0f2fe; color: #0284c7; }
.notif-status-badge.confirmed { background: #dcfce7; color: #16a34a; }
.notif-status-badge.preparing { background: #fef9c3; color: #ca8a04; }
.notif-status-badge.ready { background: #ccfbf1; color: #0d9488; }
.notif-status-badge.dispatched { background: #ede9fe; color: #7c3aed; }
.notif-status-badge.completed { background: #dcfce7; color: #166534; }
.notif-status-badge.cancelled { background: #fee2e2; color: #dc2626; }

.notif-status-badge.received { background: #e0f2fe; color: #0284c7; }
.notif-status-badge.reviewing { background: #fef9c3; color: #ca8a04; }
.notif-status-badge.quoted { background: #ffedd5; color: #ea580c; }
.notif-status-badge.accepted { background: #dcfce7; color: #16a34a; }
.notif-status-badge.rejected { background: #fee2e2; color: #dc2626; }
.notif-status-badge.expired { background: #f1f5f9; color: #64748b; }

.notif-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.notif-empty-state i {
  font-size: 2.2rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.notif-empty-state h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.notif-empty-state p {
  font-size: 0.82rem;
  margin: 0;
}

/* Delivery Tracking & Live Map Styles */
.custom-map-icon {
  background: transparent;
  border: none;
}
.custom-map-icon div {
  transition: transform 0.2s ease;
}
.custom-map-icon div:hover {
  transform: scale(1.15);
}
#odLiveMap, #custLiveMap {
  border-radius: 8px;
  overflow: hidden;
  z-index: 10;
}
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
}



