/* Quantotá: app de uma coluna, estilo celular, abas fixas embaixo.
   Etiqueta de preço amarela como acento, verde-feira como cor da marca. */
:root {
  --bg: #f3f4ef;
  --surface: #ffffff;
  --ink: #17251f;
  --muted: #5d6b64;
  --line: #dde2da;
  --accent: #f6c445;
  --accent-ink: #2b2100;
  --brand: #1f5c46;
  --on-brand: #ffffff;
  --good: #23824f;
  --warn: #9a6512;
  --bad: #c2412d;
  --good-bg: #e3f3e8;
  --warn-bg: #fbf0d9;
  --bad-bg: #fbe5e0;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111814; --surface: #1a231e; --ink: #e9eee9; --muted: #9aa8a0; --line: #2c3832;
    --brand: #6fc39a; --on-brand: #0d1a13;
    --good: #6fd096; --warn: #e8b357; --bad: #f08a76;
    --good-bg: #1d3426; --warn-bg: #3a2f17; --bad-bg: #3d211b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111814; --surface: #1a231e; --ink: #e9eee9; --muted: #9aa8a0; --line: #2c3832;
  --brand: #6fc39a; --on-brand: #0d1a13;
  --good: #6fd096; --warn: #e8b357; --bad: #f08a76;
  --good-bg: #1d3426; --warn-bg: #3a2f17; --bad-bg: #3d211b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.45; }
.app { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding-bottom: 92px; }
header { padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-family: var(--font-display); font-weight: 800; font-size: 28px; margin: 0; letter-spacing: -0.02em; }
.brand h1 span { color: var(--brand); }
.tag-icon { width: 30px; height: 30px; flex: none; }
.sub { color: var(--muted); font-size: 14px; margin: 0; }
main { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 16px; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin: 0; text-wrap: balance; }
p { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.price { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 14px; background: var(--warn-bg); border: 1px solid var(--line); }
.notice.info { background: var(--surface); }
.notice.demo { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
a { color: var(--brand); }

.search { position: relative; }
input, select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 10px; padding: 11px 12px; min-height: 46px; width: 100%;
}
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; flex: none; margin: 2px 0 0; accent-color: var(--brand); }
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); z-index: 5; overflow: hidden; }
.suggest button { display: flex; width: 100%; justify-content: space-between; gap: 8px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 12px 14px; font: inherit; color: var(--ink); cursor: pointer; }
.suggest button:last-child { border-bottom: 0; }
.suggest button:hover { background: var(--bg); }

.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 11px 16px; min-height: 46px; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-align: center; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 160px; }
.linkbtn { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px; }
.right { margin-left: auto; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 6px 12px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sum-box { border-radius: 12px; padding: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.sum-box.best { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sum-box .label { font-size: 13px; font-weight: 600; }
.sum-box .big { font-family: var(--font-display); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sum-box .hint { font-size: 13px; }
@media (max-width: 400px) { .summary { grid-template-columns: 1fr; } }

.items { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.item-top { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 14px 10px; }
.item-name { font-weight: 600; }
.item-where { font-size: 14px; color: var(--muted); }
.item-where strong { color: var(--ink); }
.item-price { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; }
.item-price .price { font-size: 20px; }
.item-pend { padding: 0 14px 10px; }
.item-actions { display: flex; align-items: center; gap: 8px; padding: 0 14px 12px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.plain { background: var(--bg); color: var(--muted); }
details { border-top: 1px solid var(--line); }
summary { cursor: pointer; padding: 10px 14px; font-size: 14px; color: var(--brand); font-weight: 600; }
.offers { list-style: none; margin: 0; padding: 0 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.offers li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; align-items: baseline; }
.offers li .m { flex: 1; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }

.pending { display: flex; flex-direction: column; gap: 6px; font-size: 13px; background: var(--warn-bg); border-radius: 10px; padding: 8px 10px; }
.progress { display: block; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--warn); border-radius: 99px; }
.ask .progress > span { background: var(--brand); }

.ask { border: 2px solid var(--accent); }
.ask .q { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.25; text-wrap: balance; }
.ask .q .price { background: var(--accent); color: var(--accent-ink); padding: 0 6px; border-radius: 6px; }
.ask-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.queue li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

form { display: flex; flex-direction: column; gap: 12px; }
label { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.mkt { display: flex; justify-content: space-between; gap: 10px; align-items: center; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.steps .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 2px solid var(--line); color: var(--muted); flex: none; }
.steps li.ok .dot { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.steps li.now .dot { border-color: var(--brand); color: var(--brand); }
.steps li.ok span:last-child { color: var(--muted); }
.badge-ok { display: inline-flex; align-items: center; gap: 6px; background: var(--good-bg); color: var(--good); font-weight: 700; font-size: 13px; border-radius: 99px; padding: 4px 10px; align-self: flex-start; }

nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
nav.tabs .inner { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; max-width: 560px; }
nav.tabs button { border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 10px 2px 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; position: relative; }
nav.tabs button svg { width: 22px; height: 22px; }
nav.tabs button[aria-current="page"] { color: var(--brand); }
nav.tabs button[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--bad); color: #fff; border-radius: 99px; font-size: 10px; padding: 1px 5px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 20; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: up .2s ease-out; } @keyframes up { from { transform: translate(-50%, 8px); opacity: .6; } } }
.photo-box { display: flex; flex-direction: column; gap: 12px; }
.photo-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-pick label.btn { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
.photo-pick label.btn svg { width: 22px; height: 22px; flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.preview { width: 100%; max-height: 320px; object-fit: contain; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.reading { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); flex: none; }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } }
.rev { display: flex; flex-direction: column; gap: 10px; }
.rev-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: start; }
.rev-item.off { opacity: .55; }
.rev-item .fields { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rev-item .fields input[data-input=rpreco] { max-width: 150px; font-variant-numeric: tabular-nums; font-weight: 700; }
.rev-item .fields input { min-height: 42px; padding: 8px 10px; }
.rev-item .meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); flex: none; background: var(--bg); }
.evid { display: flex; gap: 12px; align-items: center; }
.evid a { display: block; }
.config-row { display: flex; gap: 10px; align-items: flex-end; }
.config-row label { flex: 1; }
.chip.foto { background: var(--accent); color: var(--accent-ink); }
