/* Demo do sistema de OS — camada própria sobre a base do checklist (mesma família, DESIGN.md §8).
   Tema claro único (uso em campo), alvos de toque >= 44px, amarelo só como fundo. */
.demo { max-width: 1080px; }
.demo .hero, .demo #entrada, .demo .guide, .demo .fim { max-width: 860px; margin-left: auto; margin-right: auto; }
.entrada__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.entrada__fields select { width: 100%; min-height: 48px; font: inherit; padding: .5rem .6rem; border: 2px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }

/* ---------- Tour ---------- */
.tour { margin: 1.2rem 0 2rem; }
.tour__top { max-width: 860px; margin: 0 auto 1rem; }
.tour__prog { font: 600 .78rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .4rem; }
.tour__bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.tour__bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s ease; }
.tour__titulo { font: 700 1.7rem/1.1 var(--head); text-transform: uppercase; margin: .8rem 0 .3rem; }
.tour__legenda { margin: 0; max-width: 62ch; color: var(--ink); }

.abas { display: none; }
.telas { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.tela { background: var(--card); border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; transition: box-shadow .25s ease, opacity .25s ease; }
.tela.is-ativa { box-shadow: 0 0 0 4px var(--yellow); }
.tela:not(.is-ativa) { opacity: .62; }
.janela__barra { display: flex; align-items: center; gap: .35rem; background: var(--ink); padding: .45rem .7rem; }
.janela__barra span { width: 9px; height: 9px; border-radius: 50%; background: #5b6168; }
.janela__barra em { margin-left: .5rem; color: #cfd2d6; font: 500 .75rem var(--body); font-style: normal; }
.tela--celular { max-width: 340px; justify-self: center; width: 100%; border-width: 6px; border-radius: 26px; }
.celular__topo { display: flex; justify-content: flex-end; padding: .35rem .8rem; background: var(--ink); }
.sinal { font: 600 .72rem var(--body); color: #fff; padding: .1rem .45rem; border-radius: 4px; background: var(--ok); }
.sinal.is-off { background: var(--nc); }
.tela__corpo { padding: .9rem; min-height: 320px; font-size: .92rem; }

/* conteúdo das telas */
.t-h { font: 700 1.05rem/1.2 var(--head); text-transform: uppercase; margin: 0 0 .6rem; }
.t-linha { display: flex; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.t-linha b { font-weight: 600; }
.t-vazio { color: var(--muted); font-style: italic; }
.t-card { border: 2px solid var(--line); border-radius: 10px; padding: .7rem; margin: .5rem 0; background: #fff; }
.t-card.is-novo { border-color: var(--ink); background: var(--yellow-soft); }
.t-itens { list-style: none; margin: .4rem 0; padding: 0; }
.t-item { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.t-item span { flex: 1; min-width: 0; }
.t-st { display: flex; gap: .25rem; flex-shrink: 0; }
.t-st button { min-width: 44px; min-height: 44px; border: 2px solid var(--line); border-radius: 8px; background: #fff; font: 700 .78rem var(--body); color: var(--muted); cursor: pointer; }
.t-st button.on-ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.t-st button.on-nc { background: var(--nc-bg); border-color: var(--nc); color: var(--nc); }
.t-st button.on-na { background: var(--na-bg); border-color: var(--na); color: var(--na); }
.t-nc { border: 2px solid var(--nc); background: var(--nc-bg); border-radius: 10px; padding: .7rem; margin: .5rem 0; }
.t-nc > b { display: block; margin-bottom: .5rem; }
.t-nc > .btn { margin-bottom: .5rem; }
.t-nc textarea { width: 100%; min-height: 64px; font: inherit; border: 2px solid var(--line); border-radius: 8px; padding: .4rem; }
.t-foto { display: block; width: 100%; max-width: 220px; border-radius: 8px; border: 2px solid var(--ink); margin: .4rem 0; }
.t-aviso { font-size: .85rem; padding: .5rem .6rem; border-radius: 8px; background: var(--na-bg); margin: .5rem 0; }
.t-aviso.is-ok { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.t-aviso.is-nc { background: var(--nc-bg); color: var(--nc); font-weight: 600; }
.t-estoque { font: 700 2rem/1 var(--head); }
.t-estoque.is-baixa { color: var(--nc); }
.t-btn { min-height: 44px; }
.t-assin { width: 100%; height: 150px; border: 2px dashed var(--ink); border-radius: 10px; background: #fff; touch-action: none; display: block; }
.t-rel { border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.t-rel__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem .8rem; border-bottom: 3px solid var(--ink); }
.t-rel__head b { font: 700 1.15rem/1.1 var(--head); text-transform: uppercase; overflow-wrap: anywhere; }
.t-rel__band { background: var(--yellow); padding: .2rem .5rem; font: 700 .8rem var(--head); text-transform: uppercase; white-space: nowrap; }
.t-rel__corpo { padding: .6rem .8rem; }
.t-rel__assin { max-height: 70px; max-width: 100%; display: block; }
.t-msg { background: #e7f8ec; border-radius: 10px; padding: .6rem .7rem; font-size: .88rem; margin-top: .5rem; white-space: pre-line; }

.tour__nav { display: flex; justify-content: space-between; gap: .8rem; max-width: 860px; margin: 1rem auto 0; }
.tour__nav .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: .55rem 1rem; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.wa-float:hover { color: var(--yellow); }

.fim { border: 3px solid var(--ink); }
.fim__t { font: 700 1.6rem/1.15 var(--head); text-transform: uppercase; margin: 0 0 .6rem; overflow-wrap: anywhere; }
.fim__links { margin: .9rem 0 0; font-size: .92rem; }

/* ---------- Celular: uma tela por vez, abas ---------- */
@media (max-width: 779px) {
    .entrada__fields { grid-template-columns: 1fr; }
    .abas { display: flex; gap: .4rem; margin: 0 0 .7rem; }
    .abas button { flex: 1; min-height: 44px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; font: 600 .9rem var(--body); color: var(--ink); }
    .abas button[aria-selected="true"] { background: var(--yellow); }
    .telas { grid-template-columns: minmax(0, 1fr); }
    .tela { display: none; opacity: 1 !important; }
    .tela.is-visivel { display: block; }
    .tela--celular { max-width: none; border-width: 2px; border-radius: 12px; }
    .tour__titulo { font-size: 1.35rem; }
    .tour__nav { flex-wrap: wrap; }
    .tour__nav .btn { flex: 1; }
    .tour__nav #btnPularTour { order: 3; flex-basis: 100%; min-height: 44px; }
    .wa-float { right: 12px; bottom: 12px; padding: .5rem .85rem; }
    .demo { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) { .tour__bar span, .tela { transition: none; } }
@media print { .wa-float, .tour, .hero, #entrada, .fim, .guide { display: none !important; } }
