/* V1668 — Produção › Programação (APS Fase 1). Usa as bases .cap-*, .tp-* e .ap-tabs. */
.aps-hero { position: relative; }
.aps-hero-acoes { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }
.aps-qual { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.aps-qual-item { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; text-align: left; padding: 8px 12px; border: 1px solid #f2dca6 !important; border-left: 4px solid #e8a317 !important; border-radius: 10px; background: #fffbf0 !important; color: #5b3a1a !important; cursor: pointer; box-shadow: none !important; }
.aps-qual-item[disabled] { cursor: default; opacity: 1; }
.aps-qual-item b { grid-row: span 2; font-size: 20px; color: #8a5a00; }
.aps-qual-item span { font-size: 12.5px; font-weight: 700; }
.aps-qual-item small { font-size: 11px; color: #8a6a3a; font-weight: 400; }
.aps-seg { display: inline-flex; border: 1px solid #d9dee5; border-radius: 8px; overflow: hidden; }
.aps-seg button { padding: 6px 14px !important; border: 0 !important; border-radius: 0 !important; background: #fff !important; color: #5b6b80 !important; font-size: 12.5px; font-weight: 700; box-shadow: none !important; min-height: 0 !important; }
.aps-seg button.on { background: #13254a !important; color: #fff !important; }
#main table.aps-tab { width: 100% !important; min-width: 0 !important; table-layout: fixed; border-collapse: separate; border-spacing: 4px; }
#main table.aps-tab th { font-size: 10.5px !important; text-align: center; padding: 4px 2px !important; background: transparent !important; border: 0 !important; color: #5b6b80; white-space: nowrap; }
#main table.aps-tab th.aps-c-linha { text-align: left; }
#main table.aps-tab .aps-c-linha { width: 19%; }
#main table.aps-tab.aps-tab.aps-tab > tbody > tr > td { border: 0 !important; padding: 0 !important; vertical-align: middle; }
#main table.aps-tab.aps-tab.aps-tab > tbody > tr > td.aps-c-linha { padding: 6px 8px 6px 0 !important; }
.aps-c-linha b { display: block; font-size: 14px; color: #13254a; }
.aps-c-linha span { display: block; font-size: 12px; color: #5b6b80; overflow-wrap: anywhere; }
.aps-c-linha small { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
#main table.aps-tab.aps-tab.aps-tab > tbody > tr > td.aps-cel { text-align: center; border-radius: 8px; padding: 7px 2px !important; }
.aps-cel b { display: block; font-size: 14px; }
.aps-cel small { display: block; font-size: 10.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#main table.aps-tab td.aps-c0 { background: #f6f8fb !important; color: #8a97a8; }
#main table.aps-tab td.aps-c1 { background: #e8f6ee !important; color: #1d6a40; }
#main table.aps-tab td.aps-c2 { background: #fff6dc !important; color: #7a5300; }
#main table.aps-tab td.aps-c3 { background: #ffe7c7 !important; color: #8a4300; }
#main table.aps-tab td.aps-c4 { background: #fdd9d6 !important; color: #9b1c12; }
#main table.aps-tab td.aps-c-extra { background: #f3f5f8 !important; color: #42536a; }
.aps-legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 11.5px; color: #5b6b80; }
.aps-legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.aps-legenda i.aps-c1 { background: #cfeedd; } .aps-legenda i.aps-c2 { background: #ffe9a8; } .aps-legenda i.aps-c3 { background: #ffcf95; } .aps-legenda i.aps-c4 { background: #f8b4ad; }
.aps-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-style: normal; font-weight: 700; background: #eef2f6; color: #5b6b80; }
.aps-tag-garg { background: #13254a; color: #fff; }
.aps-tag-sobre, .aps-tag-bloqueado { background: #fdd9d6; color: #9b1c12; }
.aps-tag-reduzido { background: #fff1d1; color: #7a5300; }
.aps-tag-prio { background: #eef4ff; color: #2a55a3; }
#main table.aps-prev .aps-p-os { width: 19%; }
#main table.aps-prev .aps-p-peca { width: 18%; }
#main table.aps-prev .aps-p-lin { width: 9%; }
#main table.aps-prev .aps-p-car { width: 10%; }
#main table.aps-prev .aps-p-ent { width: 11%; }
#main table.aps-prev .aps-p-prev { width: 17%; }
#main table.aps-prev .aps-p-sit { width: 16%; }
.aps-prev .tp-sit { white-space: normal; }
.aps-prev td small { display: block; color: #718096; font-size: 11.5px; margin-top: 2px; }
.aps-s-atraso { background: #fff1f1; border-color: #f3c5c5; color: #b42318; }
.aps-s-ok { background: #ecf8f1; border-color: #bfe5cf; color: #23794a; }
.aps-s-neutro { background: #f4f6f9; border-color: #dfe5ec; color: #5b6b80; }
.aps-cli-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.aps-cli { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid #e3e9f1; border-left: 5px solid #2f9e62; border-radius: 14px; background: #fff; min-width: 0; }
.aps-cli.aps-cli-risco { border-left-color: #d64545; }
.aps-cli header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.aps-cli header b { font-size: 15px; color: #13254a; margin-right: 6px; overflow-wrap: anywhere; }
.aps-cli header span { flex: none; font-size: 12px; color: #5b6b80; }
.aps-cli-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.aps-cli-nums > div { display: grid; gap: 1px; padding: 8px; border-radius: 9px; background: #f6f8fb; }
.aps-cli-nums b { font-size: 16px; color: #13254a; }
.aps-cli-nums .r b { color: #b42318; }
.aps-cli-nums small { font-size: 10.5px; color: #718096; line-height: 1.25; }
.aps-cli-lista { display: grid; gap: 4px; padding-top: 8px; border-top: 1px dashed #e3e9f1; }
.aps-cli-lista div { display: flex; gap: 8px; font-size: 12px; color: #42536a; }
.aps-cli-lista b { color: #b42318; }
.aps-cli-lista small { font-size: 11px; color: #8a97a8; }
.aps-viavel { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; border: 1px solid #c9d9f6; border-radius: 10px; background: #f5f8ff; }
.aps-viavel-aviso { border-color: #e3e9f1; background: #f6f8fb; color: #5b6b80; font-size: 12.5px; }
.aps-viavel-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.aps-viavel-top > div { display: grid; }
.aps-viavel-top small { font-size: 10.5px; font-weight: 800; color: #2a55a3; text-transform: uppercase; letter-spacing: .04em; }
.aps-viavel-top b { font-size: 20px; color: #13254a; }
.aps-viavel-top > span { flex: 1; min-width: 200px; font-size: 12.5px; color: #42536a; }
.aps-viavel p { margin: 0; font-size: 12.5px; line-height: 1.45; padding: 7px 10px; border-radius: 8px; }
.aps-ok { background: #ecf8f1; color: #1d6a40; }
.aps-atencao { background: #fffbf0; color: #6b4a00; }
.aps-risco { background: #fff1f1; color: #9b1c12; }
.aps-viavel-alt { font-size: 11.5px; color: #5b6b80; }
.pcp-os-viavel-campo { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  .aps-hero-acoes { position: static; transform: none; margin-top: 10px; }
  #main table.aps-tab.aps-tab, #main table.aps-tab tbody, #main table.aps-tab tr { display: block; width: 100% !important; }
  #main table.aps-tab thead { display: none; }
  #main table.aps-tab tbody { display: grid; gap: 10px; }
  #main table.aps-tab.aps-tab.aps-tab > tbody > tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 5px; padding: 12px; border: 1px solid #e3e9f1; border-radius: 12px; background: #fff; }
  #main table.aps-tab.aps-tab.aps-tab > tbody > tr > td.aps-c-linha { grid-column: 1 / -1; width: auto !important; }
  #main table.aps-tab.aps-tab.aps-tab > tbody > tr > td.aps-cel { display: block; width: auto !important; }
  #main table.aps-tab td.aps-cel::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 700; opacity: .8; margin-bottom: 2px; }
  #main table.aps-prev.aps-prev.aps-prev.aps-prev > tbody > tr > td.aps-p-os { grid-column: 1 / -1; padding-bottom: 8px !important; border-bottom: 1px solid #eef2f6 !important; }
  #main table.aps-prev td[data-label]:not(.aps-p-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; }
}
@media (max-width: 640px) { .aps-cli-grid { grid-template-columns: 1fr; } .aps-cli-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* V1710 — painel de integração industrial. Mantém fontes, cartões e paleta padrão do TsQualy. */
.aps1710-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px}
.aps1710-head h2{margin:2px 0 5px;color:#13254a;font-size:21px}.aps1710-head p{margin:0;color:#5b6b80;font-size:12.5px;max-width:850px;line-height:1.45}
.aps1710-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:9px;margin-top:16px}
.aps1710-kpis article{display:grid;gap:3px;padding:11px 12px;background:#f6f8fb;border:1px solid #e3e9f1;border-radius:10px;min-width:0}
.aps1710-kpis article.risk{background:#fff6f3;border-color:#f1c8bf}.aps1710-kpis small{color:#718096;font-size:10.5px}.aps1710-kpis b{font-size:20px;color:#13254a;overflow-wrap:anywhere}.aps1710-kpis span{font-size:10.5px;color:#5b6b80}
.aps1710-note{margin-top:12px;padding:9px 11px;border-radius:8px;background:#f4f6f9;color:#53647a;font-size:11.5px;line-height:1.45}
.aps1710-table-wrap{overflow-x:auto}.aps1710-table{min-width:680px!important;border-spacing:0!important}.aps1710-table td{padding:9px 8px!important;border-bottom:1px solid #edf0f4!important;font-size:12px}.aps1710-table td b{display:block;color:#243653}.aps1710-table td small{display:block;color:#718096;font-size:10.5px}.aps1710-short{color:#b42318!important;font-weight:700}.aps1710-progress{height:7px;background:#edf0f4;border-radius:20px;overflow:hidden;min-width:70px}.aps1710-progress i{display:block;height:100%;background:#319568;border-radius:20px}
.aps1710-os-list{display:grid;gap:8px}.aps1710-os{border:1px solid #e3e9f1;border-radius:10px;background:#fff;overflow:hidden}.aps1710-os summary{display:flex;align-items:center;gap:14px;padding:11px 13px;cursor:pointer;color:#42536a;font-size:12px;flex-wrap:wrap}.aps1710-os summary b{color:#13254a;font-size:13px}.aps1710-os-meta{margin-left:auto;color:#718096}.aps1710-os-body{display:grid;gap:9px;padding:0 10px 10px}.aps1710-item{padding:10px;border-radius:9px;background:#f8fafc;border:1px solid #edf0f4}.aps1710-item-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.aps1710-item-head b{font-size:12.5px;color:#13254a}.aps1710-item-head small{display:block;color:#718096;font-size:10.5px;margin-top:3px}.aps1710-status{display:inline-flex;padding:3px 7px;border-radius:20px;font-size:10px;font-weight:700;white-space:nowrap}.aps1710-status.done{background:#e8f6ee;color:#23794a}.aps1710-status.pending{background:#fff1d1;color:#7a5300}.aps1710-status.neutral{background:#edf1f5;color:#5b6b80}
.aps1710-costs{display:flex;gap:8px 18px;flex-wrap:wrap;margin:9px 0;color:#5b6b80;font-size:11px}.aps1710-costs b{color:#13254a}.aps1710-materials{display:grid;gap:6px}.aps1710-material{display:grid;grid-template-columns:minmax(160px,1fr) auto;gap:5px 10px;padding:8px;background:#fff;border:1px solid #e7ebf1;border-radius:8px}.aps1710-material>div:first-child b{display:block;color:#243653;font-size:11.5px}.aps1710-material small{color:#718096;font-size:10.5px}.aps1710-lots{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 12px;font-size:10.5px;color:#5b6b80}.aps1710-diags{margin:8px 0 0;padding-left:18px;color:#9b3c16;font-size:11px}
@media(max-width:700px){.aps1710-costs{display:grid;grid-template-columns:1fr 1fr}.aps1710-material{grid-template-columns:1fr auto}.aps1710-head h2{font-size:18px}}
