:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#18392b;background:#fff;font-size:15px}*{box-sizing:border-box}body{margin:0}header{background:#3d8a64;color:#fff;padding:30px max(24px,calc((100vw - 1160px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:8px solid #f7c54a}.eyebrow{font-size:.72rem;font-weight:800;letter-spacing:.16em}h1{font-size:2rem;margin:8px 0}header p{margin:0;opacity:.9}.badge{border:1px solid #fff9;padding:8px 12px;border-radius:20px;font-size:.72rem;white-space:nowrap;font-weight:800;letter-spacing:.08em}main{max-width:1208px;margin:auto;padding:24px}.toolbar,.section-title{display:flex;justify-content:space-between;gap:16px;align-items:center}.toolbar p{margin:5px 0;color:#586b61;font-size:.85rem}button{font:inherit;background:#3d8a64;color:#fff;border:0;border-radius:7px;padding:11px 16px;cursor:pointer}button:disabled{opacity:.6;cursor:wait}button:focus-visible{outline:3px solid #f7c54a;outline-offset:3px}#notice{margin:20px 0;padding:13px 16px;border:1px solid #ccd9d0;border-radius:7px;background:#f5f9f6}#notice.error{border-color:#ac302e;color:#8b2422;background:#fff5f5}#notice.demo{border-color:#c99c17;background:#fffbea}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.metrics article{border:1px solid #d9e3dc;border-radius:10px;padding:20px;display:flex;flex-direction:column;gap:10px}.metrics article>span{font-size:.85rem}.metrics strong{font-size:2.3rem;line-height:1.1}.metrics small,.muted,footer{color:#64746b;font-size:.82rem}section{margin-bottom:30px}h2{font-size:1.1rem;margin:0 0 15px}.stores{display:flex;gap:12px;flex-wrap:wrap}.store{border:1px solid #d9e3dc;border-radius:8px;padding:14px 18px;min-width:180px}.store strong{display:block;margin-bottom:5px}.table-wrap{overflow:auto;border:1px solid #d9e3dc;border-radius:8px}table{width:100%;border-collapse:collapse;font-size:.83rem;text-align:left}th,td{padding:13px 14px;border-bottom:1px solid #e6ece8;white-space:nowrap}th{background:#f5f9f6;color:#52665a;font-size:.72rem;text-transform:uppercase;letter-spacing:.04em}tr:last-child td{border:0}.critical{color:#9e2424;font-weight:700}.warning{color:#896600;font-weight:700}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f5f9f6;border:1px solid #d9e3dc;padding:18px;border-radius:8px;font: .85rem/1.7 ui-monospace,monospace}footer{border-top:1px solid #d9e3dc;padding-top:18px;line-height:1.7}@media(max-width:760px){.metrics{grid-template-columns:1fr}header{padding:24px}.toolbar{align-items:flex-start}main{padding:18px}h1{font-size:1.6rem}.section-title{display:block}.badge{font-size:.65rem}}

textarea{display:block;width:100%;max-width:56rem;padding:.8rem;margin:1rem 0;font:inherit;border:1px solid #3D8A64;border-radius:.4rem}dt{font-weight:bold;margin-top:.6rem}dd{margin-left:0;overflow-wrap:anywhere}

#release-panel{border:2px solid #b77900;padding:1rem;margin:1rem 0;background:#fff}#release-panel input{display:block;width:100%;padding:.8rem;margin:.8rem 0;font:inherit}#release-panel label{display:block;margin-top:.8rem}

.login-main{max-width:32rem;margin:3rem auto}.login-card{padding:2rem;border:1px solid #3D8A64;border-radius:.75rem}.login-card label{display:block;margin-top:1rem}.login-card input{display:block;width:100%;padding:.8rem;margin:.5rem 0 1.2rem;font:inherit}#logout{margin-left:1rem}

/* Action forms: consistent labels, spacing and bounded fields on every width. */
#manual-panel,#release-panel,#note-editor{max-width:58rem;margin:1.5rem 0;padding:1.4rem;border:1px solid #bdd3c5;border-radius:.65rem;background:#f8fbf9}
#manual-panel,#release-panel{border-left:5px solid #c59115}
#manual-panel p,#release-panel p,#note-editor p{line-height:1.65;overflow-wrap:anywhere}
#manual-panel label,#release-panel label,#note-editor label{display:block;margin:1rem 0 .45rem;font-weight:650}
#manual-panel input,#release-panel input{display:block;width:100%;max-width:100%;padding:.8rem;margin:0 0 1rem;border:1px solid #6b8e7a;border-radius:.4rem;background:#fff;font:inherit;min-height:44px}
#manual-panel textarea,#release-panel textarea,#note-editor textarea{margin:.45rem 0 1rem;max-width:100%;min-height:7rem}
input:focus-visible,textarea:focus-visible{outline:3px solid #f7c54a;outline-offset:2px}
.action-feedback,.resolution-banner{max-width:58rem;padding:1rem 1.2rem;border:1px solid #c3d8cc;border-radius:.5rem;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
.action-feedback:empty{display:none}.feedback-warning{background:#fff9e8;border-color:#c59115;color:#604500}.feedback-success,.resolution-banner{background:#edf8f1;border-color:#3d8a64}
#detail-content td{white-space:normal;overflow-wrap:anywhere;min-width:7rem;max-width:25rem;vertical-align:top}#detail-content table{min-width:560px}
.queue-tabs{display:flex;gap:.6rem;margin-bottom:1rem}.queue-tabs button[aria-pressed="false"]{background:#fff;color:#245a40;border:1px solid #3d8a64}
.simulation-badge{display:inline-block;margin:.3rem .5rem;padding:.2rem .55rem;border-radius:1rem;background:#fff4c4;color:#604500;font-size:.75rem;font-weight:650}
.metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:760px){.metrics{grid-template-columns:1fr 1fr}#manual-panel,#release-panel,#note-editor{padding:1rem}.queue-tabs{flex-wrap:wrap}}
@media(max-width:440px){.metrics{grid-template-columns:1fr}header{align-items:flex-start;flex-direction:column}}

#verification-panel{max-width:58rem;padding:1.4rem;margin:1.5rem 0;border:2px solid #c59115;border-radius:.65rem;line-height:1.7}#pending-view td{white-space:normal;overflow-wrap:anywhere;max-width:25rem} .metrics{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
@media(max-width:440px){.metrics{grid-template-columns:1fr}}

#correction-panel{max-width:58rem;padding:1.4rem;margin:1.5rem 0;border:1px solid #3D8A64;border-radius:.65rem;line-height:1.7}#correction-panel label{display:block;font-weight:600;margin-top:1rem}#correction-panel input,#correction-panel textarea{display:block;width:100%;box-sizing:border-box;margin:.4rem 0 1rem;padding:.7rem;font:inherit}#correction-panel button{white-space:normal}

#store-control-panel{max-width:58rem;margin:1.5rem 0;padding:1.4rem;border:1px solid #bdd3c5;border-left:5px solid #c59115;border-radius:.65rem;background:#f8fbf9;line-height:1.65}
#store-control-panel label{display:block;margin:1rem 0 .45rem;font-weight:650}
#store-control-panel input,#store-control-panel textarea{display:block;width:100%;max-width:100%;padding:.8rem;margin:.45rem 0 1rem;border:1px solid #6b8e7a;border-radius:.4rem;background:#fff;font:inherit;min-height:44px}
#store-control-panel button{margin:.3rem .5rem .3rem 0;white-space:normal}
#stores .store{max-width:100%;overflow-wrap:anywhere}#stores .store>span{display:block;margin-bottom:.8rem}#stores details{max-width:40rem;margin-top:1rem;font-size:.85rem;line-height:1.6}#stores summary{cursor:pointer;font-weight:650}
@media(max-width:760px){#store-control-panel{padding:1rem}}

#orphan-editor input,#orphan-editor textarea{display:block;width:100%;box-sizing:border-box;margin:8px 0 16px;padding:10px;border:1px solid #8bbca4;border-radius:6px;font:inherit}
#orphan-editor label{display:block;margin-top:12px}
#orphan-editor button{margin:4px 8px 4px 0}
#orphan-audit,#orphan-receipt-preview,#orphan-confirmation-help{overflow-wrap:anywhere}

/* G-226L: Keep orphan review and linked history readable at every width. */
#orphan-workflow table{table-layout:fixed}
#orphan-workflow th,#orphan-workflow td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}
#orphan-workflow th:nth-child(1){width:10%}
#orphan-workflow th:nth-child(2){width:17%}
#orphan-workflow th:nth-child(3){width:36%}
#orphan-workflow th:nth-child(4){width:22%}
#orphan-workflow th:nth-child(5){width:15%}
#orphan-workflow td button{white-space:normal;max-width:100%;min-height:44px;padding:10px}
@media(max-width:760px){
 #orphan-workflow table,#orphan-workflow tbody,#orphan-workflow tr{display:block;width:100%}
 #orphan-workflow thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #orphan-workflow tr{padding:10px 0;border-bottom:1px solid #d9e3dc}
 #orphan-workflow td{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:12px;width:auto;max-width:none;border:0;padding:8px 12px}
 #orphan-workflow td::before{font-weight:700;color:#52665a}
 #orphan-workflow td:nth-child(1)::before{content:"Store"}
 #orphan-workflow td:nth-child(2)::before{content:"UrbanPiper order"}
 #orphan-workflow td:nth-child(3)::before{content:"State"}
 #orphan-workflow td:nth-child(4)::before{content:"Receipt"}
 #orphan-workflow td:nth-child(5)::before{content:"Action"}
 #orphan-workflow td button{justify-self:start}
}

/* Investigation history: legible metadata and mobile records. */
#detail-content .audit-wrap table{min-width:1100px}
#detail-content .audit-wrap td{min-width:8rem;line-height:1.55}
@media(max-width:760px){
 #detail-content .audit-wrap table,#detail-content .audit-wrap tbody,#detail-content .audit-wrap tr{display:block;width:100%;min-width:0}
 #detail-content .audit-wrap thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #detail-content .audit-wrap tr{padding:10px 0;border-bottom:1px solid #d9e3dc}
 #detail-content .audit-wrap td{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:12px;width:auto;min-width:0;max-width:none;border:0;padding:8px 12px}
 #detail-content .audit-wrap td::before{content:attr(data-label);font-weight:700;color:#52665a}
}

.manual-audit-list{display:grid;gap:12px;max-width:58rem}
.manual-audit-record{border:1px solid #c3d8cc;border-radius:8px;padding:16px 20px;min-width:0;overflow-wrap:anywhere}
.manual-audit-record h4{margin:0 0 8px}.manual-audit-record p{margin:8px 0;line-height:1.65}
.manual-audit-record summary{cursor:pointer;font-weight:600;padding:8px 0}
.manual-audit-record dl{display:grid;grid-template-columns:minmax(8rem,1fr) minmax(0,3fr);gap:8px 16px;margin:12px 0 0}
.manual-audit-record dt{font-weight:600}.manual-audit-record dd{margin:0;min-width:0;overflow-wrap:anywhere}
@media(max-width:520px){.manual-audit-record{padding:12px}.manual-audit-record dl{grid-template-columns:1fr;gap:4px}.manual-audit-record dd{margin-bottom:8px}}
