/* ============================================================
   Foodtrukk — Visual Identity
   ------------------------------------------------------------
   Palette (warm char, not cool tech-navy):
     --char        #1A1614   near-black, warm undertone (background)
     --char-raised #241F1C   slightly lifted surface (cards)
     --bone        #F2ECE2   warm off-white (primary text)
     --rust        #C75D3A   burnt sienna — primary accent
     --brass       #B8935A   muted gold — live status, premium accents
     --forest      #4A5D43   deep olive-forest — secondary accent
     --smoke       #8A8178   muted warm grey — secondary text
     --hairline    #38322C   warm dark grey — borders/dividers

   Type:
     Display  — 'Fraunces' (serif with personality, food-editorial feel)
     Body/UI  — 'Inter' (clean workhorse for forms, lists, data)
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: #1A1614;
  color: #F2ECE2;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

.hidden { display: none !important; }
.accent { color: #C75D3A; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #C75D3A !important; }
a { color: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1A1614; }
::-webkit-scrollbar-thumb { background: #38322C; border-radius: 3px; }

/* ============ Notification ============ */
.notification {
  position: fixed; top: 20px; right: 20px; z-index: 999;
  background: #241F1C; border: 1px solid #38322C;
  border-radius: 8px; padding: 12px 18px;
  color: #F2ECE2; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  animation: fadeIn 0.2s ease; max-width: 90vw;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Header ============ */
.site-header {
  background: #1A1614;
  border-bottom: 1px solid #2A241F;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; position: sticky; top: 0; z-index: 100;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-emoji { font-size: 22px; }
.logo-text {
  font-family: 'Fraunces', serif;
  font-weight: 600; font-size: 20px; letter-spacing: -0.3px;
}
.nav-tabs { display: flex; gap: 8px; }
.nav-btn {
  background: transparent; border: 1px solid transparent;
  color: #8A8178; border-radius: 6px; padding: 7px 14px; font-size: 13px;
  transition: all 0.15s;
}
.nav-btn.active {
  background: #241F1C; border-color: #38322C;
  color: #F2ECE2; font-weight: 600;
}

/* ============ Layout ============ */
.container { max-width: 1100px; margin: 0 auto; padding: 28px 16px; }

/* ============ Hero ============ */
.hero { text-align: center; margin-bottom: 36px; }
.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(30px, 5.5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.12;
  margin-bottom: 10px;
}
.hero-sub {
  color: #8A8178; font-size: 15px; margin-bottom: 20px;
  font-style: italic;
}
.btn-primary {
  background: #C75D3A; color: #F2ECE2; border: none;
  border-radius: 8px; padding: 11px 22px;
  font-weight: 600; font-size: 14px;
  transition: background 0.15s;
}
.btn-primary:hover { background: #B5512F; }

/* ============ Map ============ */
.map-wrap {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid #38322C; margin-bottom: 28px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
#truckMap { display: block; width: 100%; height: auto; cursor: default; }
.map-legend {
  position: absolute; bottom: 10px; right: 12px;
  display: flex; gap: 12px; font-size: 11px; color: #A89E92;
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 2px; }
.dot-you { background: #7B9CA8; }
.dot-live { background: #C75D3A; }
.dot-offline { background: #4A453F; }

/* ============ Tabs ============ */
.tabs { display: flex; margin-bottom: 22px; border-bottom: 1px solid #2A241F; }
.tab-btn {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: #8A8178; padding: 11px 18px; font-size: 14px; transition: all 0.15s;
}
.tab-btn.active { border-bottom-color: #C75D3A; color: #F2ECE2; font-weight: 600; }

/* ============ Filters ============ */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px; align-items: center;
}
.filters input[type="text"] {
  flex: 1 1 200px; background: #241F1C; border: 1px solid #38322C;
  border-radius: 6px; padding: 9px 14px; color: #F2ECE2; font-size: 14px;
}
.filters select {
  background: #241F1C; border: 1px solid #38322C; color: #F2ECE2;
  border-radius: 6px; padding: 9px 12px; font-size: 13px;
}
.btn-toggle {
  background: #241F1C; color: #8A8178; border: 1px solid #38322C;
  border-radius: 6px; padding: 9px 14px; font-size: 13px;
}
.btn-toggle.live {
  background: #2E2114; color: #D89B5C; border-color: #5C4423; font-weight: 600;
}

/* ============ Truck list / cards ============ */
.truck-list { display: flex; flex-direction: column; gap: 12px; }
.empty-state { text-align: center; padding: 40px 0; color: #8A8178; }
.empty-state .emoji { font-size: 32px; display: block; margin-bottom: 8px; }

.truck-card {
  background: #211C19; border: 1px solid #332D27;
  border-radius: 10px; padding: 16px 18px; transition: all 0.2s;
}
.truck-card.selected { background: #2A2420; border-color: #4A4038; }
.truck-card-top { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.truck-icon {
  width: 50px; height: 50px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.truck-main { flex: 1; min-width: 0; }
.truck-name-row { display: flex; align-items: center; gap: 8px; }
.truck-name { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; color: #F2ECE2; }

/* "Stamp" signature element — like a food-truck permit stamp */
.live-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: transparent;
  color: #D89B5C;
  border: 1.5px solid #B8935A;
  border-radius: 3px;
  padding: 1px 7px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.truck-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.truck-type-badge {
  border-radius: 3px; padding: 1px 7px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.truck-cost, .truck-dist { color: #8A8178; font-size: 11px; }
.truck-rating-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.stars { color: #B8935A; letter-spacing: 1px; }
.rating-text { color: #8A8178; font-size: 11px; }
.fav-btn {
  background: none; border: none; font-size: 19px;
  color: #4A453F; transition: color 0.2s; padding: 4px;
}
.fav-btn.active { color: #B8935A; }

.truck-detail { margin-top: 16px; padding-top: 16px; border-top: 1px solid #332D27; }
.truck-desc { color: #B0A89C; font-size: 13px; margin-bottom: 12px; font-style: italic; }
.truck-info-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.truck-info-row span { color: #8A8178; font-size: 12px; }
.menu-label {
  font-size: 11px; font-weight: 700; color: #8A8178;
  text-transform: uppercase; letter-spacing: 1.2px; margin: 12px 0 9px;
  border-bottom: 1px solid #332D27; padding-bottom: 6px;
}
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.menu-grid-item {
  background: #1E1A17; border-radius: 5px; padding: 7px 10px;
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid #332D27;
}
.menu-grid-item .item-name { font-size: 12px; color: #D8D0C4; }
.menu-grid-item .item-price { font-size: 12px; font-weight: 700; }

/* ============ Ad placements (customer-facing) ============ */
.ad-slot { margin-bottom: 22px; }
.ad-banner {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #2A2420 0%, #211C19 100%);
  border: 1px solid #4A4038;
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.ad-banner:hover { border-color: #B8935A; }
.ad-banner-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: #8A8178; display: block; margin-bottom: 4px;
}
.ad-banner-img {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.ad-banner-headline {
  font-family: 'Fraunces', serif; font-size: 16px; font-weight: 600; color: #F2ECE2;
}
.ad-banner-body { font-size: 13px; color: #B0A89C; margin-top: 2px; }

.ad-infeed {
  background: #1E1A17; border: 1px dashed #4A4038;
  border-radius: 10px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.ad-infeed-img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.ad-infeed-text { flex: 1; min-width: 0; }
.ad-infeed-headline { font-size: 13px; font-weight: 600; color: #F2ECE2; }
.ad-infeed-body { font-size: 12px; color: #8A8178; margin-top: 1px; }
.ad-infeed-eyebrow {
  font-size: 9px; font-weight: 700; color: #8A8178;
  letter-spacing: 0.8px; text-transform: uppercase;
}

/* ============ Owner Login ============ */
.owner-login { max-width: 460px; margin: 48px auto; }
.owner-login-head { text-align: center; margin-bottom: 32px; }
.big-emoji { font-size: 44px; margin-bottom: 14px; }
.owner-login-head h2 {
  font-family: 'Fraunces', serif; font-size: 28px; font-weight: 600; margin-bottom: 6px;
}
.owner-login-head p { color: #8A8178; font-size: 14px; }
.owner-login-card {
  background: #211C19; border: 1px solid #332D27;
  border-radius: 12px; padding: 30px;
}
.demo-note { color: #8A8178; font-size: 13px; text-align: center; margin-bottom: 20px; }
.demo-note code {
  background: #1A1614; border: 1px solid #38322C; border-radius: 4px;
  padding: 1px 5px; font-size: 12px; color: #C77B4F;
}
.owner-form { display: flex; flex-direction: column; gap: 14px; }
.form-error {
  background: #2E1813; border: 1px solid #5C3024; color: #E8A88F;
  border-radius: 8px; padding: 8px 12px; font-size: 13px;
}
.btn-link {
  background: none; border: none; color: #C77B4F;
  font-size: 13px; margin-top: 16px; width: 100%; text-align: center;
  text-decoration: underline;
}

/* ============ Dashboard ============ */
.dashboard { max-width: 600px; margin: 0 auto; }
.dash-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.btn-back {
  background: #211C19; border: 1px solid #332D27; color: #B0A89C;
  border-radius: 6px; padding: 8px 14px; font-size: 13px;
}
.dash-head h2 { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; }
.dash-sub { font-size: 12px; color: #8A8178; }

.live-card {
  background: #211C19; border: 1px solid #332D27;
  border-radius: 10px; padding: 16px 20px; margin-bottom: 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.live-card.is-live { border-color: #5C4423; }
.live-title { font-weight: 600; color: #F2ECE2; font-size: 14px; }
.live-sub { font-size: 12px; color: #8A8178; }
.btn-live {
  background: #332D27; color: #8A8178; border: 1px solid #4A4038;
  border-radius: 6px; padding: 8px 16px; font-weight: 600; font-size: 13px;
  transition: all 0.2s;
}
.btn-live.is-live { background: #3A2C16; color: #D89B5C; border-color: #5C4423; }

.dash-tabs {
  display: flex; gap: 4px; margin-bottom: 22px;
  background: #211C19; border-radius: 8px; padding: 4px; border: 1px solid #332D27;
}
.dash-tab-btn {
  flex: 1; background: transparent; border: 1px solid transparent;
  color: #8A8178; border-radius: 6px; padding: 8px; font-size: 13px;
  transition: all 0.15s;
}
.dash-tab-btn.active {
  background: #2A2420; border-color: #4A4038; color: #F2ECE2; font-weight: 600;
}

.dash-panel { display: flex; flex-direction: column; gap: 15px; }
.field label {
  display: block; font-size: 11px; color: #8A8178; font-weight: 600;
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.8px;
}
.field input, .field textarea {
  width: 100%; background: #211C19; border: 1px solid #332D27;
  border-radius: 6px; padding: 10px 12px; color: #F2ECE2; font-size: 14px;
}
.field textarea { resize: vertical; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }
.field-hint { font-size: 11px; color: #6B6258; margin-top: 5px; }

.menu-items-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.menu-item-row {
  display: flex; gap: 10px; align-items: center;
  background: #211C19; border: 1px solid #332D27;
  border-radius: 6px; padding: 10px 14px;
}
.menu-item-row .mi-name { flex: 1; color: #D8D0C4; font-size: 14px; }
.menu-item-row .mi-price { font-weight: 700; font-size: 14px; }
.menu-item-row .mi-remove {
  background: none; border: none; color: #6B6258; font-size: 16px; padding: 0 4px;
}
.add-menu-row { display: flex; gap: 8px; }
.add-menu-row input {
  background: #211C19; border: 1px solid #332D27;
  border-radius: 6px; padding: 10px 12px; color: #F2ECE2; font-size: 14px;
}
#new-menu-item { flex: 2; }
#new-menu-price { flex: 1; }
.btn-add {
  background: #2E3A2C; color: #9DB596; border: 1px solid #4A5D43;
  border-radius: 6px; padding: 10px 16px; font-weight: 600; font-size: 14px;
}

.info-box {
  background: #211C19; border: 1px solid #4A5D43; border-radius: 8px;
  padding: 14px 16px; font-size: 13px; color: #9DB596;
}

.btn-save {
  margin-top: 24px; width: 100%; padding: 13px;
  background: #C75D3A; color: #F2ECE2; border: none;
  border-radius: 8px; font-weight: 600; font-size: 15px; transition: all 0.2s;
}
.btn-save.saved { background: #3D4F3E; color: #C3D4BC; }

/* ============ Ad dashboard editor ============ */
.ad-slot-editor {
  background: #211C19; border: 1px solid #332D27;
  border-radius: 10px; padding: 18px 20px; margin-bottom: 16px;
}
.ad-slot-editor-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.ad-slot-name { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 600; color: #F2ECE2; }
.ad-slot-desc { font-size: 12px; color: #8A8178; margin-top: 2px; }
.ad-slot-toggle {
  background: #332D27; color: #8A8178; border: 1px solid #4A4038;
  border-radius: 6px; padding: 6px 14px; font-weight: 600; font-size: 12px;
  flex-shrink: 0;
}
.ad-slot-toggle.is-active { background: #3A2C16; color: #D89B5C; border-color: #5C4423; }
.ad-slot-fields { display: flex; flex-direction: column; gap: 12px; }
.ad-preview {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed #332D27;
}
.ad-preview-label {
  font-size: 10px; font-weight: 700; color: #6B6258;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: block;
}

/* ============ Footer ============ */
.site-footer {
  margin-top: 64px; padding: 22px 24px; border-top: 1px solid #2A241F;
  text-align: center; color: #5A5248; font-size: 12px;
}

/* ============ Responsive ============ */
@media (max-width: 600px) {
  .menu-grid { grid-template-columns: 1fr; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters select, .btn-toggle { width: 100%; }
  .field-row { flex-direction: column; }
  .ad-banner { flex-direction: column; text-align: center; }
}

/* ============ Accessibility ============ */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #B8935A;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
