/* Shared modal workspace. Only forms explicitly marked as large use the entire viewport. */
.layout-container .sheet-panel:has(.pm-sheet-large){width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;box-sizing:border-box}
.sheet-panel:has(.pm-sheet-large)>.sheet-handle-bar{display:none}
.sheet-panel:has(.pm-sheet-large)>.sheet-header{padding:14px 24px;min-height:68px;box-sizing:border-box;flex:none;gap:16px}
.sheet-panel:has(.pm-sheet-large)>.sheet-header .btn-close{width:42px;height:42px;flex:none}
.sheet-panel:has(.pm-sheet-large)>.sheet-content{flex:1;min-height:0;padding:24px max(24px,calc((100vw - 1560px)/2));scrollbar-gutter:stable}
.sheet-panel>.sheet-content:has(>.designer-print-sheet){padding:0!important;overflow:hidden;display:flex;scrollbar-gutter:auto}
.sheet-panel>.sheet-content>.pm-sheet-large{width:100%;max-width:none;min-width:0;box-sizing:border-box}
.pm-form .pm-disclosure,.batch-origin-panel .pm-disclosure{padding:0;display:block;border:1px solid var(--pm-app-border,#dce4ec);border-radius:15px;background:var(--pm-app-surface,#fff);overflow:clip;box-shadow:0 2px 6px #223b5510;min-width:0}
.pm-form .pm-disclosure[open],.batch-origin-panel .pm-disclosure[open]{display:block;padding:0;gap:0;border-color:var(--pm-app-accent,#4778b8)}
.pm-disclosure>summary{list-style:none;display:flex;align-items:center;gap:12px;padding:14px 16px;min-height:56px;box-sizing:border-box;cursor:pointer;font-size:13px;font-weight:650;color:var(--pm-app-text,#233447);line-height:1.5;background:transparent}
.pm-disclosure>summary::-webkit-details-marker{display:none}.pm-disclosure>summary::marker{content:""}
.pm-disclosure>summary:hover{background:var(--pm-app-surface-muted,#f6f8fb)}
.pm-disclosure>summary:focus-visible{outline:2px solid var(--pm-app-accent,#4778b8);outline-offset:-4px;border-radius:13px}
.pm-disclosure>summary>.pm-disclosure-icon{font-size:21px;color:var(--pm-app-accent,#4778b8);padding:7px;border-radius:10px;background:var(--pm-app-accent-soft,#edf3fb);flex:none}
.pm-disclosure-title{flex:1;min-width:0}.pm-disclosure-chevron{font-size:21px;color:var(--pm-app-text-muted,#64748b);transition:transform .16s;flex:none}
.pm-disclosure[open]>summary .pm-disclosure-chevron{transform:rotate(180deg)}
.pm-disclosure[open]>summary{border-bottom:1px solid var(--pm-app-border,#dce4ec)}
.pm-disclosure-content{padding:18px;min-width:0;display:grid;gap:16px}
.pm-disclosure:not([open])>.pm-disclosure-content{display:none}
.pm-disclosure-content:has(>.batch-origin-panel){padding:16px;background:var(--pm-app-surface-muted,#f6f8fb)}
.pm-form-actions{position:sticky;bottom:-1px;z-index:12;display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;padding:16px 0 max(16px,env(safe-area-inset-bottom));border-top:1px solid var(--pm-app-border,#dde5ed);background:var(--pm-app-surface,#fff);box-shadow:0 -12px 16px -16px #223b5540;grid-column:1/-1}
.pm-form-actions>.passport-error{flex:1 0 100%;margin:0!important}.pm-form-actions .passport-save-button{width:auto}
.passport-editor-columns{display:grid;gap:20px;align-items:start;min-width:0;container-type:inline-size}
.sheet-panel:has(.pm-sheet-large) .passport-source-form,.sheet-panel:has(.pm-sheet-large) .health-control-form{padding:0}
.sheet-panel>.sheet-content>.health-control-form>.passport-editor-columns,.sheet-panel>.sheet-content>.passport-source-form>.passport-editor-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
.sheet-panel .supplier-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start;max-width:none!important}
.sheet-panel .supplier-form>.form-section{margin:0;padding:24px;border:1px solid var(--pm-app-border,#dde5ed);border-radius:20px;background:var(--pm-app-surface,#fff)}
.sheet-panel .supplier-form>.form-section:nth-child(3),.sheet-panel .supplier-form>.form-actions,.sheet-panel .supplier-form>.registry-feedback,.sheet-panel .supplier-form>.error-banner{grid-column:1/-1}
.sheet-panel .supplier-form>.form-actions{position:sticky;bottom:-24px;z-index:8;padding:18px 0;background:var(--pm-app-surface,#fff);display:flex;gap:12px}
.sheet-panel .supplier-form>.form-actions .btn-save{width:auto;flex:1;max-width:340px}
@media(max-width:900px){.sheet-panel>.sheet-content>.health-control-form>.passport-editor-columns,.sheet-panel>.sheet-content>.passport-source-form>.passport-editor-columns,.sheet-panel .supplier-form{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.sheet-panel:has(.pm-sheet-large)>.sheet-header{padding:10px 16px;min-height:60px}.sheet-panel:has(.pm-sheet-large)>.sheet-content{padding:16px}.pm-disclosure>summary{padding:12px;gap:9px}.pm-disclosure-content{padding:14px}.pm-form-actions{gap:8px}.pm-form-actions>.action-btn{flex:1}.sheet-panel .supplier-form{gap:16px}.sheet-panel .supplier-form>.form-section{padding:16px}.sheet-panel .supplier-form>.form-actions{bottom:-16px}}
@media(prefers-reduced-motion:reduce){.pm-disclosure-chevron{transition:none}.sheet-panel,.sheet-overlay{animation-duration:.01ms!important}}
.sheet-panel:has(.pm-sheet-large)>.sheet-content:has(>.treatment-editor){overflow:hidden;padding-bottom:0}
.sheet-panel .treatment-editor{min-height:0;padding:0!important}.sheet-panel .treatment-editor>.form-scroll-area{min-height:0}
.sheet-panel .treatment-editor>.actions{padding:16px 0;display:flex;flex-wrap:wrap;gap:12px;border-top:1px solid var(--pm-app-border,#dde5ed);background:var(--pm-app-surface,#fff)}
.sheet-panel .treatment-editor>.form-scroll-area>fieldset{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;min-width:0;margin:0}
.sheet-panel .treatment-editor>.form-scroll-area>fieldset>:is(.record-hints,.row-2-col,.record-note){grid-column:1/-1}
.sheet-panel>.sheet-content>.production-origin-sheet>.passport-editor-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){.sheet-panel .treatment-editor>.form-scroll-area>fieldset,.sheet-panel>.sheet-content>.production-origin-sheet>.passport-editor-columns{grid-template-columns:minmax(0,1fr)}}

/* Avoid stacking card padding inside the inline origin disclosure. */
.passport-batch-origin>.pm-disclosure-content{padding:10px!important}
.passport-batch-origin .batch-origin-panel{padding:0;border:0;box-shadow:none;background:transparent;margin:0}
.passport-batch-origin .batch-origin-title{display:none}
.passport-batch-origin .batch-origin-footer{font-size:12px;margin-top:12px}
@media(max-width:600px){.batch-origin-editor-body .pm-form-actions>.action-btn{padding:10px;flex:0 1 auto}.batch-origin-editor-body .pm-form-actions>.primary{flex:1}.batch-origin-editor-body .pm-form-actions .passport-save-button{overflow-wrap:normal;word-break:normal}}
