/* AyitiDash MVP — mobile-first styles */
:root {
  --brand: #d9480f;
  --brand-dark: #a53608;
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2b2118;
  --muted: #8a7a68;
  --ok: #2f9e44;
  --warn: #e67700;
  --danger: #e03131;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
}
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  padding-bottom: 76px; }
#topbar {
  position: sticky; top: 0; z-index: 500;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--brand); color: #fff;
}
#topbar .logo { color: #fff; text-decoration: none; font-size: 22px; font-weight: 800; }
#topbar-right { font-size: 13px; display: flex; gap: 10px; align-items: center; }
#topbar-right button { background: rgba(255,255,255,.2); border: none; color: #fff;
  border-radius: 8px; padding: 6px 10px; font-size: 13px; }
#view { padding: 14px 14px 20px; }
#bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 500;
  display: flex; background: var(--card); border-top: 1px solid #eee;
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
#bottomnav a {
  flex: 1; text-align: center; text-decoration: none; color: var(--muted);
  font-size: 11px; padding: 4px 2px; border-radius: 8px;
}
#bottomnav a .ico { font-size: 20px; display: block; }
#bottomnav a.active { color: var(--brand); font-weight: 700; }

.card { background: var(--card); border-radius: var(--radius); padding: 14px;
  margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.btn {
  display: inline-block; border: none; border-radius: 10px; cursor: pointer;
  padding: 12px 16px; font-size: 15px; font-weight: 700;
  background: var(--brand); color: #fff; width: 100%; margin-top: 8px;
}
.btn.secondary { background: #eee; color: var(--text); }
.btn.small { width: auto; padding: 8px 12px; font-size: 13px; margin-top: 0; }
.btn.ok { background: var(--ok); } .btn.warn { background: var(--warn); }
.btn.danger { background: var(--danger); }
.btn:disabled { opacity: .5; }
input, select, textarea {
  width: 100%; padding: 12px; margin: 6px 0; font-size: 15px;
  border: 1px solid #ddd; border-radius: 10px; background: #fff;
}
label { font-size: 13px; font-weight: 600; color: var(--muted); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; background: #eee;
}
.badge.pending { background: #fff3bf; color: #7a5b00; }
.badge.accepted, .badge.ready { background: #d0ebff; color: #1864ab; }
.badge.picked_up { background: #e5dbff; color: #5f3dc4; }
.badge.delivered, .badge.paid, .badge.collected { background: #d3f9d8; color: #2b8a3e; }
.badge.rejected, .badge.cancelled, .badge.failed { background: #ffe3e3; color: #c92a2a; }
.menu-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1ede7; }
.menu-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #eee; }
.menu-item .info { flex: 1; }
.menu-item .price { font-weight: 800; color: var(--brand); }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-ctrl button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ddd;
  background: #fff; font-size: 18px; line-height: 1; }
#map { height: 260px; border-radius: var(--radius); margin: 8px 0; z-index: 1; }
.map-hint { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
#toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #2b2118; color: #fff; padding: 10px 18px; border-radius: 24px;
  font-size: 14px; opacity: 0; transition: all .25s; z-index: 999; pointer-events: none;
  max-width: 90%;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
table.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ledger th, table.ledger td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #f1ede7; }
.kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kpi .card { margin: 0; text-align: center; }
.kpi .num { font-size: 22px; font-weight: 800; color: var(--brand); }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.tabs button { flex: 1; white-space: nowrap; padding: 10px; border-radius: 10px;
  border: 1px solid #ddd; background: #fff; font-size: 13px; font-weight: 600; }
.tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
h2.page-title { margin: 4px 0 12px; font-size: 21px; }

/* ---- Asistan AyitiDash (chatbot) ---- */
#chat-fab {
  position: fixed; right: 16px; bottom: 76px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand, #d9480f); color: #fff; border: none;
  font-size: 26px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
#chat-panel {
  position: fixed; right: 12px; bottom: 142px; z-index: 60;
  width: min(340px, calc(100vw - 24px)); height: 420px; max-height: 60vh;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
}
#chat-panel.hidden { display: none; }
#chat-head { background: var(--brand, #d9480f); color: #fff; padding: 10px 12px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
#chat-head button { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
#chat-msgs { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #fafafa; }
.chat-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 14px; white-space: pre-line; line-height: 1.4; }
.chat-msg.bot { background: #fff; border: 1px solid #eee; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.me { background: var(--brand, #d9480f); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
#chat-sugg { display: flex; gap: 6px; padding: 8px 10px 0; flex-wrap: wrap; background: #fafafa; }
#chat-sugg button { background: #fff; border: 1px solid var(--brand, #d9480f); color: var(--brand, #d9480f); border-radius: 16px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
#chat-form { display: flex; padding: 10px; gap: 8px; background: #fff; border-top: 1px solid #eee; }
#chat-form input { flex: 1; border: 1px solid #ddd; border-radius: 20px; padding: 8px 14px; font-size: 14px; }
#chat-form button { background: var(--brand, #d9480f); color: #fff; border: none; border-radius: 20px; padding: 8px 16px; font-size: 14px; cursor: pointer; }

/* ---- Nouvo paj akèy kliyan (style modèn) ---- */
.hidden { display: none !important; }
.home-head { background: #fff; border-radius: 0 0 20px 20px; padding: 14px 14px 16px;
  margin: -14px -14px 12px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.home-top { display: flex; align-items: center; justify-content: space-between; }
.home-logo { font-size: 22px; font-weight: 800; color: var(--brand); text-decoration: none; }
.home-tag { font-size: 11px; color: var(--muted); margin-top: 2px; }
.home-icons { display: flex; gap: 10px; align-items: center; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%;
  background: #f4efe8; border: none; font-size: 18px; cursor: pointer; }
.icon-btn .n { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff;
  font-size: 10px; min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
  font-size: 18px; border: none; cursor: pointer; }
.u-menu { position: absolute; right: 0; top: 46px; background: #fff; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15); padding: 8px; z-index: 60; min-width: 150px; }
.u-menu .u-name { padding: 6px 10px; font-size: 13px; font-weight: 700; }
.deliver-to { margin-top: 10px; font-size: 12px; color: var(--danger); font-weight: 700; }
.deliver-addr { font-size: 15px; font-weight: 600; margin-top: 2px; }
.searchbar { display: flex; align-items: center; background: #f4efe8; border-radius: 12px;
  padding: 10px 12px; margin-top: 10px; gap: 8px; }
.searchbar input { border: none; background: transparent; outline: none; flex: 1;
  font-size: 14px; padding: 0; margin: 0; }
.hero { position: relative; border-radius: 18px; overflow: hidden; margin: 14px 0;
  min-height: 150px; background: linear-gradient(115deg, #a5231a 30%, #d9480f 75%);
  color: #fff; display: flex; }
.hero-text { padding: 18px 6px 18px 16px; flex: 1.25; }
.hero-text h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
.hero-text p { margin: 0 0 12px; font-size: 13px; opacity: .92; }
.hero-img { flex: 1; background: url('../img/hero.webp') center/cover; min-height: 150px; }
.btn-order { background: #fff; color: var(--brand); border: none; border-radius: 20px;
  padding: 9px 18px; font-weight: 700; font-size: 13px; cursor: pointer; }
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 10px; }
.cat { display: flex; flex-direction: column; align-items: center; min-width: 66px;
  border: none; background: none; cursor: pointer; padding: 0; }
.cat .ci { width: 56px; height: 56px; border-radius: 16px; background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.08); font-size: 26px;
  display: flex; align-items: center; justify-content: center; }
.cat.active .ci { outline: 2px solid var(--brand); }
.cat .cl { font-size: 11px; margin-top: 4px; font-weight: 700; color: var(--text); }
.cat .cs { font-size: 10px; color: var(--muted); }
.promo { display: flex; background: #fff; border-radius: 16px; margin: 4px 0 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); align-items: center; }
.promo .pi { font-size: 42px; padding: 8px 4px 8px 12px; }
.promo .pt { flex: 1; padding: 10px 4px; }
.promo .pt b { font-size: 14px; }
.promo .pt p { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.promo .pb { background: var(--brand); color: #fff; border: none; border-radius: 10px;
  padding: 10px 16px; margin-right: 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 8px; }
.sec-head h3 { margin: 0; font-size: 17px; }
.sec-head a { font-size: 13px; color: var(--brand); text-decoration: none; font-weight: 600; cursor: pointer; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; }
.rest-card { min-width: 160px; max-width: 160px; background: #fff; border-radius: 16px;
  overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); position: relative;
  text-decoration: none; color: inherit; flex-shrink: 0; }
.rest-photo { height: 100px; background: linear-gradient(135deg, #f0b429, #d9480f);
  display: flex; align-items: center; justify-content: center; font-size: 40px; }
.rest-photo img { width: 100%; height: 100%; object-fit: cover; }
.rest-card .ri { padding: 8px 10px 10px; }
.rest-card .ri b { font-size: 13px; display: block; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.rest-card .ri .muted { font-size: 11px; }
.fav { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92);
  border: none; border-radius: 50%; width: 30px; height: 30px; font-size: 15px; cursor: pointer; }
.rest-list .thumb { width: 62px; height: 62px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #f0b429, #d9480f);
  display: flex; align-items: center; justify-content: center; font-size: 28px; overflow: hidden; }
.rest-list .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Kat chwa wòl (enskripsyon) ---- */
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.role-card { background: #fff; border: 2px solid #eee; border-radius: 12px; padding: 10px 4px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.role-card .rc-ico { font-size: 26px; }
.role-card b { font-size: 13px; color: var(--text); }
.role-card small { font-size: 10px; color: var(--muted); }
.role-card.active { border-color: var(--brand); background: #fff7f2; }

/* ---- Feature pack v2 ---- */
.fchip { border: 1px solid #ddd; background: #fff; border-radius: 16px; padding: 6px 12px;
  font-size: 12px; font-weight: 700; cursor: pointer; color: var(--text); }
.fchip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.u-link { display: block; padding: 8px 10px; font-size: 13px; color: var(--text);
  text-decoration: none; border-radius: 8px; }
.checkline { display: flex !important; align-items: center; gap: 8px; font-size: 14px;
  font-weight: 600; color: var(--text); margin: 10px 0; }
.sched-row { display: flex; gap: 18px; margin: 4px 0 6px; }
.sched-opt { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.stars { display: flex; gap: 4px; margin: 4px 0 10px; }
.stars .star { background: none; border: none; font-size: 32px; cursor: pointer;
  color: #ccc; padding: 0 2px; }
.stars .star.on { color: #f0a020; }
.omsg-box { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column;
  gap: 6px; padding: 6px 0; }
.omsg { background: #f4efe8; border-radius: 10px; padding: 8px 10px; font-size: 13px;
  max-width: 85%; align-self: flex-start; }
.omsg.me { background: var(--brand); color: #fff; align-self: flex-end; }
.omsg b { font-size: 11px; opacity: .8; }
.toggle-online { display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.switch { position: relative; width: 56px; height: 30px; border-radius: 15px;
  background: #ddd; border: none; cursor: pointer; transition: background .2s; }
.switch.on { background: var(--ok); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px;
  height: 24px; border-radius: 50%; background: #fff; transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch.on::after { left: 29px; }

/* ---- Professional icon system + DoorDash polish (no emojis) ---- */
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.22em; flex-shrink: 0; }
.logo-mark { display: inline-flex; vertical-align: middle; }
.logo-mark svg { width: 30px; height: 30px; display: block; }
#topbar .logo { display: inline-flex; align-items: center; gap: 6px; }
#topbar .logo .logo-mark svg { width: 26px; height: 26px; }
.home-logo { display: inline-flex; align-items: center; gap: 7px; font-size: 22px;
  font-weight: 800; color: var(--brand); text-decoration: none; }
/* category tiles */
.cat .ci { background: #fff7f2; }
.cat .ci .ic { width: 28px; height: 28px; color: var(--brand); }
.role-card .rc-ico .ic { width: 30px; height: 30px; color: var(--brand); }
/* bottom nav */
#bottomnav a .ico { display: flex; justify-content: center; margin-bottom: 3px; }
#bottomnav a .ico .ic { width: 22px; height: 22px; }
/* DoorDash-style restaurant meta rows */
.meta { display: flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--muted); flex-wrap: wrap; margin-top: 3px; }
.meta .ic { width: 14px; height: 14px; }
.meta-rating { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--text); }
.meta-rating .ic { width: 14px; height: 14px; color: #f0a020; }
.meta-dot { color: #cfc8bd; }
.meta-new { font-weight: 700; color: var(--brand); font-size: 12px; }
.rest-card .ri b { font-size: 14px; }
.stars-inline { color: #f0a020; font-size: 14px; letter-spacing: 2px; }
/* photo placeholders */
.rest-photo.placeholder .ic { width: 42px; height: 42px; color: rgba(255,255,255,.92); }
.rest-list .thumb .ic { width: 30px; height: 30px; color: rgba(255,255,255,.92); }
/* favorite buttons */
.fav { display: flex; align-items: center; justify-content: center; color: var(--text); padding: 0; }
.fav .ic { width: 16px; height: 16px; }
.fav-btn { background: none; border: none; cursor: pointer; flex-shrink: 0; color: var(--text);
  display: flex; align-items: center; padding: 4px; }
.fav-btn .ic { width: 22px; height: 22px; }
/* header icons */
.icon-btn { display: flex; align-items: center; justify-content: center; color: var(--text); padding: 0; }
.icon-btn .ic { width: 20px; height: 20px; }
.deliver-addr { display: flex; align-items: center; gap: 5px; }
.deliver-addr .ic { width: 16px; height: 16px; color: var(--brand); }
.searchbar { display: flex; align-items: center; gap: 8px; }
.searchbar .ic { width: 18px; height: 18px; color: var(--muted); margin-left: 12px; }
/* gift promo card */
.promo .pi { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px;
  border-radius: 16px; background: #fff7f2; margin-left: 12px; color: var(--brand); flex-shrink: 0; padding: 0; }
.promo .pi .ic { width: 28px; height: 28px; }
/* notification icons */
.nicon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 12px; background: #f6f1ea; color: var(--brand); flex-shrink: 0; }
.nicon .ic { width: 20px; height: 20px; }
/* user menu */
.u-link { display: flex; align-items: center; gap: 9px; }
.u-link .ic { width: 16px; height: 16px; color: var(--muted); }
/* chat assistant button */
#chat-fab { display: flex; align-items: center; justify-content: center; }
#chat-fab .ic { width: 24px; height: 24px; }
/* filter chip */
.fchip { display: inline-flex; align-items: center; gap: 5px; }
.fchip .ic { width: 13px; height: 13px; color: #f0a020; }
.fchip.active .ic { color: #fff; }

/* ---- City picker (bottom sheet modal) ---- */
.modal-ov { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 480px;
  max-height: 72vh; overflow-y: auto; padding: 18px 16px 26px;
  animation: sheetUp .22s ease-out; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.city-list { display: flex; flex-direction: column; margin-top: 8px; }
.city-opt { display: flex; align-items: center; gap: 12px; padding: 13px 8px;
  border: none; background: none; border-bottom: 1px solid #f1ede7;
  font-size: 15px; cursor: pointer; text-align: left; color: var(--text); width: 100%; }
.city-opt .ic { width: 18px; height: 18px; color: var(--muted); }
.city-opt span { flex: 1; }
.city-opt.active { font-weight: 700; color: var(--brand); }
.city-opt.active .ic { color: var(--brand); }
button.deliver-addr { background: none; border: none; padding: 0; font: inherit;
  cursor: pointer; color: inherit; text-align: left; }

/* ---- Hero carousel (3 slides) ---- */
.hero-carousel { position: relative; overflow: hidden; border-radius: 18px; margin: 14px 0; }
.hero-track { display: flex; transition: transform .45s ease; }
.hero-slide { min-width: 100%; display: flex; color: #fff; box-sizing: border-box; }
.hero-slide.hs1 { background: linear-gradient(115deg, #a5231a 30%, #d9480f 75%); }
.hero-slide.hs2 { background: linear-gradient(115deg, #0c4f43 30%, #14957c 75%); }
.hero-slide.hs3 { background: linear-gradient(115deg, #8a4b0f 30%, #d98a0f 75%); }
.hero-slide .hero-text { padding: 20px 6px 26px 18px; flex: 1.3; }
.hero-slide .hero-text h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.2; color: #fff; }
.hero-slide .hero-text p { margin: 0 0 14px; font-size: 13px; opacity: .93; }
.hero-slide .hero-img { flex: 1; background: url('../img/hero.webp') center/cover; min-height: 160px; }
.hero-slide .hero-visual { flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 160px; color: rgba(255,255,255,.92); }
.hero-slide .hero-visual .ic { width: 76px; height: 76px; stroke-width: 1.2; }
.hero-dots { position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; gap: 6px; justify-content: center; }
.hdot { width: 8px; height: 8px; border-radius: 99px; border: none;
  background: rgba(255,255,255,.45); cursor: pointer; padding: 0;
  transition: width .25s, background .25s; }
.hdot.active { background: #fff; width: 24px; }
.badge.ok { background: #d3f9d8; color: #2b8a3e; }
.badge.warn { background: #fff3bf; color: #7a5b00; }
.greeting { font-size: 24px; font-weight: 800; margin: 14px 0 2px; letter-spacing: -0.3px; }
.stypes { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.stypes::-webkit-scrollbar { display: none; }
.stypes .fchip { flex-shrink: 0; }
