/* EntregaJá — Design System */
:root {
  --brand: #EA1D2C;
  --brand-dark: #C81E2B;
  --brand-soft: #FDECEA;
  --ink: #1B1F24;
  --muted: #6B7280;
  --line: #E7E8EC;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --ok: #16A34A;
  --warn: #D97706;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 18px 50px rgba(16, 24, 40, .22);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
::selection { background: #FFD2D6; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }

/* ============ AUTH SCREEN ============ */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
@media (max-width: 960px) { .auth-screen { grid-template-columns: 1fr; } .auth-hero { display: none; } }
.auth-hero { position: relative; background: linear-gradient(160deg, #EA1D2C 0%, #B80E1D 100%); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; overflow: hidden; }
.auth-hero::before { content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%; border: 90px solid rgba(255,255,255,.07); top: -160px; right: -160px; }
.auth-hero::after { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(255,255,255,.06); bottom: -130px; left: -120px; }
.auth-brand { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; z-index: 1; }
.auth-hero h1 { font-size: 3.1rem; line-height: 1.08; letter-spacing: -.03em; margin-top: 44px; font-weight: 800; z-index: 1; }
.auth-hero h1 em { font-style: normal; color: #FFD166; }
.auth-hero p.lead { margin-top: 18px; font-size: 1.12rem; opacity: .92; max-width: 480px; z-index: 1; }
.hero-art { margin: auto 0; z-index: 1; display: flex; justify-content: center; padding: 28px 0; }
.phone-mock { width: 250px; background: #fff; border-radius: 34px; padding: 14px; box-shadow: var(--shadow-lg); color: var(--ink); animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
.phone-mock .pm-notch { width: 90px; height: 8px; background: #E5E7EB; border-radius: 99px; margin: 0 auto 12px; }
.pm-order { display: flex; align-items: center; gap: 10px; background: #F6F7F9; border-radius: 12px; padding: 10px; margin-bottom: 8px; animation: slideIn .6s both; }
.pm-order:nth-child(3) { animation-delay: .15s } .pm-order:nth-child(4) { animation-delay: .3s } .pm-order:nth-child(5) { animation-delay: .45s }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px) } to { opacity: 1; transform: none } }
.pm-emoji { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.4rem; background: #FFE3E3; }
.pm-badge { font-size: .72rem; background: #DCFCE7; color: #15803D; border-radius: 99px; padding: 3px 8px; font-weight: 700; margin-left: auto; }
.hero-stats { display: flex; gap: 34px; z-index: 1; border-top: 1px solid rgba(255,255,255,.25); padding-top: 22px; }
.hero-stats b { display: block; font-size: 1.45rem; letter-spacing: -.02em; }
.hero-stats span { font-size: .82rem; opacity: .85; }

.auth-card-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 20px; overflow-y: auto; }
.auth-card { width: 100%; max-width: 440px; }
.auth-logo-big { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.auth-logo-big span { color: var(--brand); }
.auth-sub { color: var(--muted); margin-bottom: 22px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #ECECEF; border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.auth-tabs button { padding: 10px; border-radius: 9px; font-weight: 600; color: var(--muted); transition: all .2s; }
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: #3F4650; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; transition: border .15s, box-shadow .15s; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(234,29,44,.12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.role-picker button { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 6px; text-align: center; transition: all .15s; background: #fff; }
.role-picker button .rp-emoji { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.role-picker button small { font-size: .72rem; color: var(--muted); font-weight: 600; }
.role-picker button.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(234,29,44,.12); }
.role-picker button.active small { color: var(--brand-dark); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 11px; font-weight: 700; font-size: .95rem; transition: transform .12s, box-shadow .2s, background .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(234,29,44,.35); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-success { background: var(--ok); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: .82rem; border-radius: 9px; }
.demo-accounts { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.demo-accounts p { font-size: .78rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-chips button { background: #fff; border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: .78rem; font-weight: 600; transition: all .15s; }
.demo-chips button:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.auth-error { background: #FDE8E8; color: #B91C1C; border: 1px solid #FECACA; padding: 10px 12px; border-radius: 10px; font-size: .85rem; margin-bottom: 12px; }

/* ============ APP LAYOUT ============ */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 20px; }
.logo { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo span { color: var(--brand); }
.logo-badge { font-size: .62rem; background: var(--ink); color: #fff; border-radius: 6px; padding: 2px 6px; letter-spacing: .08em; vertical-align: middle; }
.location-pill { display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 99px; padding: 7px 14px; font-size: .8rem; max-width: 260px; overflow: hidden; white-space: nowrap; }
.topbar-spacer { flex: 1; }
.streak { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; background: #FFF7E0; border: 1px solid #FDE68A; color: #B45309; padding: 6px 12px; border-radius: 99px; }
.avatar-btn { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 99px; transition: background .15s; position: relative; }
.avatar-btn:hover { background: var(--bg); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .95rem; }
.user-pop { position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 230px; border: 1px solid var(--line); overflow: hidden; z-index: 100; }
.user-pop .up-head { padding: 14px; border-bottom: 1px solid var(--line); }
.user-pop button.up-item { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 11px 14px; font-size: .88rem; font-weight: 600; }
.user-pop button.up-item:hover { background: var(--bg); }
.user-pop button.up-item.danger { color: var(--brand); }

.role-nav { max-width: 1240px; margin: 0 auto; padding: 10px 20px 0; display: flex; gap: 6px; overflow-x: auto; }
.role-nav button { padding: 10px 16px; border-radius: 12px 12px 0 0; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-size: .9rem; }
.role-nav button.active { color: var(--brand); border-color: var(--brand); background: linear-gradient(to top, var(--brand-soft), transparent 130%); }
main#view-root { max-width: 1240px; margin: 0 auto; padding: 12px 20px 110px; }

/* ============ CARDS / GRIDS ============ */
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi-card { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid #EEEFF2; position: relative; overflow: hidden; }
.kpi-card .kpi-icon { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.25rem; }
.kpi-card .kpi-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpi-card .kpi-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.kpi-card .kpi-foot { font-size: .76rem; color: var(--muted); margin-top: 4px; }
.panel { background: var(--card); border-radius: var(--radius); border: 1px solid #EEEFF2; box-shadow: var(--shadow); padding: 18px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.panel-title h2, .panel-title h3 { font-size: 1.02rem; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }

/* Search & filters */
.search-bar { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 12px 18px; box-shadow: var(--shadow); max-width: 620px; }
.search-bar input { border: none; outline: none; flex: 1; font-size: 1rem; background: transparent; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1.5px solid var(--line); background: #fff; color: #3F4650; border-radius: 99px; padding: 8px 16px; font-size: .83rem; font-weight: 600; white-space: nowrap; transition: all .15s; }
.chip.active, .chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 12px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.18rem; letter-spacing: -.01em; }
.sort-select { padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; outline: none; }

/* Restaurant cards */
.resto-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 640px) { .resto-grid { grid-template-columns: 1fr; } }
.resto-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #EEEFF2; text-align: left; transition: transform .18s, box-shadow .25s; position: relative; display: block; width: 100%; }
.resto-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.resto-art { height: 128px; display: grid; place-items: center; font-size: 3.6rem; position: relative; }
.promo-tag { position: absolute; top: 10px; left: 10px; background: var(--brand); color: #fff; font-size: .68rem; font-weight: 800; padding: 4px 10px; border-radius: 6px; letter-spacing: .03em; text-transform: uppercase; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.fav-btn { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.92); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; transition: transform .15s; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.fav-btn:hover { transform: scale(1.15); }
.closed-tag { position: absolute; bottom: 10px; left: 10px; background: rgba(20,20,20,.75); color: #fff; font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.resto-body { padding: 12px 14px 14px; }
.resto-name { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.resto-desc { color: var(--muted); font-size: .79rem; margin: 3px 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resto-meta { display: flex; gap: 10px; font-size: .78rem; color: #3F4650; flex-wrap: wrap; align-items: center; }
.rating-pill { background: #FFF4E0; color: #B45309; font-weight: 800; padding: 2px 8px; border-radius: 6px; display: inline-flex; gap: 4px; align-items: center; }
.fee-free { color: var(--ok); font-weight: 800; }

/* ============ RESTAURANT DETAIL ============ */
.resto-detail-banner { border-radius: var(--radius); padding: 26px; display: flex; gap: 22px; align-items: center; color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.resto-detail-banner .big-emoji { font-size: 4.6rem; filter: drop-shadow(0 6px 12px rgba(0,0,0,.3)); }
.menu-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-top: 18px; align-items: start; }
@media (max-width: 900px) { .menu-layout { grid-template-columns: 1fr; } .menu-cats { display: flex; overflow-x: auto; gap: 8px; position: static !important; } }
.menu-cats { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 2px; }
.menu-cats button { text-align: left; padding: 10px 12px; border-radius: 9px; font-size: .87rem; font-weight: 600; color: #3F4650; }
.menu-cats button:hover { background: var(--bg); }
.item-row { display: flex; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); align-items: center; }
.item-row:last-child { border-bottom: none; }
.item-emoji { width: 74px; height: 74px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; font-size: 2rem; flex-shrink: 0; }
.item-info { flex: 1; min-width: 0; }
.item-name { font-weight: 700; }
.item-desc { font-size: .8rem; color: var(--muted); margin: 2px 0 6px; }
.item-price { font-weight: 800; }
.popular-tag { font-size: .65rem; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; margin-left: 6px; vertical-align: 2px; }
.add-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.35rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(234,29,44,.4); flex-shrink: 0; }
.add-btn:hover { background: var(--brand-dark); }
.add-btn:disabled { background: #D1D5DB; box-shadow: none; cursor: not-allowed; }

/* ============ CART / DRAWER ============ */
.cart-fab { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--brand); color: #fff; border-radius: 99px; padding: 13px 22px; display: flex; align-items: center; gap: 14px; box-shadow: 0 12px 32px rgba(234,29,44,.45); font-weight: 800; font-size: .95rem; min-width: 300px; justify-content: space-between; transition: transform .2s; }
.cart-fab:hover { transform: translateX(-50%) translateY(-3px); }
.cart-count { background: rgba(255,255,255,.28); border-radius: 8px; padding: 2px 9px; margin-right: 8px; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(440px, 100vw); background: #fff; z-index: 80; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .3s cubic-bezier(.2,.9,.3,1); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.15rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px 20px; background: #FCFCFD; }
.close-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); font-size: 1.1rem; display: grid; place-items: center; }
.close-btn:hover { background: #E9EAEE; }
.overlay { position: fixed; inset: 0; background: rgba(17,20,24,.5); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(2px); }
.overlay.open { opacity: 1; pointer-events: auto; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qty-ctrl { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 8px; padding: 3px; }
.qty-ctrl button { width: 26px; height: 26px; border-radius: 6px; background: #fff; font-weight: 800; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.summary-row { display: flex; justify-content: space-between; font-size: .88rem; color: #3F4650; margin: 6px 0; }
.summary-row.total { font-size: 1.05rem; font-weight: 800; color: var(--ink); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; }
.summary-row .free { color: var(--ok); font-weight: 700; }
.coupon-row { display: flex; gap: 8px; margin: 10px 0; }
.coupon-row input { flex: 1; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; outline: none; text-transform: uppercase; }
.coupon-row input:focus { border-color: var(--brand); }
.coupon-ok { font-size: .8rem; color: var(--ok); font-weight: 700; margin-top: 4px; }
.coupon-err { font-size: .8rem; color: #B91C1C; margin-top: 4px; }
.pay-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0 2px; }
.pay-option { border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 8px; text-align: center; font-size: .8rem; font-weight: 600; transition: all .15s; background: #fff; }
.pay-option span { display: block; font-size: 1.35rem; margin-bottom: 4px; }
.pay-option.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }

/* ============ MODAL ============ */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,20,24,.55); }
.modal-panel { position: relative; background: #fff; border-radius: 18px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: var(--shadow-lg); transform: translateY(14px) scale(.98); transition: transform .25s; }
.modal.open .modal-panel { transform: none; }

/* Timeline */
.timeline { display: flex; flex-direction: column; margin: 14px 0; }
.tl-step { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 18px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 1.05rem; z-index: 1; border: 2px solid transparent; }
.tl-step.done .tl-icon { background: #DCFCE7; }
.tl-step.current .tl-icon { border-color: var(--brand); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(234,29,44,.35) } 50% { box-shadow: 0 0 0 6px rgba(234,29,44,.12) } }
.tl-step::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.tl-step:last-child::before { display: none; }
.tl-step.done::before { background: var(--ok); }
.tl-label { font-weight: 700; font-size: .9rem; padding-top: 8px; }
.tl-step.pending-l .tl-label { color: var(--muted); font-weight: 600; }

/* Stars */
.stars { display: flex; gap: 6px; font-size: 1.9rem; }
.stars button { transition: transform .1s; filter: grayscale(1); opacity: .35; }
.stars button.on { filter: none; opacity: 1; transform: scale(1.1); }

/* ============ KANBAN (loja) ============ */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: #EDEEEF; border-radius: var(--radius); padding: 12px; min-height: 200px; }
.kanban-col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #4B5563; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.kanban-col .count { background: #fff; border-radius: 99px; font-size: .75rem; padding: 1px 9px; }
.order-card { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.1); margin-bottom: 10px; }
.order-card .oc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.order-code { font-weight: 800; letter-spacing: .03em; }
.pay-badge { font-size: .68rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; }
.pay-badge.paid { background: #DCFCE7; color: #15803D; }
.pay-badge.pending { background: #FEF3C7; color: #B45309; }
.oc-items { font-size: .8rem; color: #3F4650; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 6px 0; margin: 8px 0; max-height: 120px; overflow: auto; }
.oc-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.oc-actions { display: flex; gap: 6px; margin-top: 8px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.data th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: #FAFAFB; }
.status-pill { font-size: .7rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; text-transform: uppercase; white-space: nowrap; }
.status-pending { background: #FEF3C7; color: #B45309; } .status-accepted { background: #DBEAFE; color: #1D4ED8; }
.status-preparing { background: #FFE4E6; color: #BE123D; } .status-ready { background: #EDE9FE; color: #6D28D9; }
.status-delivering { background: #CCFBF1; color: #0F766E; } .status-delivered { background: #DCFCE7; color: #15803D; }
.status-cancelled { background: #F3F4F6; color: #6B7280; }
.status-approved { background: #DCFCE7; color: #15803D; } .status-suspended { background: #FEE2E2; color: #B91C1C; }

/* Toggle switch */
.switch { position: relative; width: 52px; height: 30px; border-radius: 99px; background: #D1D5DB; transition: background .25s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .25s; }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(22px); }
.switch.big { width: 64px; height: 36px; } .switch.big::after { width: 30px; height: 30px; } .switch.big.on::after { transform: translateX(28px); }

/* Toast */
#toast-container { position: fixed; top: 18px; right: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: .87rem; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn .3s; max-width: 360px; }
.toast.success { background: #15803D; } .toast.error { background: #B91C1C; } .toast.info { background: #1D4ED8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) } }

/* Misc */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 44px; border-radius: 6px 6px 3px 3px; background: linear-gradient(to top, var(--brand), #FF6B5E); transition: height .5s; min-height: 3px; }
.bar-label { font-size: .68rem; color: var(--muted); font-weight: 700; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state .es-emoji { font-size: 3rem; margin-bottom: 10px; }
.spinner { width: 34px; height: 34px; border: 3px solid #E5E7EB; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg) } }
.item-admin-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; }
.inline-note { font-size: .78rem; background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.demo-note { font-size: .75rem; background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; border-radius: 10px; padding: 9px 12px; margin-top: 8px; }
.map-canvas { background: linear-gradient(#E8F0E9, #DCE8DE); border-radius: 12px; overflow: hidden; border: 1px solid #CBD8CC; }
.earn-hero { background: linear-gradient(150deg, #111827, #1F2937); color: #fff; border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden; }
.earn-hero::after { content: '🛵'; position: absolute; font-size: 5rem; right: 14px; top: 8px; opacity: .25; }
.earn-amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; }
.qr-box { background: #fff; border: 2px dashed var(--line); border-radius: 12px; padding: 16px; text-align: center; margin: 12px 0; }
.pix-copy { display: flex; gap: 8px; margin-top: 10px; }
.pix-copy code { flex: 1; font-size: .68rem; background: var(--bg); border-radius: 8px; padding: 8px; word-break: break-all; text-align: left; }
@media (max-width: 760px) {
  .topbar-inner { gap: 8px; padding: 10px 12px; } .logo { font-size: 1.1rem; } .location-pill, .streak { display: none; }
  main#view-root { padding: 10px 12px 120px; } .kpi-card .kpi-value { font-size: 1.25rem; }
  .auth-hero h1 { font-size: 2.2rem; }
}
