:root {
  --azul: #0f2a44; --azul-2: #17395c; --azul-3: #234d78;
  --ambar: #f5b84b; --ambar-2: #e09e22;
  --fundo: #f3f5f8; --cartao: #ffffff; --linha: #dfe4ea; --texto: #1b2633; --suave: #5d6b7a;
  --ok: #1d8a52; --ok-fundo: #e5f5ec; --erro: #c23b30; --erro-fundo: #fdecea; --aviso: #a86500; --aviso-fundo: #fff4e0;
  --info: #1d6fb8; --info-fundo: #e6f1fb;
  --raio: 10px; --sombra: 0 1px 2px rgba(15, 42, 68, .08), 0 2px 8px rgba(15, 42, 68, .06);
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --campo: #ffffff; --borda-campo: #c9d2dc; --borda-forte: #b9c4d0; --sutil: #f6f8fb; --hover: #f2f7fd;
  --rotulo: #334252; --tag: #eef1f5; --tag-texto: #3e4c5b; --destaque: #0f2a44;
  color-scheme: light;
}
/* ---------- modo escuro (só na tela: impressão e PDF ficam sempre claros) */
@media screen {
  :root[data-tema="escuro"] {
    --fundo: #0c1520; --cartao: #142131; --linha: #26374b; --texto: #e4ebf3; --suave: #9badbf;
    --campo: #0f1b29; --borda-campo: #34495f; --borda-forte: #4a6380; --sutil: #18283a; --hover: #1c3048;
    --rotulo: #c3d0dd; --tag: #22344a; --tag-texto: #c3d0dd; --destaque: #8fd0ff;
    --ok-fundo: #10342a; --erro-fundo: #3b1c1c; --aviso-fundo: #3a2b10; --info-fundo: #12304d;
    --ok: #4cc38a; --erro: #ff7b6e; --aviso: #f2b54d; --info: #6db8ff;
    --sombra: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 10px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
  :root[data-tema="escuro"] .st-aprovada, :root[data-tema="escuro"] .st-em_reparo { background: #2c2147; color: #c4a8ff; }
  :root[data-tema="escuro"] .st-entregue { background: #26313c; color: #b3c0cc; }
  :root[data-tema="escuro"] .aviso-box.aviso { border-color: #6b4f1c; } :root[data-tema="escuro"] .aviso-box.erro { border-color: #6b2c2c; }
  :root[data-tema="escuro"] .aviso-box.info { border-color: #23507a; } :root[data-tema="escuro"] .aviso-box.ok { border-color: #1f5c46; }
  :root[data-tema="escuro"] .kpi.alerta { border-color: #6b4f1c; } :root[data-tema="escuro"] .kpi.perigo { border-color: #6b2c2c; }
  :root[data-tema="escuro"] .btn.perigo { border-color: #6b2c2c; }
  :root[data-tema="escuro"] .login { background: radial-gradient(circle at 20% 10%, #13324f, #070d14 65%); }
  :root[data-tema="escuro"] tr.cancelada td { color: #6d7d8d; }
  :root[data-tema="escuro"] a { color: var(--info); }
}
/* senha com botão de visualizar */
.senha-wrap { position: relative; display: block; width: 100%; }
.senha-wrap input { padding-right: 2.8rem; }
.olho { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 1.15rem; padding: .3rem .45rem; border-radius: 6px; color: var(--suave); line-height: 1; }
.olho:hover { background: var(--hover); }
/* alternador de tema e instalação */
.btn-tema { min-width: 38px; }
.login .topo-login { display: flex; justify-content: flex-end; gap: .4rem; margin: -.6rem -.6rem .4rem 0; }
.instalar-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--linha); text-align: center; }
.instalar-box p { margin: .4rem 0 0; font-size: .82rem; color: var(--suave); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 var(--fonte); color: var(--texto); background: var(--fundo); -webkit-font-smoothing: antialiased; }
a { color: var(--info); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
.carregando { padding: 3rem; text-align: center; color: var(--suave); }
.suave { color: var(--suave); } .peq { font-size: .85rem; } .mono { font-family: var(--mono); }
.direita { text-align: right; } .centro { text-align: center; } .nowrap { white-space: nowrap; }
.oculto { display: none !important; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- estrutura */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.lateral { background: var(--azul); color: #dce7f3; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.marca { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1rem; font-weight: 800; letter-spacing: .04em; color: #fff; font-size: 1.05rem; }
.marca img { width: 32px; height: 32px; }
.marca-lateral { flex-direction: column; gap: .35rem; padding: 1rem 1rem .6rem; text-align: center; }
.marca-lateral img { width: 100%; max-width: 176px; height: auto; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .35)); }
.marca-lateral small { color: #dce7f3; font-size: .8rem; font-weight: 600; }
.marca-login { flex-direction: column; text-align: center; gap: .3rem; }
.marca-login img { width: 100%; max-width: 250px; height: auto; }
.logo-topo { height: 34px; width: auto; }
.rel-cab { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #0f2a44; padding-bottom: 8px; margin-bottom: 10px; }
.rel-cab img { height: 70px; width: auto; }
.rel-cab h1 { margin: 0 0 2px; }
.rel-cab p { margin: 0; }
.cupom-logo { display: block; width: 48mm; height: auto; margin: 0 auto 1.5mm; }
.marca small { display: block; font-weight: 500; letter-spacing: 0; color: #9fb6cc; font-size: .72rem; }
.nav { display: flex; flex-direction: column; padding: .3rem .5rem; gap: 2px; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .62rem .75rem; border-radius: 8px; color: #dce7f3; text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--azul-2); }
.nav a.ativo { background: var(--ambar); color: var(--azul); font-weight: 700; }
.nav .ic { width: 1.3rem; text-align: center; }
.nav .badge { margin-left: auto; background: var(--erro); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 .45rem; font-weight: 700; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .1); margin: .5rem .75rem; }
.usuario-box { margin-top: auto; padding: .9rem 1rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.usuario-box b { color: #fff; display: block; }
.usuario-box .eu { display: flex; align-items: center; gap: .6rem; color: #dce7f3; text-decoration: none; margin-bottom: .3rem; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; background: #5d6b7a; }
.av-36 { width: 36px; height: 36px; font-size: .85rem; } .av-40 { width: 40px; height: 40px; font-size: .9rem; border: 2px solid rgba(255, 255, 255, .5); }
.av-72 { width: 72px; height: 72px; font-size: 1.5rem; } .av-96 { width: 96px; height: 96px; font-size: 2rem; }
.perfil { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.perfil h2 { margin: 0; }
.tag.super { background: linear-gradient(90deg, #c23b30, #e09e22); color: #fff; letter-spacing: .04em; }
input.codigo { font: 700 1.8rem/1 var(--mono); letter-spacing: .5em; text-align: center; padding: .6rem; }
.c12 { grid-column: span 12 !important; }
.usuario-box button { margin-top: .5rem; }
.usuario-box .acoes { flex-wrap: nowrap; gap: .35rem; } .usuario-box .acoes .btn { padding-left: .55rem; padding-right: .55rem; }
.conteudo { padding: 1.4rem 1.6rem 3rem; min-width: 0; }
.topo-movel { display: none; }

/* ---------- componentes */
.cartao { background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); padding: 1.1rem; }
.cartao + .cartao { margin-top: 1rem; }
.grade > .cartao + .cartao { margin-top: 0; }
.grade + .cartao, .kpis + .grade, .grade + .grade { margin-top: 1rem; }
.cabecalho { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.cabecalho h1 { margin: 0; margin-right: auto; }
.grade { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); padding: .9rem 1rem; box-shadow: var(--sombra); }
.kpi .rot { color: var(--suave); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.kpi .val { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.kpi .sub { font-size: .82rem; color: var(--suave); }
.kpi.alerta { border-color: #f2c48a; background: var(--aviso-fundo); }
.kpi.perigo { border-color: #f0b3ad; background: var(--erro-fundo); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--linha); background: var(--cartao); color: var(--texto);
  padding: .55rem .95rem; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 38px; }
.btn:hover { border-color: var(--borda-forte); background: var(--hover); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.pri { background: var(--azul); border-color: var(--azul); color: #fff; } .btn.pri:hover { background: var(--azul-3); }
.btn.dest { background: var(--ambar); border-color: var(--ambar-2); color: var(--azul); } .btn.dest:hover { background: var(--ambar-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.perigo { color: var(--erro); border-color: #f0b3ad; } .btn.perigo:hover { background: var(--erro-fundo); }
.btn.peq { padding: .3rem .6rem; min-height: 30px; font-size: .85rem; }
.btn.grande { padding: .85rem 1.3rem; font-size: 1.08rem; min-height: 52px; }
.btn.link { border: 0; background: none; color: var(--info); padding: .2rem .3rem; min-height: 0; }
.btn-lateral { background: transparent; color: #dce7f3; border-color: rgba(255, 255, 255, .25); }
.btn-lateral:hover { background: var(--azul-2); }
.acoes { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.acoes.fim { justify-content: flex-end; }

label.campo { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--rotulo); }
label.campo.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
input, select, textarea { font: inherit; color: var(--texto); background: var(--campo); border: 1px solid var(--borda-campo); border-radius: 8px; padding: .5rem .65rem; min-height: 38px; width: 100%; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--azul); }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 3px solid rgba(245, 184, 75, .55); outline-offset: 1px; border-color: var(--ambar-2); }
.form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .75rem 1rem; }
.form > * { grid-column: span 12; }
.c2 { grid-column: span 2 !important; } .c3 { grid-column: span 3 !important; } .c4 { grid-column: span 4 !important; }
.c5 { grid-column: span 5 !important; } .c6 { grid-column: span 6 !important; } .c8 { grid-column: span 8 !important; } .c9 { grid-column: span 9 !important; }
.form fieldset { border: 1px solid var(--linha); border-radius: var(--raio); padding: .8rem 1rem 1rem; margin: 0; }
.form legend { font-weight: 700; padding: 0 .4rem; color: var(--destaque); }
.busca { position: relative; flex: 1 1 260px; max-width: 420px; }
label.campo .busca, .pdv-busca { flex: none; max-width: none; width: 100%; }
.pdv .acoes .pdv-busca { flex: 1 1 260px; }
.filtros { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filtros select, .filtros input { width: auto; }

.tabela-wrap { overflow-x: auto; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--cartao); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .55rem .7rem; border-bottom: 1px solid var(--linha); text-align: left; vertical-align: middle; }
th { background: var(--sutil); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clicavel { cursor: pointer; } tbody tr.clicavel:hover { background: var(--hover); }
tr.cancelada td { color: #8a96a3; text-decoration: line-through; }
tfoot td { font-weight: 700; background: var(--sutil); }
.vazio { padding: 2rem; text-align: center; color: var(--suave); }

.tag { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--tag); color: var(--tag-texto); white-space: nowrap; }
.tag.ok { background: var(--ok-fundo); color: var(--ok); } .tag.erro { background: var(--erro-fundo); color: var(--erro); }
.tag.aviso { background: var(--aviso-fundo); color: var(--aviso); } .tag.info { background: var(--info-fundo); color: var(--info); }
.st-aberta, .st-em_analise { background: var(--info-fundo); color: var(--info); }
.st-aguardando_aprovacao, .st-aguardando_peca { background: var(--aviso-fundo); color: var(--aviso); }
.st-aprovada, .st-em_reparo { background: #efe8fb; color: #6a3fb5; }
.st-pronta { background: var(--ok-fundo); color: var(--ok); }
.st-entregue { background: #e9edf1; color: #4d5a67; } .st-cancelada { background: var(--erro-fundo); color: var(--erro); }

.aviso-box { border-radius: var(--raio); padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.aviso-box.aviso { background: var(--aviso-fundo); border-color: #f2c48a; } .aviso-box.erro { background: var(--erro-fundo); border-color: #f0b3ad; }
.aviso-box.info { background: var(--info-fundo); border-color: #b6d4f0; } .aviso-box.ok { background: var(--ok-fundo); border-color: #a9dcc0; }

.lista-simples { list-style: none; padding: 0; margin: 0; }
.lista-simples li { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-bottom: 1px dashed var(--linha); }
.lista-simples li:last-child { border-bottom: 0; }

/* gráfico de barras simples */
.barras { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: .5rem; }
.barras .b { flex: 1; background: var(--azul-3); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.barras .b.hoje { background: var(--ambar-2); }
.barras-rot { display: flex; gap: 4px; font-size: .68rem; color: var(--suave); }
.barras-rot span { flex: 1; text-align: center; }

/* ---------- PDV */
.pdv { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.pdv-busca input { font-size: 1.1rem; padding: .75rem .9rem; min-height: 50px; }
.sugestoes { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--cartao); border: 1px solid var(--linha); border-radius: 8px; box-shadow: 0 10px 24px rgba(0, 0, 0, .12); max-height: 340px; overflow-y: auto; }
.sugestoes button { display: flex; width: 100%; justify-content: space-between; gap: .8rem; border: 0; background: none; padding: .6rem .8rem; font: inherit; text-align: left; cursor: pointer; border-bottom: 1px solid var(--linha); }
.sugestoes button:hover, .sugestoes button.sel { background: var(--hover); }
.carrinho td input { width: 82px; min-height: 32px; padding: .25rem .4rem; }
.resumo-pdv { position: sticky; top: 1rem; }
.total-grande { font-size: 2.1rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--destaque); }
.linha-tot { display: flex; justify-content: space-between; padding: .25rem 0; }
.pag-linha { display: grid; grid-template-columns: 1fr 110px 64px 34px; gap: .35rem; margin-bottom: .35rem; }
.pag-linha input, .pag-linha select { min-height: 36px; padding: .35rem .5rem; }
.atalhos { font-size: .78rem; color: var(--suave); margin-top: .6rem; }
kbd { font-family: var(--mono); background: var(--sutil); border: 1px solid var(--linha); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; font-size: .78rem; }

/* ---------- modal e toasts */
.modal-fundo { position: fixed; inset: 0; background: rgba(10, 22, 36, .5); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; z-index: 100; overflow-y: auto; }
.modal { background: var(--cartao); border-radius: 14px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal.largo { max-width: 920px; }
.modal-cab { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--linha); }
.modal-cab h2 { margin: 0; }
.modal-corpo { padding: 1.1rem 1.2rem; }
.modal-rodape { padding: .9rem 1.2rem; border-top: 1px solid var(--linha); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.fechar { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--suave); padding: .2rem .5rem; }
#toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 200; max-width: min(420px, calc(100vw - 2rem)); }
.toast { background: var(--azul); color: #fff; padding: .75rem 1rem; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-weight: 500; }
.toast.erro { background: var(--erro); } .toast.ok { background: var(--ok); }

/* ---------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 20% 10%, #1d4a77, var(--azul) 60%); }
.login .cartao { width: 100%; max-width: 380px; padding: 1.8rem; }
.login .marca { color: var(--destaque); padding: 0 0 1.2rem; font-size: 1.3rem; }
.login .marca small { color: var(--suave); }
.login form { display: grid; gap: .9rem; }

/* ---------- abas */
.abas { display: flex; gap: .25rem; border-bottom: 1px solid var(--linha); margin-bottom: 1rem; overflow-x: auto; }
.abas button { border: 0; background: none; padding: .6rem .9rem; font: inherit; font-weight: 600; color: var(--suave); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.abas button.ativo { color: var(--destaque); border-bottom-color: var(--ambar-2); }

/* ---------- responsivo */
@media (max-width: 1100px) { .pdv { grid-template-columns: minmax(0, 1fr); } .resumo-pdv { position: static; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 90; }
  .lateral.aberta { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
  .topo-movel { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; background: var(--azul); color: #fff; position: sticky; top: 0; z-index: 50; font-weight: 800; }
  .topo-movel button { background: none; border: 0; color: #fff; font-size: 1.5rem; padding: .2rem .4rem; cursor: pointer; }
  .conteudo { padding: 1rem 1rem 3rem; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .filtros > * { flex: 1 1 140px; } .filtros select, .filtros input { width: 100%; }
  .c2, .c3, .c4, .c5, .c6, .c8, .c9 { grid-column: span 12 !important; }
  .form .c3.par, .form .c2.par { grid-column: span 6 !important; }
  .busca { max-width: none; }
}

/* ---------- impressão: só o conteúdo de #impressao */
#impressao { display: none; }
@media print {
  @page { margin: 0; }
  @page relatorio { size: A4; margin: 10mm; }
  body { background: #fff; }
  body.imprimindo > *:not(#impressao) { display: none !important; }
  body.imprimindo #impressao { display: block; }
  .rel-a4 { page: relatorio; }
}
/* cupom 80 mm (ELGIN MP4200: 72 mm úteis) */
.cupom { width: 72mm; margin: 0 auto; padding: 2mm 0 6mm; font: 11.5px/1.3 var(--mono); color: #000; }
.cupom .c { text-align: center; } .cupom .d { text-align: right; } .cupom b { font-weight: 800; }
.cupom .tit { font-size: 14px; font-weight: 800; text-align: center; }
.cupom hr { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
.cupom .l { display: flex; justify-content: space-between; gap: 2mm; }
.cupom .l span:first-child { flex: 1; overflow-wrap: anywhere; }
.cupom .tot { font-size: 15px; font-weight: 800; }
.cupom .nf { text-align: center; font-weight: 800; border: 1px solid #000; padding: 1mm; margin: 2mm 0; }
.cupom .assin { margin-top: 10mm; border-top: 1px solid #000; text-align: center; padding-top: 1mm; }
.cupom pre { white-space: pre-wrap; font: inherit; margin: 0; }
/* relatório A4 */
.rel-a4 { font: 12px/1.4 var(--fonte); color: #000; }
.rel-a4 h1 { font-size: 18px; } .rel-a4 h2 { font-size: 14px; margin-top: 14px; }
.rel-a4 table { border: 1px solid #999; margin-bottom: 8px; } .rel-a4 th, .rel-a4 td { padding: 3px 6px; border-bottom: 1px solid #ccc; }
.rel-a4 th { position: static; background: #eee; color: #000; }
.topo-movel .espaco { flex: 1; } .topo-movel .btn-tema { background: transparent; border-color: rgba(255,255,255,.3); }
.previa-logo { display: flex; gap: .6rem; margin: .6rem 0 1rem; flex-wrap: wrap; }
.previa-logo > div { flex: 1 1 160px; min-height: 140px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--linha); padding: .8rem; }
.previa-logo .claro { background: #ffffff; } .previa-logo .escuro { background: #0f2a44; }
.previa-logo img { max-width: 100%; max-height: 150px; }
.previa-logo .cupom-prev img { max-width: 72mm; }
/* ---------- OS: visualização profissional */
.os-topo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.os-logo { height: 64px; width: auto; }
.os-id { flex: 1 1 260px; }
.os-id h1 { margin: .1rem 0 .2rem; font-size: 1.6rem; }
.os-acoes { justify-content: flex-end; }
.menu-doc { position: relative; }
.menu-doc-itens { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--cartao); border: 1px solid var(--linha); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .18); min-width: 220px; padding: .3rem; }
.menu-doc-itens button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .55rem .7rem; border-radius: 7px; font: inherit; color: var(--texto); cursor: pointer; }
.menu-doc-itens button:hover { background: var(--hover); }
.stepper { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 1rem; overflow-x: auto; }
.stepper li { flex: 1 1 0; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: .3rem; position: relative; text-align: center; font-size: .76rem; color: var(--suave); }
.stepper li::before { content: ''; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: var(--linha); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper .bola { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sutil); border: 2px solid var(--linha); font-weight: 800; z-index: 1; color: var(--suave); }
.stepper li.feito .bola { background: var(--ok); border-color: var(--ok); color: #fff; } .stepper li.feito::before { background: var(--ok); }
.stepper li.atual .bola { background: var(--ambar); border-color: var(--ambar-2); color: #0f2a44; box-shadow: 0 0 0 4px rgba(245, 184, 75, .3); }
.stepper li.atual { color: var(--texto); font-weight: 700; } .stepper li.atual::before { background: var(--ok); }
.stepper.cancelado { opacity: .55; }
.bloco-tec p { margin: .35rem 0; }
textarea.comunicado { font-size: .9rem; line-height: 1.45; background: var(--sutil); }
.obrig { color: var(--erro); font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 4px solid var(--linha); padding: .5rem .8rem .7rem; margin-bottom: .6rem; background: var(--sutil); border-radius: 0 8px 8px 0; }
.timeline .tl-cab { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .3rem; }
.timeline .tl-texto { white-space: pre-line; font-size: .92rem; }
.st-borda-aberta, .st-borda-em_analise { border-left-color: var(--info) !important; }
.st-borda-aguardando_aprovacao, .st-borda-aguardando_peca { border-left-color: var(--aviso) !important; }
.st-borda-aprovada, .st-borda-em_reparo { border-left-color: #6a3fb5 !important; }
.st-borda-pronta { border-left-color: var(--ok) !important; } .st-borda-cancelada { border-left-color: var(--erro) !important; } .st-borda-entregue { border-left-color: #4d5a67 !important; }
.frame-oculto { position: fixed; width: 0; height: 0; border: 0; visibility: hidden; }

/* ---------- atalhos de teclado (v1.4.0) */
.btn[data-dica]::after, .menu-doc-itens [data-dica]::after {
  content: attr(data-dica); font-family: var(--mono); font-size: .68rem; font-weight: 500; line-height: 1;
  margin-left: .45rem; padding: .15rem .3rem; border-radius: 4px; border: 1px solid currentColor; opacity: .55; white-space: nowrap;
}
.menu-doc-itens { min-width: 240px; }
.menu-doc-itens [data-tecla] { white-space: nowrap; display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.btn.peq[data-tecla]::after { font-size: .62rem; margin-left: .3rem; }
.btn-lateral[data-tecla]::after { display: none; }
@media (max-width: 900px), (pointer: coarse) and (max-width: 1280px) { .btn[data-tecla]::after, .menu-doc-itens [data-tecla]::after { display: none; } }
tbody tr.sel-tecla, .lista-nav > .sel-tecla { background: var(--hover); box-shadow: inset 3px 0 0 var(--ambar-2); }
.linha-busca-rapida { display: flex; gap: .4rem; margin: .2rem .9rem .6rem; }
.linha-busca-rapida .btn-tecla-mapa { flex: none; padding: 0 .6rem; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; color: #dce7f3; cursor: pointer; font: inherit; font-size: .9rem; }
.btn-busca-rapida { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .3rem; padding: .5rem .55rem;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; color: #dce7f3; font: inherit; font-size: .85rem; cursor: pointer; text-align: left; }
.btn-busca-rapida span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .btn-busca-rapida kbd { white-space: nowrap; flex: none; font-size: .64rem; padding: 0 .25rem; }
.btn-busca-rapida:hover, .btn-busca-rapida:focus-visible { background: rgba(255, 255, 255, .13); }
.btn-busca-rapida kbd, .lateral kbd { background: transparent; color: inherit; border-color: rgba(255, 255, 255, .3); opacity: .8; }
.versao { margin-top: .5rem; opacity: .5; font-family: var(--mono); font-size: .7rem; text-align: right; }
.paleta input { width: 100%; font-size: 1.05rem; padding: .7rem .8rem; }
.paleta-lista { max-height: min(60vh, 440px); overflow-y: auto; margin: .6rem 0; display: flex; flex-direction: column; gap: 2px; }
.paleta-lista button { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px;
  padding: .5rem .6rem; color: var(--texto); font: inherit; cursor: pointer; }
.paleta-lista button.sel, .paleta-lista button:hover { background: var(--hover); box-shadow: inset 3px 0 0 var(--ambar-2); }
.paleta-lista .ic { width: 1.4rem; text-align: center; flex: none; }
.paleta-lista .nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paleta-lista .nome small { display: block; color: var(--suave); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.paleta-grupo { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); padding: .5rem .6rem .2rem; }
.tabela-teclas { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela-teclas td { padding: .4rem .3rem; border-bottom: 1px solid var(--linha); vertical-align: top; }
.tabela-teclas td.tecla { white-space: nowrap; width: 1%; padding-right: .9rem; }
.mapa-teclas h3 { margin-top: 0; }

/* ---------- Trial público do JMDC CRM (Padrão-Ouro) ---------- */
.trial-login { margin: 0 0 1rem; padding: .9rem 1rem; border-radius: 10px; background: #1b1612; border: 1px solid rgba(193,138,85,.45); color: #D9D0C5; }
.trial-login b { display: block; color: #C18A55; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.trial-login p { margin: .35rem 0 .7rem; font-size: .9rem; line-height: 1.4; }
.trial-login__btn { width: 100%; background: #C18A55; border-color: #C18A55; color: #11100F; font-weight: 700; }
.trial-login__btn:hover { background: #D9A673; border-color: #D9A673; }
.faixa-trial { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .55rem 1rem; background: #11100F; color: #D9D0C5; border-bottom: 2px solid #C18A55; font-size: .88rem; }
.faixa-trial__selo { color: #C18A55; font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.faixa-trial b { color: #F5F1EB; }
.faixa-trial__cta { margin-left: auto; padding: .35rem .8rem; border-radius: 4px; background: #C18A55; color: #11100F; font-weight: 700; text-decoration: none; }
.faixa-trial__cta:hover { background: #D9A673; }
.faixa-trial { grid-column: 1 / -1; position: sticky; top: 0; z-index: 30; }
.layout:has(.faixa-trial) .lateral { height: calc(100vh - 2.6rem); top: 2.6rem; }
