/* Página de Precificação — complementa css/app.css (mesmos tokens de cor). */
.pr-voltar { font-size: .82rem; font-weight: 600; color: var(--accent); text-decoration: none; padding: 6px 10px; border-radius: 7px; }
.pr-voltar:hover { background: var(--surface2); }
.pr-main { padding: 18px 24px 80px; max-width: 1200px; }
.pr-aviso { max-width: 560px; margin: 60px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; text-align: center; color: var(--text2); line-height: 1.6; }
.pr-aviso h2 { color: var(--text); font-size: 1.1rem; margin-bottom: 8px; }

.pr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.pr-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.pr-card + .pr-card { margin-top: 14px; }
.pr-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 2px; display: flex; gap: 8px; align-items: center; }
.pr-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; flex: none; }
.pr-hint { color: var(--text2); font-size: .8rem; margin: 0 0 12px; }
.pr-nome { width: 100%; border: 0; border-bottom: 2px solid var(--border); background: transparent; font: 600 1.15rem 'Inter', sans-serif; color: var(--text); padding: 4px 0 8px; margin-bottom: 14px; }
.pr-nome:focus { outline: 0; border-bottom-color: var(--accent); }

.pr-line { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.pr-line:first-of-type { border-top: 0; }
.pr-line .lb { font-weight: 600; font-size: .86rem; }
.pr-line .lb small { display: block; color: var(--text2); font-weight: 400; font-size: .75rem; }
.pr-box { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pr-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.pr-box span { display: grid; place-items: center; padding: 0 9px; color: var(--text2); font-size: .75rem; font-weight: 600; background: var(--surface2); }
.pr-box input, .pr-box select { border: 0; background: transparent; font: 600 .9rem 'Inter', sans-serif; color: var(--text); padding: 8px 9px; width: 100%; min-width: 0; text-align: right; outline: 0; font-variant-numeric: tabular-nums; }
.pr-box select { text-align: left; }
.pr-calc { font-size: .7rem; color: var(--text2); text-align: right; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pr-chip { border: 1px dashed var(--accent); background: var(--accent-light); color: var(--accent-dark); font-weight: 700; font-size: .82rem; padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-row { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.pr-tot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--text); font-weight: 700; }
.pr-tot b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pr-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }

.pr-res { position: sticky; top: 14px; }
.pr-seg { display: flex; background: var(--surface2); border-radius: 9px; padding: 3px; }
.pr-seg button { flex: 1; border: 0; background: transparent; color: var(--text2); font: 600 .8rem 'Inter', sans-serif; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.pr-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pr-lbl { font-size: .7rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; margin-top: 14px; }
.pr-price { font-size: 2.3rem; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.pr-sub { font-size: .8rem; color: var(--text2); }
.pr-bigin { display: flex; align-items: center; border: 2px solid var(--accent); border-radius: 10px; margin-top: 6px; }
.pr-bigin span { padding: 0 10px; font-weight: 700; color: var(--text2); }
.pr-bigin input { border: 0; outline: 0; background: transparent; font: 700 1.6rem 'Inter', sans-serif; color: var(--text); padding: 8px 10px 8px 0; width: 100%; min-width: 0; }
.pr-verd { border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.pr-verd b { font-size: 1.3rem; }
.pr-verd p { margin-top: 2px; font-size: .8rem; color: var(--text2); }
.pr-good { background: var(--green-dim); color: var(--green); }
.pr-warn { background: var(--amber-dim); color: var(--amber); }
.pr-bad { background: var(--red-dim); color: var(--red); }
.pr-split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 8px 0; background: var(--border); }
.pr-where div { display: grid; grid-template-columns: 1fr auto 44px; gap: 8px; padding: 3px 0; font-size: .8rem; font-variant-numeric: tabular-nums; }
.pr-where b { text-align: right; font-weight: 600; }
.pr-where em { text-align: right; font-style: normal; color: var(--text2); }
.pr-acts { display: flex; gap: 8px; margin-top: 14px; }
.pr-acts .btn { flex: 1; }
.btn-sec { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }

.pr-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.pr-table th { text-align: left; font-size: .72rem; color: var(--text2); font-weight: 600; padding: 6px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.pr-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pr-table td.r, .pr-table th.r { text-align: right; font-variant-numeric: tabular-nums; }
.pr-table input, .pr-table select { width: 100%; min-width: 0; border: 1px solid transparent; background: transparent; color: var(--text); font: 500 .84rem 'Inter', sans-serif; padding: 6px 6px; border-radius: 6px; }
.pr-table input:hover, .pr-table select:hover { border-color: var(--border); }
.pr-table input:focus, .pr-table select:focus { outline: 0; border-color: var(--accent); background: var(--surface); }
.pr-table input.n { text-align: right; font-variant-numeric: tabular-nums; }
.pr-table tr.cl { cursor: pointer; }
.pr-table tr.cl:hover td { background: var(--surface2); }
.pr-x { border: 0; background: none; color: var(--text2); cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.pr-x:hover { color: var(--red); background: var(--red-dim); }
.pr-scroll { overflow-x: auto; }
.pr-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.pr-busca { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 8px 10px; font: 500 .85rem 'Inter', sans-serif; min-width: 220px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-empty { color: var(--text2); font-size: .85rem; padding: 18px 0; text-align: center; }

.pr-rec { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.pr-lista button { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); padding: 9px 10px; border-radius: 8px; cursor: pointer; font: 500 .85rem 'Inter', sans-serif; }
.pr-lista button:hover { background: var(--surface2); }
.pr-lista button.on { background: var(--accent-light); color: var(--accent-dark); font-weight: 600; }
.pr-lista small { color: var(--text2); font-variant-numeric: tabular-nums; }

.pr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pr-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.pr-kpi .l { font-size: .72rem; color: var(--text2); font-weight: 600; }
.pr-kpi .v { font-size: 1.3rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

.pr-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.pr-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); z-index: 41; transform: translateX(100%); transition: transform .22s ease; display: flex; flex-direction: column; box-shadow: -20px 0 40px -20px rgba(0,0,0,.3); }
body.pr-dr .pr-scrim { opacity: 1; pointer-events: auto; }
body.pr-dr .pr-drawer { transform: none; }
.pr-dh { display: flex; justify-content: space-between; gap: 10px; padding: 18px; border-bottom: 1px solid var(--border); }
.pr-dh h3 { font-size: 1rem; }
.pr-dh p { font-size: .8rem; color: var(--text2); margin-top: 2px; }
.pr-db { padding: 6px 18px 18px; overflow-y: auto; flex: 1; }
.pr-db .pr-line { grid-template-columns: minmax(0, 1fr) 210px; }
.pr-df { padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface2); }
.pr-tip { font-size: .75rem; color: var(--text2); background: var(--surface2); border-radius: 8px; padding: 9px 11px; margin: 10px 0 4px; line-height: 1.5; }
.pr-chk { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .85rem; cursor: pointer; margin-top: 12px; }
.pr-toast { position: fixed; bottom: 18px; right: 18px; background: var(--text); color: var(--surface); padding: 9px 14px; border-radius: 8px; font-size: .82rem; font-weight: 600; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 60; }
.pr-toast.on { opacity: 1; }
.pr-toast.err { background: var(--red); color: #fff; }

@media (max-width: 900px) {
  .pr-grid, .pr-rec { grid-template-columns: 1fr; }
  .pr-res { position: static; }
  .pr-main { padding: 14px 14px 80px; }
}
@media (max-width: 480px) { .pr-line { grid-template-columns: 1fr; } .pr-row { justify-content: flex-start; } }
.pr-table tr.on td { background: var(--accent-light); }
