/* Shared visual hierarchy for the two isolated demo editions. */
.app-page.active:not(#page-profile) { display:block; }
.app-page > .page-topbar, #page-statistics > .page-controls-actions { display:flex !important; align-items:flex-start; justify-content:space-between; gap:24px; margin:0 0 20px !important; min-width:0 !important; }
.du-heading { flex:1; min-width:0; }
.du-heading h1 { margin:8px 0 6px; font-size:28px; line-height:1.2; letter-spacing:-.7px; color:var(--ink); }
.du-heading p { margin:0; font-size:13px; color:var(--muted); max-width:680px; line-height:1.6; }
.du-eyebrow,.du-chips,.du-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.du-eyebrow { color:var(--muted); font-size:11px; font-weight:650; letter-spacing:.3px; }
.du-chip { display:inline-flex; align-items:center; gap:5px; border-radius:20px; padding:4px 9px; font-size:11px; font-weight:700; line-height:1.4; background:var(--brand-soft); color:var(--brand); white-space:nowrap; }
.du-chip.green { background:#e8f8ef; color:#08774f; }
.du-chip.amber { background:#fff2dc; color:#975b05; }
.du-chip.purple { background:#f0ebff; color:#6940b8; }
.du-chip.gray { background:#edf0f4; color:#5b6678; }
.du-chip.red { background:#ffebee; color:#b52d44; }
.du-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 18px; }
.du-toolbar .dh-btn { min-height:40px; font-weight:650; }
.du-toolbar:empty { display:none; }
.app-page > .filter-panel,.app-page > .dh-filter-panel { width:100%; margin:0 0 22px !important; padding:18px 20px; border:1px solid var(--line); background:#fff; box-shadow:0 2px 6px #10182803; }
.filter-panel-header.compact-filter-actions,.dh-filter-head.compact-filter-actions { display:flex !important; align-items:center; justify-content:space-between !important; gap:12px; height:auto; padding:0 0 14px !important; margin:0 0 16px !important; border-bottom:1px solid #edf0f5 !important; }
.du-filter-title { margin-right:auto; }
.filter-switch-row { display:flex; }
.du-filter-title { font-size:13px; font-weight:750; color:var(--ink-2); display:flex; align-items:center; gap:9px; }
.filter-grid,.dh-filter-grid,.dh-filter-grid.has-inline-reset,.dh-notification-controls,#page-statistics > .filter-panel .filter-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; align-items:end; }
.field,.dh-field { min-width:0; }
.field label,.dh-field label { text-transform:none; letter-spacing:0; color:#475467; font-size:12px; font-weight:650; margin-bottom:7px; }
.filter-panel select,.dh-select,.dh-input { height:42px; border:1px solid #e3e6ee; border-radius:9px; background:#f9fafc; font-size:13px; width:100%; }
.filter-panel select:focus,.dh-select:focus,.dh-input:focus { outline:2px solid #aab4ff; outline-offset:1px; }
.statistics-view-filter,.dh-document-type-filter { grid-column:1/-1; padding:0 0 14px; border-bottom:1px solid #edf0f5; }
.dh-document-type-label { color:var(--muted); font-size:11px; margin-bottom:8px; }
.dh-tabs { gap:5px; flex-wrap:wrap; background:#f3f5fa; padding:4px; border-radius:10px; width:fit-content; }
.dh-tab { font-size:12px; border-radius:7px; padding:8px 12px; }
.dh-tab.active { background:white; color:var(--brand); box-shadow:0 1px 4px #1e27a014; }
.inline-filter-reset { min-height:32px; font-size:11px; padding:0 10px; }
.dh-page-actions-organized { width:auto; max-width:280px !important; }
.dh-page-utility-row .dh-account-pill { min-height:43px; box-shadow:none; }
.dh-table-card { margin-bottom:22px; }
.dh-table-card-head { padding:18px 20px; }
.dh-table-card-head h2 { font-size:16px; }
.dh-table-card-head p { display:block !important; font-size:12px; color:var(--muted); margin-top:5px; }
.dh-table th { font-size:10px; letter-spacing:.5px; color:#63718a; background:#f8f9fc; padding:13px 12px; }
.dh-table td { font-size:12px; padding:16px 12px; }
.dh-catalog-table .dh-product-copy strong { font-size:12px; }
.dh-catalog-table .dh-product-copy > span { font-size:11px; line-height:1.5; }
.dh-kpi { padding:16px 18px; border:1px solid var(--line); box-shadow:none; }
.dh-kpi-label { font-size:11px; color:#63718a; }
.dh-kpi-value { font-size:27px; }
.dh-dialog-header p { display:block !important; color:var(--muted); font-size:12px; }
.dh-version-banner { display:none !important; }
.sidebar { overflow-y:auto; }
.sidebar .nav-link { height:47px; flex-shrink:0; }
.sidebar .brand { flex-shrink:0; }
.sidebar .du-nav-new { margin-left:auto; color:#d5d0ff; font-size:9px; font-weight:700; }
.sidebar .nav-label { font-size:13px; }
.du-panel { padding:22px; border:1px solid var(--line); background:white; border-radius:16px; margin-bottom:20px; min-width:0; }
.du-panel h2 { font-size:18px; margin:0 0 7px; letter-spacing:-.3px; }
.du-panel h3 { font-size:14px; margin:0 0 7px; }
.du-panel p { font-size:13px; color:var(--muted); line-height:1.6; margin:0 0 16px; }
.du-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:20px; }
.du-panel-head p { margin:4px 0 0; }
.du-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.du-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.du-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.du-form label { display:grid; gap:6px; font-size:12px; color:#475467; font-weight:650; }
.du-form input,.du-form select,.du-form textarea { min-width:0; width:100%; border:1px solid #dce1e9; padding:10px 12px; border-radius:8px; background:#fafbfe; font:inherit; color:var(--ink); }
.du-form .wide { grid-column:1/-1; }
.du-note { padding:12px 15px; border-radius:10px; background:var(--brand-soft); font-size:12px; line-height:1.6; color:#475489; margin:16px 0; }
.du-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:18px 0; }
.du-metric { padding:18px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.du-metric span { display:block; font-size:12px; color:var(--muted); }
.du-metric strong { display:block; font-size:27px; margin:6px 0; color:var(--brand); }
.du-metric small { display:block; color:var(--muted); font-size:11px; }
.du-table { width:100%; border-collapse:collapse; font-size:12px; }
.du-table th { text-align:left; background:#f7f8fc; color:var(--muted); font-weight:600; }
.du-table th,.du-table td { padding:12px; border-bottom:1px solid var(--line); vertical-align:middle; }
.du-table input,.du-table select { max-width:100%; border:1px solid #dce1e9; border-radius:6px; padding:8px; background:white; }
.du-scroll { max-width:100%; overflow:auto; }
.du-table small { display:block; color:var(--muted); }
.du-table button { white-space:nowrap; }
.du-bar { height:7px; border-radius:5px; background:#edf0f8; overflow:hidden; margin-top:7px; }
.du-bar i { display:block; height:100%; background:var(--brand); border-radius:5px; }
.du-list-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); }
.du-list-row strong,.du-list-row small { display:block; }
.du-list-row small { color:var(--muted); font-size:11px; margin-top:3px; }
.du-selection { padding:14px 18px; background:var(--brand-soft); border:1px solid #dce1ff; border-radius:12px; margin-bottom:18px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.du-selection > strong { margin-right:auto; color:var(--brand); }
html[data-demo-version="3"] #openCatalogCompare { display:inline-flex !important; }
html[data-demo-version="3"] [data-doc-tab="listino"] { display:inline-flex !important; }
html[data-demo-version="3"] .dh-catalog-table th:first-child,html[data-demo-version="3"] .dh-catalog-table td:first-child { display:table-cell; }
.du-dialog { width:min(920px,calc(100vw - 32px)); max-height:88vh; overflow:auto; padding:0; border:1px solid var(--line); border-radius:18px; color:var(--ink); box-shadow:0 24px 80px #11182730; }
.du-dialog::backdrop { background:#17224566; backdrop-filter:blur(3px); }
.du-dialog-head { position:sticky; top:0; display:flex; justify-content:space-between; align-items:center; padding:20px 24px; border-bottom:1px solid var(--line); background:#fff; z-index:2; }
.du-dialog-head h2 { font-size:20px; margin:0; }
.du-dialog-body { padding:24px; }
.du-close { border:0; background:#f1f3f9; border-radius:50%; width:32px; height:32px; font-size:20px; }
.du-digi-launch { position:fixed; bottom:24px; right:24px; z-index:45; border:0; background:var(--brand); color:white; border-radius:30px; display:flex; align-items:center; gap:10px; padding:12px 18px; box-shadow:0 6px 20px #1e27a033; font-weight:700; }
.du-face { display:grid; place-items:center; width:32px; height:28px; border-radius:10px; background:#fff; color:var(--brand); letter-spacing:5px; padding-left:5px; font-size:18px; }
.du-chat { display:grid; gap:14px; max-height:42vh; overflow:auto; margin:18px 0; }
.du-bubble { padding:15px; border-radius:12px; background:#f3f5fb; font-size:13px; line-height:1.7; }
.du-bubble.user { margin-left:20%; background:var(--brand-soft); }
.du-bubble p { margin:0 0 8px; }
.du-empty { padding:24px; text-align:center; color:var(--muted); }
.du-checkbox { display:flex !important; align-items:flex-start; gap:8px; }
.du-checkbox input { width:16px; margin-top:3px; }
@media(min-width:901px) and (max-width:1100px) { .du-nav-new { display:none; } }
@media(max-width:1200px) { .filter-grid,.dh-filter-grid,.dh-filter-grid.has-inline-reset,.dh-notification-controls,#page-statistics > .filter-panel .filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:900px) {
 .app-page > .page-topbar,#page-statistics > .page-controls-actions { margin-bottom:18px !important; display:block !important; }
 .du-heading h1 { font-size:25px; }.du-heading p { font-size:12px; }
 .page-topbar .dh-page-actions-organized,.page-topbar .dh-page-utility-row { display:none !important; }
 .filter-grid,.dh-filter-grid,.dh-filter-grid.has-inline-reset,.dh-notification-controls,#page-statistics > .filter-panel .filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .filter-panel-header.compact-filter-actions,.dh-filter-head.compact-filter-actions { padding-bottom:12px !important; margin-bottom:10px; }
 .du-filter-title { font-size:12px; flex:1; }.du-filter-title .du-chip { display:none; }
 .filter-panel-header.compact-filter-actions,.dh-filter-head.compact-filter-actions { flex-wrap:wrap; }
 .compact-filter-actions .inline-filter-reset { align-self:center; flex:0 0 auto; width:auto !important; min-width:82px; }
 .app-page > .filter-panel,.app-page > .dh-filter-panel { padding:14px !important; }
 .du-grid,.du-grid.three { grid-template-columns:1fr; }
 .du-panel { padding:17px; }.du-metrics { grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }.du-metric { padding:12px; }.du-metric strong { font-size:22px; }
 .du-digi-launch { bottom:86px;right:16px;padding:10px 14px; }
 .du-dialog-body { padding:18px; }.du-panel-head { flex-wrap:wrap; }
 html[data-demo-version="3"] .dh-catalog-table td:first-child { display:block; }
}
@media(max-width:520px) { .du-form { grid-template-columns:1fr; }.du-metrics { grid-template-columns:1fr; }.du-metric { display:grid;grid-template-columns:1fr auto;gap:2px 12px; }.du-metric strong { margin:0;grid-row:1/3;grid-column:2;align-self:center; }.du-toolbar .dh-btn { flex:1; }.du-panel h2 { font-size:17px; }.du-dialog-head { padding:16px; }.du-selection .dh-btn { flex:1; } }
