@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --navy-900: #171717;
  --navy-800: #241a14;
  --navy-700: #2e211a;
  --primary-dark: #C62828;
  --primary: #E53935;
  --secondary: #FF6B00;
  --cyan: #FFC107;
  --accent: #FFC107;
  --bg: #FFF8F4;
  --panel: #ffffff;
  --border: rgba(23, 23, 23, 0.08);
  --text: #1F1B18;
  --muted: #7A736C;
  --success: #22C55E;
  --success-bg: #E9F9EF;
  --warning: #FFC107;
  --warning-bg: #FFF6DE;
  --danger: #DC2626;
  --danger-bg: #FDEAEA;
  --info-bg: #FFEDE8;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(23, 23, 23, 0.05);
  --shadow: 0 4px 20px rgba(23, 23, 23, 0.06);
  --shadow-lg: 0 10px 32px rgba(23, 23, 23, 0.12);
  --ease: 200ms ease;
}

* { box-sizing: border-box; }

.kpi-grid > *, .grid-side > * { min-width: 0; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.app { display: flex; min-height: 100vh; }

/* ============ SIDEBAR (portal admin/mitra) ============ */
.sidebar {
  width: 252px;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #c9beb2;
  display: flex;
  flex-direction: column;
  padding: 22px 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}
.sidebar .brand { display: flex; align-items: center; justify-content: center; margin: 4px 20px 4px; padding: 4px; }
.sidebar .brand .brand-logo { width: 100%; max-width: 170px; height: auto; display: block; }
.sidebar .brand-caption {
  text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em;
  color: #9a8a7a; margin: 0 20px 20px; line-height: 1.6; text-transform: uppercase;
}
.sidebar .brand-caption strong { display: block; color: #e7dcd0; font-size: 11px; }

.sidebar nav { display: flex; flex-direction: column; flex: 1; gap: 3px; padding: 0 14px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px; padding: 10.5px 13px;
  color: #b7a998; font-size: 13.5px; font-weight: 600; border-radius: var(--radius-sm);
  transition: background var(--ease), color var(--ease);
}
.sidebar nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }
.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.sidebar nav a.active {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(229,57,53,0.25), 0 6px 18px -6px rgba(229, 57, 53, 0.5);
}
.sidebar nav a.active svg { opacity: 1; }

.sidebar-footer { padding: 16px 16px 0; margin: 14px 14px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 4px 3px 12px; }
.sidebar-user .avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff; flex-shrink: 0;
}
.sidebar-user .who { min-width: 0; }
.sidebar-user .admin-name { color: #f3ece4; font-weight: 700; font-size: 13px; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .status-line { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #7cd992; font-weight: 600; margin-top: 1px; }
.sidebar-user .status-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.22); }
.logout-link { display: flex; align-items: center; gap: 8px; color: #f4a3a3 !important; font-weight: 600; font-size: 12.5px; padding: 8px 3px 4px; }
.logout-link svg { width: 15px; height: 15px; }

/* ============ TOPBAR (portal admin/mitra) ============ */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 38px; background: var(--panel); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar-left h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.topbar-left p { margin: 2px 0 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; transition: background var(--ease), color var(--ease);
}
.icon-btn:hover { background: var(--info-bg); color: var(--primary); }
.icon-btn svg { width: 17px; height: 17px; }
.notif-badge {
  position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid var(--panel);
}
.topbar-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
}
.menu-toggle { display: none; }

/* ============ CONTENT (portal admin/mitra) ============ */
.content { flex: 1; min-width: 0; }
.content-inner { padding: 28px 38px 44px; max-width: 1320px; overflow-x: hidden; }

h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 20px; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 14px; letter-spacing: -0.01em; }
.hint { font-size: 13px; color: var(--muted); }

.alert { padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-size: 13.5px; font-weight: 600; border: 1px solid transparent; }
.alert-success { background: var(--success-bg); color: #106b34; border-color: #bfe8cd; }
.alert-danger { background: var(--danger-bg); color: #a01f1f; border-color: #f5c6c6; }
.alert-warning { background: var(--warning-bg); color: #92600a; border-color: #f6ddaa; }

/* ============ KPI CARDS (admin) ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px 18px; box-shadow: var(--shadow-sm); transition: transform var(--ease), box-shadow var(--ease); min-width: 0; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.kpi-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi-icon svg { width: 19px; height: 19px; }
.kpi-icon.tone-blue { background: var(--info-bg); color: var(--primary); }
.kpi-icon.tone-green { background: var(--success-bg); color: var(--success); }
.kpi-icon.tone-red { background: var(--danger-bg); color: var(--danger); }
.kpi-icon.tone-orange { background: var(--warning-bg); color: #92600a; }
.kpi-value { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; margin-top: 3px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ============ PANEL (admin) ============ */
.grid-side { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: stretch; margin-top: 30px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }

/* ============ TABLE (admin) ============ */
table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius-sm); overflow: hidden; }
th, td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { background: #FAFAF9; font-weight: 700; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr { transition: background var(--ease); }
tbody tr:hover { background: #FDFBF9; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.actions-wrap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.search-bar { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 16px; }
.search-bar svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.search-bar input { flex: 1; min-width: 0; border: none; background: transparent; font-family: inherit; font-size: 13.5px; outline: none; color: var(--text); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block; background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff;
  border: none; padding: 9px 18px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13.5px; font-weight: 700; font-family: inherit;
  transition: transform var(--ease), box-shadow var(--ease), opacity var(--ease);
  box-shadow: 0 4px 12px -4px rgba(198, 40, 40, 0.5);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(198, 40, 40, 0.55); text-decoration: none; opacity: 0.97; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-sm { padding: 5px 12px; font-size: 12px; box-shadow: none; }
.btn-danger { background: linear-gradient(120deg, #a01f1f, var(--danger)); box-shadow: 0 4px 12px -4px rgba(220, 38, 38, 0.5); }
.btn-secondary { background: var(--bg); color: #45402f; box-shadow: none; border: 1px solid var(--border); }
.btn-secondary:hover { background: #F3E9E2; color: var(--text); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ============ BADGES ============ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.01em; }
.badge-buka, .badge-baru { background: var(--success-bg); color: #12703a; }
.badge-tutup, .badge-dibatalkan { background: #EEF1F7; color: #5c6685; }
.badge-diproses { background: var(--warning-bg); color: #92600a; }
.badge-siap { background: var(--info-bg); color: var(--primary-dark); }
.badge-selesai { background: var(--success-bg); color: #12703a; }

/* ============ EMPTY STATE (admin tables) ============ */
.table-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; color: var(--muted); text-align: center; }
.table-empty svg { width: 34px; height: 34px; opacity: 0.4; margin-bottom: 12px; }
.table-empty .te-text { font-size: 13.5px; font-weight: 600; color: #475569; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: #45402f; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; background: #FBFAF8;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }

/* ============ LOGIN (admin/mitra) ============ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 18% 15%, rgba(229, 57, 53, 0.35), transparent 45%),
    radial-gradient(circle at 82% 85%, rgba(255, 193, 7, 0.28), transparent 45%), var(--navy-900);
}
.login-box { background: rgba(255, 255, 255, 0.99); border-radius: 20px; padding: 38px 34px; width: 340px; box-shadow: 0 26px 64px -18px rgba(0, 0, 0, 0.55); }
.login-logo { display: block; max-width: 200px; width: 100%; height: auto; margin: 0 auto 22px; }
.login-box .btn { width: 100%; margin-top: 8px; padding: 11px; font-size: 14px; }

/* ============ FOOTER ============ */
.app-footer { text-align: center; padding: 26px 20px 34px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.app-footer strong { color: #475569; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #e9ddd0; border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.sidebar-overlay { display: none; }

/* =========================================================
   STOREFRONT (halaman publik pelanggan) — food delivery UI
   ========================================================= */
body.store-body { background: var(--bg); padding-bottom: 78px; }

/* --- Header --- */
.store-topbar {
  position: sticky; top: 0; z-index: 50; background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.store-topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.store-brand-logo { height: 38px; width: auto; flex-shrink: 0; }
.store-location { display: flex; flex-direction: column; min-width: 0; }
.store-location .loc-label { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.store-location .loc-value { font-size: 13.5px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-location .loc-value svg { width: 14px; height: 14px; color: var(--primary); flex-shrink: 0; }
.store-topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.store-topbar .icon-btn { background: var(--bg); }
.topbar-desktop-only { display: none; }

/* --- Wrap / container --- */
.store-wrap { max-width: 1280px; margin: 0 auto; padding: 0; }
.store-section { padding: 18px 16px 0; }
.store-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.store-section-head h2 { margin: 0; font-size: 18px; }
.store-section-head .see-all { font-size: 12.5px; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.store-section-sub { color: var(--muted); font-size: 12.5px; margin: -8px 0 14px; }

/* --- Search (standalone, near top) --- */
.search-section { padding: 16px 16px 0; }
.search-eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 8px; text-align: center; }
.hero-search {
  display: flex; align-items: center; gap: 10px; background: var(--panel);
  border: 1.5px solid var(--border); border-radius: 999px; padding: 0 18px; height: 52px;
  box-shadow: var(--shadow); width: 100%; max-width: 720px; margin: 0 auto; box-sizing: border-box;
}
.hero-search svg { width: 19px; height: 19px; color: var(--primary); flex-shrink: 0; }
.hero-search input { flex: 1; min-width: 0; border: none; background: transparent; font-family: inherit; font-size: 14.5px; outline: none; color: var(--text); }
.hero-search button { flex-shrink: 0; }

/* --- Hero banner (promotional). Mobile: stacked (text top, mascot bottom-right). Desktop: two-column. --- */
.hero-banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 55%, var(--secondary) 100%);
  color: #fff; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 20px;
}
.hero-banner::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,193,7,0.35), transparent 70%); pointer-events: none;
}
.hero-banner-text { position: relative; z-index: 1; max-width: 100%; }
.hero-banner-text .hb-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.85); margin-bottom: 4px; }
.hero-banner-text h1 { font-size: 30px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.01em; color: #fff; line-height: 1.15; }
.hero-banner-text p { margin: 0 0 12px; font-size: 14.5px; color: rgba(255,255,255,0.92); line-height: 1.45; max-width: 320px; }
.hero-banner-text .btn { background: #fff; color: var(--primary-dark); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }
.hero-banner-text .btn:hover { background: #fff; opacity: 0.92; }
.hero-banner-visual { position: relative; z-index: 1; align-self: flex-end; display: flex; align-items: center; justify-content: center; }
.hero-banner-visual img { width: 180px; max-width: 46vw; height: auto; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.25)); }

/* --- Category chips --- */
.category-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px; }
.category-chip {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 56px; text-decoration: none;
}
.category-chip .cc-icon {
  width: 46px; height: 46px; border-radius: 50%; background: var(--panel); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  box-shadow: var(--shadow-sm); transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease);
}
.category-chip:hover .cc-icon { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--secondary); }
.category-chip:hover .cc-label { color: var(--secondary); }
.category-chip.active .cc-icon { background: #FDE6E5; border-color: var(--primary); }
.category-chip.active .cc-label { color: var(--primary); font-weight: 800; }
.category-chip .cc-label { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; }

/* --- Promo mini cards (honest placeholder, no fake active discounts) --- */
.promo-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.promo-mini {
  border-radius: var(--radius-sm); padding: 16px; background: var(--info-bg); border: 1.5px dashed var(--border);
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.promo-mini .pm-icon { font-size: 22px; margin-bottom: 2px; }
.promo-mini .pm-title { font-weight: 800; font-size: 13.5px; color: var(--text); }
.promo-mini .pm-sub { font-size: 12px; color: var(--muted); }

/* --- Horizontal scroll rows --- */
.hscroll { display: flex; gap: 14px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px; }
.hscroll > * { flex-shrink: 0; }

/* --- Resto card (food-delivery style) --- */
.resto-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.resto-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform var(--ease), box-shadow var(--ease); display: block;
}
.resto-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.resto-card.is-closed { opacity: 0.6; }
.resto-cover {
  position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.resto-card:hover .resto-cover img { transform: scale(1.05); }
.resto-cover img { transition: transform 300ms ease; }
.resto-cover img { width: 100%; height: 100%; object-fit: cover; }
.resto-cover .resto-initial { font-size: 40px; font-weight: 800; color: rgba(255,255,255,0.85); }
.resto-status { position: absolute; top: 10px; right: 10px; }
.resto-body { padding: 13px 15px; }
.resto-name { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resto-desc { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 8px; }
.resto-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.resto-price-from { font-size: 12.5px; font-weight: 700; color: var(--primary-dark); }
.resto-cta {
  font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  padding: 5px 11px; border-radius: 999px; display: flex; align-items: center; gap: 3px; flex-shrink: 0;
}

/* Resto card variant: compact horizontal (for "populer" style rows) */

/* --- Menu item card (dish-forward, for hscroll) --- */
.dish-card { position: relative; width: 168px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--ease), box-shadow var(--ease); }
.dish-fav {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.92); border: none; color: #9CA3AF; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.15); transition: transform var(--ease), color var(--ease);
}
.dish-fav svg { width: 15px; height: 15px; }
.dish-fav:active { transform: scale(0.85); }
.dish-fav.is-fav { color: var(--primary); }
.dish-fav.is-fav svg { fill: var(--primary); }
.dish-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.dish-photo { aspect-ratio: 4 / 3; background: var(--info-bg); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--primary); position: relative; }
.dish-photo img { width: 100%; height: 100%; object-fit: cover; }
.dish-photo svg { width: 30px; height: 30px; opacity: 0.55; }
.dish-body { padding: 11px 12px 13px; }
.dish-name { font-weight: 700; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dish-resto { font-size: 11px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dish-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 6px; }
.dish-price { font-size: 13px; font-weight: 800; color: var(--primary-dark); }
.dish-add {
  width: 26px; height: 26px; border-radius: 8px; border: none; flex-shrink: 0;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff;
  font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* --- Resto detail page --- */
.resto-detail-cover { aspect-ratio: 16 / 7; background: linear-gradient(135deg, var(--primary-dark), var(--secondary)); position: relative; overflow: hidden; }
.resto-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.resto-detail-card {
  background: var(--panel); margin: -34px 14px 0; position: relative; border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: flex; gap: 13px; align-items: center;
}
.resto-detail-logo {
  width: 62px; height: 62px; border-radius: 14px; background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
.resto-detail-logo img { width: 100%; height: 100%; object-fit: cover; }
.resto-detail-logo .resto-initial { font-size: 22px; font-weight: 800; color: #fff; }
.resto-detail-info { min-width: 0; flex: 1; }
.resto-detail-info h1 { font-size: 17px; margin: 0 0 4px; }
.resto-detail-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.resto-detail-desc { padding: 14px 18px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* --- Menu list on detail page --- */
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm);
}
.menu-card.is-unavailable { opacity: 0.5; }
.menu-photo {
  width: 68px; height: 68px; border-radius: 12px; background: var(--info-bg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--primary);
}
.menu-photo img { width: 100%; height: 100%; object-fit: cover; }
.menu-photo svg { width: 26px; height: 26px; opacity: 0.6; }
.menu-info { flex: 1; min-width: 0; }
.menu-name { font-weight: 700; font-size: 14px; color: var(--text); }
.menu-desc { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-price { font-size: 13.5px; font-weight: 800; color: var(--primary-dark); margin-top: 5px; }
.menu-add { flex-shrink: 0; }

.qty-stepper { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 3px; }
.qty-stepper button {
  width: 28px; height: 28px; border-radius: 7px; border: none; background: var(--panel); box-shadow: var(--shadow-sm);
  font-size: 16px; font-weight: 700; color: var(--primary-dark); cursor: pointer; font-family: inherit; line-height: 1;
}
.qty-stepper .qty-val { min-width: 16px; text-align: center; font-weight: 800; font-size: 13.5px; }
.add-btn {
  border: none; background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff;
  font-weight: 700; font-size: 12.5px; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 12px -4px rgba(198,40,40,0.5);
}

/* --- Sticky cart bar --- */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 62px; z-index: 60;
  background: var(--navy-900); color: #fff; padding: 13px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
  margin: 0 8px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.cart-bar-info { font-size: 12.5px; color: #cbbfae; }
.cart-bar-total { font-size: 16px; font-weight: 800; color: #fff; }
.cart-bar .btn { background: linear-gradient(120deg, var(--primary-dark), var(--secondary)); }

/* --- Cart / checkout summary --- */
.cart-item-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.cart-item-row:last-child { border-bottom: none; }
.cart-item-photo { width: 52px; height: 52px; border-radius: 10px; background: var(--info-bg); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--primary); overflow: hidden; }
.cart-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-photo svg { width: 22px; height: 22px; opacity: 0.6; }
.cart-item-name { flex: 1; min-width: 0; font-weight: 700; font-size: 13.5px; }
.cart-item-price { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-item-subtotal { font-weight: 800; font-size: 13.5px; min-width: 90px; text-align: right; }
.cart-remove { color: var(--danger); font-size: 11.5px; font-weight: 700; flex-shrink: 0; }

.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13.5px; }
.cart-summary-row.total { font-weight: 800; font-size: 17px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.cart-summary-row .muted { color: var(--muted); }

/* --- Payment method selector --- */
.pay-options { display: flex; flex-direction: column; gap: 8px; }
.pay-option {
  display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; cursor: pointer; transition: border-color var(--ease), background var(--ease);
}
.pay-option:has(input:checked) { border-color: var(--primary); background: var(--info-bg); }
.pay-option input { width: auto; margin: 0; accent-color: var(--primary); }
.pay-option .po-icon { font-size: 18px; }
.pay-option .po-label { font-weight: 700; font-size: 13px; flex: 1; }

/* --- Order status / tracking --- */
.order-status-hero { text-align: center; padding: 24px 10px 10px; }
.order-status-icon {
  width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; background: linear-gradient(135deg, var(--primary-dark), var(--secondary)); color: #fff;
  box-shadow: var(--shadow);
}
.order-status-icon svg { width: 32px; height: 32px; }
.order-status-icon.done { background: linear-gradient(135deg, #15803d, var(--success)); }
.order-status-icon.cancelled { background: #94a3b8; }
.order-code { font-family: monospace; font-weight: 800; font-size: 15px; letter-spacing: 0.03em; }

.status-track { display: flex; justify-content: space-between; margin: 26px 0; position: relative; }
.status-track::before {
  content: ""; position: absolute; top: 11px; left: 8%; right: 8%; height: 2px; background: var(--border); z-index: 0;
}
.status-track-step { flex: 1; text-align: center; position: relative; z-index: 1; }
.status-track-step .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--panel); border: 2px solid var(--border); margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; }
.status-track-step.active .dot { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); border-color: transparent; }
.status-track-step .label { font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.status-track-step.active .label { color: var(--primary-dark); }

/* --- Toast --- */
.toast {
  position: fixed; left: 50%; bottom: 78px; transform: translateX(-50%); z-index: 80;
  background: var(--navy-900); color: #fff; font-size: 13px; font-weight: 700;
  padding: 11px 20px; border-radius: 999px; box-shadow: var(--shadow-lg);
  animation: toastIn 220ms ease;
}
.toast-hide { animation: toastOut 280ms ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(10px); } }

/* --- Micro interactions --- */
.dish-add:active, .add-btn:active, .qty-stepper button:active { transform: scale(0.9); }
.notif-badge, .bn-badge { animation: badgePop 260ms ease; }
@keyframes badgePop { 0% { transform: scale(0.5); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
html { scroll-behavior: smooth; }

/* --- Empty states (storefront) --- */
.store-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; text-align: center; min-height: 0; }
.store-empty .se-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--info-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.store-empty .se-icon svg { width: 26px; height: 26px; }
.store-empty h3 { font-size: 14.5px; margin: 0 0 4px; }
.store-empty p { color: var(--muted); font-size: 12.5px; max-width: 280px; margin: 0; line-height: 1.4; }

/* --- Bottom navigation (mobile app-like) --- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--panel);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgba(23,23,23,0.06);
  display: flex; align-items: stretch; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 9px 4px 8px; color: var(--muted); position: relative;
}
.bn-item svg { width: 21px; height: 21px; }
.bn-item .bn-label { font-size: 10px; font-weight: 700; }
.bn-item.active { color: var(--primary); }
.bn-item .bn-badge {
  position: absolute; top: 4px; right: 22%; background: var(--primary); color: #fff; font-size: 9px; font-weight: 800;
  min-width: 15px; height: 15px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* Hide bottom-nav / cart-bar on desktop, keep app usable via header */
@media (min-width: 821px) {
  .bottom-nav { display: none; }
  body.store-body { padding-bottom: 0; }
  .store-wrap { padding-bottom: 40px; }
  .cart-bar { bottom: 0; margin: 0; border-radius: 0; }
  .store-section, .search-section { padding-left: 24px; padding-right: 24px; }
  .hscroll { padding-left: 24px; padding-right: 24px; margin-left: -24px; margin-right: -24px; }
  .category-scroll { padding-left: 24px; padding-right: 24px; margin-left: -24px; margin-right: -24px; }
  .hero-banner { flex-direction: row; align-items: center; justify-content: space-between; min-height: 260px; padding: 30px 36px; gap: 16px; }
  .hero-banner-text { max-width: 340px; }
  .hero-banner-text h1 { font-size: 27px; }
  .hero-banner-text p { font-size: 14px; max-width: 320px; }
  .hero-banner-visual { align-self: center; }
  .hero-banner-visual img { width: auto; max-width: none; max-height: 220px; }
  .resto-grid { grid-template-columns: repeat(4, 1fr); }
  .store-topbar { padding: 14px 24px; }
  .topbar-desktop-only { display: flex; }
  .category-chip { width: 64px; gap: 6px; }
  .category-chip .cc-icon { width: 54px; height: 54px; font-size: 24px; }
}
@media (min-width: 821px) and (max-width: 1180px) {
  .resto-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1281px) {
  .store-wrap { padding: 0 0 40px; }
}

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-side { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .menu-toggle { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; margin-right: 6px; }
  .menu-toggle svg { width: 18px; height: 18px; }
  .topbar { padding: 14px 18px; }
  .topbar-left h1 { font-size: 17px; }
  .content-inner { padding: 18px 16px 32px; }
  .sidebar { position: fixed; left: 0; top: 0; height: 100vh; width: 252px; transform: translateX(-100%); transition: transform 220ms ease; z-index: 100; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(28,20,16,0.5); z-index: 90; }
  .sidebar-overlay.show { display: block; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { flex-direction: column; gap: 0; }
  th, td { padding: 9px 10px; font-size: 12.5px; }
  .btn-sm { padding: 4px 8px; font-size: 11px; }
  .table-cards { border: none; background: transparent; }
  .table-cards tr:first-child { display: none; }
  .table-cards tr { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 4px 14px; box-shadow: var(--shadow-sm); }
  .table-cards td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; text-align: right; }
  .table-cards td:last-child { border-bottom: none; }
  .table-cards td::before { content: attr(data-label); font-weight: 700; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.03em; text-align: left; flex-shrink: 0; }
  .table-cards td:has(.actions-wrap) { flex-direction: column; align-items: flex-start; gap: 8px; }
  .table-cards td .actions-wrap { justify-content: flex-start; width: 100%; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 24px; }
  .content-inner { padding: 14px 12px 28px; }
  .panel { padding: 16px; }
  .resto-grid .resto-name { font-size: 13px; }

  /* Warung Pilihan: horizontal swipe cards on phone */
  .resto-grid {
    display: flex; grid-template-columns: none; gap: 12px; overflow-x: auto;
    margin: 0 -16px; padding: 2px 16px 6px;
  }
  .resto-grid .resto-card { width: 280px; flex-shrink: 0; }

  /* Menu Favorit: 2-column grid on phone (instead of horizontal scroll) */
  .dish-grid-mobile {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
    overflow: visible; margin: 0; padding: 0;
  }
  .dish-grid-mobile .dish-card { width: auto; }
}

/* GoFood-style flow: driver & status baru */
.badge-diantar { background: var(--info-bg); color: var(--primary-dark); }
.badge-pending { background: var(--warning-bg); color: #92600a; }
.driver-card { border-left: 4px solid var(--primary); }
.driver-card .cart-summary-row span:last-child { text-align: right; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.status-track-step .label { font-size: 9.5px; line-height: 1.25; }
.app-footer a { color: inherit; text-decoration: underline; }
@media (max-width: 760px) {
  .store-body.has-bottom-nav { padding-bottom: 76px; }
}
