/* Compact photo controls and manual disclosure, scoped to this feature. */
.pm-photo{display:flex;align-items:center;gap:10px;margin:8px 0 12px;min-height:48px;}
.pm-thumb{width:48px;height:48px;object-fit:contain;border:1px solid var(--border);border-radius:10px;background:white;flex-shrink:0;}
.pm-photo button,.pm-link{border:0;background:transparent;color:var(--ui-primary,#285a48);font-family:inherit;font-size:13px;font-weight:500;cursor:pointer;padding:4px 0;text-align:left;}
.pm-photo small{display:block;font-size:11px;color:var(--text3);margin-top:2px;}
.pm-photo input{display:none;}
#pmModal[hidden],#pmModal [hidden]{display:none!important;}
#pmModal{position:fixed;inset:0;z-index:650;background:#0006;display:flex;align-items:center;justify-content:center;padding:16px;}
.pm-sheet{width:100%;max-width:540px;max-height:calc(100dvh - 32px);overflow:auto;background:#fff;border-radius:22px;padding:20px;box-sizing:border-box;color:var(--text);}
.pm-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
.pm-head h3{font-family:'DM Serif Display',Georgia,serif;font-weight:400;font-size:25px;margin:0;}
.pm-close{border:1px solid var(--border2);background:white;border-radius:10px;width:40px;height:40px;font-size:22px;color:var(--text2);cursor:pointer;}
.pm-muted{font-size:12px;color:var(--text2);line-height:1.5;margin:6px 0 12px;}
.pm-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px;}
.pm-toolbar button{padding:10px;border:1px solid var(--border2);border-radius:10px;background:white;color:var(--text2);font:inherit;font-size:13px;cursor:pointer;}
.pm-toolbar button[aria-pressed=true]{background:#edf5f1;border-color:#c9ded4;color:#285a48;}
.pm-search{width:100%;padding:12px;border:1px solid var(--border2);border-radius:10px;font:inherit;font-size:16px;box-sizing:border-box;margin-bottom:8px;}
.pm-row{display:grid;grid-template-columns:22px 44px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border);}
.pm-row img{width:44px;height:54px;object-fit:contain;background:#f7f7f5;border-radius:7px;}
.pm-row input{accent-color:#285a48;width:18px;height:18px;}
.pm-row strong{font-size:13px;line-height:1.4;font-weight:500;display:block;}
.pm-row small{font-size:11px;color:var(--text3);display:block;margin-top:3px;}
.pm-row button{padding:8px;border:0;background:#edf5f1;border-radius:8px;color:#285a48;font:inherit;font-size:11px;cursor:pointer;}
.pm-row .pm-placeholder{width:44px;height:54px;border-radius:7px;display:grid;place-items:center;background:#f3f2ef;color:#9c9b96;font-size:20px;}
.pm-actions{display:flex;gap:8px;margin-top:16px;}
.pm-actions button{flex:1;min-height:44px;border-radius:11px;border:1px solid var(--border2);background:white;color:var(--text2);font:inherit;font-size:13px;padding:10px;cursor:pointer;}
.pm-actions .pm-primary{background:#285a48;color:white;border-color:#285a48;}
#pmModal button:disabled{opacity:.45;cursor:default;}
.pm-card{display:block;width:100%;max-width:240px;height:auto;margin:0 auto;background:white;border:1px solid var(--border);border-radius:10px;}
.pm-caption{white-space:pre-wrap;background:#f7f7f5;border-radius:10px;padding:12px;font-size:13px;line-height:1.5;margin-top:12px;}
.pm-nav{display:flex;justify-content:center;align-items:center;gap:14px;margin:12px 0;font-size:12px;}
.pm-nav button{width:40px;height:36px;border:1px solid var(--border);border-radius:9px;background:white;cursor:pointer;}
#pmMessage{font-size:12px;line-height:1.5;color:var(--text2);margin:8px 0;}
#pmMessage[data-error=true]{color:var(--red);}
@media(max-width:360px){.pm-sheet{padding:14px;}.pm-row{gap:6px;}.pm-actions{flex-wrap:wrap;}}

.pm-name-row{display:grid;grid-template-columns:minmax(0,1fr) 80px;gap:10px;align-items:stretch;}
.pm-name-row>.input{height:44px;min-width:0;box-sizing:border-box;}
.pm-name-row .pm-photo{display:block;margin:0;min-height:0;height:44px;}
.pm-name-row .pm-photo button{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:44px;box-sizing:border-box;border:.5px solid var(--border2);border-radius:var(--r);background:var(--bg);color:var(--ui-primary,#285a48);font-size:11px;line-height:1;padding:0 6px;}
.pm-name-row .pm-thumb{display:flex;align-items:center;justify-content:center;width:20px;height:24px;object-fit:contain;border:0;border-radius:3px;background:transparent;}
.pm-name-row .pm-photo button:focus-visible{outline:2px solid var(--ui-primary,#285a48);outline-offset:2px;}
.pm-name-row .pm-photo button:disabled{opacity:.5;}
/* Ficha do rótulo (29/09/2026): mesmo card de 80×44; ponto verde = já tem texto. A folha é um .modal-bg do Caixa,
   acima dos modais de estoque (300) e abaixo do toast (400). */
.pm-name-row .pm-photo button{position:relative;}
.pm-dot{position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:50%;background:var(--ui-primary,#285a48);}
#pmFicha{z-index:310;}
.pm-ficha-sub{font-size:12px;color:var(--text3);margin:-2px 0 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.pm-frame{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;height:160px;box-sizing:border-box;border-radius:var(--r);}
.pm-frame-empty{border:1px dashed var(--border2);background:var(--bg);color:var(--text3);font-family:inherit;font-size:13px;cursor:pointer;}
.pm-frame-empty svg{color:var(--ui-primary,#285a48);}
.pm-frame-full{background:#f7f7f5;border:.5px solid var(--border2);padding:8px;}
.pm-frame-full img{max-width:100%;max-height:100%;object-fit:contain;}
.pm-trocar{display:block;margin:8px auto 0;height:36px;padding:0 16px;border-radius:8px;background:var(--ui-selected,#edf5f1);color:var(--ui-primary,#285a48);border:.5px solid var(--ui-selected-border,#c9ded4);font-family:inherit;font-size:12px;font-weight:500;cursor:pointer;}
.pm-ficha-hint{font-size:11px;color:var(--text3);margin:6px 0 0;}
.pm-ficha-hint:empty{display:none;}
.pm-opt{font-size:9px;text-transform:none;letter-spacing:0;font-weight:400;color:var(--text3);}
.pm-ficha-texto{display:block;width:100%;box-sizing:border-box;font-family:inherit;font-size:16px;line-height:1.45;min-height:128px;resize:none;}
.pm-help{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:var(--text3);margin-top:5px;}
.pm-help #pmFichaCount{font-variant-numeric:tabular-nums;white-space:nowrap;}
.pm-help .pm-over{color:var(--red);}
#pmFichaStatus{font-size:12px;line-height:1.45;color:var(--text2);margin:8px 0 0;}
#pmFichaStatus:empty{display:none;}
#pmFichaStatus[data-error=true]{color:var(--red);}
#pmList{max-height:44dvh;overflow-y:auto;overscroll-behavior:contain;}
