/* ==========================================================================
   RollNBowl — Indian Fusion Kitchen
   Brand tokens taken from the logo & banner artwork:
   - RollNBowl orange:  #EE5A24 (the wordmark / accent orange)
   - Ink black:         #1A1414 (the wordmark black, bowl silhouette)
   - Warm parchment:    #F6EDDD (the "Fresh Delicious Made with Love" card bg)
   - Chilli maroon:     #7A1F12 (the little hearts on the banner)
   - Cream paper:       #FFFBF3 (page background)
   ========================================================================== */

:root {
  --orange: #EE5A24;
  --orange-dark: #C8461A;
  --ink: #1A1414;
  --parchment: #F6EDDD;
  --maroon: #7A1F12;
  --cream: #FFFBF3;
  --white: #FFFFFF;
  --success: #2E7D32;

  --font-display: 'Baloo 2', 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-soft: 0 10px 30px rgba(26, 20, 20, 0.10);
  --shadow-pop: 0 6px 0 rgba(26, 20, 20, 0.9);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 0.4em;
  color: var(--ink);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Top bar / nav ---------- */
.topbar {
  background: var(--ink);
  color: var(--cream);
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar a { color: var(--cream); opacity: 0.9; }
.topbar a:hover { color: var(--orange); opacity: 1; }
.topbar-contact { display: flex; gap: 18px; flex-wrap: wrap; }

.navbar {
  background: var(--white);
  border-bottom: 4px solid var(--orange);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.brand img { height: 46px; width: auto; }
.brand .n { color: var(--ink); }
.brand .roll, .brand .bowl { color: var(--orange); }

.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
  font-weight: 600;
}
.nav-links a {
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 3px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--orange-dark);
  border-bottom-color: var(--orange);
}
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle {
    display: inline-flex;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--ink);
    cursor: pointer;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--white) 0%, var(--parchment) 100%);
  padding: 48px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
}
.eyebrow {
  display: inline-block;
  background: var(--maroon);
  color: var(--cream);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
}
.hero h1 .accent { color: var(--orange); }
.hero p.lead {
  font-size: 1.15rem;
  color: #4a3f3f;
  max-width: 46ch;
}
@media (max-width: 860px) { .hero p.lead { margin-inline: auto; } }
.hero-cta { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: var(--shadow-pop); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-danger { background: var(--maroon); color: var(--white); }

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-art img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.hero-badge {
  position: absolute;
  bottom: -16px;
  left: -16px;
  background: var(--white);
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--orange-dark);
  border: 2px solid var(--orange);
}

/* ---------- Section headers ---------- */
.section { padding: 60px 0; }
.section-alt { background: var(--white); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.section-head p { color: #5b4f4f; }
.divider-hearts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--maroon);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.divider-hearts .dot { color: var(--maroon); }

/* ---------- Category pills ---------- */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
.cat-tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-weight: 700;
  font-family: var(--font-display);
  background: var(--white);
  cursor: pointer;
}
.cat-tab.active, .cat-tab:hover {
  background: var(--ink);
  color: var(--cream);
}

/* ---------- Menu grid ---------- */
.menu-group { margin-bottom: 48px; }
.menu-group h3 {
  font-size: 1.5rem;
  border-bottom: 3px solid var(--orange);
  display: inline-block;
  padding-bottom: 6px;
  margin-bottom: 24px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.menu-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}
.menu-card:hover { transform: translateY(-4px); }
.menu-card .thumb {
  aspect-ratio: 4/3;
  width: 100%;
  object-fit: cover;
  background: var(--parchment);
}
.menu-card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.menu-card .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.menu-card h4 { font-size: 1.1rem; margin-bottom: 4px; }
.menu-card .price {
  font-family: var(--font-display);
  color: var(--orange-dark);
  font-weight: 800;
  white-space: nowrap;
}
.menu-card p.desc { font-size: 0.9rem; color: #5b4f4f; margin: 6px 0 0; flex: 1; }
.badge-unavailable {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--maroon);
  background: #fbe4dd;
  padding: 3px 10px;
  border-radius: 6px;
  align-self: flex-start;
}

/* ---------- Deals ---------- */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}
.deal-card {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.deal-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.deal-card .body { padding: 20px 22px 24px; }
.deal-card h3 { color: var(--cream); font-size: 1.3rem; }
.deal-card p { color: #ded2c8; }
.deal-ribbon {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.deal-dates { font-size: 0.8rem; color: var(--orange); font-weight: 700; margin-top: 8px; }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #7a6f6f;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 48px 0 24px;
  margin-top: 40px;
}
footer.site-footer .container {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
}
@media (max-width: 720px) {
  footer.site-footer .container { grid-template-columns: 1fr; text-align: center; }
}
footer.site-footer h4 { color: var(--orange); font-size: 1rem; letter-spacing: 0.5px; text-transform: uppercase; }
footer.site-footer a:hover { color: var(--orange); }
footer.site-footer .brand-line {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: #a99b91;
  margin-top: 34px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
}

/* ---------- Install / PWA banner ---------- */
.install-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  display: none;
  align-items: center;
  gap: 14px;
  z-index: 200;
  max-width: 92vw;
}
.install-banner.show { display: flex; }
.install-banner button { flex-shrink: 0; }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-body { background: var(--parchment); min-height: 100vh; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px;
  background: var(--ink);
  color: var(--cream);
  padding: 24px 0;
  flex-shrink: 0;
}
.admin-sidebar .brand { color: var(--cream); padding: 0 20px 20px; font-size: 1.2rem; }
.admin-sidebar .brand .roll, .admin-sidebar .brand .bowl { color: var(--orange); }
.admin-nav a {
  display: block;
  padding: 12px 22px;
  color: #d8cec4;
  font-weight: 600;
  border-left: 4px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,0.06);
  color: var(--cream);
  border-left-color: var(--orange);
}
.admin-main { flex: 1; padding: 32px; max-width: 1100px; }

.mobile-topbar { display: none; }
.bottom-tabs { display: none; }
.more-sheet, .more-sheet-backdrop { display: none; }
.fab { display: none; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: -4px; padding: 4px; }
.table-scroll table { min-width: 640px; }

@media (max-width: 860px) {
  html { -webkit-text-size-adjust: 100%; }
  input, textarea, select { font-size: 16px !important; } /* prevents iOS auto-zoom on focus */

  .admin-shell { flex-direction: column; }
  .admin-sidebar { display: none; } /* replaced by mobile-topbar + bottom-tabs */

  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ink);
    color: var(--cream);
    padding: 14px 18px;
    position: sticky;
    top: 0;
    z-index: 60;
  }
  .mobile-topbar-brand { font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
  .mobile-topbar-brand .roll, .mobile-topbar-brand .bowl { color: var(--orange); }
  .mobile-topbar-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #cfc3b8;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 10px;
  }

  .admin-main { padding: 16px 14px 100px; } /* extra bottom padding clears the tab bar */
  .admin-topline { flex-direction: column; align-items: stretch; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  /* ---------- Bottom tab bar ---------- */
  .bottom-tabs {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--ink);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    z-index: 70;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
  }
  .bottom-tabs .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #a99b91;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 6px 2px;
    background: none;
    border: none;
    font-family: var(--font-body);
    cursor: pointer;
  }
  .bottom-tabs .tab-icon { font-size: 1.25rem; line-height: 1; }
  .bottom-tabs .tab.active { color: var(--orange); }
  .bottom-tabs .tab-scan .tab-icon {
    background: var(--orange);
    color: var(--white);
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    margin-top: -18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  }

  /* ---------- More sheet ---------- */
  .more-sheet-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .more-sheet-backdrop.open { opacity: 1; pointer-events: auto; }
  .more-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    padding: 8px 6px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.25s ease;
    z-index: 90;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
  }
  .more-sheet.open { transform: translateY(0); }
  .more-sheet-handle {
    width: 40px; height: 4px;
    background: #e2d7c8;
    border-radius: 999px;
    margin: 6px auto 10px;
  }
  .more-sheet a {
    padding: 15px 18px;
    font-weight: 600;
    border-bottom: 1px solid #f1e8db;
  }
  .more-sheet a:last-child { border-bottom: none; color: var(--maroon); }

  /* ---------- Floating action button ---------- */
  .fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 18px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    font-size: 1.6rem;
    box-shadow: 0 8px 20px rgba(238,90,36,0.45);
    z-index: 65;
  }

  /* ---------- Card-style tables (no horizontal scrolling) ---------- */
  .table-scroll { overflow-x: visible; margin: 0; padding: 0; }
  table.admin-table.card-table, table.admin-table.card-table thead, table.admin-table.card-table tbody,
  table.admin-table.card-table th, table.admin-table.card-table td, table.admin-table.card-table tr {
    display: block;
    width: 100%;
  }
  table.admin-table.card-table { min-width: 0; }
  table.admin-table.card-table thead { display: none; }
  table.admin-table.card-table tr {
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  table.admin-table.card-table td {
    border-bottom: none;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
  }
  table.admin-table.card-table td[data-label]::before {
    content: attr(data-label);
    color: #a99b91;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
  }
  table.admin-table.card-table td.card-title-cell {
    padding-top: 0;
    display: block;
  }
  table.admin-table.card-table td.card-title-cell::before { content: none; }
  table.admin-table.card-table img.thumb-sm { width: 60px; height: 60px; }
  table.admin-table.card-table .row-actions { justify-content: flex-end; padding-top: 8px; }

  /* ---------- Sticky form action bar ---------- */
  .form-actions {
    position: sticky;
    bottom: calc(70px + env(safe-area-inset-bottom));
    background: var(--white);
    margin: 18px -24px -24px;
    padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 16px rgba(0,0,0,0.08);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .admin-main { padding: 14px 10px 60px; }
  table.admin-table th, table.admin-table td { padding: 10px 8px; font-size: 0.85rem; }
  .row-actions { flex-wrap: wrap; }
  .login-card { padding: 30px 22px; }
}

#reader video, #reader canvas { width: 100% !important; height: auto !important; border-radius: 14px; }
.admin-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 10px; }
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  margin-bottom: 24px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: 0.9rem; }
input[type=text], input[type=number], input[type=password], input[type=email],
input[type=date], input[type=file], textarea, select {
  padding: 10px 12px;
  border: 1.5px solid #e2d7c8;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
}
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--orange);
}
.checkbox-row { display: flex; align-items: center; gap: 8px; }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #eee1d0;
  font-size: 0.92rem;
  vertical-align: middle;
}
table.admin-table th { color: #7a6f6f; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; }
table.admin-table img.thumb-sm { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.row-actions { display: flex; gap: 8px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; }
.badge-on { background: #e2f3e2; color: var(--success); }
.badge-off { background: #f3e2e2; color: var(--maroon); }

.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 600;
}
.flash-success { background: #e2f3e2; color: #205a24; }
.flash-error { background: #fbe1db; color: var(--maroon); }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--ink), #2a1e1a);
  padding: 20px;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  text-align: center;
}
.login-card img { height: 60px; margin: 0 auto 14px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; text-align: left; }
