
/* V164 – Cost summary limited to 3 KPIs; fixed partner identity; contract + signed VO total */
.cost-page{width:100%;max-width:none}
.cost-page .pagehead{align-items:flex-start;margin-bottom:12px}
.cost-page .pagehead h1{font-size:21px;letter-spacing:-.25px}
.cost-page .pagehead .sub{font-size:12px}
.cost-kpis{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.cost-kpis .statcard{padding:11px 13px;min-width:0}
.cost-kpis .statcard small{font-size:11px;line-height:1.35;display:block;min-height:28px}
.cost-kpis .statcard b{font-size:clamp(15px,1.15vw,20px);white-space:nowrap;letter-spacing:-.35px}
.cost-lists{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.cost-party-panel{padding:13px 14px}
.cost-party-panel .panelhead{margin-bottom:12px}
.cost-party-panel .panelhead h3{font-size:14px}
.cost-count{background:#eef4fb;border-radius:20px;padding:5px 10px;font-size:11px;font-weight:700}
.cost-party-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cost-party-card{background:#fff;border:1px solid #dce5f0;border-radius:9px;padding:12px;min-width:0;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}
.cost-party-card:hover,.cost-party-card:focus{outline:0;border-color:#83b4f4;box-shadow:0 4px 15px rgba(37,99,235,.09);transform:translateY(-1px)}
.cost-party-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.cost-party-ident{display:flex;align-items:flex-start;gap:8px;min-width:0}
.cost-party-type{flex:0 0 auto;background:#eaf2ff;color:#245db1;border-radius:5px;padding:3px 6px;font-size:9px;font-weight:800;letter-spacing:.04em}
.cost-party-ident>div{min-width:0}
.cost-party-ident b{display:block;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.cost-party-ident small{display:block;color:#718096;font-size:10px;margin-top:3px;overflow-wrap:anywhere}
.cost-card-open{color:#2676e8;font-size:10px;font-weight:700;white-space:nowrap}
.cost-card-open b{font-size:16px;margin-left:3px}
.cost-party-scope{font-size:10px;color:#64748b;margin:8px 0 10px;padding-bottom:8px;border-bottom:1px solid #edf1f6;white-space:normal;line-height:1.35}
.cost-party-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.cost-party-metrics>div{min-width:0;background:#f7f9fc;border:1px solid #edf1f6;border-radius:6px;padding:7px}
.cost-party-metrics small{display:block;font-size:9px;color:#66758b;line-height:1.25;min-height:23px}
.cost-party-metrics b{display:block;font-size:clamp(10px,.82vw,12px);font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:-.2px;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
.cost-party-metrics .cpm.primary{background:#edf5ff;border-color:#d7e8ff}
.cost-party-metrics .cpm.primary b{color:#1557a6}
.cost-party-metrics .cpm.claim{background:#fff8ed;border-color:#f8e6c7}
.cost-party-metrics .cpm.vo{background:#f4f0ff;border-color:#e7ddff}
.cost-party-metrics .cpm.updated{background:#eaf8f1;border-color:#cceedd}
.cost-party-metrics .cpm.updated b{color:#087443}
.cost-party-metrics .cpm.claim b{color:#9a5a08}
.cost-party-metrics em{display:block;font-style:normal;color:#9a5a08;font-size:8px;line-height:1.25;margin-top:4px;white-space:normal;overflow-wrap:anywhere}
.cost-page .empty{grid-column:1/-1}
#modalRoot .modal{width:min(790px,96vw);max-height:92vh;padding:19px 21px}
#modalRoot .formgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
#modalRoot .field input,#modalRoot .field select,#modalRoot .field textarea{width:100%;min-width:0}
#modalRoot .field.full{grid-column:1/-1}
#modalRoot .modalfoot{position:sticky;bottom:-19px;background:#fff;padding:11px 0 0;border-top:1px solid #edf1f6}
@media(max-width:1050px){.cost-party-grid{grid-template-columns:1fr}.cost-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.cost-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.cost-party-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#modalRoot .formgrid{grid-template-columns:1fr}}
