/* Painel Skincare Vet — identidade visual (SPEC seção 15). Fontes hospedadas no próprio app. */
@font-face { font-family: "Oswald"; src: url("assets/fontes/oswald.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("assets/fontes/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("assets/fontes/poppins-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("assets/fontes/poppins-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Kaushan Script"; src: url("assets/fontes/kaushan-script.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F5EFE8; --surface: #FFFFFF; --surface2: #FAF5EF; --ink: #1E1713; --muted: #6B5E54;
  --accent: #E97C39; --accent-ink: #1E1713; --accent-text: #B24F14; --accent-soft: #FBE4D3;
  --no: #6B5E54; --no-soft: #ECE4DC; --no-bar: #C4B8AC;
  --line: #E6D8CA; --dash: #E9A878; --warn-soft: #FFF0D6;
  --panel: #14100D; --panel-ink: #FFFFFF; --err: #B3261E;
  --display: "Oswald", "Arial Narrow", Arial, sans-serif;
  --body: "Poppins", system-ui, "Segoe UI", Roboto, sans-serif;
  --script: "Kaushan Script", "Segoe Script", cursive;
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0D0A08; --surface: #17120F; --surface2: #1F1915; --ink: #F6EFE8; --muted: #B5A698;
    --accent: #EF8644; --accent-ink: #1A120C; --accent-text: #F29A5E; --accent-soft: #3A2314;
    --no: #B5A698; --no-soft: #2A221C; --no-bar: #5A4E44;
    --line: #32271F; --dash: #8A5530; --warn-soft: #3A2D12; --panel: #000000; --err: #FF9C94;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D0A08; --surface: #17120F; --surface2: #1F1915; --ink: #F6EFE8; --muted: #B5A698;
  --accent: #EF8644; --accent-ink: #1A120C; --accent-text: #F29A5E; --accent-soft: #3A2314;
  --no: #B5A698; --no-soft: #2A221C; --no-bar: #5A4E44;
  --line: #32271F; --dash: #8A5530; --warn-soft: #3A2D12; --panel: #000000; --err: #FF9C94;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5;
  -webkit-tap-highlight-color: transparent; padding-bottom: env(safe-area-inset-bottom, 0px); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.1; letter-spacing: .01em; }
h2 { text-transform: uppercase; }
.hidden { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Cabeçalho: sempre branco, também no modo escuro */
.top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  padding: 12px 24px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: #FFFFFF; color: #1E1713; border-bottom: 3px solid #E97C39; }
.brand { display: flex; align-items: center; gap: 18px; }
.brand img { height: 76px; width: auto; display: block; }
.brand .wm { display: flex; flex-direction: column; font-weight: 600; font-size: 17px; line-height: 1.45; letter-spacing: .26em; text-transform: uppercase; color: #4A4540; }
.brand .app { margin-top: 4px; font-family: var(--display); font-weight: 500; font-size: 16px; letter-spacing: .12em; color: #B24F14; text-transform: uppercase; }
.quem { display: flex; align-items: center; gap: 12px; color: #4A4540; font-weight: 600; }

/* Faixa de conexão */
.faixa { display: flex; align-items: center; gap: 8px; padding: 6px 24px; font-size: 14px; font-weight: 600; color: var(--muted); }
.faixa::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--no-bar); }
.faixa.ok::before { background: var(--accent); }
.faixa.erro { background: var(--warn-soft); color: var(--ink); }
.faixa.erro::before { background: var(--err); }

/* Recepção */
.rec { display: grid; grid-template-columns: 250px 1fr; gap: 20px; padding: 16px 20px 28px; max-width: 1240px; margin: 0 auto; }
.rail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 14px; align-self: start; }
.rail h2 { font-size: 20px; margin: 0 0 12px 6px; }
.passo { display: flex; gap: 12px; align-items: center; padding: 9px 8px; border-radius: var(--r-md); color: var(--muted); }
.passo .dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.passo.feito .dot { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.passo.agora { color: var(--ink); font-weight: 700; background: var(--surface2); }
.passo.agora .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.occ { margin-top: 14px; padding-top: 12px; border-top: 1.5px dashed var(--dash); }
.occ h3 { font-size: 16px; margin: 0 0 6px 6px; text-transform: uppercase; }
.ocl { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 15px; }

.palco { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px; min-height: 540px; display: flex; flex-direction: column; }
.palco h2 { font-size: 38px; margin-bottom: 6px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.campo { margin-bottom: 20px; }
label.f, .f { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.inp { width: 100%; min-height: 60px; padding: 12px 16px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface2); font-size: 19px; }
.inp:focus { border-color: var(--accent); outline: none; }
textarea.inp { min-height: 120px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 58px; padding: 0 22px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface2); font-weight: 600; font-size: 18px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip[disabled] { opacity: .45; cursor: not-allowed; }
.chip small { display: block; font-weight: 600; font-size: 14px; }
.acoes { margin-top: auto; padding-top: 22px; display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.btn { min-height: 64px; padding: 0 30px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface); font-weight: 600; font-size: 18px; }
.btn.prim { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.peq { min-height: 48px; padding: 0 18px; font-size: 16px; }
.err { color: var(--err); font-size: 15px; font-weight: 600; min-height: 22px; }
.linkbtn { background: none; border: 0; color: var(--accent-text); font-weight: 600; text-decoration: underline; padding: 6px 4px; min-height: 48px; }

/* Busca de cadastro */
.busca { background: var(--surface2); border: 1px dashed var(--dash); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 20px; }
.resultados { display: grid; gap: 8px; margin-top: 10px; }
.resultado { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; min-height: 56px; padding: 8px 14px;
  border-radius: var(--r-sm); border: 2px solid var(--line); background: var(--surface); }
.resultado b { font-family: var(--display); font-size: 20px; text-transform: uppercase; }
.selecionado { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--accent-soft); margin-bottom: 20px; font-weight: 600; }

/* Serviços */
.svc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc button { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 20px; border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface2); min-height: 150px; }
.svc button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.svc button[disabled] { opacity: .45; cursor: not-allowed; }
.svc .nm { font-family: var(--display); font-size: 27px; font-weight: 600; text-transform: uppercase; line-height: 1.1; }
.svc .pr { font-size: 22px; font-weight: 700; color: var(--accent-text); }
.svc .ds { color: var(--muted); font-size: 14px; }

/* Oferta do adicional */
.ad { flex: 1; display: flex; flex-direction: column; gap: 18px; }
.prog { display: flex; gap: 8px; }
.prog span { flex: 1; height: 10px; border-radius: 99px; background: var(--line); }
.prog span.ok { background: var(--accent); } .prog span.no { background: var(--no-bar); } .prog span.cur { background: var(--ink); }
.adcard { background: var(--panel); color: var(--panel-ink); border: 2px solid var(--accent); border-radius: var(--r-lg); padding: 24px 26px; display: grid; gap: 12px; }
.adcard .cnt { color: #CDBFB2; font-size: 14px; }
.adcard .nm { font-family: var(--display); font-size: 50px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.adcard .pr { font-family: var(--display); font-size: 32px; font-weight: 600; color: #EF8644; }
.fala { border: 1.5px dashed #E97C39; padding: 14px 18px; border-radius: var(--r-md); font-size: 18px; }
.fala small { display: block; font-family: var(--script); color: #EF8644; font-size: 20px; margin-bottom: 2px; }
.prov { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 99px; border: 1.5px dashed currentColor; font-family: var(--body); font-size: 12px; font-weight: 600; vertical-align: middle; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.yn button { min-height: 92px; border-radius: var(--r-lg); font-size: 30px; font-weight: 600; font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; border: 3px solid; }
.yn .sim { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.yn .nao { background: transparent; border-color: var(--no); color: var(--no); }

/* Caixas e resumo */
.box { background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.box h3 { font-size: 22px; margin-bottom: 10px; text-transform: uppercase; }
.box + .box { margin-top: 16px; }
.sum { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.sum .box + .box { margin-top: 0; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1.5px dashed var(--dash); }
.row:last-child { border-bottom: 0; }
.row > span:last-child { text-align: right; }
.row.muted { color: var(--muted); } .row.muted .v { text-decoration: line-through; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 2px solid var(--ink); font-family: var(--display); font-size: 32px; font-weight: 600; text-transform: uppercase; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); }
.tag.no { background: var(--no-soft); color: var(--no); }
.infobox { padding: 12px 16px; border-radius: var(--r-md); background: var(--surface2); border: 1px solid var(--line); font-weight: 600; }
.infobox.warn { background: var(--warn-soft); border-color: var(--dash); }

/* Inspeção, fotos e pertences */
.irow { padding: 12px 0; border-bottom: 1.5px dashed var(--dash); display: grid; gap: 10px; }
.irow:last-child { border-bottom: 0; }
.irow .in { font-family: var(--display); font-size: 22px; font-weight: 600; text-transform: uppercase; }
.seg { display: flex; gap: 10px; flex-wrap: wrap; }
.seg button { min-height: 56px; padding: 0 22px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface); font-weight: 600; font-size: 17px; }
.seg button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.seg button.alt[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.thumbs .th { position: relative; }
.thumbs img { height: 110px; width: auto; border-radius: var(--r-sm); display: block; border: 1px solid var(--line); }
.thumbs .th button { position: absolute; top: -10px; right: -10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--panel); color: var(--panel-ink); font-size: 22px; }
.thumbs.mini img { height: 84px; }
.thumbs .envio { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel); color: var(--panel-ink); }
.thumbs .envio.erro { background: var(--err); color: #fff; }
.camera { display: inline-flex; align-items: center; cursor: pointer; }
.cab-box { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.cab-box h3 { margin: 0; }

/* Assinatura */
.term { background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; font-size: 15px; margin-top: 16px; }
.term ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.padwrap { margin-top: 14px; border: 2px dashed var(--accent); border-radius: var(--r-md); background: #fff; overflow: hidden; }
canvas.pad { display: block; width: 100%; height: 210px; touch-action: none; cursor: crosshair; background: #fff; }
.sigmeta { margin-top: 10px; font-weight: 600; }
.padbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--panel); color: var(--panel-ink);
  border: 2px solid var(--accent); padding: 14px 22px; border-radius: 99px; font-weight: 600; z-index: 40; max-width: 92vw; text-align: center; }
.aviso-tela { max-width: 560px; margin: 60px auto; padding: 28px; text-align: center; background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); }
.aviso-tela h2 { font-size: 30px; margin-bottom: 10px; }

/* Abas (papéis com mais de uma tela) */
.abas { display: flex; gap: 6px; padding: 10px 20px 0; max-width: 1240px; margin: 0 auto; overflow-x: auto; }
.aba { border: 1px solid var(--line); background: var(--surface2); color: var(--muted); padding: 10px 20px; border-radius: 999px; font-weight: 600; min-height: 48px; white-space: nowrap; }
.aba[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--panel); color: var(--panel-ink); font-size: 13px; font-weight: 700; margin-left: 8px; }

/* Filas de banho e tosa (celular) */
.fila { max-width: 560px; margin: 0 auto; padding: 12px 12px 40px; }
.fila-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 4px 14px; }
.fila-cab h2 { font-size: 28px; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 12px; display: grid; gap: 10px; }
.qcard.pronto { opacity: .7; }
.qcard .topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qcard .pet { font-family: var(--display); font-size: 30px; font-weight: 700; text-transform: uppercase; line-height: 1.05; }
.qcard .meta { color: var(--muted); font-size: 14px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; margin: 0 6px 6px 0; }
.pill.extra { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.obs { background: var(--warn-soft); padding: 10px 12px; border-radius: var(--r-sm); font-size: 15px; }
.obs.ok { background: var(--surface2); border: 1px solid var(--line); }
.st { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.st.s0 { background: var(--no-soft); color: var(--no); }
.st.s1 { background: var(--accent); color: var(--accent-ink); }
.st.s2 { background: var(--panel); color: var(--panel-ink); }
.qcard .go { min-height: 60px; border-radius: var(--r-md); border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 18px; }
.qcard .go[disabled] { background: var(--no-soft); color: var(--no); cursor: default; }
.thumbs.mini img.grande { height: auto; max-width: 100%; }
.sec { font-size: 18px; margin: 20px 4px 10px; text-transform: uppercase; color: var(--muted); }
.vazio { text-align: center; color: var(--muted); padding: 40px 12px; }
.so-leitura { margin: 0 4px 12px; }

.mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; } .mt16 { margin-top: 16px; } .mb12 { margin-bottom: 12px; } .m0 { margin: 0; }
.w260 { max-width: 260px; } .w220 { max-width: 220px; }

@media (max-width: 900px) {
  .top { padding: 10px 14px; }
  .brand img { height: 56px; }
  .brand .wm { font-size: 12px; letter-spacing: .18em; }
  .rec { grid-template-columns: 1fr; padding: 12px; }
  .rail { display: flex; gap: 6px; overflow-x: auto; padding: 8px; }
  .rail h2, .occ { display: none; }
  .passo { flex: none; padding: 6px 8px; }
  .passo .t { display: none; }
  .passo.agora .t { display: inline; }
  .palco { padding: 18px 16px; min-height: 0; }
  .palco h2 { font-size: 30px; }
  .adcard .nm { font-size: 38px; }
  .svc { grid-template-columns: 1fr; }
  .grid2, .sum { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .yn button:active, .btn:active, .chip:active { transform: scale(.98); }
}
