/* Estilos do sistema de O.S. (cliente e painel) — complementa style.css */
.app-main { max-width: 900px; margin: 0 auto; padding: 56px 24px 96px; display: flex; flex-direction: column; gap: 28px; }
.app-main h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.06; }
.box { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); padding: 28px; }
.box--flush { padding: 0; overflow: hidden; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  min-height: 48px; border-radius: 12px; border: 1.5px solid #C5CFC7; background: #fff; font: inherit; font-size: 16px; padding: 10px 14px; color: var(--tinta);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(47,168,79,.3); border-color: var(--verde-esc); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row > .field { flex: 1 1 200px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
button.btn { cursor: pointer; font-family: inherit; }
button.btn:disabled { opacity: .55; cursor: not-allowed; }
.muted { color: var(--cinza-2); font-size: 14px; }
.msg { padding: 14px 18px; border-radius: 12px; font-size: 15px; }
.msg--ok { background: #E6F1EA; color: var(--verde-noite); }
.msg--warn { background: #FFF4D6; color: #6B4A00; }
.msg--err { background: #FDE8E6; color: #8A1A12; }
.hidden { display: none !important; }

.os-head { padding: 24px 28px; background: var(--verde-noite); color: #fff; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; }
.os-head small { color: #CFE6D8; font-size: 13px; display: block; }
.os-head strong { font-family: 'Space Grotesk', sans-serif; font-size: 22px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; background: #E6F1EA; color: var(--verde-noite); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge--avaliacao { background: #E8EEF9; color: #23406E; }
.badge--aguardando_aprovacao { background: #FFF4D6; color: #6B4A00; }
.badge--em_reparo, .badge--aguardando_peca { background: #E3F0FA; color: #0E4A75; }
.badge--recusado, .badge--condenado { background: #FDE8E6; color: #8A1A12; }
.badge--pronto_avisar { background: #FFE9D6; color: #7A3A00; }
.badge--pronto, .badge--pronto_sem_reparo { background: #DDF3E4; color: #0B5A2E; }
.badge--entregue, .badge--devolvido { background: #ECEFEC; color: #3E5045; }
.badge--novo { background: #D42A20; color: #fff; }
.os-body { padding: 28px; display: flex; flex-direction: column; gap: 24px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; }
.timeline .tl-rail { display: flex; flex-direction: column; align-items: center; }
.timeline .tl-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #C5CFC7; background: #fff; flex: none; }
.timeline .tl-line { width: 2px; flex: 1; min-height: 22px; background: var(--linha); }
.timeline li:last-child .tl-line { display: none; }
.timeline li.done .tl-dot { background: var(--verde-esc); border-color: var(--verde-esc); }
.timeline li.done .tl-line { background: var(--verde-esc); }
.timeline li.now .tl-dot { border: 3px solid #C98A00; }
.timeline .tl-text { padding-bottom: 20px; display: flex; flex-direction: column; gap: 2px; }
.timeline li.todo .tl-text strong { color: var(--cinza-2); font-weight: 500; }

table.itens { width: 100%; border-collapse: collapse; font-size: 15px; }
table.itens th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--cinza-2); padding: 8px 6px; border-bottom: 1px solid var(--linha); }
table.itens td { padding: 10px 6px; border-bottom: 1px solid var(--fundo); vertical-align: top; }
table.itens .num { text-align: right; white-space: nowrap; }
table.itens tfoot td { font-weight: 700; font-size: 17px; border-bottom: 0; padding-top: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--verde-esc); }

/* ---------- Painel ---------- */
.adm { display: flex; flex-wrap: wrap; min-height: calc(100vh - 70px); }
.adm-list { flex: 1 1 340px; max-width: 420px; border-right: 1px solid var(--linha); background: #fff; display: flex; flex-direction: column; }
.adm-list__tools { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--linha); }
.adm-list__items { overflow-y: auto; max-height: calc(100vh - 230px); }
.adm-item { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--fundo); background: #fff; padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; }
.adm-item:hover { background: var(--fundo); }
.adm-item.is-active { background: #E6F1EA; }
.adm-item__top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.adm-item__top strong { font-size: 15px; }
.adm-item .badge { font-size: 12px; padding: 4px 9px; }
.adm-detail { flex: 999 1 560px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.adm-detail h2 { font-size: 28px; }
.adm-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.chips-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-filter button { border: 1px solid var(--linha); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; min-height: 34px; }
.chips-filter button.is-on { background: var(--verde-esc); color: #fff; border-color: var(--verde-esc); }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 130px 44px; gap: 8px; align-items: center; }
.item-row input { min-height: 44px; border-radius: 10px; border: 1.5px solid #C5CFC7; padding: 0 10px; font: inherit; font-size: 15px; width: 100%; }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--linha); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #8A1A12; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.log li { padding: 10px 12px; background: var(--fundo); border-radius: 10px; }
dialog { border: 0; border-radius: 20px; padding: 0; width: min(760px, 94vw); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(8,50,31,.45); }
dialog form { padding: 28px; display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 760px) {
  .adm-list { max-width: none; border-right: 0; }
  .adm-list__items { max-height: 340px; }
  .item-row { grid-template-columns: minmax(0, 1fr) 64px 100px 44px; }
}


.fs { border: 1px solid var(--linha); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fs legend { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; padding: 0 6px; }
dialog .fs { border-radius: 14px; padding: 16px; }
.item-row--srv { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 70px 120px 44px; }
.item-row select { min-height: 44px; border-radius: 10px; border: 1.5px solid #C5CFC7; padding: 0 8px; font: inherit; font-size: 14px; width: 100%; background: #fff; }
.itens-lista { display: flex; flex-direction: column; gap: 8px; }
.totais { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; align-items: baseline; border-top: 1px solid var(--linha); padding-top: 12px; }
.totais strong { font-size: 22px; }
.barra-salvar { position: sticky; bottom: 0; background: rgba(244,246,242,.95); padding: 12px 0; align-items: center; }
.cli-res { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; border-radius: 12px; }
.cli-res .adm-item { border: 1px solid var(--linha); border-radius: 10px; margin-bottom: 6px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--verde-esc); text-decoration: underline; cursor: pointer; font-weight: 600; }
@media (max-width: 760px) {
  .item-row--srv { grid-template-columns: minmax(0, 1fr) 64px 100px 44px; }
  .item-row--srv select { grid-column: 1 / -1; grid-row: 2; }
}

/* Ditado por voz */
.ditado-wrap { position: relative; display: flex; gap: 8px; align-items: flex-start; }
.ditado-wrap > textarea, .ditado-wrap > input { flex: 1; min-width: 0; }
.mic-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--verde-esc); background: #fff; color: var(--verde-esc); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.mic-btn:hover { background: #E6F1EA; }
.mic-btn.is-gravando { background: var(--vermelho); border-color: var(--vermelho); color: #fff; animation: pulso 1.4s ease-in-out infinite; }
@keyframes pulso { 50% { box-shadow: 0 0 0 6px rgba(212,42,32,.18); } }
@media (prefers-reduced-motion: reduce) { .mic-btn.is-gravando { animation: none; } }
@media (max-width: 600px) { .mic-btn span { display: none; } .mic-btn { padding: 0 12px; } }
.adm-detail .btn--light, .adm-list .btn--light { background: #fff; border-color: var(--linha); }
.adm-detail .btn--light:hover:not(:disabled) { border-color: var(--verde-esc); color: var(--verde-esc); }
.mic-btn.is-ocupado { background: #FFF4D6; border-color: #C98A00; color: #6B4A00; cursor: progress; }
