/* ============================================================
   Caterer Platform — Main CSS
   ============================================================ */

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --secondary: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg-light: #f9fafb;
  --card-shadow: 0 1px 4px rgba(0,0,0,.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-light);
  color: #111827;
}

/* ---- Navbar ---- */
.navbar-brand { font-size: 1.1rem; letter-spacing: -.3px; }
.navbar .nav-link { font-size: .9rem; font-weight: 500; color: #374151; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--primary); }
.navbar .nav-link.active { font-weight: 600; }

/* ---- Sidebar ---- */
.sidebar .nav-link {
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: #374151;
  padding: .5rem .75rem;
  margin-bottom: 2px;
}
.sidebar .nav-link:hover { background: #f3f4f6; color: var(--primary); }
.sidebar .nav-link.active { background: #ede9fe; color: var(--primary); font-weight: 600; }

/* ---- Cards ---- */
.card { border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--card-shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--border); font-weight: 600; }

/* ---- Buttons ---- */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* ---- Badges ---- */
.badge { font-weight: 500; }

/* ---- Forms ---- */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.form-label { font-weight: 500; font-size: .9rem; color: #374151; }

/* ---- Auth pages ---- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ede9fe 0%, #dbeafe 100%);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  padding: 2.5rem;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
}
.auth-logo { font-size: 1.4rem; font-weight: 700; color: var(--primary); }

/* ---- Stats cards ---- */
.stat-card { border-radius: 12px; padding: 1.25rem 1.5rem; border: 1px solid var(--border); background: #fff; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: #111; }
.stat-card .stat-label { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-card .stat-icon { font-size: 2rem; opacity: .15; }

/* ---- Voice waveform (onboarding) ---- */
#vsWaveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 60px;
}
#vsWaveform .bar {
  width: 5px;
  border-radius: 3px;
  height: 8px;
  background: #d1d5db;
  transition: background .2s;
}
#vsWaveform.user .bar { background: #10b981; animation: barBounce .5s ease-in-out infinite alternate; }
#vsWaveform.ai .bar { background: var(--primary); animation: barBounce .5s ease-in-out infinite alternate; }
#vsWaveform.user .bar:nth-child(2), #vsWaveform.ai .bar:nth-child(2) { animation-delay: .1s; }
#vsWaveform.user .bar:nth-child(3), #vsWaveform.ai .bar:nth-child(3) { animation-delay: .2s; }
#vsWaveform.user .bar:nth-child(4), #vsWaveform.ai .bar:nth-child(4) { animation-delay: .3s; }
#vsWaveform.user .bar:nth-child(5), #vsWaveform.ai .bar:nth-child(5) { animation-delay: .4s; }

@keyframes barBounce { from { height: 8px; } to { height: 48px; } }

/* ---- Voice transcript ---- */
#vsTranscript {
  height: 260px;
  overflow-y: auto;
  background: #f9fafb;
  border-radius: 10px;
  padding: 1rem;
  font-size: .875rem;
}
.vs-bubble { margin-bottom: .75rem; }
.vs-bubble.user .vs-text {
  background: var(--primary);
  color: #fff;
  border-radius: 12px 12px 4px 12px;
  display: inline-block;
  padding: .5rem .75rem;
  max-width: 80%;
  float: right;
  clear: both;
}
.vs-bubble.ai .vs-text {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  display: inline-block;
  padding: .5rem .75rem;
  max-width: 80%;
  clear: both;
}

/* ---- Party chat ---- */
#partyChatMessages {
  height: 360px;
  overflow-y: auto;
  background: #f9fafb;
  border-radius: 10px;
  padding: 1rem;
  font-size: .875rem;
}
.chat-bubble { margin-bottom: .75rem; overflow: hidden; }
.chat-bubble.user .chat-text {
  background: var(--primary); color: #fff;
  border-radius: 12px 12px 4px 12px;
  display: inline-block; padding: .5rem .75rem;
  max-width: 80%; float: right; clear: both;
}
.chat-bubble.ai .chat-text {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  display: inline-block; padding: .5rem .75rem;
  max-width: 80%; clear: both;
}

/* ---- Dish library ---- */
.dish-row { transition: background .15s; }
.dish-row:hover { background: #f9fafb; }
.allergen-badge {
  display: inline-block;
  font-size: .7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  margin: 1px;
}
.food-type-veg { color: #059669; }
.food-type-non-veg { color: #dc2626; }
.food-type-vegan { color: #7c3aed; }

/* ---- Party cards ---- */
.party-card { transition: transform .15s, box-shadow .15s; }
.party-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.status-badge-draft { background: #f3f4f6; color: #6b7280; }
.status-badge-published { background: #d1fae5; color: #065f46; }
.status-badge-expired { background: #fee2e2; color: #991b1b; }
.status-badge-pending_payment { background: #fef3c7; color: #92400e; }

/* ---- QR & Print ---- */
.qr-print-card { text-align: center; }
.qr-img { max-width: 200px; border: 4px solid #fff; box-shadow: 0 2px 12px rgba(0,0,0,.15); }

/* ---- Print-specific CSS ---- */
@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
  .print-container { width: 100%; }
}

/* ---- Public party page ---- */
.party-header {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  padding: 3rem 1rem 2rem;
  text-align: center;
}
.category-section { margin-bottom: 2rem; }
.category-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}
.dish-item { padding: .75rem 0; border-bottom: 1px solid #f3f4f6; }
.dish-item:last-child { border-bottom: none; }
.dish-name { font-weight: 600; font-size: .95rem; }
.dish-desc { font-size: .85rem; color: var(--text-muted); margin: .15rem 0; }

/* ---- Caterer public page ---- */
.caterer-hero {
  background: linear-gradient(to bottom right, #1e1b4b, #312e81);
  color: #fff;
  padding: 4rem 1rem 3rem;
}
.caterer-logo {
  width: 100px; height: 100px;
  border-radius: 12px;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.3);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}
.gallery-grid img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

/* ---- Admin ---- */
.admin-sidebar { min-height: calc(100vh - 60px); background: #1e1b4b; }
.admin-sidebar .nav-link { color: #c4b5fd; border-radius: 8px; font-size: .875rem; }
.admin-sidebar .nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-sidebar .nav-link.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.admin-sidebar .nav-link i { width: 1.2em; }

/* ---- Credit badge ---- */
.credit-zero { color: #dc2626; }
.credit-ok { color: #059669; }

/* ---- Loader overlay ---- */
#vsLoaderOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .auth-card { margin: 1rem; padding: 1.5rem; }
  .party-header { padding: 2rem 1rem 1.5rem; }
}

/* ============================================================
   HOME PAGE
   ============================================================ */

/* spacing utility used throughout home sections */
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }
.mb-6 { margin-bottom: 5rem; }

/* ---- Hero ---- */
.home-hero {
  background: linear-gradient(145deg, #1a0a00 0%, #3d1c00 40%, #6b2d00 70%, #1a0a00 100%);
  min-height: 92vh;
  display: flex;
  align-items: center;
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(247,147,30,.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(225,112,85,.15) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(17,153,142,.1) 0%, transparent 50%);
  pointer-events: none;
}
.min-vh-hero { min-height: 85vh; }

.home-badge {
  background: rgba(247,147,30,.18);
  color: #f7931e;
  border: 1px solid rgba(247,147,30,.3);
  font-size: .78rem;
  padding: .35rem .75rem;
  border-radius: 50px;
}
.home-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.home-accent {
  background: linear-gradient(90deg, #f7931e, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  max-width: 480px;
}

.home-btn-primary {
  background: linear-gradient(135deg, #f7931e, #ff6b35);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(247,147,30,.4);
  transition: transform .15s, box-shadow .15s;
}
.home-btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(247,147,30,.5);
}
.home-btn-outline {
  border: 2px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.85);
  font-weight: 600;
  border-radius: 50px;
  background: transparent;
  transition: all .15s;
}
.home-btn-outline:hover {
  border-color: rgba(255,255,255,.7);
  color: #fff;
  background: rgba(255,255,255,.08);
}

/* ---- Phone mockup ---- */
.home-phone-mockup {
  width: 260px;
  background: #1a1a2e;
  border-radius: 32px;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.05);
}
.home-phone-screen {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
}
.home-phone-header {
  background: linear-gradient(135deg, #f7931e, #ff6b35);
  color: #fff;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.home-phone-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  flex-shrink: 0;
}
.home-phone-body { padding: .75rem; }
.home-dish-card {
  display: flex;
  gap: .5rem;
  padding: .5rem;
  margin-bottom: .4rem;
  border-radius: 8px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  align-items: flex-start;
}
.home-qr-placeholder {
  width: 64px; height: 64px;
  border-radius: 6px;
  background: repeating-conic-gradient(#d1d5db 0% 25%, #fff 0% 50%) 0 0 / 8px 8px;
}

/* ---- Stats strip ---- */
.home-stats-strip {
  background: linear-gradient(90deg, #fff8f0, #fffdf9, #f0fff8);
  border-top: 1px solid #f7e6d3;
  border-bottom: 1px solid #f7e6d3;
}
.home-stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f7931e, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-stat-label {
  font-size: .8rem;
  color: #6b7280;
  margin-top: .15rem;
}

/* ---- Section labels ---- */
.home-section-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(247,147,30,.12), rgba(255,107,53,.12));
  color: #e17055;
  border: 1px solid rgba(225,112,85,.25);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 50px;
}
.home-section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #111;
  line-height: 1.25;
  letter-spacing: -.02em;
}

/* ---- How it works steps ---- */
.home-step-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid #f0e8df;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.home-step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
}
.home-step-featured {
  border-color: #f7931e;
  box-shadow: 0 4px 24px rgba(247,147,30,.15);
}
.home-step-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}
.home-step-num {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(0,0,0,.04);
  line-height: 1;
}

/* ---- Feature cards ---- */
.home-feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid #f0e8df;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.home-feat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---- Print format cards ---- */
.home-print-card {
  background: #fff;
  border: 1px solid #f0e8df;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.home-print-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.07);
}

/* ---- Caterer cards (featured section) ---- */
.home-caterer-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #f0e8df;
  background: #fff;
  transition: transform .2s, box-shadow .2s;
}
.home-caterer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
}
.home-caterer-cover {
  height: 140px;
  background-size: cover;
  background-position: center;
}
.home-caterer-cover-placeholder {
  background: linear-gradient(135deg, #f7931e22, #ff6b3522);
}
.home-caterer-body {
  padding: 1rem 1.25rem 1.25rem;
  position: relative;
}
.home-caterer-logo {
  width: 48px; height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  margin-top: -28px;
  margin-bottom: .5rem;
  display: block;
}

/* ---- CTA section ---- */
.home-cta {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 40%, #e17055 100%);
  position: relative;
  overflow: hidden;
}
.home-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 50%, rgba(255,255,255,.08) 0%, transparent 60%),
    radial-gradient(ellipse at 90% 50%, rgba(0,0,0,.1) 0%, transparent 60%);
}
.home-cta .container { position: relative; }

/* ---- Base.html navbar override on home ---- */
.home-page-nav .navbar {
  background: rgba(26, 10, 0, .85) !important;
  backdrop-filter: blur(12px);
}
.home-page-nav .nav-link { color: rgba(255,255,255,.8) !important; }
.home-page-nav .nav-link:hover { color: #f7931e !important; }
.home-page-nav .navbar-brand { color: #fff !important; }
