/* ============================================================================
   AM LAB v2 — sistema visual (estética nova sobre as funções do portal)
   Segue o livro de marca: Void + Porcelana, dentina só em detalhe, Jost + Plex Mono.
   ========================================================================== */
@font-face { font-family: "Jost"; font-weight: 300; font-display: swap; src: url(fonts/jost-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url(fonts/jost-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-display: swap; src: url(fonts/jost-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 600; font-display: swap; src: url(fonts/jost-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --bg: #f7f6f2; --surface: #ffffff; --ink: #17181a; --ink-2: #4a4b4f; --mute: #707176; --line: #e4e2dc; --line-2: #d3d0c8;
  --graf: #17181a; --on-graf: #f2f1ec; --on-graf-dim: #a6a7a2;
  --acc: #138a52; --acc-soft: #e3f3ea; --acc-ink: #0d5c37; --brand: #128a50; --brand-hi: #2fae6e;
  --warn: #8a5a12; --warn-soft: #f6eedd; --bad: #9b2d22; --bad-soft: #f6e3df;
  --f: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif; --mono: "Plex Mono", ui-monospace, Consolas, monospace; --serif: "Jost", sans-serif;
  --r: 10px; --r-lg: 16px; --topo: 64px;
  color-scheme: light;
}
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; scroll-padding-bottom: 110px }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--f); -webkit-font-smoothing: antialiased }
button, input, select, textarea { font: inherit; color: inherit }
a { color: inherit }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: -.02em }
p { margin: 0 }
em.s { font-style: normal; font-weight: 300 }
.rot { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute) }
.mono { font-family: var(--mono) }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px }
[hidden] { display: none !important }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 500; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap }
.btn:active { transform: scale(.96) }
.btn-pri { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -12px var(--brand) }
.btn-pri:hover { background: var(--acc-ink) }
.btn-sec { background: transparent; border-color: var(--line-2); color: var(--ink) }
.btn-sec:hover { border-color: var(--ink) }
.btn-txt { background: none; border: 0; color: var(--ink-2); padding: 0 6px; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer }
.btn[disabled] { opacity: .4; cursor: not-allowed }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.05rem }

/* cabeçalho */
.topo { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) }
.topo .wrap { display: flex; align-items: center; gap: 18px; min-height: var(--topo) }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink) }
.logo img { height: 22px; width: auto }
.logo span { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute) }
.topo nav { display: flex; gap: 4px; margin-left: 12px }
.topo nav a { text-decoration: none; color: var(--ink-2); padding: 8px 10px; border-radius: 8px; font-size: .95rem }
.topo nav a:hover, .topo nav a[aria-current="page"] { color: var(--ink); background: var(--line) }
.topo .acoes { margin-left: auto; display: flex; gap: 10px; align-items: center }
.quem { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .92rem }
.quem i { width: 30px; height: 30px; border-radius: 50%; background: var(--graf); color: var(--on-graf); display: grid; place-items: center; font-style: normal; font-size: .75rem; font-weight: 600 }
@media (max-width: 860px) { .topo nav, .logo span, .quem b { display: none } }

/* campos */
.campo { width: 100%; min-height: 50px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r); padding: 12px 14px; font-size: 1rem }
.campo:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: var(--acc) }
textarea.campo { min-height: 96px; resize: vertical }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: .92rem; min-height: 38px }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.nota { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font-size: .9rem }
.nota::before { content: "i"; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: .7rem; font-weight: 600; font-family: var(--mono); margin-top: 2px }
.erro { color: var(--bad); font-size: .9rem; margin-top: 8px }
.aviso-modo { position: fixed; left: 12px; bottom: 84px; z-index: 60; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; background: #2b2215; color: #f4e7cc; padding: 5px 10px; border-radius: 999px; pointer-events: none; opacity: .9 }
/* no celular o selo cobria texto e botões: vira um ponto discreto no canto */
@media (max-width: 760px) { body .aviso-modo { left: 8px; bottom: auto !important; top: 8px; font-size: 0 !important; padding: 0 !important; width: 10px; height: 10px; box-shadow: 0 0 0 2px var(--bg) } }

/* selos de situação (forma + cor, nunca só cor) */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mute) }
.st.vc { background: var(--warn-soft); color: var(--warn); border-color: transparent }
.st.vc::before { width: 0; height: 0; border-radius: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid var(--warn); background: none }
.st.pr::before { background: var(--acc) }
.st.ok { background: var(--acc-soft); color: var(--acc-ink); border-color: transparent }
.st.ok::before { content: "✓"; width: auto; height: auto; background: none; font-size: .8rem }
.st.mal { background: var(--bad-soft); color: var(--bad); border-color: transparent }
.st.mal::before { content: "!"; width: auto; height: auto; background: none; font-weight: 700 }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 70; background: var(--graf); color: var(--on-graf); padding: 12px 18px; border-radius: 12px; font-size: .95rem; max-width: min(92vw, 520px); box-shadow: 0 10px 30px rgba(0,0,0,.18) }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important } }

/* topo à prova dos estilos herdados da home antiga */
.topo .btn { text-transform: none; letter-spacing: normal; font-family: var(--f); font-size: .95rem; box-shadow: none }
.topo .btn-pri { min-height: 42px }
@media (max-width: 560px) { .topo .btn-txt { display: none } .topo .wrap { gap: 10px } }

/* topo com a conta aberta: nada quebra em duas linhas; sem espaço, o nome sai e fica o círculo
   com as iniciais, que leva a "Meus pedidos" (no celular é o único caminho no topo) */
.topo nav a, .topo .acoes > * { white-space: nowrap }
a.quem { text-decoration: none; border-radius: 999px }
a.quem:hover b { color: var(--ink) }
a.quem:active i { transform: scale(.96) }
a.quem i { transition: transform 120ms ease-out }
@media (max-width: 1360px) { .topo .quem b { display: none } }

/* foto do dentista no círculo do topo */
.quem i { overflow: hidden }
.quem i img { width: 100%; height: 100%; object-fit: cover; display: block }
