/* V10 Pivot Builder — read-only analytics; works without external CDNs. */
.pvt-root{display:grid;gap:16px}.pvt-banner{display:flex;align-items:start;justify-content:space-between;gap:16px;flex-wrap:wrap}.pvt-banner h2{margin:0 0 6px;font-size:20px;letter-spacing:-.4px}.pvt-banner p{font-size:12px;color:#718099;line-height:1.6;margin:0}.pvt-badges{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.pvt-shell{display:grid;grid-template-columns:minmax(200px,.77fr) minmax(400px,1.8fr);border:1px solid #dfe7f4;border-radius:16px;overflow:hidden;background:white;box-shadow:var(--shadow)}.pvt-palette{border-right:1px solid #e4eaf5;padding:16px;background:#fbfcff}.pvt-workspace{background:radial-gradient(#d9e1f0 .85px,transparent 1px) 0 0/18px 18px,#f8faff;padding:17px}.pvt-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}.pvt-heading strong{font-size:13px}.pvt-caption{font-size:11px;color:#8292aa;line-height:1.65}.pvt-palette-list{max-height:525px;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:3px}.pvt-field{border:1px solid #dce4f1;background:#fff;border-radius:10px;padding:9px 10px;display:flex;align-items:center;gap:9px;min-width:0;cursor:grab;user-select:none}.pvt-field:active{cursor:grabbing}.pvt-field:hover{border-color:#809fe5;background:#f7faff}.pvt-field .type{width:31px;height:31px;border-radius:8px;flex-shrink:0;display:grid;place-items:center;background:#edf2fd;color:#355ebe;font-size:13px;font-weight:800}.pvt-field.metric .type{background:#e6f5ed;color:#188b65}.pvt-field .fieldname{min-width:0;flex:1;font-size:12px;font-weight:700;overflow-wrap:anywhere}.pvt-field .fieldsub{display:block;color:#8491a5;font-size:10px;font-weight:400;margin-top:2px}.pvt-field button{padding:5px 8px;border-radius:7px;background:#edf3ff;color:#2d54a6;border:0;font-size:11px}.pvt-zones{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pvt-zone{background:white;border:2px dashed #cbd8ee;border-radius:12px;padding:13px;min-height:136px;transition:.15s}.pvt-zone.over{background:#eaf1ff;border-color:#4a77d4}.pvt-zone-head{display:flex;justify-content:space-between;gap:5px;align-items:center;margin-bottom:10px}.pvt-zone-head b{font-size:13px}.pvt-zone-head span{color:#8293aa;font-size:10px}.pvt-drop-hint{font-size:12px;color:#9aa8bc;margin:17px 0;text-align:center}.pvt-chips{display:flex;flex-direction:column;gap:7px}.pvt-chip{background:#edf3ff;color:#244b91;border:1px solid #d2e0fb;border-radius:8px;padding:7px 9px;display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12px;font-weight:650;min-width:0;cursor:grab}.pvt-chip span{overflow-wrap:anywhere}.pvt-chip button{border:none;background:transparent;color:#8c4e52;font-weight:700;font-size:16px;cursor:pointer}.pvt-chip select{max-width:112px;border:1px solid #cad6ea;border-radius:6px;background:#fff;padding:4px;color:#284466;font-size:11px}.pvt-chip.metric{background:#eaf8f1;border-color:#c0e9d5;color:#16674d}.pvt-chip.filter{background:#fff6e8;border-color:#f0ddb7;color:#836424}.pvt-panel{background:white;border:1px solid #e2e8f2;border-radius:15px;padding:17px;box-shadow:var(--shadow)}.pvt-options{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.pvt-options select,.pvt-options input{padding:8px 10px;border:1px solid #d5dfeb;border-radius:8px;background:white;font-size:12px;min-width:125px}.pvt-chartbox{overflow-x:auto;padding:8px 0}.pvt-chartbox svg{width:100%;min-width:510px;display:block}.pvt-chart-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:11px;color:#5d6e86}.pvt-chart-legend span{display:inline-flex;gap:6px;align-items:center}.pvt-chart-legend i{width:10px;height:10px;display:inline-block;border-radius:3px}.pvt-table{width:max-content;min-width:100%;border-collapse:collapse;font-size:12px}.pvt-table th{background:#f3f6fc;color:#4e607b;font-size:11px;border:1px solid #e3e9f3;padding:10px 11px;white-space:nowrap;text-align:right;position:sticky;top:0;z-index:1}.pvt-table th:first-child,.pvt-table td:first-child{text-align:left;position:sticky;left:0;z-index:2;background:#fff;min-width:180px;max-width:350px}.pvt-table th:first-child{z-index:3;background:#eaf0fc}.pvt-table td{padding:9px 11px;border:1px solid #e9edf5;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.pvt-table tbody tr:hover td{background:#f7fbff}.pvt-table tfoot td{background:#eaf1ff!important;font-weight:800;color:#214b8a}.pvt-empty{color:#7c8ca5;text-align:center;padding:35px}.pvt-table-scroll{max-height:470px;overflow:auto;border:1px solid #dfe6f2;border-radius:9px}.pvt-limit{margin:10px 0 0;font-size:11px;color:#8b6b36}.pvt-sectionbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:13px}.pvt-mini-stat{border:1px solid #dce5f2;background:#f7faff;border-radius:8px;padding:7px 10px;color:#5372a7;font-size:11px;font-weight:700}.pvt-grp{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:#7e91ad;font-weight:800;margin:16px 2px 8px}.pvt-active-filter{display:grid;gap:5px;margin-top:8px}.pvt-active-filter label{font-size:11px;color:#5e718e}.pvt-active-filter select{width:100%;padding:5px 7px;border:1px solid #e3d0a4;border-radius:7px;background:#fff}.pvt-guide{padding:10px 13px;border-radius:10px;border:1px solid #dae6fa;background:#f3f8ff;font-size:12px;color:#546c91;line-height:1.6}.pvt-tablink{display:flex;gap:7px;align-items:center}.pvt-table-toggle{color:#3d66bd;background:#ecf2ff;border:1px solid #d4e0f9;border-radius:7px;padding:7px 11px;font-size:12px;font-weight:650}@media(max-width:1120px){.pvt-shell{grid-template-columns:1fr}.pvt-palette{border-right:none;border-bottom:1px solid #e4eaf5}.pvt-palette-list{max-height:240px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.pvt-zones{grid-template-columns:1fr}.pvt-palette-list{grid-template-columns:1fr}.pvt-workspace{padding:12px}}

.pvt-source{padding:8px 10px;border:1px solid #cad8ec;border-radius:8px;background:#fff;color:#2f4a70;font-size:12px;max-width:230px}


/* V14 copy-as-PNG fallback preview for ordinary LAN HTTP origins. */
.pvt-image-modal{position:fixed;inset:0;z-index:9000;background:rgba(9,20,42,.65);display:flex;align-items:center;justify-content:center;padding:20px}
.pvt-image-dialog{background:#fff;border:1px solid #dce5ef;border-radius:14px;max-width:min(1100px,95vw);max-height:93vh;overflow:auto;padding:18px 22px;box-shadow:0 18px 65px rgba(0,0,0,.24)}
.pvt-image-head{display:flex;justify-content:space-between;align-items:center;gap:14px}
.pvt-image-dialog p{font-size:12px;line-height:1.5;color:#52647e}
.pvt-image-dialog img{display:block;max-width:100%;max-height:65vh;margin:auto;object-fit:contain;border:1px solid #e0e6f0;background:#fff}
.pvt-image-actions{display:flex;justify-content:flex-end;padding-top:12px}
#pvtCopyChart{white-space:nowrap}

/* v21: Keep the Pivot workspace inside its tab, not as a page-wide horizontal scroll. */
.pvt-root,.pvt-shell,.pvt-palette,.pvt-workspace,.pvt-panel,.pvt-chartbox{min-width:0;max-width:100%}
.pvt-shell{grid-template-columns:minmax(210px,30%) minmax(0,1fr)}
.pvt-zones{grid-template-columns:repeat(2,minmax(0,1fr))}
.pvt-chartbox{overflow-x:hidden}.pvt-chartbox svg{width:100%;min-width:0;height:auto;max-width:100%}
.pvt-palette-list{min-width:0}.pvt-badges{justify-content:flex-end}
.pvt-table-scroll{width:100%;max-width:100%;overflow-x:auto}
@media(max-width:1350px){.pvt-shell{grid-template-columns:minmax(0,1fr)}.pvt-palette{border-right:0;border-bottom:1px solid #e4eaf5}.pvt-palette-list{max-height:260px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:750px){.pvt-zones{grid-template-columns:1fr}.pvt-palette-list{grid-template-columns:1fr}.pvt-banner{align-items:stretch}.pvt-badges{justify-content:start}}

/* v22: compact on-screen Pivot chart; copy/export raster sizing stays untouched. */
.pvt-chartbox{max-height:355px;overflow-y:auto;overflow-x:hidden}
.pvt-chartbox svg{max-height:345px;width:100%;height:auto;object-fit:contain}
@media(max-width:800px){.pvt-chartbox{max-height:300px}.pvt-chartbox svg{max-height:290px}}

/* v22: remove nonessential explanatory text while retaining validation messages. */
.pvt-banner p,.pvt-guide,#pvtChartHint{display:none}
