﻿/* Painel administrativo */
body.admin { background: var(--bg); }
.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.side { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; background: var(--surface); }
.side .store { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.side .store img, .side .store .logo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--soft); display: grid; place-items: center; font-weight: 700; flex: none; }
.side .store b { display: block; font-size: 15px; line-height: 1.2; }
.side .store select { border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 0; margin-left: -2px; max-width: 160px; cursor: pointer; }
.nav a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav a .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 12px; display: grid; place-items: center; }
.nav a:not([aria-current="page"]) .badge { background: var(--ink); color: #fff; }
.side .foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.side .foot a, .side .foot button { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 14px; text-align: left; }
.side .foot a:hover, .side .foot button:hover { background: var(--bg); color: var(--ink); }
.main { padding: 28px 36px 80px; max-width: 1080px; width: 100%; }
.page-h { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-h h1 { font-size: 24px; margin: 0; letter-spacing: -.02em; flex: 1; }
.page-h p { flex-basis: 100%; margin: -6px 0 0; color: var(--muted); }
.pill.sm { height: 40px; padding: 0 18px; font-size: 14px; }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .store { padding: 0 8px 0 0; }
  .nav { display: flex; gap: 4px; overflow-x: auto; width: 100%; order: 3; }
  .nav a { white-space: nowrap; height: 38px; }
  .side .foot { display: none; }
  .main { padding: 20px 16px 80px; }
}

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.panel h2 { font-size: 17px; margin: 0 0 4px; }
.panel > p.sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.field select { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 13px 16px; outline: 0; font: inherit; }
/* só a chave liga/desliga: clicar no texto ou no espaço vazio da linha não muda nada */
.switch { display: flex; align-items: center; gap: 12px; margin-top: 14px; cursor: default; user-select: none; pointer-events: none; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #d8d4cc; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; pointer-events: auto; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(18px); }
.switch small { display: block; color: var(--muted); font-size: 13px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:disabled { opacity: .25; }

/* Cardápio */
.cat-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.cat-block > header { display: flex; align-items: center; gap: 8px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--line); }
.cat-block > header h2 { margin: 0; font-size: 16px; flex: 1; }
.cat-block.off > header h2 { color: var(--muted); }
.prod { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.prod:last-child { border-bottom: 0; }
.prod .th { width: 52px; height: 52px; border-radius: 14px; background: var(--soft); overflow: hidden; flex: none; }
.prod .th img { width: 100%; height: 100%; object-fit: cover; }
.prod .t { flex: 1; min-width: 0; cursor: pointer; }
.prod .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod .t span { color: var(--muted); font-size: 13px; }
.prod.off .t b { color: var(--muted); }
.pdv { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pdv.miss { border-color: #e9b8b1; color: #a2321f; background: #fdf3f1; }
.stat { font-size: 12.5px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.stat svg { width: 14px; height: 14px; }
.mini-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.mini-switch input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: #d8d4cc; position: relative; cursor: pointer; margin: 0; }
.mini-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.mini-switch input:checked { background: var(--ink); }
.mini-switch input:checked::after { transform: translateX(14px); }
@media (max-width: 700px) { .prod .stat, .prod .ord { display: none; } }

/* Editor (gaveta lateral) */
.drawer-bg { position: fixed; inset: 0; z-index: 60; background: rgba(15,15,15,.35); }
.drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--surface); display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.08); }
.drawer > header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer > header h2 { flex: 1; margin: 0; font-size: 18px; }
.drawer .body { flex: 1; overflow-y: auto; padding: 6px 24px 30px; }
.drawer > footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.drawer > footer .left { margin-right: auto; }
.sec-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 28px 0 4px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 12px; }
.mcell { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--soft); }
.mcell img { width: 100%; height: 100%; object-fit: cover; }
.mcell .kind { position: absolute; left: 8px; top: 8px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.5); color: #fff; }
.mcell .acts { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 6px; }
.mcell .acts button { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--ink); }
.mcell .acts svg { width: 15px; height: 15px; }
.mcell.uploading { display: grid; place-items: center; text-align: center; font-size: 12.5px; color: var(--muted); padding: 10px; }
.mcell.uploading .bar { width: 70%; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; overflow: hidden; }
.mcell.uploading .bar i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .2s; }
.drop { border: 1.5px dashed #cfcac1; border-radius: 16px; aspect-ratio: 9 / 16; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; padding: 10px; }
.drop:hover, .drop.over { border-color: var(--ink); color: var(--ink); }
.ogroup { border: 1px solid var(--line); border-radius: 18px; padding: 6px 14px 12px; margin-top: 12px; }
.ogroup .gh { display: grid; grid-template-columns: 1fr 74px 74px 36px; gap: 8px; align-items: end; }
.ogroup .gh2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ogroup select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; outline: 0; font: inherit; font-size: 14px; background: var(--surface); }
.orow { display: grid; grid-template-columns: 1fr 100px 90px 44px 36px; gap: 8px; align-items: center; margin-top: 8px; }
.orow.off { opacity: .45; }
.ogroup input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; outline: 0; font: inherit; font-size: 14px; background: var(--surface); }
.ogroup input:focus { border-color: var(--ink); }
.ogroup label span { font-size: 12px; color: var(--muted); display: block; margin: 8px 0 4px; }
.olabels { display: grid; grid-template-columns: 1fr 100px 90px 44px 36px; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.linkbtn { color: var(--ink); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 0; }
.linkbtn svg { width: 16px; height: 16px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* Pedidos */
.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; }
.ocard.pending { border-color: var(--ink); }
.ocard .top { display: flex; align-items: baseline; gap: 10px; }
.ocard .top b { font-size: 22px; letter-spacing: -.02em; }
.ocard .top .where { font-weight: 600; }
.ocard .top time { margin-left: auto; color: var(--muted); font-size: 13px; }
.ocard .who { color: var(--muted); font-size: 13.5px; margin: 2px 0 10px; }
.ocard ul { list-style: none; margin: 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.ocard li { padding: 3px 0; }
.ocard li small { display: block; color: var(--muted); padding-left: 22px; font-size: 13px; }
.ocard .tot { display: flex; justify-content: space-between; font-weight: 600; padding: 10px 0; }
.ocard .acts { display: flex; gap: 8px; margin-top: auto; }
.ocard .acts .pill { flex: 1; height: 42px; font-size: 14px; }
.st { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.st.pending { background: var(--ink); color: #fff; border-color: var(--ink); }
.st.cancelled { color: #a2321f; }
.seg.inline { display: inline-flex; margin: 0; }
.seg.inline button { padding: 0 18px; height: 38px; flex: none; }

/* Mesas */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.qr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; position: relative; }
.qr img { width: 100%; aspect-ratio: 1; }
.qr b { display: block; font-size: 17px; margin-top: 6px; }
.qr small { display: block; color: var(--muted); font-size: 11.5px; word-break: break-all; margin-top: 2px; }
.qr .del { position: absolute; top: 6px; right: 6px; }
.copy { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.copy span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
pre.code { background: #151515; color: #e8e6e1; border-radius: 16px; padding: 16px 18px; font-size: 12.5px; overflow-x: auto; line-height: 1.55; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi b { display: block; font-size: 24px; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #bbb; margin-right: 6px; }
.dot.on { background: #2f8f4e; }

.pay-tag { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.pay-tag.paid { color: #1f6b3a; }
.pay-tag.awaiting { color: #8a6a12; }
.ocard.awaiting_payment { opacity: .7; }

/* Relatórios */
.rep-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.rep-filters .seg, .rep-tabs { overflow-x: auto; max-width: 100%; }
.rep-custom { display: flex; align-items: center; gap: 8px; }
.rep-custom[hidden] { display: none; }
#rep .kpis { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.rep-custom input { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; background: var(--surface); }
.rep-tabs { margin: 0 0 16px; }
.rep-tabs button { white-space: nowrap; }
.rep-note { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.kpi small { display: block; font-size: 12.5px; margin-top: 2px; }
.panel-h { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.panel-h h2 { flex: 1; margin: 0; }
.rep-2 { gap: 0 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .rep-2 { grid-template-columns: minmax(0, 1fr); } }
.rep-2 .panel { margin-bottom: 18px; }

.chart { position: relative; padding: 22px 0 0; }
.chart.empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 14px; }
.ch-max { position: absolute; top: 0; left: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-bars { display: flex; align-items: flex-end; gap: 2px; height: 180px; border-top: 1px dashed var(--line); border-bottom: 1px solid #cfcac1; }
.ch-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; cursor: default; }
.ch-col i { display: block; background: var(--ink); opacity: .82; border-radius: 4px 4px 0 0; min-height: 0; transition: opacity .12s; }
.ch-col:hover i, .ch-col.on i { opacity: 1; }
.ch-bars:hover .ch-col:not(:hover):not(.on) i { opacity: .45; }
.ch-col span { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart { padding-bottom: 22px; }
.ch-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.45; padding: 7px 11px; border-radius: 10px; pointer-events: none; white-space: nowrap; z-index: 2; }

.share-row { display: grid; grid-template-columns: 90px 1fr auto; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.share-row:last-child { border-bottom: 0; }
.share-row span { font-weight: 500; }
.share-row b { font-variant-numeric: tabular-nums; }
.share-row small { grid-column: 3; color: var(--muted); font-size: 12px; text-align: right; }
.share-bar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.share-bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }

.abc { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-weight: 700; font-size: 13px; border: 1px solid var(--line); }
.abc-A { background: var(--ink); color: #fff; border-color: var(--ink); }
.abc-B { background: #d8d4cc; color: var(--ink); border-color: #d8d4cc; }
.abc-C { background: var(--surface); color: var(--muted); }
.abc-tile span { display: flex; align-items: center; gap: 8px; }
.cum { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.cum .share-bar { width: 70px; }
.tbl.num-r td:not(:first-child):not(:nth-child(2)), .tbl.num-r th:not(:first-child):not(:nth-child(2)) { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.sortable td:nth-child(2), .tbl.sortable th:nth-child(2) { text-align: right; }
.tbl th[data-sort] { cursor: pointer; user-select: none; }
.tbl.sortable td:first-child { min-width: 170px; }
.tbl.sortable th, .tbl.sortable td { padding-left: 8px; padding-right: 8px; }
.tbl th.sorted { color: var(--ink); }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl td.items { color: var(--muted); font-size: 13px; max-width: 280px; }
.tbl tr.off td { color: var(--muted); }
.tbl tr.off td b { text-decoration: line-through; }

.rank ol { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: r; }
.rank li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 90px auto; gap: 10px; align-items: center; padding: 7px 0; counter-increment: r; }
.rank li::before { content: counter(r); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.rank li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank li b { font-variant-numeric: tabular-nums; font-size: 14px; min-width: 54px; text-align: right; }
@media (max-width: 640px) { .rank li { grid-template-columns: 22px minmax(0, 1fr) auto; } .rank li .share-bar { display: none; } }

/* Horário e entrega */
.hora-row { display: grid; grid-template-columns: 90px 110px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hora-row:last-child { border-bottom: 0; }
.turnos { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.turno { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13.5px; }
.turno input { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font: inherit; color: var(--ink); }
.zn-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 110px 52px 36px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.zn-row input[data-f] { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; width: 100%; }
.zn-row.off input[data-f="name"] { color: var(--muted); }
.zn-row > input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); }
.zn-h { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .hora-row { grid-template-columns: 1fr auto; } .hora-row .turnos { grid-column: 1 / -1; } }

/* Disponibilidade */
.av-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.av-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.av-row > input { width: 18px; height: 18px; accent-color: var(--ink); }
.st.av-paused { background: #fdf3f1; border-color: #e9b8b1; color: #a2321f; }

/* Importação do cardápio do iComanda */
.import-banner { border-color: var(--ink); }
.imp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.imp-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.imp-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.imp-price s { color: var(--muted); font-size: 12.5px; }
.st.imp-novo { background: var(--ink); color: #fff; border-color: var(--ink); }
.st.imp-igual { color: var(--muted); }

/* Plataforma */
.charge-pix { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; margin: 10px 0 6px; }
.charge-pix img { width: 150px; height: 150px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.charge-pix > div { min-width: 0; }
.linkbtn[hidden] { display: none; }
.charge .copy { min-width: 0; }
@media (max-width: 520px) { .charge-pix { grid-template-columns: minmax(0, 1fr); } }
.banner { border-radius: 16px; padding: 12px 18px; margin-bottom: 18px; font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.banner.pending, .banner.trial { background: #f6f3ea; border-color: #e6dcc2; }
.banner.suspended, .banner.cancelled { background: #fdf3f1; border-color: #e9b8b1; color: #7a2617; }
.tbl-wrap { overflow-x: auto; margin: 6px -6px 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.st-active { background: #eaf5ee; border-color: #bfe0ca; color: #1f6b3a; }
.st-trial { background: #f6f3ea; border-color: #e6dcc2; }
.st-pending { background: var(--ink); color: #fff; border-color: var(--ink); }
.st-suspended, .st-cancelled { background: #fdf3f1; border-color: #e9b8b1; color: #a2321f; }

/* Login */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.auth form { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 30px 28px; }
.auth h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.auth .pill { margin-top: 22px; }
.auth .alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth .alt button { color: var(--ink); font-weight: 600; }

@media print {
  body.admin * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; }
  .print-area .qr { break-inside: avoid; border: 1px solid #ccc; }
  .print-area .del { display: none; }
}

/* ---------- Entregadores ---------- */
.addr-line { font-size: 13.5px; margin: -4px 0 10px; padding-left: 22px; text-indent: -22px; }
.addr-line .i { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.courier-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; margin: -4px 0 10px; }
.courier-line .i { width: 16px; height: 16px; flex: none; }
.courier-line .pill.sm { margin-left: auto; }
.courier-line .linkbtn { margin: 0 0 0 4px; }
.map-panel { padding: 0; overflow: hidden; }
.cmap { isolation: isolate; z-index: 0; height: 360px; background: var(--soft); }
.cmap-hint { padding: 10px 16px; margin: 0; }
.couriers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ccard.off { opacity: .55; }
.ccard .top { display: flex; align-items: center; gap: 4px; }
.ccard .top .muted { margin-left: auto; font-size: 12.5px; }
.ccard .c-orders { display: flex; flex-wrap: wrap; gap: 6px; }
.ccard .c-orders .chip { height: 28px; font-size: 12.5px; }
.ccard .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.disp-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.disp-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font: inherit; cursor: pointer; }
.disp-row:hover, .disp-row[aria-current="true"] { border-color: var(--ink); }
.disp-row span { flex: 1; }
.disp-row small { display: block; color: var(--muted); font-size: 12.5px; }
.qr-box { display: grid; place-items: center; padding: 16px; margin: 12px 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 13px; }

/* Fechado para reforma */
.closed-panel.is-closed { border-color: #c9473a; background: #fdf1ef; }
.closed-panel.is-closed .switch input:checked { background: #c9473a; }
.traccar { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.traccar h3 { margin: 0; font-size: 15px; }
.traccar ol { margin: 10px 0 0; padding-left: 20px; font-size: 13.5px; display: flex; flex-direction: column; gap: 10px; }
.traccar .copy-row { margin-top: 4px; }

/* ---------- Listas longas: paginação e filtros (padrão de todas as telas) ---------- */
.pager { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 14px; font-size: 13.5px; }
.pager .pg-size { display: inline-flex; align-items: center; gap: 6px; }
.pager select { border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 13.5px; background: var(--surface); }
.pg-btns { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.pg-btns button { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; display: inline-grid; place-items: center; }
.pg-btns button:hover:not(:disabled) { border-color: var(--ink); }
.pg-btns button[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pg-btns button:disabled { opacity: .35; cursor: default; }
.pg-btns button .i { width: 16px; height: 16px; }
.pg-gap { color: var(--muted); padding: 0 2px; }
.list-filters, .hist-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 12px; }
.hist-filters { margin: 0 0 8px; }
.list-search { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: 14px; background: var(--surface); }
.list-filters select { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 14px; background: var(--surface); }
.period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.period-bar .seg { overflow-x: auto; max-width: 100%; }
.period-bar input[type="date"] { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; background: var(--surface); }
.hist-pager .pager { margin: 6px 0 24px; }
.older-note { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 13.5px; }
.older-note .linkbtn { margin: 0 0 0 4px; }
.wa-link { display: inline-flex; align-items: center; gap: 4px; color: #1f8f4e; font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: 999px; padding: 1px 8px 1px 6px; background: #e8f6ee; }
.wa-link:hover { background: #d3efdf; }
.wa-link .i.wa { width: 15px; height: 15px; }

/* ---------- Design do site ---------- */
.design-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-top: 6px; }
@media (max-width: 760px) { .design-grid { grid-template-columns: minmax(0, 1fr); } }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type="color"] { width: 64px; height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.color-row code { font-size: 13px; color: var(--muted); }
.bg-presets { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.bg-sw { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #cfcac2; cursor: pointer; padding: 0; position: relative; }
.bg-sw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.bg-sw.custom { background: conic-gradient(#e55, #ec5, #5c5, #5ce, #55e, #e5e, #e55); display: grid; place-items: center; overflow: hidden; }
.bg-sw.custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.bg-hint { display: block; margin-top: 6px; }
.design-prev { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--p-bg); color: var(--p-ink); }
.dp-banner { height: 84px; background: rgba(127,127,127,.18); display: grid; place-items: center; color: var(--p-muted); font-size: 12px; }
.dp-banner img { width: 100%; height: 100%; object-fit: cover; }
.dp-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.dp-card { display: flex; gap: 10px; align-items: center; background: var(--p-surface); border-radius: 14px; padding: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.dp-card > div { flex: 1; min-width: 0; }
.dp-card b { display: block; font-size: 13.5px; }
.dp-card small { display: block; color: var(--p-muted); font-size: 11.5px; }
.dp-card em { display: block; font-style: normal; font-size: 10.5px; color: var(--p-muted); margin-top: 4px; }
.dp-card em i { font-style: normal; font-weight: 700; font-size: 14px; color: var(--p-price); }
.dp-img { width: 54px; height: 44px; border-radius: 10px; background: rgba(127,127,127,.25); flex: none; }
.dp-btn { align-self: stretch; text-align: center; padding: 11px; border-radius: 999px; background: var(--p-accent); color: var(--p-on-accent); font-weight: 600; font-size: 13.5px; }
.banner-box { border: 1px dashed var(--line); border-radius: 16px; overflow: hidden; background: var(--bg); min-height: 64px; display: grid; place-items: center; }
.banner-box img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.banner-box p { padding: 14px; margin: 0; font-size: 13.5px; }
