/* ═══════════════════════════════════════════════════════════════════
   SwiftGo — App Design System v3.0
   Teal-Mint theme · Glassmorphism · Cohérent avec la landing page
   ═══════════════════════════════════════════════════════════════════ */

/* ── Variables ───────────────────────────────────────────────────── */
:root {
  /* Palette landing (source de vérité) */
  --teal-50:        #C4ECE5;
  --teal-100:       #E0F7F3;
  --teal-200:       #A8E5D9;
  --teal-600:       #0D9488;
  --accent:         #FDB813;
  --accent-dark:    #E5A50A;
  --accent-pale:    rgba(253,184,19,.15);
  --dark:           #1A1A2E;
  --dark-80:        rgba(26,26,46,.82);

  /* Glass tokens */
  --glass-light:    rgba(255,255,255,.78);
  --glass-light-hv: rgba(255,255,255,.92);
  --glass-dark:     rgba(15,20,40,.88);
  --glass-border:   rgba(255,255,255,.62);
  --glass-border-dk:rgba(255,255,255,.09);
  --blur-sm:        blur(12px);
  --blur-md:        blur(20px);
  --blur-lg:        blur(28px);

  /* Sémantique */
  --primary:        var(--accent);
  --primary-dark:   var(--accent-dark);
  --primary-pale:   var(--accent-pale);
  --bg-card:        var(--glass-light);
  --text-primary:   #1A1A2E;
  --text-secondary: #4A5568;
  --text-muted:     #7B8C9E;
  --success:        #22C55E;
  --warning:        #F59E0B;
  --danger:         #EF4444;
  --info:           #3B82F6;
  --sidebar-width:  260px;
  --radius-sm:      .5rem;
  --radius-md:      .75rem;
  --radius-lg:      1rem;
  --radius-xl:      1.25rem;
  --radius-2xl:     1.5rem;
  --shadow-sm:      0 2px 8px rgba(13,90,80,.08), 0 1px 3px rgba(13,90,80,.04);
  --shadow-md:      0 8px 32px rgba(13,90,80,.1), 0 2px 8px rgba(13,90,80,.06);
  --shadow-lg:      0 16px 48px rgba(13,90,80,.12), 0 4px 16px rgba(13,90,80,.06);
  --shadow-accent:  0 6px 20px rgba(253,184,19,.38);

  /* Bootstrap overrides */
  --bs-link-color:           #1A1A2E;
  --bs-link-color-rgb:       26,26,46;
  --bs-link-hover-color:     #1A1A2E;
  --bs-link-hover-color-rgb: 26,26,46;
}

/* ── Reset / Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ── App Body (pages authentifiées) ─────────────────────────────── */
body.app-body {
  background: #F4FBFA;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Blobs décoratifs (app) ──────────────────────────────────────── */
.app-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.app-blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(168,229,217,.45) 0%, transparent 70%);
  top: -180px; right: -120px;
  filter: blur(60px);
}
.app-blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(253,184,19,.18) 0%, transparent 70%);
  bottom: 10%; left: -100px;
  filter: blur(80px);
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.app-sidebar {
  background: linear-gradient(180deg, #C4ECE5 0%, #B8E8DF 100%);
  border-right: 1px solid rgba(168,229,217,.6);
  box-shadow: 4px 0 24px rgba(13,90,80,.08);
}

/* ── Sidebar Section Labels ──────────────────────────────────────── */
.sidebar-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9BB5B0;
  padding: 0 .75rem;
  margin: 1rem 0 .4rem;
}

/* ── Sidebar Nav Links ───────────────────────────────────────────── */
a.sidebar-link,
a.sidebar-link:link,
a.sidebar-link:visited {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .875rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: #5E7A76 !important;
  text-decoration: none !important;
  transition: background .15s, color .15s;
  position: relative;
  cursor: pointer;
}

a.sidebar-link:hover {
  background: rgba(196,236,229,.35);
  color: var(--dark) !important;
}

a.sidebar-link.active,
a.sidebar-link.active:link,
a.sidebar-link.active:visited {
  background: rgba(253,184,19,.12);
  color: #B07D00 !important;
  font-weight: 600;
}

a.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

a.sidebar-link i {
  font-size: 1rem;
  flex-shrink: 0;
  width: 1.1rem;
  text-align: center;
}

/* ── Logout Button ───────────────────────────────────────────────── */
.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .875rem;
  border-radius: var(--radius-sm);
  padding: .5rem .875rem;
  color: #9BB5B0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: background .15s, color .15s;
}

.logout-btn:hover {
  background: rgba(239,68,68,.15);
  color: #FCA5A5;
}

/* ── Mobile TopBar ───────────────────────────────────────────────── */
.app-topbar {
  background: rgba(255,255,255,.82);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border-bottom: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 2px 16px rgba(13,90,80,.06);
}

/* ── Bottom Nav (Mobile) ─────────────────────────────────────────── */
.app-bottom-nav {
  background: rgba(255,255,255,.88);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border-top: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 -4px 20px rgba(13,90,80,.07);
}

a.bottom-nav-link,
a.bottom-nav-link:link,
a.bottom-nav-link:visited,
button.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  padding: .35rem .5rem;
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-size: .6rem;
  font-weight: 600;
  flex: 1;
  transition: color .15s;
  letter-spacing: .01em;
}

a.bottom-nav-link:hover,
button.bottom-nav-link:hover { color: var(--dark) !important; }

a.bottom-nav-link.active      { color: var(--accent) !important; }
a.bottom-nav-link.active i    { color: var(--accent); }

a.bottom-nav-link i,
button.bottom-nav-link i { font-size: 1.3rem; line-height: 1; }

/* ── Status Badges ───────────────────────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .7rem;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.badge-pending    { background: rgba(253,184,19,.15); color: #92400E; }
.badge-accepted   { background: rgba(59,130,246,.12); color: #1E40AF; }
.badge-inprogress { background: rgba(139,92,246,.12); color: #5B21B6; }
.badge-delivered  { background: rgba(34,197,94,.12);  color: #166534; }
.badge-canceled   { background: rgba(239,68,68,.12);  color: #991B1B; }

/* ── Glass Card (base) ───────────────────────────────────────────── */
.app-card {
  background: #FFFFFF;
  border: 1px solid rgba(196,236,229,.45);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(13,90,80,.06);
  transition: box-shadow .22s, transform .22s;
}

.app-card:hover {
  box-shadow: 0 8px 28px rgba(13,90,80,.1);
  transform: translateY(-2px);
}

/* ── Stat Card ───────────────────────────────────────────────────── */
.stat-card {
  background: #FFFFFF;
  border: 1px solid rgba(196,236,229,.45);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(13,90,80,.06);
  transition: box-shadow .22s, transform .22s;
}

.stat-card:hover {
  box-shadow: 0 8px 28px rgba(13,90,80,.1);
  transform: translateY(-3px);
}

/* ── Glass Panel (ex: recent orders) ────────────────────────────── */
.glass-panel {
  background: #FFFFFF;
  border: 1px solid rgba(196,236,229,.45);
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 12px rgba(13,90,80,.06);
  overflow: hidden;
}

/* ── Form Inputs ─────────────────────────────────────────────────── */
.app-input {
  width: 100%;
  background: rgba(255,255,255,.65);
  border: 1.5px solid rgba(255,255,255,.7);
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  font-size: .875rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
  backdrop-filter: var(--blur-sm);
}

.app-input:focus {
  background: rgba(255,255,255,.9);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(253,184,19,.22);
}

.app-input::placeholder { color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1.35rem;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .18s cubic-bezier(.16,1,.3,1);
  white-space: nowrap;
  touch-action: manipulation;
  text-decoration: none !important;
  letter-spacing: .01em;
}

.btn-app:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-app-primary {
  background: var(--accent);
  color: var(--dark) !important;
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.btn-app-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(253,184,19,.45);
  color: var(--dark) !important;
}

.btn-app-secondary {
  background: rgba(255,255,255,.72);
  backdrop-filter: var(--blur-sm);
  color: var(--text-secondary) !important;
  border-color: var(--glass-border);
}

.btn-app-secondary:hover {
  background: rgba(255,255,255,.92);
  color: var(--text-primary) !important;
  border-color: rgba(255,255,255,.8);
  transform: translateY(-1px);
}

.btn-app-danger {
  background: rgba(254,242,242,.85);
  backdrop-filter: var(--blur-sm);
  color: #991B1B !important;
  border-color: rgba(254,202,202,.8);
}

.btn-app-danger:hover {
  background: rgba(254,226,226,.9);
  color: #7F1D1D !important;
}

/* ── Page Title ──────────────────────────────────────────────────── */
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 .25rem;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.page-subtitle {
  font-size: .875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Alert Toasts ────────────────────────────────────────────────── */
.alert-toast-success {
  background: rgba(240,253,244,.9);
  backdrop-filter: var(--blur-sm);
  border: 1px solid rgba(187,247,208,.7);
  border-radius: var(--radius-md);
  padding: .875rem 1.125rem;
  color: #166534;
  font-size: .875rem;
  font-weight: 500;
}

.alert-toast-success i { color: #22C55E; font-size: 1rem; }

.alert-toast-error {
  background: rgba(254,242,242,.9);
  backdrop-filter: var(--blur-sm);
  border: 1px solid rgba(254,202,202,.7);
  border-radius: var(--radius-md);
  padding: .875rem 1.125rem;
  color: #991B1B;
  font-size: .875rem;
  font-weight: 500;
}

.alert-toast-error i { color: #EF4444; font-size: 1rem; }

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: .5;
  font-size: .75rem;
  padding: 0;
  transition: opacity .15s;
}
.toast-close:hover { opacity: 1; }

/* ── Star Rating ─────────────────────────────────────────────────── */
.star-rating { font-size: 1.1rem; letter-spacing: 1px; }
.star-fill   { color: var(--accent); }
.star-empty  { color: #D1D5DB; }

/* ── Stepper ─────────────────────────────────────────────────────── */
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 1.5rem; }

.step-item {
  flex: 1;
  text-align: center;
  padding: .625rem .5rem;
  font-size: .75rem;
  font-weight: 600;
  background: rgba(255,255,255,.45);
  color: var(--text-muted);
  position: relative;
}

.step-item.step-done     { background: rgba(220,252,231,.8); color: #166534; }
.step-item.step-active   { background: rgba(219,234,254,.8); color: #1E40AF; }
.step-item.step-canceled { background: rgba(254,226,226,.8); color: #991B1B; }
.step-item:first-child   { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.step-item:last-child    { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ── Tables ──────────────────────────────────────────────────────── */
.app-table { width: 100%; border-collapse: collapse; font-size: .875rem; }

.app-table thead th {
  background: rgba(196,236,229,.3);
  color: var(--text-secondary);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.5);
  text-align: left;
}

.app-table tbody td {
  padding: .875rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.4);
  color: var(--text-primary);
  vertical-align: middle;
}

.app-table tbody tr:hover { background: rgba(255,255,255,.3); }
.app-table tbody tr:last-child td { border-bottom: none; }

/* ── Bootstrap focus ring override ──────────────────────────────── */
.form-control:focus, .form-select:focus, .btn:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(253,184,19,.22) !important;
}

/* ── Form Labels ─────────────────────────────────────────────────── */
.form-label-app {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: .4rem;
  letter-spacing: .01em;
}

/* ── Select ──────────────────────────────────────────────────────── */
.app-select {
  width: 100%;
  background: rgba(255,255,255,.65);
  border: 1.5px solid rgba(255,255,255,.7);
  border-radius: var(--radius-sm);
  padding: .6rem 2.5rem .6rem .9rem;
  font-size: .875rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2394A3B8' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  cursor: pointer;
  backdrop-filter: var(--blur-sm);
}

.app-select:focus {
  background-color: rgba(255,255,255,.9);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(253,184,19,.22);
}

select.input-validation-error {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}

/* ── Section Badge ───────────────────────────────────────────────── */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ── Auth Card ───────────────────────────────────────────────────── */
.auth-card {
  background: var(--glass-light);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
}

/* ── Input with Icon ─────────────────────────────────────────────── */
.input-icon-wrap { position: relative; }

.input-icon-wrap .input-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .9rem;
  pointer-events: none;
  line-height: 1;
}

.input-icon-wrap .app-input { padding-left: 2.6rem; }

/* ── Validation ──────────────────────────────────────────────────── */
.validation-summary-valid  { display: none !important; }

.validation-summary-errors {
  background: rgba(254,242,242,.85);
  border: 1px solid rgba(254,202,202,.7);
  border-radius: var(--radius-sm);
  padding: .875rem 1rem;
  margin-bottom: 1.25rem;
  font-size: .8rem;
  color: #991B1B;
}

.validation-summary-errors ul { margin: 0; padding-left: 1.25rem; }

.field-validation-error {
  font-size: .75rem;
  color: #EF4444;
  margin-top: .3rem;
  display: block;
}

input.input-validation-error {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(13,148,136,.3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(13,148,136,.55); }

/* ── Tabular numbers ─────────────────────────────────────────────── */
.tabular { font-variant-numeric: tabular-nums; }

/* ── Navigation text link (dark header) ──────────────────────────── */
.nav-text-link-dark {
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.65) !important;
  transition: color .15s;
  text-decoration: none !important;
}
.nav-text-link-dark:hover { color: #fff !important; }

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .btn-app, .stat-card, .app-card, .glass-panel {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ── Force link color (app pages only — scoped to avoid overriding landing page) */
body.app-body a,
body.app-body a:link,
body.app-body a:visited { color: var(--text-primary) !important; text-decoration: none !important; }
body.app-body a:hover,
body.app-body a:active  { color: var(--text-primary) !important; text-decoration: none !important; }

/* ═══════════════════════════════════════════════════════════════════
   Search Component — Barre de recherche IA
   ═══════════════════════════════════════════════════════════════════ */

/* ── Search bar wrapper ────────────────────────────────────────────── */
.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.82);
  border: 1.5px solid rgba(196,236,229,.7);
  border-radius: var(--radius-xl);
  transition: border-color .2s, box-shadow .2s;
}
.search-bar-wrap:focus-within {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12), var(--shadow-sm);
}

/* Glow effect — AI powered feel */
.search-bar-wrap--glow {
  box-shadow: 0 0 0 0 rgba(13,148,136,0);
  animation: search-idle-glow 3s ease-in-out infinite;
}
.search-bar-wrap--glow:focus-within {
  animation: none;
  box-shadow: 0 0 20px rgba(13,148,136,.18), 0 0 0 3px rgba(13,148,136,.1);
}
@keyframes search-idle-glow {
  0%,100% { box-shadow: 0 2px 12px rgba(13,148,136,.08); }
  50%      { box-shadow: 0 2px 20px rgba(13,148,136,.18), 0 0 8px rgba(253,184,19,.1); }
}

.search-bar-wrap--mobile {
  background: rgba(255,255,255,.72);
  border-color: rgba(196,236,229,.5);
}

.search-bar-icon {
  padding: 0 .6rem 0 .9rem;
  font-size: .95rem;
  color: var(--teal-600);
  flex-shrink: 0;
  pointer-events: none;
}

.search-bar-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  color: var(--dark);
  padding: .55rem .3rem;
  min-width: 0;
}
.search-bar-input::placeholder { color: var(--text-muted); }
.search-bar-input::-webkit-search-cancel-button { display:none; }

/* AI dot indicator */
.search-ai-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal-600);
  flex-shrink: 0;
  margin-right: .5rem;
  animation: search-ai-pulse 2s ease-in-out infinite;
}
@keyframes search-ai-pulse {
  0%,100% { opacity:.5; transform:scale(1); }
  50%      { opacity:1; transform:scale(1.35); box-shadow:0 0 6px rgba(13,148,136,.5); }
}

/* Submit button (full-page search bar only) */
.search-bar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  margin: 3px;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--teal-600);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, transform .15s;
}
.search-bar-btn:hover { background: #0b7a70; transform: scale(1.05); }

/* ── Sidebar search wrapper ─────────────────────────────────────────── */
.search-sidebar-wrap { position: relative; }

/* ── Mobile search button icon (top-right) ──────────────────────────── */
.search-mobile-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: rgba(13,148,136,.1);
  color: var(--teal-600) !important;
  font-size: 1rem;
  transition: background .2s;
}
.search-mobile-icon-btn:hover { background: rgba(13,148,136,.18) !important; }

/* ── Autocomplete dropdown ─────────────────────────────────────────── */
.search-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--glass-light);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1.5px solid rgba(196,236,229,.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  max-height: 340px;
  overflow-y: auto;
}
.search-autocomplete.hidden { display: none; }

.search-autocomplete-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .85rem;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid rgba(196,236,229,.35);
  text-decoration: none !important;
}
.search-autocomplete-item:last-child { border-bottom: none; }
.search-autocomplete-item:hover { background: rgba(13,148,136,.08); }

.search-autocomplete-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
}
.search-autocomplete-label {
  flex: 1;
  min-width: 0;
}
.search-autocomplete-label strong {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-autocomplete-label span {
  display: block;
  font-size: .7rem;
  color: var(--text-muted);
}
.search-autocomplete-price {
  font-size: .78rem;
  font-weight: 800;
  color: var(--teal-600);
  flex-shrink: 0;
}
.search-autocomplete-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .5rem;
  font-size: .75rem;
  color: var(--teal-600);
  font-weight: 600;
  background: rgba(13,148,136,.05);
  cursor: pointer;
  transition: background .15s;
}
.search-autocomplete-footer:hover { background: rgba(13,148,136,.1); }

/* ── AI badge ──────────────────────────────────────────────────────── */
.search-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .03em;
  background: linear-gradient(135deg, var(--teal-600), #0b7a70);
  color: #fff;
}

/* ── Loading state ─────────────────────────────────────────────────── */
.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem;
}
.search-loading.hidden { display: none; }

.search-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(13,148,136,.2);
  border-top-color: var(--teal-600);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Search page ───────────────────────────────────────────────────── */
.search-page { max-width: 860px; }

.search-hero { }

.search-hero-form { }

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  text-align: center;
}

/* ── Filter tabs ───────────────────────────────────────────────────── */
.search-filter-tabs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.search-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1.5px solid rgba(196,236,229,.8);
  background: rgba(255,255,255,.7);
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
}
.search-filter-tab:hover { border-color: var(--teal-600); color: var(--teal-600); }
.search-filter-tab.active {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
}

/* ── Results grid ─────────────────────────────────────────────────── */
.search-results-grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.search-result-card {
  background: var(--glass-light);
  border: 1.5px solid rgba(196,236,229,.6);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  transition: box-shadow .2s, transform .15s;
}
.search-result-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ── Result icons & badges ─────────────────────────────────────────── */
.search-result-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.badge-restaurant  { background: rgba(253,184,19,.18); color: #b5870a; }
.badge-supermarket { background: rgba(13,148,136,.14); color: var(--teal-600); }
.badge-pharmacy    { background: rgba(59,130,246,.14); color: #3b82f6; }

.search-type-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
}

.search-add-btn {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: var(--radius-md);
  background: var(--teal-600);
  color: #fff !important;
  font-size: .72rem;
  font-weight: 700;
  transition: background .2s;
}
.search-add-btn:hover { background: #0b7a70 !important; color: #fff !important; }

