.ph-embedded{border:1px solid #cce1e5;background:linear-gradient(130deg,#f3fbfa,#fff);border-radius:14px;margin:22px 0 8px;padding:22px;grid-column:1/-1;color:#193a45}.ph-embedded>header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;border-bottom:1px solid #dce9ed;padding-bottom:16px;margin-bottom:20px}.ph-embedded h3{font-size:19px;margin:5px 0}.ph-embedded header p,.ph-help{font-size:12px;line-height:1.8;color:#627d86;margin:0}.ph-eyebrow{color:#087f8c;font-size:12px;font-weight:700}.ph-embedded .ph-switch{display:flex;gap:9px;align-items:center;background:#e0f2ef;padding:10px 13px;border-radius:9px;font-size:13px}.ph-switch input{width:18px!important;height:18px;min-height:0!important;accent-color:#087f8c}.ph-embedded fieldset{border:0;margin:0;padding:0;min-width:0}.ph-embedded fieldset[hidden]{display:none}.ph-fields{display:grid;grid-template-columns:1fr 1fr;gap:17px}.ph-embedded label{display:grid;gap:7px;font-size:13px;min-width:0}.ph-embedded input,.ph-embedded select,.ph-embedded textarea{width:100%;font:inherit;padding:11px 12px;background:#fff;color:#193a45;border:1px solid #c7dce1;border-radius:9px;min-height:43px}.ph-embedded input:focus,.ph-embedded select:focus,.ph-embedded textarea:focus{outline:2px solid #25a4a4;outline-offset:2px}.ph-embedded textarea{min-height:80px;resize:vertical}.ph-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 12px}.ph-section-title h4{margin:0;font-size:14px}.ph-ingredient-row{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end;margin-bottom:14px}.ph-embedded .ph-help{margin:16px 0 0}.ph-history-button{margin-top:16px}.ph-audit{padding:12px 0;border-bottom:1px solid #dce9ed;font-size:12px}.ph-audit time{margin-inline-start:14px;color:#617b85}.ph-audit p{margin:6px 0}.ph-row-sub{display:block;font-size:11px;color:#087f8c;line-height:1.6;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:620px){.ph-embedded{padding:14px}.ph-fields{grid-template-columns:1fr}.ph-ingredient-row{grid-template-columns:1fr auto}.ph-ingredient-row label:first-child{grid-column:1/-1}.ph-audit time{display:block;margin:6px 0}}

.product-edit-modal:has(#phIsMedicine:checked)>.product-components-section,.product-edit-modal:has(#phIsMedicine:checked) label:has(#modalProductProductionMode){display:none!important}
/* Keep medicine names visible without inheriting the retail table's 1440px minimum. */
#inventoryProductsTable{min-width:0!important;width:100%!important;max-width:100%!important}
.product-table-head,.product-directory-row{min-width:0!important;width:100%!important;max-width:100%!important;grid-template-columns:24px minmax(150px,2fr) minmax(80px,1fr) minmax(110px,1.2fr) 60px 85px 65px 130px!important;gap:8px!important}
.product-table-head>:nth-child(6),.product-table-head>:nth-child(7),.product-directory-row>:nth-child(6),.product-directory-row>:nth-child(7){display:none!important}
.product-directory-row{min-height:75px!important;height:auto!important;align-items:center!important}.product-directory-row>*{min-width:0!important;max-width:100%;overflow-wrap:anywhere}.product-directory-row .product-name-cell{white-space:normal!important;text-align:start!important;line-height:1.7!important}.product-directory-row .product-barcode-cell,.product-directory-row .product-sku-cell{font-size:11px!important;direction:ltr;text-align:center}.product-directory-row .product-row-actions{gap:5px!important}.product-directory-row .product-row-actions button{padding:8px 11px!important}.product-directory-row .ph-row-sub{white-space:normal!important;overflow-wrap:anywhere}
@media(max-width:760px){.product-table-head{display:none!important}.product-directory-row{grid-template-columns:24px minmax(0,1fr) 115px!important;padding:14px!important;margin-bottom:10px!important}.product-directory-row>:nth-child(1){grid-column:1;grid-row:1}.product-directory-row>:nth-child(2){grid-column:2/4;grid-row:1}.product-directory-row>:nth-child(3){grid-column:2;grid-row:2;text-align:start!important}.product-directory-row>:nth-child(4){grid-column:2;grid-row:3;text-align:start!important}.product-directory-row>:nth-child(5){grid-column:3;grid-row:2;text-align:center}.product-directory-row>:nth-child(8){grid-column:2;grid-row:4;font-size:11px}.product-directory-row>:nth-child(9){grid-column:3;grid-row:3}.product-directory-row>:nth-child(10){grid-column:2/4;grid-row:5;justify-content:flex-start!important}}
html body #inventoryPage #inventoryServiceModal #inventoryProductsTable>.product-directory-row,html body #inventoryPage #inventoryServiceModal .product-table-head{min-width:0!important;width:100%!important;max-width:100%!important;grid-template-columns:24px minmax(150px,2fr) minmax(80px,1fr) minmax(110px,1.2fr) 60px 85px 65px 130px!important;gap:8px!important}
@media(max-width:760px){html body #inventoryPage #inventoryServiceModal #inventoryProductsTable>.product-directory-row{grid-template-columns:24px minmax(0,1fr) 115px!important}}
/* Follow the host theme, including branding styles injected after the app HTML. */
html body #detailModal #modalProductForm .ph-embedded{background:var(--panel,#142136)!important;color:var(--text,#e5edf8)!important;border-color:var(--border,#40536d)!important}
html body #detailModal #modalProductForm .ph-embedded>header{border-color:var(--border,#40536d)!important}
html body #detailModal #modalProductForm .ph-embedded :is(h3,h4,label,.ph-eyebrow){color:var(--text,#e5edf8)!important}
html body #detailModal #modalProductForm .ph-embedded :is(header p,.ph-help,.ph-audit time){color:var(--muted,#aabbd0)!important}
html body #detailModal #modalProductForm .ph-embedded .ph-switch{background:var(--bg,#0c1423)!important;border:1px solid var(--border,#40536d)!important;color:var(--text,#e5edf8)!important}
html body #detailModal #modalProductForm .ph-embedded :is(input:not([type=checkbox]),select,textarea){background:var(--bg,#0c1423)!important;color:var(--text,#e5edf8)!important;border-color:var(--border,#40536d)!important}
html body #detailModal #modalProductForm .ph-embedded input[type=checkbox]{accent-color:#30b4b6;opacity:1!important}
html body #detailModal #modalProductForm .ph-embedded input::placeholder,html body #detailModal #modalProductForm .ph-embedded textarea::placeholder{color:var(--muted,#aabbd0)!important;opacity:1}
/* Compact medicine editor: keep all original controls inside their original form. */
html body #detailModal #modalProductForm.ph-compact-form{display:block!important}
html body #detailModal #modalProductForm .ph-card-layout{margin:0!important;padding:20px!important;width:100%;max-width:100%;box-sizing:border-box}
html body #detailModal #modalProductForm .ph-card-layout [hidden]{display:none!important}
html body #detailModal #modalProductForm .ph-card-layout>.ph-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html body #detailModal #modalProductForm .ph-card-layout label{min-width:0;max-width:100%;margin:0}
html body #detailModal #modalProductForm .ph-card-layout .wide{grid-column:1/-1}
html body #detailModal #modalProductForm .ph-card-layout .ph-composition{margin-top:20px;border-top:1px solid var(--border,#40536d);padding-top:6px}
html body #detailModal #modalProductForm .ph-card-layout label.ph-inline-toggle{display:flex!important;align-items:center;gap:9px;margin:14px 0;font-size:12px;color:var(--muted,#aabbd0)!important}
html body #detailModal #modalProductForm .ph-card-layout label.ph-inline-toggle input{width:18px!important;height:18px!important;min-height:0!important;flex:0 0 18px;accent-color:#30b4b6}
html body #detailModal .ph-fold{border:1px solid var(--border,#40536d);border-radius:10px;background:var(--panel,#142136);color:var(--text,#e5edf8);margin-top:14px;padding:0 16px}
html body #detailModal .ph-fold>summary{cursor:pointer;padding:15px 0;font-size:14px;font-weight:700;color:var(--text,#e5edf8)!important;list-style-position:inside}
html body #detailModal .ph-fold[open]{padding-bottom:16px}
html body #detailModal .ph-fold[open]>summary{margin-bottom:12px;border-bottom:1px solid var(--border,#40536d)}
html body #detailModal #phAuditSlot .ph-history-button[hidden]{display:none!important}
html body #detailModal .ph-preview-fold{margin:14px 0}
html body #detailModal .ph-card-layout #phKindSlot .ph-switch{font-size:12px;padding:8px 10px}
@media(max-width:620px){html body #detailModal #modalProductForm .ph-card-layout{padding:14px!important}html body #detailModal #modalProductForm .ph-card-layout>.ph-fields{grid-template-columns:1fr!important}html body #detailModal .ph-fold{padding-inline:12px}}
html body #detailModal .product-edit-modal:has(.ph-card-layout)>.product-modal-hero{padding:12px 16px!important;min-height:0!important;margin-bottom:14px!important}
html body #detailModal .product-edit-modal:has(.ph-card-layout)>.product-modal-hero p{display:none!important}
html body #detailModal #phKindSlot{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
html body #detailModal #phKindSlot>label[hidden]{display:none!important}
html body #detailModal #phExtraFields .product-image-picker{padding:12px;max-width:100%}
html body #detailModal .product-edit-modal:has(.ph-card-layout)>.product-modal-hero{display:none!important}
html body #detailModal #modalProductForm .ph-card-layout>header{padding-bottom:10px!important;margin-bottom:14px!important}
html body #detailModal #modalProductForm .ph-card-layout>header h3{font-size:17px!important}
html body #detailModal #modalProductForm .ph-card-layout .ph-section-title{margin-top:12px!important}
.ph-piece-note{grid-column:1/-1;font-size:12px;line-height:1.8;color:var(--muted,#aabbd0)}.ph-box-dialog{padding:24px;width:min(450px,92vw);border:1px solid var(--border,#40536d);border-radius:14px;background:var(--panel,#142136);color:var(--text,#e5edf8);font-family:inherit}.ph-box-dialog::backdrop{background:#0008}.ph-box-dialog label{display:grid;gap:7px;margin:14px 0}.ph-box-dialog input{padding:10px;background:var(--bg,#0c1423);color:var(--text,#e5edf8);border:1px solid var(--border,#40536d);border-radius:8px;font:inherit}.ph-box-dialog p{font-size:13px;line-height:1.8}.ph-box-dialog #phBoxError{color:#ffadb4}.ph-box-dialog>div{display:flex;gap:10px;margin-top:20px}
