#petInventoryPanel{--pe-green:#216b52;--pe-border:#dce6df;color:#1d3429}
#petInventoryPanel button{border:1px solid var(--pe-border);border-radius:8px;padding:9px 12px;background:#fff;color:#234936;cursor:pointer;font:inherit;min-height:40px}
#petInventoryPanel button:disabled{opacity:.5;cursor:wait}
#petInventoryPanel[aria-busy=true] form{pointer-events:none}
#petInventoryPanel button.pe-primary{background:var(--pe-green);border-color:var(--pe-green);color:#fff}
#petInventoryPanel :focus-visible{outline:3px solid #679fe4;outline-offset:2px}
.pe-boundary,.pe-help{font-size:13px;line-height:1.7;color:#53665c;background:#f3f7f4;padding:12px;border-radius:10px}
.pe-message{padding:8px 0;min-height:32px;line-height:1.6;color:#216b52}.pe-message.is-error{color:#a52e22}
.pe-toolbar,.pe-toolbar form,.pe-actions,.pe-heading{display:flex;gap:12px;flex-wrap:wrap;align-items:end}.pe-heading{align-items:center;justify-content:space-between}.pe-heading h4{margin:0}
.pe-toolbar form{flex:1}.pe-toolbar label{min-width:160px}.pe-toolbar label:first-child{flex:1}
#petInventoryPanel label{display:flex;flex-direction:column;gap:6px;font-size:14px;line-height:1.5}
#petInventoryPanel input:not([type=checkbox]):not([type=radio]),#petInventoryPanel select,#petInventoryPanel textarea{border:1px solid #c7d5cc;border-radius:7px;padding:10px;min-width:0;width:100%;background:#fff;color:#1d3429;font:inherit;box-sizing:border-box}
#petInventoryPanel input[type=checkbox],#petInventoryPanel input[type=radio]{width:18px;height:18px;accent-color:var(--pe-green);flex-shrink:0}
#petInventoryPanel .pe-check,.pe-results label{flex-direction:row;align-items:flex-start;gap:8px}
.pe-counts{display:flex;gap:14px;flex-wrap:wrap;padding:14px 0;align-items:center;font-size:14px}
.pe-counts .pe-count{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:105px;border-radius:6px;font-size:13px}
.pe-count strong{font-size:17px;font-variant-numeric:tabular-nums;min-width:2ch;text-align:right}.pe-counts .pe-count[aria-pressed=true]{border-color:#216b52;box-shadow:inset 0 0 0 1px #216b52;background:#edf5ef}.pe-counts .pe-count-expired,.pe-counts .pe-count-urgent{color:#9d3020}
.pe-editor,.pe-saved{background:#fff;border:1px solid var(--pe-border);border-radius:8px;padding:20px;margin-bottom:18px}
.pe-editor form{display:grid;gap:16px;margin-top:16px}.pe-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.pe-photo{padding:14px;background:#f7f9f7;border:1px dashed #b8cfc0;border-radius:10px;display:grid;gap:10px}.pe-photo>button{justify-self:start}.pe-photo p{margin:0;font-size:13px;line-height:1.6}
.pe-editor details{padding:10px 0}.pe-editor summary{cursor:pointer;font-size:14px;font-weight:600;padding-bottom:10px}.pe-proof{border-top:1px solid var(--pe-border);margin-top:8px}.pe-proof a{margin:10px;display:inline-block;color:#216b52}
.pe-editor pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto;font-size:13px;background:#f2f5f2;padding:12px}
.pe-history article{border-top:1px solid var(--pe-border);padding:10px 0}.pe-history small,.pe-table small{display:block;color:#607469;font-size:12px;line-height:1.7}.pe-history p{margin:4px 0}
.pe-results{display:flex;flex-wrap:wrap;gap:18px}.pe-table-wrap{overflow:auto;border:1px solid var(--pe-border);border-radius:12px;background:#fff}.pe-table{border-collapse:collapse;width:100%;min-width:800px;font-size:14px}.pe-table th{text-align:left;font-weight:600;background:#f3f7f4;white-space:nowrap}.pe-table th,.pe-table td{padding:15px 12px;border-bottom:1px solid #e9efea;vertical-align:top}.pe-table td:last-child button{display:block;margin-bottom:7px;white-space:nowrap}.pe-state{display:inline-block;border-radius:6px;padding:5px 8px;line-height:1.5;background:#eef5ef;color:#286443}.pe-missing,.pe-rule,.pe-due{background:#fff3d8;color:#815509}.pe-expired,.pe-issue{background:#fff0ed;color:#9d3020}.pe-empty{background:#eef0f1;color:#626b69}
.pe-urgent{background:#fff0ed;color:#9d3020;font-weight:600}.pe-state+.pe-state{margin-top:6px}.pe-barcode{font-variant-numeric:tabular-nums}.pe-table td{overflow-wrap:anywhere}.pe-fields label{min-width:0}.pe-actions{margin-top:10px}
.pe-toolbar{align-items:flex-start}.pe-toolbar form{min-width:0}.pe-search-actions,.pe-toolbar-actions{display:flex;flex-wrap:wrap;gap:8px}.pe-toolbar-actions{padding-top:27px}
.pe-more-filters{flex-basis:100%;min-width:0;border-bottom:1px solid var(--pe-border);padding:6px 0 12px}.pe-more-filters summary{cursor:pointer;font-size:13px;color:#4a6155;line-height:1.6}.pe-filter-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}.pe-filter-fields label{min-width:0}
.pe-counts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.pe-counts .pe-count{min-width:0;width:100%;min-height:44px}
.pe-statistics{padding:16px 0 18px;margin-bottom:18px;border-top:1px solid var(--pe-border);border-bottom:1px solid var(--pe-border)}.pe-statistics-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.pe-statistics-head h4{margin:0;font-size:15px;line-height:1.5}.pe-statistics-head>span,.pe-statistics-note{color:#617168;font-size:12px;line-height:1.7}.pe-statistics-summary{display:flex;flex-wrap:wrap;gap:18px;margin:12px 0}.pe-statistics-summary>div{display:flex;align-items:baseline;gap:8px}.pe-statistics-summary dt{color:#53665c;font-size:13px}.pe-statistics-summary dd{margin:0;font-size:19px;font-weight:600;font-variant-numeric:tabular-nums}
.pe-unit-wrap{overflow-x:auto;max-width:100%}.pe-unit-table{width:100%;border-collapse:collapse;min-width:560px;font-size:13px;font-variant-numeric:tabular-nums}.pe-unit-table th,.pe-unit-table td{padding:10px 12px;text-align:right;border-bottom:1px solid #e3e9e5;white-space:nowrap}.pe-unit-table thead th{font-weight:600;background:#f4f6f5;color:#46594e}.pe-unit-table th:first-child{text-align:left}.pe-statistics-note{margin:9px 0 0}.pe-table-wrap{border-radius:8px}
.pe-label-photo{border:0;border-top:1px solid var(--pe-border);border-bottom:1px solid var(--pe-border);border-radius:0;background:transparent;padding:14px 0}.pe-label-photo h4{font-size:15px}.pe-ocr-capability{color:#53665c;font-size:12px}.pe-photo-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:stretch}
#petInventoryPanel .pe-photo-picker{position:relative;display:flex;justify-content:center;align-items:center;min-height:44px;padding:9px 14px;background:#216b52;color:#fff;border:1px solid #216b52;border-radius:7px;font-size:14px;cursor:pointer;overflow:hidden}.pe-photo-picker:focus-within{outline:3px solid #679fe4;outline-offset:2px}
#petInventoryPanel .pe-photo-picker input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;padding:0}.pe-photo-preview{margin:0;display:grid;gap:6px;justify-items:start}.pe-photo-preview img{display:block;max-width:100%;max-height:260px;object-fit:contain}.pe-photo-preview figcaption{font-size:12px;color:#617168;overflow-wrap:anywhere}
[data-pe-photo-status]{font-size:13px;line-height:1.6;color:#216b52}[data-pe-photo-status].is-error,.pe-proof .is-error{color:#a52e22}.pe-ocr-candidates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin:12px 0}.pe-ocr-candidates>div{min-width:0}.pe-ocr-candidates dt{font-size:12px;color:#617168}.pe-ocr-candidates dd{margin:4px 0 0;font-size:15px;font-weight:600;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.pe-ocr-review{color:#815509}.pe-ocr-text{margin-top:6px}
@media(max-width:760px){.pe-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.pe-editor{padding:14px}.pe-toolbar form{flex-basis:100%}.pe-table{min-width:0}.pe-table thead{display:none}.pe-table tr{display:grid;grid-template-columns:1fr 1fr;padding:12px;border-bottom:2px solid #dce6df}.pe-table td{padding:6px;border:0}.pe-table td:first-child{grid-column:1/-1}.pe-table td:nth-child(3)::before{content:'进货：';color:#607469}.pe-table td:nth-child(4)::before{content:'最近实查：';color:#607469}.pe-table td:last-child{display:flex;gap:8px;flex-wrap:wrap;grid-column:1/-1}.pe-table td:last-child button{margin:0}.pe-counts{gap:6px}.pe-counts>span{padding:6px 9px}}
@media(max-width:760px){.pe-toolbar-actions{padding-top:0}.pe-filter-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.pe-counts{grid-template-columns:repeat(3,minmax(0,1fr))}.pe-counts .pe-count{font-size:12px;padding:8px;gap:5px}.pe-count strong{font-size:16px}.pe-statistics-head{align-items:flex-start}.pe-statistics-summary{gap:14px}}
@media(max-width:420px){.pe-fields{grid-template-columns:1fr}.pe-toolbar label{min-width:120px}.pe-results{gap:10px}}
@media(max-width:420px){.pe-toolbar form>label{flex-basis:100%;min-width:0}.pe-filter-fields label{min-width:0}.pe-filter-fields{grid-template-columns:1fr}.pe-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.pe-toolbar-actions{width:100%}.pe-toolbar-actions button{flex:1;min-width:0;padding:8px 10px}.pe-statistics-summary dd{font-size:17px}}
@media(max-width:420px){.pe-toolbar-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.pe-toolbar-actions button{width:100%}.pe-photo-actions>.pe-photo-picker,.pe-photo-actions>button{flex:1 1 calc(50% - 8px);min-width:0}.pe-ocr-candidates{grid-template-columns:1fr}}
.pe-popup-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:0}.pe-popup-status{font-size:12px;color:#9d3020;max-width:260px;overflow-wrap:anywhere}.pet-tool-head:has(.pe-popup-tools){flex-wrap:wrap}
.pe-popup-dialog{box-sizing:border-box;width:min(720px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);margin:auto;padding:20px;border:1px solid #d1dbd6;border-radius:8px;background:#fff;color:#253c30;overflow:auto;box-shadow:0 18px 60px #152b3433}.pe-popup-dialog::backdrop{background:#162a3966}
.pe-popup-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.pe-popup-dialog h3{margin:0;font-size:19px;line-height:1.5}.pe-popup-dialog header p{margin:5px 0 0;color:#64736a;font-size:12px}.pe-popup-dialog [data-pe-alert-close]{font-size:24px;line-height:1;width:40px;flex-shrink:0;padding:4px}
.pe-popup-summary{display:flex;gap:7px;flex-wrap:wrap;margin:16px 0}.pe-popup-risk{display:inline-block;font-size:12px;line-height:1.6;border-radius:4px;padding:3px 7px;background:#f0f3f5;color:#506174}.pe-popup-expired,.pe-popup-urgent,.pe-popup-issue{background:#fff0eb;color:#9a3123}.pe-popup-due,.pe-popup-review{background:#fff4d8;color:#805b13}.pe-popup-warning{font-size:13px;color:#a12f23;line-height:1.6}.pe-popup-warning:empty,.pe-popup-status:empty{display:none}
.pe-popup-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.pe-popup-results{font-size:12px;color:#64736a;margin:12px 0 6px}.pe-popup-list{list-style:none;padding:0;margin:0}.pe-popup-item{padding:14px 0;border-bottom:1px solid #e2e8e4;overflow-wrap:anywhere}.pe-popup-item-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.pe-popup-item-head strong{font-size:15px;line-height:1.6;min-width:0}.pe-popup-item-head .pe-popup-risk{flex-shrink:0}.pe-popup-item-meta{display:flex;gap:8px;flex-wrap:wrap;color:#64736a;font-size:12px;margin:6px 0}.pe-popup-item dl{display:grid;gap:6px;margin:8px 0 0}.pe-popup-item dl>div{display:grid;grid-template-columns:88px minmax(0,1fr);gap:8px;font-size:13px;line-height:1.7}.pe-popup-item dt{color:#64736a}.pe-popup-item dd{margin:0}.pe-popup-extra{font-size:12px;line-height:1.7;color:#8b5019;margin:7px 0 0}.pe-popup-empty{padding:25px 0;color:#64736a;line-height:1.7}
.pe-popup-dialog>footer{display:flex;gap:12px;justify-content:space-between;align-items:center;margin-top:14px}.pe-popup-dialog>footer p{font-size:12px;color:#64736a;line-height:1.7;margin:0;max-width:370px}.pe-popup-dialog>footer>div{display:flex;gap:8px;flex-shrink:0}
@media(max-width:540px){.pe-popup-dialog{padding:14px;max-height:calc(100dvh - 24px)}.pe-popup-filters{grid-template-columns:minmax(0,1fr)}.pe-popup-item-head{flex-direction:column;gap:6px}.pe-popup-dialog>footer{align-items:stretch;flex-direction:column}.pe-popup-dialog>footer>div{justify-content:flex-end}.pe-popup-item dl>div{grid-template-columns:74px minmax(0,1fr)}.pe-popup-dialog h3{font-size:18px}}
