/* Painel do Good Oficina (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%; }
}
