/* V1666 — Produção › Apontamento (tablet). Usa as bases .cap-* (V1664) e .tp-* (V1665). */
.ap-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.ap-tabs button { padding: 9px 16px; border: 1px solid #dfe5ec; border-radius: 999px; background: #fff; color: #42536a; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.ap-tabs button.active { background: #13254a; border-color: #13254a; color: #fff; }
.ap-resumo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 12px; font-size: 13.5px; color: #42536a; }
.ap-resumo b { font-size: 18px; color: #23794a; margin-right: 3px; }
.ap-resumo .ap-r-par b { color: #b42318; }
.ap-resumo .ap-r-livre b { color: #5b6b80; }
.ap-resumo small { margin-left: auto; color: #8a97a8; font-size: 12px; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ap-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border: 1px solid #e3e9f1; border-top: 5px solid #8a97a8; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(19, 37, 74, .04); min-width: 0; }
.ap-card.ap-st-prod { border-top-color: #2f9e62; }
.ap-card.ap-st-par { border-top-color: #d64545; }
.ap-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ap-card header > div { display: grid; gap: 1px; min-width: 0; }
.ap-card header b { font-size: 17px; color: #13254a; }
.ap-card header span { font-size: 13px; color: #5b6b80; overflow-wrap: anywhere; }
.ap-st { flex: none; padding: 4px 11px; border-radius: 999px; font-size: 12px !important; font-weight: 800; background: #f4f6f9; color: #5b6b80 !important; }
.ap-st-prod .ap-st { background: #ecf8f1; color: #23794a !important; }
.ap-st-par .ap-st { background: #fff1f1; color: #b42318 !important; }
.ap-parada { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fff5f5; border: 1px solid #f3c5c5; }
.ap-parada > div { display: grid; gap: 2px; min-width: 0; }
.ap-parada small { font-size: 11.5px; color: #8a3b3b; font-weight: 600; }
.ap-parada b { color: #7a1c1c; font-size: 14px; }
.ap-parada em { font-style: normal; font-size: 11px; color: #8a97a8; }
.ap-os { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f3faf6; border: 1px solid #cfe9db; }
.ap-os-info { display: grid; gap: 2px; min-width: 0; }
.ap-os-info b { font-size: 15px; color: #13254a; }
.ap-os-info span { font-size: 13px; color: #24364f; overflow-wrap: anywhere; }
.ap-os-info small { font-size: 11.5px; color: #5b6b80; }
.ap-vazio { margin: 2px 0; color: #8a97a8; font-size: 13px; }
.ap-acoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: auto; }
.ap-btn { min-height: 46px; padding: 10px 14px; border-radius: 10px; border: 1px solid transparent; font-size: 14.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ap-btn-ini { background: #e87524; color: #fff; }
.ap-btn-ini:hover { background: #d4661a; }
.ap-btn-sec { background: #fff; border-color: #d9dee5; color: #42536a; }
.ap-btn-fin { flex: none; min-height: 42px; background: #23794a; color: #fff; }
.ap-btn-par { flex: none; min-height: 42px; background: #fff; border-color: #e3a5a5; color: #b42318; }
.ap-fila { display: grid; gap: 6px; padding-top: 10px; border-top: 1px dashed #e3e9f1; }
.ap-fila > small, .ap-lista-tit { font-size: 10.5px; font-weight: 800; color: #8a97a8; text-transform: uppercase; letter-spacing: .04em; }
.ap-fila > div { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-fila-os { display: grid; gap: 1px; text-align: left; padding: 6px 10px; border: 1px solid #dfe5ec; border-radius: 9px; background: #fafbfd; cursor: pointer; min-width: 0; max-width: 100%; }
.ap-fila-os:hover:not([disabled]) { border-color: #e87524; background: #fff8f2; }
.ap-fila-os b { font-size: 12.5px; color: #13254a; }
.ap-fila-os span, .ap-fila-os em { font-size: 11px; color: #5b6b80; font-style: normal; overflow-wrap: anywhere; }
.ap-fila-mais { align-self: center; font-size: 12px; color: #8a97a8; font-weight: 700; }
.ap-form .ap-opc { font-weight: 400; color: #8a97a8; font-size: 11.5px; }
.ap-lista-os { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; margin: -4px 0 14px; padding: 2px; }
.ap-os-opc { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1.5px solid #dfe5ec; border-radius: 10px; background: #fff; cursor: pointer; }
.ap-os-opc b { color: #13254a; font-size: 14px; }
.ap-os-opc span { color: #24364f; font-size: 12.5px; overflow-wrap: anywhere; }
.ap-os-opc small { color: #718096; font-size: 11.5px; }
.ap-os-opc.on { border-color: #e87524; background: #fff8f2; }
.ap-hora { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ap-hora input[type="datetime-local"] { flex: 1; min-width: 190px; }
.ap-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #24364f; cursor: pointer; }
.ap-check input { width: 18px; height: 18px; accent-color: #e87524; }
.ap-input-grande { font-size: 20px !important; font-weight: 700; min-height: 48px; }
.ap-btn-grande { min-height: 48px; padding: 0 24px !important; font-size: 15px !important; }
.ap-defs { display: grid; gap: 8px; margin-bottom: 8px; }
.ap-def { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(70px, .6fr) 34px; gap: 6px; align-items: center; }
.ap-def select, .ap-def input { min-width: 0; width: 100%; }
.ap-seg { display: inline-flex; border: 1px solid #d9dee5; border-radius: 8px; overflow: hidden; }
.ap-seg label { cursor: pointer; }
.ap-seg input { display: none; }
.ap-seg span { display: block; padding: 8px 10px; font-size: 12.5px; font-weight: 600; color: #5b6b80; background: #fff; }
.ap-seg label + label span { border-left: 1px solid #d9dee5; }
.ap-seg input:checked + span { background: #13254a; color: #fff; }
.ap-def-x { width: 34px; height: 34px; border: 1px solid #e3e9f1; border-radius: 8px; background: #fff; color: #8a97a8; font-size: 18px; cursor: pointer; }
.ap-total { margin: 4px 0 10px; font-size: 13px; color: #42536a; min-height: 18px; }
.ap-concluir { padding: 10px 12px; border: 1px solid #e3e9f1; border-radius: 10px; background: #fafbfd; }
.ap-motivos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 6px 0 14px; }
.ap-motivo { display: flex; align-items: center; min-height: 48px; padding: 8px 12px; border: 1.5px solid #dfe5ec; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; color: #24364f; background: #fff; }
.ap-motivo input { display: none; }
.ap-motivo.nao_planejada.on { border-color: #d64545; background: #fff5f5; color: #7a1c1c; }
.ap-motivo.planejada.on { border-color: #2a55a3; background: #eef4ff; color: #1d3f7d; }
.ap-reg-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ap-filtros { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.ap-filtros select { width: auto; min-width: 170px; max-width: 100%; }
#main table.ap-tab .ap-c-os { width: 19%; }
#main table.ap-tab .ap-c-lin { width: 15%; }
#main table.ap-tab .ap-c-per { width: 20%; }
#main table.ap-tab .ap-c-ac { width: 104px; text-align: right; }
.ap-tab .tp-un { display: inline !important; color: #718096; }
#main table.ap-tab td.ap-c-ac .small { margin: 2px 0 2px 4px; }
.ap-par-lista { display: grid; gap: 8px; }
.ap-par-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #e3e9f1; border-left: 4px solid #e8a317; border-radius: 10px; }
.ap-par-item.aberta { border-left-color: #d64545; background: #fffafa; }
.ap-par-item > div { display: grid; gap: 2px; min-width: 0; }
.ap-par-item b { color: #13254a; font-size: 13.5px; }
.ap-par-item small { font-size: 11.5px; color: #718096; }
.ap-par-item span { font-size: 12.5px; color: #24364f; }
.ap-cad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ap-cad-lista { display: grid; gap: 6px; }
.ap-cad-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #e3e9f1; border-radius: 10px; }
.ap-cad-item > div { display: grid; gap: 1px; min-width: 0; }
.ap-cad-item b { font-size: 13.5px; color: #13254a; font-weight: 600; }
.ap-cad-item small { font-size: 11.5px; color: #718096; }
.ap-cad-item.inativo { background: #f8f9fb; }
.ap-cad-item.inativo b { color: #8a97a8; }
@media (max-width: 1100px) {
  #main table.ap-tab.ap-tab.ap-tab.ap-tab > tbody > tr > td.ap-c-os { grid-column: 1 / -1; padding-bottom: 8px !important; border-bottom: 1px solid #eef2f6 !important; }
  #main table.ap-tab.ap-tab.ap-tab.ap-tab > tbody > tr > td.ap-c-ac { grid-column: 1 / -1; text-align: right; }
  #main table.ap-tab td[data-label]:not(.ap-c-os)::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 10.5px; font-weight: 700; color: #8a97a8; text-transform: uppercase; letter-spacing: .03em; }
  .ap-cad-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ap-grid { grid-template-columns: 1fr; }
  .ap-def { grid-template-columns: minmax(0, 1fr) 34px; }
  .ap-def .ap-seg, .ap-def [data-qtd] { grid-column: 1; }
  .ap-par-item { grid-template-columns: 1fr; }
  .ap-resumo small { margin-left: 0; width: 100%; }
}
/* botões secundários: o estilo global de <button> é laranja */
#main .ap-card .ap-btn.ap-btn-sec, .ap-form button[data-ap-add-def] { background: #fff !important; border: 1px solid #d9dee5 !important; color: #42536a !important; box-shadow: none !important; }
#main .ap-card .ap-btn.ap-btn-sec:hover, .ap-form button[data-ap-add-def]:hover { border-color: #e87524 !important; color: #b4531a !important; }
#main .ap-card .ap-btn.ap-btn-fin { background: #23794a !important; color: #fff !important; }
#main .ap-card .ap-btn.ap-btn-par { background: #fff !important; border: 1px solid #e3a5a5 !important; color: #b42318 !important; }
.ap-def-x { background: #fff !important; color: #8a97a8 !important; border: 1px solid #e3e9f1 !important; padding: 0 !important; }

/* V1667 — sinal de capacidade no cartão do tablet e aba Restrições de capacidade */
.ap-sinal { display: grid; gap: 2px; padding: 8px 12px; border-radius: 10px; border: 1px solid; }
.ap-sinal b { font-size: 12.5px; }
.ap-sinal span { font-size: 12px; overflow-wrap: anywhere; }
.ap-sinal-bloq { background: #fff5f5; border-color: #f3c5c5; color: #7a1c1c; }
.ap-sinal-red { background: #fffbf0; border-color: #f2dca6; color: #6b4a00; }
.ap-rs-resumo { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: #42536a; }
.ap-rs-resumo b { font-size: 18px; margin-right: 3px; }
.ap-rs-b b { color: #b42318; } .ap-rs-r b { color: #8a5a00; } .ap-rs-n b { color: #23794a; }
.ap-rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.ap-rs-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid #e3e9f1; border-left: 5px solid #2f9e62; border-radius: 14px; background: #fff; min-width: 0; }
.ap-rs-card.ap-rs-bloqueado { border-left-color: #d64545; }
.ap-rs-card.ap-rs-reduzido { border-left-color: #e8a317; }
.ap-rs-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ap-rs-card header > div { display: grid; min-width: 0; }
.ap-rs-card header b { font-size: 16px; color: #13254a; }
.ap-rs-card header span { font-size: 12.5px; color: #5b6b80; }
.ap-rs-estado { flex: none; padding: 4px 11px; border-radius: 999px; font-size: 12px !important; font-weight: 800; background: #ecf8f1; color: #23794a !important; }
.ap-rs-bloqueado .ap-rs-estado { background: #fff1f1; color: #b42318 !important; }
.ap-rs-reduzido .ap-rs-estado { background: #fff6e0; color: #8a5a00 !important; }
.ap-rs-sinal { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid #eef2f6; border-radius: 10px; background: #fafbfd; }
.ap-rs-sinal > div { display: grid; gap: 2px; min-width: 0; }
.ap-rs-sinal b { font-size: 13px; color: #13254a; font-weight: 600; overflow-wrap: anywhere; }
.ap-rs-sinal small { font-size: 11.5px; color: #718096; }
.ap-rs-fator { font-weight: 800; font-size: 13px; color: #42536a; }
.ap-rs-sinal .ap-n { justify-self: start; margin-bottom: 3px; }
.ap-n { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; border: 1px solid transparent; }
.ap-n-bloq { background: #fff1f1; border-color: #f3c5c5; color: #b42318; }
.ap-n-crit { background: #fff0e6; border-color: #f6c8a6; color: #b4531a; }
.ap-n-alerta { background: #fffbf0; border-color: #f2dca6; color: #8a5a00; }
.ap-n-manual { background: #eef4ff; border-color: #c9d9f6; color: #2a55a3; }
.ap-rs-tipos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .ap-rs-grid { grid-template-columns: 1fr; }
  .ap-rs-sinal { grid-template-columns: minmax(0, 1fr) auto; }
  .ap-rs-tipos { grid-template-columns: 1fr; }
}
