/* ARMAZÉM — computador e telemóvel */
.wh-page{display:flex;flex-direction:column;gap:14px;min-width:0}.wh-page h2{margin:0;font-size:25px}.wh-head,.wh-toolbar,.wh-tabs,.wh-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.wh-head{justify-content:space-between}.wh-toolbar{margin-bottom:14px}.wh-toolbar>input{flex:1;min-width:180px}.wh-toolbar select{max-width:320px}.wh-toolbar label{font-size:12px;display:flex;gap:6px;align-items:center}.wh-page input,.wh-page select,.wh-form input,.wh-form select,.wh-form textarea{border:1px solid var(--line,#dce2e9);border-radius:6px;padding:9px;color:var(--ink,#14212e);background:#fff;box-sizing:border-box;min-width:0;font:inherit}.wh-page [hidden],.wh-modal [hidden]{display:none!important}.wh-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}.wh-summary .card{display:flex;flex-direction:column;gap:8px}.wh-summary small{font-size:12px;color:var(--ink-soft,#64748b)}.wh-summary strong{font-size:23px;color:#1769c2}.wh-summary .wh-alert strong{color:#b91c1c}.wh-scroll{overflow:auto;max-width:100%;border:1px solid var(--line,#dce2e9);border-radius:8px}.wh-scroll table{width:100%;border-collapse:collapse;font-size:12px;min-width:720px}.wh-scroll th,.wh-scroll td{padding:10px;text-align:left;border-bottom:1px solid var(--line,#dce2e9);vertical-align:top}.wh-scroll th{background:#f5f7fa;font-size:11px;color:#526477}.wh-scroll small{display:block;color:var(--ink-soft,#64748b);margin-top:4px}.wh-scroll .wh-number{text-align:right;font-variant-numeric:tabular-nums}.wh-low{background:#fff5e5}.wh-low .wh-number{color:#b45309;font-weight:700}.wh-void{opacity:.65}.wh-check input{width:16px;height:16px}.wh-modal{position:fixed;inset:0;z-index:10000002;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}.wh-modal-card{width:min(760px,100%);max-height:92dvh;overflow:auto;border-radius:12px;background:#fff;box-shadow:0 22px 55px #0004}.wh-modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line,#dce2e9)}.wh-modal-head h3{margin:0}.wh-modal-head>button{background:none;border:none;font-size:28px;color:#64748b;cursor:pointer}.wh-form{padding:18px 20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.wh-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#475569;font-weight:600}.wh-form input,.wh-form select,.wh-form textarea{width:100%}.wh-wide{grid-column:1/-1}.wh-price-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.wh-discount{margin:0;color:#1769c2;font-size:13px}.wh-form .wh-actions{justify-content:flex-end}.wh-form [data-message]{font-size:13px}.wh-form p{margin:0;line-height:1.5}.wh-page button:disabled,.wh-modal button:disabled{opacity:.6;cursor:wait}
@media(max-width:700px){.wh-summary{grid-template-columns:1fr}.wh-toolbar{align-items:stretch}.wh-toolbar>input,.wh-toolbar>select{max-width:100%;width:100%;flex-basis:100%}.wh-toolbar label{flex-wrap:wrap}.wh-tabs{gap:6px}.wh-tabs .btn{font-size:11px;padding:9px}.wh-form{grid-template-columns:1fr}.wh-wide{grid-column:auto}.wh-price-fields{grid-template-columns:1fr}.wh-page>#wh-body{padding:12px}.wh-modal{padding:12px}.wh-form .wh-actions .btn{flex:1}.wh-modal-card{max-height:94dvh}}
/* PWPLADUR 1961 — pesquisas escritas com resultados filtrados. */
.wh-picker1961{display:flex;flex-direction:column;gap:5px;position:relative;min-width:0;max-width:100%}.wh-picker1961[hidden]{display:none!important}.wh-picker1961 input[type=search]{width:100%;box-sizing:border-box;min-width:0}.wh-picker-results1961{position:absolute;left:0;right:0;top:100%;z-index:6;max-height:230px;overflow-y:auto;background:#fff;border:1px solid #cbd5e1;border-radius:6px;box-shadow:0 6px 14px #0002;min-width:180px}.wh-picker-results1961[hidden]{display:none!important}.wh-picker-results1961 button{display:block;width:100%;padding:9px 12px;text-align:left;white-space:normal;overflow-wrap:anywhere;background:#fff;border:0;border-bottom:1px solid #edf2f7;font:inherit;color:inherit;cursor:pointer}.wh-picker-results1961 button:hover,.wh-picker-results1961 button:focus{background:#fff1c2}.wh-picker-results1961 small{display:block;padding:10px}.wh-picker1961 [data-picker-data]{display:none}.wh-toolbar>.wh-picker1961{flex:1;min-width:180px}.wh-type-row1961{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #e2e8f0;padding:14px 0}.wh-type-row1961 small{display:block;color:#64748b;margin-top:4px}.wh-type-row1961>div{min-width:0;overflow-wrap:anywhere}.wh-type-row1961>div:last-child{display:flex;gap:8px;flex-shrink:0}.wh-type-editor1961{border:1px solid #cbd5e1;background:#f8fafc;padding:14px;border-radius:6px;margin:16px 0}.wh-settings1961 input[type=search]{padding:9px 11px;border:1px solid #cbd5e1;border-radius:6px;font:inherit;max-width:100%;box-sizing:border-box}.wh-type-editor1961 input:not([type=checkbox]){width:100%;box-sizing:border-box;padding:9px 11px;border:1px solid #cbd5e1;border-radius:6px;font:inherit}.wh-type-editor1961 label{min-width:0}@media(max-width:600px){.wh-type-row1961{flex-direction:column;align-items:flex-start}.wh-type-editor1961{grid-template-columns:1fr}.wh-toolbar>.wh-picker1961{min-width:0;width:100%}}
/* Resultados em linha: não passam sobre os cabeçalhos das tabelas. */
.wh-picker1961 .wh-picker-results1961{position:static;box-sizing:border-box;width:100%;min-width:0;box-shadow:none;flex:none}.wh-toolbar>.wh-picker1961{align-items:stretch}
/* 1963 — alinhamento de stock e catálogos nas definições. */
.wh-stock-table1963 th,.wh-stock-table1963 td{text-align:center!important;vertical-align:middle}
.wh-stock-table1963 .wh-actions{justify-content:center}
.wh-settings1963>.wh-tabs{margin-bottom:16px;flex-wrap:wrap}
.wh-settings1963 .wh-type-row1961{min-width:0}
.wh-settings1963 .wh-type-row1961 strong{overflow-wrap:anywhere}
@media(max-width:600px){.wh-settings1963 .wh-toolbar>*{max-width:100%;min-width:0}.wh-settings1963 .wh-type-row1961{flex-wrap:wrap;gap:10px}}

/* 1968 — várias linhas no mesmo movimento. */
[data-wh-lines]{display:flex;flex-direction:column;gap:16px;min-width:0}.wh-multi-line1968{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;margin:0;padding:14px;border:1px solid #cbd5e1;border-radius:8px}.wh-multi-line1968 legend{font-weight:700;color:#334155;padding:0 6px}@media(max-width:700px){.wh-multi-line1968{grid-template-columns:1fr;padding:10px}.wh-multi-line1968 .wh-wide{grid-column:1/-1}}

/* 1970 — seleção compacta de armazém, alinhada com Exportar CSV. */
.wh-toolbar>.wh-warehouse1970{flex:0 1 230px;width:230px;max-width:230px;height:36px;align-self:flex-start;padding:7px 9px;font:inherit}.wh-toolbar:has(>.wh-warehouse1970){align-items:flex-start}.wh-toolbar:has(>.wh-warehouse1970)>#wh-export{min-height:36px}@media(max-width:700px){.wh-toolbar>.wh-warehouse1970{flex:0 1 230px;max-width:100%;width:230px}}
@media(max-width:700px){.wh-toolbar>.wh-warehouse1970{flex:1 1 140px;width:140px;min-width:0;max-width:230px}.wh-toolbar:has(>.wh-warehouse1970)>#wh-export{flex:0 0 auto}}

/* 1972 — filtros do histórico alinhados pela base; títulos acima dos controlos. */
.wh-history-filters1972{align-items:flex-end}
