/* WebApp-V.1.0.1 · ui/shared/shell.css — সব পর্দার কাঠামো (প্রোটোটাইপ App.dc.html-এর চেহারা)
 * টোকেন: ../assets/ds.css (Modernist) — লাল accent, ০ radius, Archivo, বড় হাতের লেবেল।
 * মোবাইল আগে; ≥768 চওড়া কলাম; ≥1100 ট্যাব বার উপরে।
 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--color-accent-700); text-decoration: none; }
a:hover { color: var(--color-accent); }
button { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }

.page { min-height: 100vh; padding-bottom: 96px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 680px; }

/* ── উপরের বার ────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 40; background: var(--color-bg); border-bottom: 2px solid var(--color-divider); }
.top-in { display: flex; align-items: center; gap: 12px; height: 60px; }
.top-back { flex: none; width: 44px; height: 44px; margin-left: -10px; display: flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
.top-title { flex: 1; min-width: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-logo { height: 34px; width: auto; }
.chip-branch {
  flex: none; display: flex; align-items: center; gap: 8px; height: 36px; max-width: 52vw; padding: 0 12px;
  background: var(--color-surface); border: 2px solid var(--color-divider); cursor: pointer;
  font-size: 13px; font-weight: 600;
}
.chip-branch span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2E8B57; }
.dot.is-off { background: var(--color-neutral-500); }
.dot.is-soon { background: #D98A00; }
.lang { flex: none; display: flex; gap: 4px; }
.lang button { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; background: none; border: 2px solid transparent; cursor: pointer; }
.lang button.is-on { border-color: var(--color-text); }
.lang img { width: 20px; height: 14px; object-fit: cover; }

/* হোমের লাল হেডার */
.top.is-brand { background: var(--color-accent-800); border-bottom-color: var(--color-accent); }
.top.is-brand .top-in { height: 70px; justify-content: space-between; gap: 16px; }
.top.is-brand .top-logo { height: 40px; }
.hh-r { min-width: 0; display: flex; flex-direction: row-reverse; align-items: center; gap: 10px; }
.hh-br { min-width: 0; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: transparent; border: 2px solid var(--color-neutral-100); color: var(--color-neutral-100); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.hh-br svg { flex: none; }
.hh-br span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-br:hover { background: var(--color-neutral-100); color: var(--color-accent-800); }
.hh-st { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--color-neutral-100); white-space: nowrap; }
.hh-dot { flex: none; width: 8px; height: 8px; background: oklch(0.78 0.17 152); }
.hh-dot.is-off { background: var(--color-neutral-300); }
.hh-dot.is-soon { background: oklch(0.82 0.15 80); }
.hh-st { min-width: 0; }
.hh-stt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* UI-02: ফোনেও খোলা/বন্ধ দেখা যায় (আগে ≤480px-এ লুকানো) */
@media (max-width: 340px) { .hh-stt { display: none; } }
@media (min-width: 880px) { .top.is-brand .top-in { height: 86px; } .top.is-brand .top-logo { height: 56px; } }

/* ── ট্যাব বার ────────────────────────────────────────── */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--color-bg); border-top: 2px solid var(--color-divider); }
.tabbar-in { max-width: 680px; margin: 0 auto; height: 64px; display: flex; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--color-neutral-700); border-top: 3px solid transparent; position: relative; }
.tab:hover { color: var(--color-text); }
.tab.is-on { color: var(--color-text); border-top-color: var(--color-accent); }
.tab svg { width: 22px; height: 22px; }
.tab-l { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.tab-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center; background: var(--color-accent); color: #fff; font-size: 11px; font-weight: 800; }
@media (min-width: 1100px) {
  .tabbar { top: 0; bottom: auto; border-top: 0; border-bottom: 2px solid var(--color-divider); }
  .tabbar-in { max-width: none; height: 48px; justify-content: center; gap: 2px; }
  .tab { flex: none; flex-direction: row; gap: 6px; padding: 0 14px; border-top: 0; border-bottom: 2px solid transparent; }
  .tab.is-on { border-bottom-color: var(--color-accent); }
  .tab svg { width: 15px; height: 15px; }
  .tab-badge { position: static; }
  .tab-live { position: static; order: -1; }
  .page { padding-top: 48px; padding-bottom: 40px; }
  .top { top: 48px; }
}

/* ── টাইপ ও বোতাম ─────────────────────────────────────── */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--color-neutral-700); }
.h1 { margin: 0; font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.h2 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.muted { color: var(--color-neutral-700); }
.small { font-size: 13px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px;
  background: var(--color-accent); color: #fff; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
}
.btn:hover { background: var(--color-accent-600); color: #fff; }
.btn:disabled { background: var(--color-neutral-400); cursor: default; }
.btn.is-ghost { background: transparent; color: var(--color-text); border: 2px solid var(--color-text); }
.btn.is-ghost:hover { background: var(--color-surface); color: var(--color-text); }
.btn.is-block { width: 100%; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--color-text); }
.seg button { height: 44px; background: transparent; border: 0; cursor: pointer; font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.seg button.is-on { background: var(--color-text); color: var(--color-bg); }
.field { width: 100%; height: 48px; padding: 0 14px; background: #fff; border: 2px solid var(--color-divider); font-family: inherit; font-size: 16px; color: var(--color-text); }
.field:focus { outline: none; border-color: var(--color-text); }
textarea.field { height: auto; padding: 12px 14px; resize: vertical; }

/* ── অবস্থা ───────────────────────────────────────────── */
.state { padding: 48px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.state-msg { font-size: 18px; font-weight: 600; }
.state-code { font-size: 12px; font-family: ui-monospace, monospace; color: var(--color-neutral-700); word-break: break-all; }
.skel { background: linear-gradient(90deg, var(--color-surface), var(--color-neutral-200), var(--color-surface)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── শিট (branch picker) ──────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(32, 30, 29, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--color-bg); padding: 22px 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.sheet > *, .state > *, .br-list > *, .item-body > * { flex-shrink: 0; }
@media (min-width: 768px) { .scrim { align-items: center; padding: 32px; } .sheet { box-shadow: var(--shadow-lg); } }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.sheet-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.x { flex: none; width: 44px; height: 44px; margin: -8px -10px 0 0; background: none; border: 0; cursor: pointer; font-size: 26px; line-height: 1; }
.row-find { display: flex; gap: 8px; }
.row-find .field { flex: 1; min-width: 0; }
.row-find .btn { flex: none; height: 48px; }
.geo-list { display: flex; flex-direction: column; border: 2px solid var(--color-divider); }
.geo-list button { text-align: left; padding: 12px 14px; background: #fff; border: 0; border-bottom: 1px solid var(--color-neutral-300); cursor: pointer; font-size: 14px; }
.geo-list button:last-child { border-bottom: 0; }
.geo-list button:hover { background: var(--color-neutral-100); }
.notice { padding: 12px 14px; background: var(--color-accent-100); border: 2px solid var(--color-accent-300); font-size: 14px; font-weight: 600; color: var(--color-accent-800); }
.br-list { display: flex; flex-direction: column; gap: 10px; }
.br {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; text-align: left; width: 100%;
  background: #fff; border: 2px solid var(--color-divider); cursor: pointer;
}
.br:hover { border-color: var(--color-text); }
.br.is-on { border-color: var(--color-accent); }
.br.is-dis { opacity: .55; cursor: default; }
.br-top { display: flex; align-items: baseline; gap: 10px; }
.br-name { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; }
.br-km { flex: none; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.br-addr { font-size: 14px; color: var(--color-neutral-700); }
.br-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; background: var(--color-surface); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.tag.is-red { background: var(--color-accent); color: #fff; }
.tag.is-ink { background: var(--color-text); color: var(--color-bg); }

/* ── টোস্ট ───────────────────────────────────────────── */
.toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 90; pointer-events: none; box-shadow: 0 6px 16px rgba(32,30,29,.3); max-width: calc(100% - 32px); padding: 12px 18px; background: var(--color-text); color: var(--color-bg); font-size: 14px; font-weight: 600; }
@media (min-width: 1100px) { .toast { top: 64px; } }

/* ── লগইন / রেজিস্টার শিট (auth.sheet.js · প্রোটোটাইপ "11b Auth") ── */
.auth-scrim { z-index: 85; }
.sheet.auth { max-width: 480px; border-top: 4px solid var(--color-accent); padding: 22px 24px 28px; }
.auth-head { display: flex; align-items: flex-start; gap: 12px; }
.auth-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.auth-k { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--color-neutral-700); }
.auth-t { font-size: 26px; font-weight: 900; line-height: 1.08; letter-spacing: -.03em; }
.auth-x { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--color-text); background: transparent; cursor: pointer; }
.auth-x:hover { background: var(--color-text); color: var(--color-bg); }
.auth-f { display: flex; flex-direction: column; gap: 8px; }
.auth-l { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--color-neutral-700); }
.auth-f.is-bad .field { border-color: var(--color-accent); }
.auth-f.is-bad .auth-l { color: var(--color-accent-700); }
.auth-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.auth-check input { width: 20px; height: 20px; accent-color: var(--color-accent); margin: 0; }
.auth-code { border: 2px solid var(--color-text); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.auth-p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--color-neutral-700); text-wrap: pretty; }
.auth-p strong { color: var(--color-text); }
.auth-otp { height: 60px; font-size: 28px; font-weight: 800; letter-spacing: .5em; font-variant-numeric: tabular-nums; }
.auth-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-link { padding: 4px 0; background: none; border: 0; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--color-accent-700); }
.auth-link:hover { color: var(--color-accent); }
.auth-link:disabled { color: var(--color-neutral-600); cursor: default; }
.auth-err { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; background: var(--color-accent-100); border: 2px solid var(--color-accent-300); font-size: 14px; font-weight: 600; color: var(--color-accent-800); }
.auth-main { justify-content: space-between; height: 56px; }
.auth-ar { display: flex; }
.auth-foot { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 2px solid var(--color-divider); font-size: 14px; }

*:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Order ট্যাব — লাইভ ট্র্যাকিং চলাকালীন স্পন্দিত লাল বিন্দু (শেষ হলে চলে যায়) */
.tab-live { position: absolute; top: 8px; left: calc(50% + 8px); width: 9px; height: 9px; background: var(--color-accent); box-shadow: 0 0 0 0 color-mix(in oklch, var(--color-accent) 55%, transparent); animation: tabLive 1.6s ease-out infinite; pointer-events: none; }
@keyframes tabLive { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--color-accent) 55%, transparent); } 70% { box-shadow: 0 0 0 9px color-mix(in oklch, var(--color-accent) 0%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
/* UI-11 — বিন্দুর ভেতরে সংখ্যা */
.tab-live.has-n { top: 3px; left: calc(50% + 3px); width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .tab-live { animation: none; } }

/* Menu-র ছোট branch লাইন (উপরের বারের বদলে) */
.br-line { width: 100%; display: flex; align-items: center; gap: 8px; padding: 14px 0 12px; background: none; border: 0; border-bottom: 2px solid var(--color-divider); cursor: pointer; font-size: 13px; text-align: left; color: var(--color-text); }
.br-line b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.br-line .bl-s { color: var(--color-neutral-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.br-line u { margin-left: auto; flex: none; font-weight: 700; color: var(--color-accent-700); text-underline-offset: 3px; }
.br-line:hover u { color: var(--color-accent); }
.br-line:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ── UI-01 · Branch picker (2026-11-20) — Design ক্যানভাস "Picker 1–6" ─────────────── */
.pk-hint, .pk-why { font-size: 14px; line-height: 1.4; color: var(--color-neutral-700); }
.pk-why { font-size: 13px; }
.pk-ask { display: flex; flex-direction: column; gap: 14px; }
.pk-ask > * { flex-shrink: 0; }
.pk-or { display: flex; align-items: center; gap: 12px; }
.pk-or::before, .pk-or::after { content: ""; flex: 1; height: 2px; background: var(--color-divider); }
.row-find .field::placeholder { color: var(--color-neutral-600); }
.pk-loc { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 6px 0 14px; background: #fff; border: 2px solid var(--color-divider); }
.pk-loc-ok { flex: none; display: flex; color: #2E8B57; }
.pk-loc-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-loc-x { flex: none; min-height: 44px; padding: 0 12px; background: none; border: 0; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--color-accent-700); }
.pk-loc-x:active, .pk-nbtn:active, .br:active { opacity: .7; }
.pk-lab { flex: none; }
.pk-note { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex-shrink: 0; }
.pk-note span { font-size: 13px; line-height: 1.4; font-weight: 500; }
.pk-note .pk-help { color: var(--color-accent-800); }
.pk-nbtn { min-height: 44px; padding: 0 16px; background: var(--color-text); color: var(--color-bg); border: 0; cursor: pointer; font-size: 14px; font-weight: 800; margin-top: 4px; }
.pk-nbtn.is-light { background: transparent; color: var(--color-accent-800); border: 2px solid var(--color-accent-800); }
.br { gap: 5px; }
.br.is-near { border-color: var(--color-text); }
.br.is-dis { opacity: .6; }
.br-km { color: var(--color-neutral-700); }
.br-st { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.br-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; }
.br-lab { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-700); }
.br-lab.is-ok { color: #1F7A45; }
.br-cta { flex: none; font-size: 14px; font-weight: 700; color: var(--color-accent-700); }
.geo-list button { min-height: 44px; }
.row-find .btn { padding: 0 16px; font-size: 14px; letter-spacing: .02em; text-transform: none; background: var(--color-surface); color: var(--color-text); border: 2px solid var(--color-divider); }
.row-find .btn:hover { background: var(--color-neutral-200); color: var(--color-text); }

.hh-br:active, .tab:active { opacity: .7; }   /* UI-02 */

/* UI-02b · স্ট্যাটাস সারি (হেডারের নিচে, মাঝখানে) */
.hstat { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 -24px; padding: 10px 24px; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--color-neutral-900, #201e1d); border-bottom: 1px solid rgba(32,30,29,.15); }
.hstat:empty { display: none; }
.hstat .hh-dot { background: #1f9d55; }
.hstat .hh-dot.is-off { background: var(--color-neutral-500, #8a8686); }
.hstat .hh-dot.is-soon { background: #d98e04; }
.hstat .hh-stt { overflow: visible; white-space: normal; text-align: center; }
@media (max-width: 340px) { .hstat .hh-stt { display: inline; } }

/* UI-02c · পতাকা হেডারে (লোগোর ডানে) */
.hh-r .lmenu { flex: none; margin: 0; }
.hh-r .lm-btn svg { stroke: var(--color-neutral-100, #f8f4f4); }
.hh-r .lm-btn img { outline-color: rgba(248,244,244,.5); }
.hh-r .lm-it { color: var(--color-text); }
.top.is-brand .top-in { gap: 8px; }
.hh-r .lm-btn { color: var(--color-neutral-100, #f8f4f4); }

/* ── UI-06: অর্ডার ফ্লোতে ট্যাব বার নেই — পূর্ণ স্ক্রিন ── */
body.no-tabs .page { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 1100px) { body.no-tabs .page { padding-top: 0; padding-bottom: 40px; } }
/* ── বেরোনোর সতর্কতা ── */
.xd-scrim { align-items: center; padding: 24px; }
.xdlg { width: 100%; max-width: 420px; box-sizing: border-box; background: var(--color-bg); border-top: 6px solid var(--color-accent); padding: 24px 24px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-lg); }
.xd-k { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--color-neutral-700); }
.xd-t { margin: 0; font-size: 28px; font-weight: 900; line-height: 1.05; letter-spacing: -.03em; }
.xd-p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--color-neutral-700); }
.xd-b { width: 100%; justify-content: center; margin-top: 2px; }

/* ── UI-07: ফোন ঘর (দেশের কোড + নম্বর) ── */
.ph-f { position: relative; }
.ph-row { display: flex; gap: 8px; align-items: stretch; }
.ph-chiphost { flex: none; display: flex; }
.ph-chip { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 10px 0 12px; background: #fff; border: 2px solid var(--color-divider); color: var(--color-text); font: inherit; font-size: 16px; cursor: pointer; }
.ph-chip:focus-visible { outline: 3px solid var(--color-text); outline-offset: 2px; }
.ph-tag { flex: none; min-width: 26px; padding: 2px 4px; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .06em; background: var(--color-text); color: var(--color-bg); }
.ph-dial { width: 84px; }
.ph-row .field { flex: 1; min-width: 0; }
.ph-f.is-bad .ph-chip, .ph-f.is-bad .field { border-color: var(--color-accent); }
.ph-list { position: absolute; left: 0; right: 0; top: 76px; z-index: 5; background: #fff; border: 2px solid var(--color-text); box-shadow: var(--shadow-lg); }
.ph-opt { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: none; border: 0; border-top: 1px solid var(--color-divider); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; color: var(--color-text); }
.ph-opt:first-child { border-top: 0; }
.ph-opt.is-on { background: var(--color-text); color: var(--color-bg); }
.ph-opt.is-on .ph-tag { background: var(--color-bg); color: var(--color-text); }
.ph-n { flex: 1; }
.ph-d { color: var(--color-neutral-700); font-weight: 700; }
.ph-opt.is-on .ph-d { color: var(--color-bg); }
.ph-err { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--color-accent-700); }
