/* Simbicom Shop: phone-first, green like M-Pesa shopping, readable on cheap screens in sunlight. */
:root { --bg: #f3f6f4; --card: #fff; --ink: #1c2622; --muted: #64716b; --line: #d8e1dc; --primary: #0b7a4b; --primary-dark: #075c38;
  --danger: #b42318; --warn: #a15c07; --good: #157f3c; --shadow: 0 1px 3px rgba(16, 40, 24, .12); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--ink); background: var(--bg); padding-bottom: 72px; }
header#top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .55rem; padding: .55rem .8rem; background: var(--primary); color: #fff; }
header .logo { width: 34px; height: 34px; border-radius: 9px; background: #fff; }
header .title { flex: 1; min-width: 0; } header .title b { display: block; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header .title small { display: block; opacity: .85; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header button { color: #fff; border-color: #ffffff55; background: #ffffff1f; }
header .cart { font-weight: 600; }
main { max-width: 760px; margin: 0 auto; padding: .9rem .8rem; }
nav#tabs { position: fixed; inset: auto 0 0 0; display: flex; background: #fff; border-top: 1px solid var(--line); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
nav#tabs button { flex: 1; border: 0; border-radius: 0; background: none; padding: .45rem 0 .5rem; font-size: 1.15rem; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px; }
nav#tabs button span { font-size: .7rem; } nav#tabs button.on { color: var(--primary); font-weight: 600; }
h1, h2, h3 { margin: .2rem 0 .6rem; line-height: 1.25; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: .4rem 0; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .center { text-align: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .9rem; margin-bottom: .75rem; box-shadow: var(--shadow); }
button, .btn { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 9px; padding: .55rem .9rem; cursor: pointer; }
button.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--primary-dark); }
button.danger { color: var(--danger); border-color: #f3b8b3; }
button.ghost { background: transparent; }
button.big { width: 100%; padding: .8rem; font-size: 1.02rem; }
button:disabled { opacity: .55; cursor: default; }
label { display: block; font-size: .86rem; color: var(--muted); margin: .55rem 0 .2rem; }
input, select, textarea { font: inherit; width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid #0b7a4b55; border-color: var(--primary); }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; } .row > * { flex: 1; }
.msg { margin-top: .6rem; font-size: .9rem; } .msg.bad { color: var(--danger); } .msg.good { color: var(--good); }
.list .item { display: flex; gap: .7rem; align-items: center; padding: .7rem .1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.list .item:last-child { border-bottom: 0; }
.avatar { width: 44px; height: 44px; border-radius: 11px; background: #e3f1ea; color: var(--primary); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 1.05rem; }
.item .grow { flex: 1; min-width: 0; } .item b { display: block; } .item small { color: var(--muted); }
.badge { display: inline-block; font-size: .74rem; padding: .1rem .5rem; border-radius: 999px; background: #eef1ef; color: var(--muted); white-space: nowrap; }
.badge.good { background: #dff3e6; color: var(--good); } .badge.warn { background: #fdf0dc; color: var(--warn); } .badge.bad { background: #fde3e1; color: var(--danger); }
.badge.blue { background: #e1ecfb; color: #134a9b; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.prod { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .75rem; display: flex; flex-direction: column; gap: .4rem; }
.prod b { font-size: .98rem; } .price { font-weight: 700; color: var(--primary-dark); font-size: 1.05rem; }
.prod .row select { flex: 2; } .prod .row input { flex: 1; min-width: 60px; }
.out { opacity: .55; }
.lines { width: 100%; border-collapse: collapse; } .lines td { padding: .35rem .2rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td.num { text-align: right; white-space: nowrap; } .lines tr.total td { font-weight: 700; border-bottom: 0; }
.steps { display: flex; gap: .25rem; margin: .4rem 0 .8rem; } .steps div { flex: 1; height: 5px; border-radius: 3px; background: var(--line); } .steps div.on { background: var(--primary); }
.chat { display: flex; flex-direction: column; gap: .35rem; max-height: 340px; overflow-y: auto; padding: .2rem; }
.bubble { max-width: 82%; padding: .45rem .7rem; border-radius: 12px; background: #eef1ef; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: #d9f1e3; } .bubble small { display: block; color: var(--muted); font-size: .7rem; margin-top: .15rem; }
.lock { font-size: .8rem; color: var(--good); }
.safety { font-family: Consolas, monospace; letter-spacing: .05em; background: #eef6f1; padding: .1rem .4rem; border-radius: 6px; }
.choices label { display: flex; gap: .55rem; align-items: flex-start; color: var(--ink); font-size: .95rem; border: 1px solid var(--line); border-radius: 10px; padding: .6rem; margin: .35rem 0; cursor: pointer; }
.choices input { width: auto; margin-top: .2rem; } .choices small { display: block; color: var(--muted); }
dialog { border: 0; border-radius: 14px; padding: 1rem; width: min(560px, 94vw); max-height: 90vh; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
dialog::backdrop { background: #0008; }
#toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: #1c2622; color: #fff; padding: .6rem 1rem; border-radius: 10px; z-index: 50; max-width: 92vw; font-size: .92rem; }
.hero { text-align: center; padding: 1.2rem .4rem .6rem; } .hero img { width: 76px; height: 76px; border-radius: 18px; }
.tabs2 { display: flex; gap: .3rem; margin-bottom: .7rem; } .tabs2 button { flex: 1; } .tabs2 button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.floatcart { position: fixed; left: 50%; transform: translateX(-50%); bottom: 80px; z-index: 9; box-shadow: 0 6px 18px #0003; }
.pimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; background: #eef1ef; }
