/* Igual ao cadastro pelo Wi-Fi (core/services/mobile_page.py). */
:root {
  --bg: #F4F1EB; --card: #FFFFFF; --soft: #F5F2EC; --text: #17181B;
  --muted: #686C75; --line: #E5DFD5; --gold: #C9A267; --gold-dark: #98713B;
  --gold-light: #F1E4D0; --ok: #279666; --ok-light: #E5F4ED; --err: #CF5861;
  --err-light: #F9E5E7; --dark: #17181B;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
header { background: var(--dark); color: #fff; padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; }
header .marca { margin: 0; }
header h1 { font-size: 16px; margin: 0; font-weight: 700; }
header small { display: block; color: #B9B2A6; font-size: 12px; font-weight: 400; }
main { padding: 14px 14px 210px; max-width: 560px; margin: 0 auto; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; margin-bottom: 12px; }
h2 { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
h2 .step { background: var(--gold-light); color: var(--gold-dark); border-radius: 999px;
  padding: 2px 9px; font-size: 11px; }
.photo { position: relative; border: 2px dashed var(--line); border-radius: 14px;
  min-height: 180px; display: grid; place-items: center; overflow: hidden; background: var(--soft); }
.photo img { width: 100%; max-height: 360px; object-fit: contain; display: block; }
.photo .empty { text-align: center; color: var(--muted); padding: 20px; }
.photo .empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.photo input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.row { display: flex; gap: 8px; margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--soft); color: var(--text);
  border-radius: 999px; padding: 10px 14px; font-size: 15px; }
.chip.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft);
  border-radius: 12px; padding: 4px; margin-bottom: 10px; }
.tabs button { border: 0; background: transparent; padding: 10px; border-radius: 9px;
  font-size: 15px; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--text); font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.size { display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid var(--soft); }
.size:last-child { border-bottom: 0; }
.size .label { font-size: 18px; font-weight: 700; width: 56px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--soft); font-size: 24px; color: var(--text); }
.stepper input { width: 60px; height: 46px; text-align: center; font-size: 20px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); }
.size.has .stepper input { border-color: var(--gold); background: var(--gold-light); }
.money { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.money label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.money .field { display: flex; align-items: center; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; padding: 0 12px; }
.money .field span { color: var(--muted); font-size: 15px; }
.money input { border: 0; outline: 0; width: 100%; padding: 13px 6px; font-size: 20px;
  font-weight: 700; background: transparent; color: var(--text); }
.margin { margin-top: 10px; font-size: 14px; color: var(--muted); min-height: 18px; }
.margin b { color: var(--ok); }
.margin b.bad { color: var(--err); }
footer { position: fixed; left: 0; right: 0; bottom: calc(57px + env(safe-area-inset-bottom)); background: rgba(244,241,235,.96);
  border-top: 1px solid var(--line); padding: 10px 14px; z-index: 4; }
footer .wrap { max-width: 560px; margin: 0 auto; }
footer .summary { font-size: 13px; color: var(--muted); margin-bottom: 8px; text-align: center; }
.primary { width: 100%; border: 0; border-radius: 14px; padding: 16px; font-size: 18px; font-weight: 800;
  background: var(--gold); color: var(--dark); }
.primary:disabled { background: #DCD5C9; color: #9A9DA4; }
.secondary { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 14px;
  font-size: 15px; color: var(--text); flex: 1; }
.toast { border-radius: 14px; padding: 14px; margin-bottom: 12px; font-size: 15px; display: none; }
.toast.ok { display: block; background: var(--ok-light); color: #14583A; border: 1px solid #BFE3D1; }
.toast.err { display: block; background: var(--err-light); color: #8C2B33; border: 1px solid #F0C3C7; }
.toast b { display: block; font-size: 17px; margin-bottom: 2px; }
.toast code { font-size: 13px; }
.history { font-size: 14px; color: var(--muted); }
.history div { padding: 8px 0; border-bottom: 1px solid var(--soft); display: flex; justify-content: space-between; }
.history div:last-child { border-bottom: 0; }
[hidden] { display: none !important; }
.photo::after { content: ""; position: absolute; inset: 9% 12%; border: 2px dashed rgba(201,162,103,.55);
  border-radius: 12px; pointer-events: none; }
.photo.has::after { display: none; }
  background: var(--gold-light); border-radius: 12px; font-size: 13px; color: var(--muted); }
.tips { margin: 10px 0 0; padding-left: 20px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.toast span { display: block; }
.history div { gap: 12px; align-items: baseline; }
.history span { min-width: 0; overflow-wrap: anywhere; }
.history code { display: block; font-size: 12px; overflow-wrap: anywhere; }
.history small { flex: none; max-width: 45%; text-align: right; }
.estado-gravado small { color: var(--ok); }
.estado-recusado small { color: var(--err); }
.link { border: 0; background: none; color: var(--err); text-decoration: underline; font-size: 14px; min-height: 44px; }
.size .label { min-width: 56px; width: auto; }
:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 2px; }
#menu { position: fixed; inset: auto 0 0; z-index: 5; display: flex; background: #fff; border-top: 1px solid var(--gold-light);
  padding-bottom: env(safe-area-inset-bottom); }
#menu a { flex: 1; min-width: 0; min-height: 56px; display: grid; place-items: center; color: #6B6459; text-decoration: none;
  font-weight: 600; border-top: 3px solid transparent; }
#menu a[aria-current] { color: var(--gold-dark); border-top-color: var(--gold); }

/* marca: toque volta ao início */
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin: 0 0 10px; -webkit-tap-highlight-color: transparent; }
.selo { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, #F8EBCF 0%, #C9A267 52%, #8A6532 100%);
  color: #17181B; font: italic 700 21px/1 Georgia, "Times New Roman", serif; padding-right: 2px;
  box-shadow: 0 0 0 2px rgba(201, 162, 103, .35), 0 3px 8px rgba(0, 0, 0, .45); transition: transform .12s; }
.nomeMarca { display: inline-flex; align-items: baseline; gap: 6px; font: 600 17px/1 Georgia, "Times New Roman", serif;
  color: #F1E4D0; letter-spacing: .03em; }
.nomeMarca b { font: 700 10px/1 system-ui, sans-serif; letter-spacing: .34em; color: #C9A267; }
.marca:active .selo { transform: scale(.92); }
