/* Driver and vendor apps. Same tokens and components as the customer app;
   the driver app leans green, the vendor app leans orange. */

/* ---------- chrome ---------- */
.role-badge { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); margin-left: 2px; }
.role-driver { background: var(--green-700); color: #fff; }
.role-vendor { background: var(--orange-500); color: #1d0f02; }
body[data-app="driver"] .topbar { border-bottom-color: var(--green-100); box-shadow: inset 0 -3px 0 var(--green-600); }
body[data-app="vendor"] .topbar { border-bottom-color: var(--orange-100); box-shadow: inset 0 -3px 0 var(--orange-500); }
.live-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 750; padding: 5px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.live-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa8a0; }
.live-chip.on { background: var(--green-50); color: var(--green-800); }
.live-chip.on::before { background: var(--green-500); box-shadow: 0 0 0 3px rgba(34, 166, 80, .25); animation: pulse 1.6s infinite; }
@media (max-width: 400px) { body[data-app="driver"] .brand-word, body[data-app="vendor"] .brand-word { display: none; } }
@media (max-width: 340px) { .live-chip { display: none; } }

.partner-auth .auth-hero .role-badge { margin: 4px auto 0; }
.partner-links { margin-top: -6px; }
.admin-link { margin-top: -6px; font-size: 13px; }
.admin-link a { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 750; color: var(--orange-700); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- shared partner blocks ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.stat small { font-size: 11.5px; color: var(--muted); font-weight: 650; }
.stat strong { font-family: var(--font-display); font-size: clamp(15px, 4.4vw, 20px); font-weight: 850; color: var(--ink); overflow-wrap: anywhere; line-height: 1.25; }
.stat span { font-size: 11.5px; color: var(--muted); }
.job-list { display: grid; gap: 12px; }
@media (min-width: 820px) { .job-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.job-card, .order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-1); animation: view-in .25s ease-out; }
.job-card { border-left: 4px solid var(--orange-500); }
.job-head { display: flex; align-items: center; gap: 10px; }
.job-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.job-title small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.job-pay { text-align: right; display: flex; flex-direction: column; }
.job-pay small { font-size: 11px; color: var(--muted); font-weight: 650; }
.job-pay strong { font-size: 19px; font-family: var(--font-display); color: var(--green-800); font-weight: 850; }
.job-actions { display: flex; gap: 10px; }
.job-actions .btn { min-height: 48px; }
.route-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.route-list li { display: flex; gap: 12px; align-items: flex-start; position: relative; }
.route-list li:first-child::after { content: ""; position: absolute; left: 6px; top: 18px; bottom: -12px; border-left: 2px dashed var(--line-2); }
.route-list div { display: flex; flex-direction: column; min-width: 0; }
.route-list small { font-size: 11.5px; color: var(--muted); font-weight: 650; }
.route-list strong { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.rdot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-top: 3px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--green-600); background: var(--green-600); }
.rdot.b { box-shadow: 0 0 0 2px var(--orange-500); background: var(--orange-500); }
.fact-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fact-chips li { font-size: 12px; font-weight: 650; padding: 4px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); }
.earn-list, .doc-list, .top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.earn-list li, .doc-list li, .top-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.earn-list li:last-child, .doc-list li:last-child, .top-list li:last-child { border-bottom: 0; }
.earn-list .grow { min-width: 0; display: flex; flex-direction: column; }
.earn-list small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.earn-list .act-ico { width: 38px; height: 38px; border-radius: 12px; }
.top-list { counter-reset: top; }
.top-list li::before { counter-increment: top; content: counter(top); width: 26px; height: 26px; border-radius: 50%; background: var(--orange-50); color: var(--orange-700); font-weight: 800; display: grid; place-items: center; font-size: 13px; flex: none; }
.top-list small { color: var(--muted); }
.doc-list .i { color: var(--green-700); }

/* ---------- driver ---------- */
.d-greet { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.online-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-lg); color: #fff;
  background: linear-gradient(135deg, #3b4a42, #1f2a24); box-shadow: var(--shadow-2); position: relative; overflow: hidden; transition: background .3s; }
.online-card.is-on { background: linear-gradient(135deg, var(--green-600), var(--green-900)); }
.online-card::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 162, 63, .35), transparent 70%); }
.oc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.oc-text small { font-size: 12px; opacity: .8; }
.oc-text strong { font-family: var(--font-display); font-size: 22px; font-weight: 850; }
.oc-text p { font-size: 13px; opacity: .9; }
.power-btn { position: relative; z-index: 1; flex: none; width: 92px; height: 92px; border-radius: 50%; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--orange-500); color: #1d0f02; font-weight: 800; font-size: 12.5px; box-shadow: 0 0 0 6px rgba(255, 255, 255, .15), 0 10px 22px -8px rgba(0, 0, 0, .5); transition: transform .15s; }
.power-btn .i { width: 30px; height: 30px; stroke-width: 2.4; }
.power-btn:active { transform: scale(.95); }
.online-card.is-on .power-btn { background: #fff; color: var(--green-800); box-shadow: 0 0 0 6px rgba(255, 255, 255, .2), 0 0 0 12px rgba(255, 255, 255, .08); animation: halo 2s infinite; }
@keyframes halo { 50% { box-shadow: 0 0 0 9px rgba(255, 255, 255, .25), 0 0 0 18px rgba(255, 255, 255, .06); } }
.active-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--orange-50); border: 1.5px solid var(--orange-400); color: var(--ink); text-decoration: none; }
.active-banner .grow { display: flex; flex-direction: column; min-width: 0; }
.active-banner small { color: var(--orange-700); font-weight: 700; }
.pref-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .pref-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pref { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: #fff; font-weight: 650; font-size: 13.5px; text-align: left; color: var(--muted); }
.pref .i { width: 20px; height: 20px; }
.pref.on { border-color: var(--green-700); background: var(--green-50); color: var(--green-800); }
.pref.on::after { content: "✓"; margin-left: auto; font-weight: 900; }
.payout-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.payout-card > div { display: flex; flex-direction: column; padding: 4px 2px; }
.payout-card small { font-size: 12px; color: var(--muted); font-weight: 650; }
.payout-card strong { font-family: var(--font-display); font-size: 22px; font-weight: 850; color: var(--green-800); }
.payout-card .collect strong { color: var(--orange-700); }
.payout-card .collect { border-left: 1px solid var(--line); padding-left: 12px; }
.done-card { display: flex; gap: 12px; align-items: center; background: var(--green-50); border-color: var(--green-100); }
.done-card > .i { width: 36px; height: 36px; padding: 7px; border-radius: 50%; background: var(--green-700); color: #fff; stroke-width: 3; }
.earn-card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.earn-card .btn { margin-top: 6px; position: relative; z-index: 1; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 150px; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.bar-fill { width: 100%; max-width: 34px; height: max(4px, var(--h)); border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--orange-400), var(--orange-600)); }
.bar:last-child .bar-fill { background: linear-gradient(180deg, var(--green-500), var(--green-700)); }
.bar small { font-size: 11px; color: var(--muted); font-weight: 650; }
.bar-val { font-size: 10px; color: var(--ink-2); font-weight: 700; white-space: nowrap; }
@media (max-width: 380px) { .bar-val { display: none; } }

/* ---------- vendor ---------- */
.v-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 150px; display: flex; align-items: flex-end; color: #fff; background: var(--green-900); }
.v-hero-img, .v-hero .img-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 30, 15, .15), rgba(7, 30, 15, .85)); }
.v-hero-body { position: relative; z-index: 1; padding: 16px; padding-right: 120px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v-hero-body small { font-size: 12px; opacity: .85; font-weight: 650; }
.v-hero-body p { font-size: 13px; opacity: .9; }
.v-hero .store-switch { position: absolute; z-index: 2; right: 12px; top: 12px; }
.store-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 4px; border-radius: var(--r-pill); border: 0; font-weight: 800; font-size: 13px;
  background: #e9ecea; color: var(--ink-2); box-shadow: var(--shadow-1); }
.store-switch .knob { width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); display: block; position: relative; }
.store-switch .knob::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #9aa8a0; }
.store-switch.is-open { background: var(--green-700); color: #fff; flex-direction: row-reverse; padding: 4px 4px 4px 14px; }
.store-switch.is-open .knob::after { background: var(--green-500); }
.store-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-card { border-left: 4px solid var(--line-2); }
.order-card.st-placed { border-left-color: var(--orange-500); box-shadow: 0 0 0 3px var(--orange-50), var(--shadow-1); }
.order-card.st-accepted, .order-card.st-preparing { border-left-color: var(--orange-400); }
.order-card.st-ready, .order-card.st-in_progress { border-left-color: var(--green-500); }
.order-card.st-completed { border-left-color: var(--green-700); }
.order-card.st-cancelled { border-left-color: var(--bad); opacity: .85; }
.order-lines { list-style: none; margin: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: var(--r-sm); font-size: 14px; }
.order-lines li { display: flex; gap: 8px; align-items: baseline; }
.order-lines b { color: var(--orange-700); min-width: 26px; }
.order-lines .grow { min-width: 0; overflow-wrap: anywhere; }
.order-note { font-size: 13px; display: flex; gap: 6px; align-items: flex-start; color: var(--info); }
.order-note .i { width: 16px; height: 16px; margin-top: 2px; }
.order-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.order-foot strong { color: var(--ink); font-size: 16px; }
.rider-line { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--green-800); background: var(--green-50); padding: 8px 10px; border-radius: var(--r-sm); }
.rider-line.wait { color: var(--orange-700); background: var(--orange-50); }
.rider-line .i { width: 18px; height: 18px; }
.tab .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: var(--r-pill); background: var(--orange-500); color: #1d0f02; font-size: 11.5px; font-weight: 800; }
.v-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--r-pill); padding: 0 14px; }
.v-search input { border: 0 !important; box-shadow: none !important; flex: 1; min-height: 46px; background: transparent; outline: none; }
.v-search:focus-within { border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 820px) { .menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.menu-img, .menu-row .img-fallback { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; flex: none; }
.menu-row.is-off .menu-img { filter: grayscale(.9); opacity: .6; }
.menu-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.menu-main strong { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.menu-main small { font-size: 12px; color: var(--muted); }
.price-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 2px 10px; border-radius: var(--r-pill); border: 1px dashed var(--orange-400); background: var(--orange-50); color: var(--orange-700); font-weight: 800; font-size: 13.5px; }
.price-btn .i { width: 15px; height: 15px; }
.switch { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; flex: none; min-width: 64px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 50px; height: 30px; border-radius: var(--r-pill); background: #cdd5cf; position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .2s; }
.switch input:checked + span { background: var(--green-600); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--orange-500); outline-offset: 2px; }
.switch small { font-size: 11px; font-weight: 700; color: var(--muted); }

/* ---------- vendor menu management ---------- */
.menu-thumb { flex: none; display: block; border-radius: 12px; }
.menu-thumb:focus-visible { outline: 3px solid var(--orange-500); outline-offset: 2px; }
.menu-name { font-size: 14px; line-height: 1.3; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; text-decoration: none; }
.menu-name:hover { color: var(--green-700); text-decoration: underline; }
.menu-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.edit-link { font-size: 13px; font-weight: 650; color: var(--green-700); }
.edit-link:hover { text-decoration: underline; }

.prod-form { display: flex; flex-direction: column; gap: 14px; max-width: 680px; }
.prod-photo { padding: 14px; }
.img-drop { display: flex; gap: 14px; align-items: flex-start; }
.img-preview { width: 112px; height: 112px; flex: none; display: grid; place-items: center; gap: 4px; border-radius: var(--r); overflow: hidden; background: var(--surface-2); border: 1.5px dashed var(--line-2); color: var(--muted); }
.img-preview.is-empty { text-align: center; }
.img-preview .preview-img { width: 100%; height: 100%; object-fit: cover; }
.preview-ico { display: inline-flex; }
.preview-ico .i { width: 28px; height: 28px; }
.img-preview small { font-size: 11.5px; font-weight: 650; }
.img-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.img-copy strong { font-size: 15px; }
.img-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.img-btns .btn { min-height: 40px; }
.img-btns .btn .i { width: 18px; height: 18px; }
.prod-photo > .err { margin-top: 10px; }
.form-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.form-actions .btn .i { width: 18px; height: 18px; }
@media (max-width: 380px) {
  .img-drop { flex-direction: column; align-items: stretch; }
  .img-preview { width: 100%; height: 160px; }
}

/* ---------- customer additions ---------- */
.line-warn { color: var(--bad) !important; font-weight: 700; }
.tab { white-space: nowrap; }
.tab .count { vertical-align: 1px; }

/* product type + category picker */
.type-badge { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.type-badge .i { width: 15px; height: 15px; }
.type-badge.food { background: var(--orange-500); color: #1d0f02; }
.type-badge.item { background: var(--green-700); color: #fff; }
.type-badge.sm { padding: 1px 7px; font-size: 10.5px; margin-right: 6px; }
.prod-type-note { display: flex; gap: 12px; align-items: flex-start; }
.prod-type-note p { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.prod-type-note strong { font-size: 14px; }
.prod-type-note small { color: var(--muted); font-size: 12.5px; }
.cat-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.cat-field legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 2px; }
.cat-field .hint { margin: 0 0 8px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cat-opt { position: relative; cursor: pointer; }
.cat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cat-opt span { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.25; }
.cat-opt .i { width: 18px; height: 18px; flex: none; color: var(--green-600); }
.cat-opt:hover span { border-color: var(--green-600); }
.cat-opt input:checked + span { border-color: var(--green-700); background: var(--green-50); color: var(--green-800); box-shadow: inset 0 0 0 1px var(--green-700); }
.cat-opt input:focus-visible + span { outline: 3px solid var(--orange-500); outline-offset: 2px; }
.cat-field.has-error .cat-opt span { border-color: var(--bad); }
.menu-cats { margin: 10px 0 2px; }
.menu-cats .chip.active { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.menu-cats .chip.active .i { color: #fff; }
.menu-cats .chip small { font-weight: 700; opacity: .7; }
.menu-meta { display: flex; align-items: center; flex-wrap: wrap; }

/* ---------- vendor: create store, setup checklist, your stores ---------- */
.type-grid { grid-template-columns: 1fr 1fr; }
.type-opt span { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; min-height: 76px; }
.type-opt span strong { font-size: 15px; color: var(--ink); }
.type-opt span small { font-weight: 500; color: var(--ink-3, #667); }
.setup-list ol { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.setup-list a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1.5px dashed var(--orange-500); border-radius: 12px; font-weight: 600; color: var(--ink); text-decoration: none; }
.setup-list a .i { width: 18px; height: 18px; color: var(--orange-500); }
.my-store-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.my-store-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; }
.my-store-list li.is-current { border-color: var(--green-700); background: var(--green-50); }

/* ---------- store cover (vendor + admin) ---------- */
.cover-preview { position: relative; width: 100%; aspect-ratio: 16 / 7; border-radius: var(--r); overflow: hidden; background: var(--surface-2); border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: var(--muted); }
.cover-preview:not(.is-empty) { border-style: solid; border-color: var(--line); }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-preview > span { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 12px; }
.cover-preview > span .i { width: 28px; height: 28px; }
.cover-preview small { font-size: 12.5px; font-weight: 650; }
.cover-card .img-btns { margin-top: 0; }
.store-cover-card { padding: 0; overflow: hidden; }
.store-cover-card .cover-preview { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); }
.store-cover-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; flex-wrap: wrap; }
.store-about { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
