/* Painel do Good Licitações (complementa o style.css) */
.brand-bag { background: url('/img/logo-mark.svg') center / cover no-repeat; }
.badge.novo { background: #fef3c7; color: #b45309; }
.badge.pronto, .badge.enviado { background: #ede9fe; color: #6d28d9; }
.badge.entregue { background: #dcfce7; color: #15803d; }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: #f1f2f6; display: inline-grid; place-items: center; vertical-align: middle; }
.prod-cell { display: flex; align-items: center; gap: 10px; }
.prod-cell small { display: block; color: var(--muted); }
.var-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.var-table th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 700; padding: 4px; }
.var-table td { padding: 4px; vertical-align: middle; }
.var-table input[type=text], .var-table input[type=number], .var-table input:not([type]) { width: 100%; min-width: 60px; }
.var-table .erp-link { font-size: .78rem; color: var(--muted); display: block; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.photo-grid figure { margin: 0; position: relative; width: 86px; height: 86px; border-radius: 12px; overflow: hidden; background: #f1f2f6; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid figure button { position: absolute; border: 0; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; padding: 3px 6px; cursor: pointer; }
.photo-grid .ph-del { top: 4px; right: 4px; }
.photo-grid .ph-cover { bottom: 4px; left: 4px; }
.photo-grid .ph-first { position: absolute; bottom: 4px; left: 4px; background: var(--primary); color: var(--on-primary); font-size: .65rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.photo-add { width: 86px; height: 86px; border-radius: 12px; border: 2px dashed var(--border); display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: .8rem; text-align: center; }
.share-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.share-box code { background: #f6f7fb; padding: 8px 12px; border-radius: 10px; word-break: break-all; }
.order-items td:last-child { text-align: right; white-space: nowrap; }
.status-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.erp-ok { color: #15803d; font-weight: 700; }
.erp-err { color: var(--danger); }
.stock-low { color: var(--danger); font-weight: 700; }

/* Ordens de serviço */
.badge.recebido, .badge.analise { background: #e0f2fe; color: #0369a1; }
.badge.orcamento { background: #fef3c7; color: #b45309; }
.badge.aprovado, .badge.reparo { background: #ede9fe; color: #6d28d9; }
.badge.peca { background: #ffedd5; color: #c2410c; }
.badge.pronto { background: #dcfce7; color: #15803d; }
.badge.recusado { background: #fee2e2; color: #b91c1c; }
.os-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.os-grid .card { margin-bottom: 18px; }
.os-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.os-head h1 { margin: 0; }
.os-head small { color: var(--muted); display: block; }
.os-dl { display: grid; gap: 6px; margin: 0; }
.os-dl div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.os-dl dt { color: var(--muted); font-size: .88rem; }
.os-dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.check-grid { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.check-grid .seg { display: inline-flex; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.check-grid .seg button { border: 0; background: #fff; padding: 6px 10px; font: inherit; font-size: .82rem; cursor: pointer; }
.check-grid .seg button.on[data-s=ok] { background: #dcfce7; color: #15803d; font-weight: 700; }
.check-grid .seg button.on[data-s=problema] { background: #fee2e2; color: #b91c1c; font-weight: 700; }
.check-grid .seg button.on[data-s=na] { background: #eef1f5; font-weight: 700; }
.items-table input { width: 100%; }
.items-table td { padding: 4px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.timeline li { padding: 0 0 12px 14px; position: relative; font-size: .92rem; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline li.priv::before { background: #9ca3af; }
.timeline small { display: block; color: var(--muted); font-size: .78rem; }
.secret { font-family: ui-monospace, monospace; background: #f6f7fb; padding: 2px 8px; border-radius: 6px; }
.prio { color: var(--danger); font-weight: 800; }
.late { color: var(--danger); font-weight: 700; }
@media (max-width: 900px) { .os-grid { grid-template-columns: minmax(0, 1fr); } .os-dl div { grid-template-columns: 1fr; gap: 0; } }
.table-wrap + .main-head, .table-wrap + h2 { margin-top: 28px; }
.os-grid > div { min-width: 0; }
@media (max-width: 640px) {
  .items-table thead { display: none; }
  .items-table tr { display: grid; grid-template-columns: 1.2fr 70px 1fr auto; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .items-table td { padding: 0; }
  .items-table td:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .os-head .status-steps { width: 100%; }
}

/* Radar, análise e funil */
.nota { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 32px; padding: 0 10px; border-radius: 999px; font-weight: 800; font-size: .95rem; }
.nota.verde { background: #dcfce7; color: #15803d; } .nota.amarelo { background: #fef3c7; color: #b45309; } .nota.vermelho { background: #fee2e2; color: #b91c1c; }
.nota-grande { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--radius); margin-bottom: 16px; }
.nota-grande.verde { background: #f0fdf4; } .nota-grande.amarelo { background: #fffbeb; } .nota-grande.vermelho { background: #fef2f2; }
.nota-grande .n { font-size: 2.6rem; font-weight: 800; line-height: 1; min-width: 84px; text-align: center; }
.nota-grande.verde .n { color: #15803d; } .nota-grande.amarelo .n { color: #b45309; } .nota-grande.vermelho .n { color: #b91c1c; }
.motivos { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: .9rem; }
.motivos .mais { color: #15803d; } .motivos .menos { color: #b91c1c; }
.alerta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; }
.alerta.nova { border-left: 4px solid var(--primary); }
.alerta h3 { margin: 0 0 4px; font-size: 1rem; line-height: 1.35; cursor: pointer; }
.alerta .meta { color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.alerta .acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 700; }
.chip.amber { background: var(--accent-soft); color: #b45309; }
.analise-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.analise-grid .card + .card { margin-top: 16px; }
.doc-lista { list-style: none; padding: 0; margin: 6px 0 14px; display: grid; gap: 6px; }
.doc-lista li { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.doc-lista .ok { color: #15803d; font-weight: 800; } .doc-lista .falta { color: #b91c1c; font-weight: 800; } .doc-lista .info { color: var(--muted); }
.datas { display: grid; gap: 8px; }
.datas div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--border); padding-bottom: 6px; font-size: .92rem; }
.chat { display: grid; gap: 10px; max-height: 420px; overflow: auto; margin-bottom: 10px; }
.chat .q { justify-self: end; background: var(--primary); color: var(--on-primary); padding: 8px 12px; border-radius: 14px 14px 2px 14px; max-width: 85%; }
.chat .a { background: var(--bg); padding: 10px 12px; border-radius: 14px 14px 14px 2px; white-space: pre-wrap; font-size: .92rem; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.coluna { background: #eef0f8; border-radius: 14px; padding: 10px; min-height: 120px; }
.coluna h3 { font-size: .9rem; margin: 2px 4px 10px; display: flex; justify-content: space-between; }
.coluna.drop { outline: 2px dashed var(--primary); }
.cartao { background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; font-size: .88rem; }
.cartao b { display: block; margin-bottom: 4px; line-height: 1.3; }
.cartao small { color: var(--muted); display: block; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; justify-content: flex-start; text-align: left; font-size: .92rem; font-weight: 500; margin: 0; }
.checklist input[type=checkbox] { width: auto; flex: none; margin-top: 3px; }
.prazo-linha { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: center; }
.prazo-linha .d { font-weight: 800; }
.uso { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.barra { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.barra i { display: block; height: 100%; background: var(--primary); }
.doc-print { background: #fff; color: #000; padding: 32px; border-radius: 8px; font-family: Georgia, 'Times New Roman', serif; line-height: 1.55; }
.doc-print table { width: 100%; border-collapse: collapse; font-size: .85rem; } .doc-print th, .doc-print td { border: 1px solid #999; padding: 4px 6px; text-align: left; }
.doc-print .aviso { font-family: var(--font); font-size: .8rem; color: #b45309; }
@media (max-width: 900px) { .analise-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .alerta { grid-template-columns: auto minmax(0, 1fr); } .alerta .acoes { grid-column: 1 / -1; justify-content: flex-start; } .prazo-linha { grid-template-columns: 80px minmax(0, 1fr); } }
@media print { body.imprimindo > *:not(#printRoot) { display: none !important; } #printRoot { display: block !important; } #printRoot .doc-print { padding: 0; } }
