/* ============================================================
   Design System — FoodDash (mobile-first)
   ============================================================ */
:root {
  --brand:        #b45309;
  --brand-dark:   #92400e;
  --brand-light:  #292524;
  --ink:          #fafaf9;
  --ink-soft:     #78716c;
  --surface:      #1c1917;
  --bg:           #0a0a0a;
  --danger:       #ef4444;
  --danger-bg:    #7f1d1d;
  --radius:       14px;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 6px rgba(0,0,0,.3), 0 10px 15px rgba(0,0,0,.4);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    height: 100%;
}

img { display: block; max-width: 100%; }

/* ---------- Header / navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.site-header .bar {
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-header h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: .3px;
}
.site-header .subtitle {
  font-size: .85rem;
  opacity: .85;
  font-weight: 400;
}

.site-banner {
    width: 100%;
    height: auto;
    max-height: 280px;
    overflow: hidden;
}
.site-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface);
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand-dark); color: #fff; }
.btn-primary:hover { background: #bf6834; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.15); color: #fff; box-shadow: none; }
.btn-ghost:hover { background: rgba(255,255,255,.28); }

/* ---------- Layout ---------- */
main {
    margin: 0 auto;
    padding: 24px 16px 64px;
    height: 100%;
}

/* ---------- Cards (products & orders) ---------- */
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card img.thumb {
    width: 120px;
    min-width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 16px;
    flex-shrink: 0;
}
.card .body {
    padding: 16px 16px 16px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card h3 {
    margin: 0;
    font-size: 1.1rem;
    border-bottom: 1px dotted var(--ink-soft);
    padding-bottom: 4px;
}
.card .desc { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.card .foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}
.price { font-weight: 700; color: var(--brand-dark); font-size: 1.05rem; }

/* ---------- Orders (admin) ---------- */
.order-card {
    width: 100%;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}
.order-card .head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--brand-light);
    min-height: 50px;
    width: 100%;
    box-sizing: border-box;
}
.order-card .body-area {
    display: flex;
    flex-direction: column;
    padding: 0 16px 16px;
    width: 50%;
}
.order-card .order-items {
    margin: 0;
    padding: 0;
    list-style: none;
}
.order-card .order-items li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dotted #d1d5db;
    font-size: .95rem;
}
.order-card .order-items li:last-child { border-bottom: none; }
.order-card .order-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 2px solid var(--brand-light);
    font-weight: 700;
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 64px 20px;
}
.empty .icon { font-size: 3rem; margin-bottom: 12px; }

/* ---------- Login ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}
.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.auth-card h1 { margin: 0 0 4px; font-size: 1.5rem; }
.auth-card p.hint { margin: 0 0 24px; color: var(--ink-soft); }
.field { text-align: left; margin-bottom: 18px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input[type="password"],
.field input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .9rem;
  margin-bottom: 16px;
}

/* ---------- Product detail ---------- */
.detail {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;¨
  width: 100%;
  height: 100%;
  margin: 0 auto;
}
.detail img { width: 100%; height: 280px; object-fit: cover; }
.detail .body { padding: 24px; }
.detail h1 { margin: 0 0 8px; }
.detail .desc { color: var(--ink-soft); }
.detail .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

/* ---------- Confirmation page ---------- */
.confirm {
  text-align: center;
  padding: 80px 20px;
}
.confirm .big {
  font-size: 4rem;
  margin-bottom: 8px;
}
.confirm .order-number {
  display: inline-block;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--brand-dark);
  background: var(--brand-light);
  border-radius: var(--radius);
  padding: 12px 32px;
  margin: 16px 0 28px;
}

/* ---------- Utility ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}
.back-link:hover { color: var(--brand-dark); }