.ph-purchase{color:#1e293b;font-size:13px}
.ph-record-modal textarea{width:100%;min-height:65px;box-sizing:border-box;border:1px solid #dbe2ef;border-radius:8px;padding:8px;font:inherit}
.ph-arrival-spec{padding:8px 0;border-bottom:1px solid #eef2f7}
.ph-arrival-spec small{color:#64748b}
.ph-record-modal .ph-btn{border:1px solid #dbe2ef;border-radius:8px;background:#fff;color:#334155;padding:8px 12px;font:inherit;cursor:pointer}
.ph-record-modal .ph-btn-primary{border-color:#2563eb;background:#2563eb;color:#fff}
.ph-record-modal .ph-btn:disabled{opacity:.5;cursor:not-allowed}
.ph-purchase *{box-sizing:border-box}
.ph-purchase .ph-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.ph-purchase .ph-toolbar input,.ph-purchase .ph-toolbar select{border:1px solid #dbe2ef;border-radius:9px;background:#fff;padding:8px 10px;font:inherit;color:#334155}
.ph-purchase .ph-toolbar input{min-width:240px;flex:1}
.ph-purchase .ph-btn{display:inline-flex;align-items:center;border:1px solid #dbe2ef;border-radius:9px;background:#fff;color:#334155;padding:7px 11px;font:inherit;cursor:pointer;text-decoration:none}
.ph-purchase .ph-btn:hover{background:#f8fafc}
.ph-purchase .ph-btn:disabled{opacity:.55;cursor:not-allowed}
.ph-purchase .ph-btn-primary{border-color:#2563eb;background:#2563eb;color:#fff}
.ph-purchase .ph-btn-primary:hover{background:#1d4ed8}
.ph-purchase .ph-btn-danger{border-color:#fecaca;color:#b91c1c;background:#fff7f7}
.ph-purchase .ph-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.ph-purchase .ph-tab{border:1px solid #dbe2ef;border-radius:999px;background:#fff;color:#475569;padding:6px 12px;cursor:pointer;font:inherit}
.ph-purchase .ph-tab.on{background:#141736;border-color:#141736;color:#fff;font-weight:800}
.ph-purchase .ph-summary{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:9px;margin-bottom:12px}
.ph-purchase .ph-kpi{border:1px solid #e2e8f0;border-radius:10px;padding:10px;background:#f8fafc}
.ph-purchase .ph-kpi b{display:block;font-size:19px;color:#0f172a;margin-top:3px}
.ph-purchase .ph-kpi span{font-size:11px;color:#64748b}
.ph-purchase .ph-list{display:grid;gap:10px}
.ph-purchase .ph-item{border:1px solid #e2e8f0;border-radius:12px;background:#fff;padding:12px}
.ph-purchase .ph-head{display:flex;gap:10px;align-items:flex-start}
.ph-purchase .ph-img{width:58px;height:58px;border-radius:9px;object-fit:cover;background:#f1f5f9;flex:0 0 58px}
.ph-purchase .ph-title{font-weight:800;color:#0f172a;line-height:1.45}
.ph-purchase .ph-meta{color:#64748b;font-size:12px;line-height:1.7;word-break:break-word}
.ph-purchase .ph-grow{flex:1;min-width:0}
.ph-purchase .ph-badge{display:inline-block;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:800;background:#eff6ff;color:#1d4ed8;white-space:nowrap}
.ph-purchase .ph-badge.ok{background:#dcfce7;color:#15803d}
.ph-purchase .ph-badge.warn{background:#fff7ed;color:#c2410c}
.ph-purchase .ph-badge.muted{background:#f1f5f9;color:#475569}
.ph-purchase .ph-grid{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:8px;margin-top:10px}
.ph-purchase .ph-cell{border-radius:9px;background:#f8fafc;padding:8px 10px;min-width:0}
.ph-purchase .ph-cell small{display:block;color:#64748b;margin-bottom:2px}
.ph-purchase .ph-cell strong{display:block;color:#0f172a;word-break:break-word}
.ph-purchase .ph-components{margin-top:10px;border-left:3px solid #60a5fa;padding:7px 10px;background:#f8fbff;border-radius:0 8px 8px 0}
.ph-purchase .ph-component{display:flex;gap:8px;justify-content:space-between;padding:3px 0}
.ph-purchase .ph-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}
.ph-purchase details{margin-top:9px;border-top:1px dashed #dbe2ef;padding-top:8px}
.ph-purchase summary{cursor:pointer;color:#1d4ed8;font-weight:700}
.ph-purchase .ph-order{padding:6px 0;border-bottom:1px solid #eef2f7;color:#475569;font-size:12px}
.ph-purchase .ph-empty,.ph-purchase .ph-error{padding:28px;border:1px dashed #cbd5e1;border-radius:10px;text-align:center;color:#64748b;background:#f8fafc}
.ph-purchase .ph-error{border-color:#fecaca;background:#fff7f7;color:#b91c1c}
.ph-purchase .ph-note{font-size:11px;color:#64748b;margin-top:10px}
@media(max-width:900px){.ph-purchase .ph-summary{grid-template-columns:repeat(2,1fr)}.ph-purchase .ph-grid{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.ph-purchase .ph-summary,.ph-purchase .ph-grid{grid-template-columns:1fr}.ph-purchase .ph-toolbar input{min-width:100%}.ph-purchase .ph-head{flex-wrap:wrap}}
.ph-record-modal{width:min(680px,92vw);max-height:88vh;border:1px solid #dbe2ef;border-radius:16px;padding:22px;color:#1e293b;box-shadow:0 20px 80px #0f172a33}
.ph-record-modal::backdrop{background:#0f172a66}
.ph-record-modal form>label,.ph-record-modal #prComponents>label,.ph-record-money>label{display:flex;flex-direction:column;gap:6px;margin:10px 0;font-size:13px}
.ph-record-modal input:not([type=checkbox]){padding:9px 11px;border:1px solid #cbd5e1;border-radius:9px;font:inherit}
.ph-record-modal fieldset{border:1px solid #e2e8f0;border-radius:10px;padding:10px;margin:12px 0}
.ph-record-source{display:flex;align-items:center;gap:8px;padding:5px;font-size:13px}
.ph-record-money{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ph-record-modal small{color:#64748b}
.ph-record-modal .ph-error:empty{display:none}
@media(max-width:600px){.ph-record-money{grid-template-columns:1fr}}
/* Source profiles only: never change procurement dashboard styles. */
.ph-profile-page .ph-list{gap:5px}
.ph-profile-page .ph-profile-row{border:1px solid #e5eaf2;border-radius:7px;padding:6px 8px;background:#fff}
.ph-profile-page .ph-profile-line{display:grid;grid-template-columns:34px minmax(150px,2fr) minmax(90px,1fr) minmax(100px,1fr) 75px 115px auto;gap:8px;align-items:center;min-height:38px;font-size:12px}
.ph-profile-page .ph-profile-line .ph-img{width:34px;height:34px;min-width:34px;object-fit:contain}
.ph-profile-page .ph-profile-product{min-width:0;display:flex;flex-direction:column;gap:2px}
.ph-profile-page .ph-profile-product span,.ph-profile-page .ph-profile-spec{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph-profile-page .ph-profile-state small{display:block;font-size:10px;color:#64748b}
.ph-profile-page .ph-btn{padding:4px 8px;font-size:12px;width:auto}
.ph-profile-page .ph-profile-detail{font-size:11px;margin-top:3px}
.ph-profile-page .ph-profile-detail summary{cursor:pointer;color:#64748b}
.ph-profile-page .ph-profile-detail .ph-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:5px 0}
.ph-profile-page .ph-profile-detail .ph-cell{padding:5px}
.ph-profile-page .ph-profile-group{border:1px solid #e5eaf2;border-radius:7px;background:#f8fafc;padding:5px}
.ph-profile-page .ph-profile-group>summary{padding:4px 6px;font-size:12px;font-weight:600;cursor:pointer}
.ph-profile-page .ph-profile-group .ph-profile-row{margin-top:4px}
.ph-profile-page .ph-profile-library{margin:5px 0 10px;color:#64748b;font-size:12px}
.ph-profile-page .ph-profile-library>summary{cursor:pointer;padding:5px 0}
.ph-profile-page .ph-canonical-group{margin:6px 0;border:1px solid #e5eaf2;border-radius:8px;background:white}
.ph-profile-page .ph-canonical-group-head{display:flex;align-items:center;gap:8px;padding:7px 9px}
.ph-profile-page .ph-canonical-group-toggle{display:flex;align-items:center;gap:8px;min-width:0;flex:1;border:0;background:transparent;text-align:left;cursor:pointer}
.ph-profile-page .ph-canonical-group-title{display:flex;flex-direction:column;min-width:0}
.ph-profile-page .ph-canonical-group-title b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.ph-profile-page .ph-canonical-group-title small,.ph-profile-page .ph-canonical-group-meta{color:#64748b;font-size:12px}
.ph-profile-page .ph-canonical-group-body{padding:0 8px 8px}
.ph-profile-page .ph-canonical-group-body[hidden]{display:none!important}
.ph-profile-page .ph-canonical-chevron{transition:transform .15s}
.ph-profile-page .is-open>.ph-canonical-group-head .ph-canonical-chevron{transform:rotate(90deg)}
.ph-profile-page .ph-profile-references{padding:6px 0;font-size:12px}
.ph-profile-page .ph-profile-references small{display:block;color:#64748b;margin-top:4px}
@media(max-width:1000px){.ph-profile-page .ph-profile-line{grid-template-columns:34px minmax(120px,2fr) minmax(80px,1fr) 90px 65px 100px auto;gap:5px}}
@media(max-width:720px){.ph-profile-page .ph-profile-line{grid-template-columns:30px minmax(100px,1fr) 75px auto}.ph-profile-page .ph-profile-spec,.ph-profile-page .ph-profile-line>span:nth-of-type(2),.ph-profile-page .ph-profile-state{display:none}}
