/* MS Purchase Orders v1.0 — scoped Luxury identity; no global overrides */
.po-page{--po-gold:#c89948;--po-deep:#342216;--po-ink:#352316;--po-border:#e3d0b4;--po-ivory:#fffdf9;color:var(--po-ink);font-family:inherit;font-size:1rem;max-width:1780px;margin:0 auto;padding-bottom:40px}
.po-page .po-hero{background:linear-gradient(110deg,#302017,#603f25);color:#f9e1ad;border:1px solid #bd975a;border-radius:14px;padding:19px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin:5px 0 15px}
.ms-luxury main .po-page .po-hero h1{font-family:inherit;font-size:clamp(26px,2.3vw,32px);line-height:1.4;margin:0;color:#f8e4ba}
.po-page .po-hero p{color:#e8d4b6;margin:3px 0 0;font-size:1rem}.po-page .po-eyebrow{font-family:inherit;font-size:12px;font-weight:600;letter-spacing:1.1px;color:#e0be7f}
.po-page .po-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.po-page .po-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin-bottom:16px}
.po-page .po-metrics>.card{background:#fffdfa;border:1px solid var(--po-border);padding:18px;min-height:92px;border-radius:12px;text-align:center;display:flex;flex-direction:column;gap:7px;justify-content:center;box-shadow:0 5px 15px rgba(60,38,14,.035)}
.po-metrics b{font-size:29px;color:var(--po-deep);line-height:1}.po-metrics span{font-size:15px;color:#836342}
.po-page .po-filters{margin:10px 0 15px;border:1px solid var(--po-border);border-radius:12px;background:#fffdfa;padding:12px;display:flex;flex-wrap:wrap;gap:9px}
.po-filters input,.po-filters select{font-family:inherit;font-size:1rem;min-height:39px;border:1px solid #d9bfa0;border-radius:8px;background:#fff;color:var(--po-ink)}
.po-filters input:first-of-type{flex:2 1 270px}
.po-page .po-table-wrap,.po-page .po-fields,.po-page .po-lines,.po-page .po-history,.po-page .po-state-control{background:#fffefa;border:1px solid var(--po-border);border-radius:13px;box-shadow:0 6px 22px rgba(41,25,12,.045)}
.po-page .po-table-wrap{overflow-x:auto}.po-page .po-table{width:100%;min-width:790px}
.po-page .po-table th,.po-page .po-lines-table th{background:#38271b!important;color:#ffe4b4!important;border-color:#987345!important;font-size:15px;padding:13px 12px}
.po-page .po-table td{font-size:15px;padding:11px 12px}.po-page .po-table tbody tr:hover{background:#f8eddb!important}.po-page .po-table .po-number{font-size:18px;font-weight:850;color:#774515;text-decoration:none;white-space:nowrap}

/* Supplier badges and origin flags use the same B6 foundation components as Shipments.
   supplier-badge / origin-flag-b4 are intentionally NOT restyled here. */
.po-page .po-status{display:inline-block;border:1px solid #d8b579;border-radius:40px;background:#f5e7ce;color:#63401e;padding:5px 10px;font-size:14px;font-weight:700}
.po-status.po-sent{background:#f1dfae}.po-status.po-completed{background:#e1efdf;color:#2d6430;border-color:#a9cda5}.po-status.po-cancelled{background:#f5e5e0;color:#993d32;border-color:#e0b2a7}
.po-page .po-field-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:12px}
.po-page .po-fields,.po-page .po-lines,.po-page .po-state-control,.po-page .po-history{padding:18px 20px;margin:12px 0}
.po-page h2{font-size:20px;margin:0 0 12px;color:var(--po-deep)}
.po-page .po-fields label{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:15px;color:#6e492b}
.po-page .po-fields :is(input,select,textarea),.po-page .po-lines input{font-family:inherit;background:#fffefa;color:#382317;border:1px solid #d8bb94;border-radius:8px;min-height:39px;padding:8px 10px;outline:none;max-width:100%;width:100%;font-size:15px}
.po-page input[readonly]{background:#f7eddd;color:#7b5124}
.po-page :is(input,select,textarea):focus-visible{border-color:#ac792d!important;box-shadow:0 0 0 3px rgba(195,142,53,.2)!important;outline:none!important}
.po-page :is(input,select,textarea):disabled{background:#f8f4ef;color:#5c4b3a;opacity:1}
.po-page .po-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.po-section-head p{margin:0}
.po-page .po-lines .tablewrap{overflow-x:auto}.po-page .po-lines-table{min-width:990px;width:100%;table-layout:auto}.po-lines-table th{white-space:nowrap}.po-lines-table td{padding:7px 5px;border-color:#efdfc7}.po-lines-table td:nth-child(2){min-width:220px}.po-lines-table td:nth-child(6){min-width:180px}
.po-page .po-lines-table td{font-size:15px}.po-page .po-lines-table td input{text-align:center;min-height:36px;padding:7px}
.po-lines-table td:nth-child(2) input,.po-lines-table td:nth-child(6) input{text-align:right}
.po-page .po-order{color:#886439;font-weight:800;text-align:center}
.po-page .po-save-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;border:1px solid #dcb77d;background:#f9eeda;padding:15px;border-radius:12px}.po-save-bar p{margin:0;color:#795936}
.po-page .po-status-line{height:39px;display:flex;align-items:center}
.po-page .po-state-form{display:flex;gap:10px;flex-wrap:wrap}.po-page .po-event{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid #f0e1cc}.po-event strong{color:#704a20}.po-event small{color:#876b47}
.po-page :is(a,button).btn:hover{border-color:#c38d42!important;box-shadow:0 3px 10px rgba(116,72,23,.12)}
.po-not-ready{padding:30px;color:#603c1f}
@media(max-width:900px){.po-page .po-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.po-page .po-field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:580px){.po-page .po-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.po-page .po-field-grid{grid-template-columns:1fr}.po-page .po-hero{padding:14px}.po-page .po-fields,.po-page .po-lines{padding:12px}.po-page .po-save-bar{align-items:stretch}.po-page .po-save-bar button{width:100%}}
