/*! © 2026 Bond Netto. Tutti i diritti riservati. Vietata la copia o il riuso senza autorizzazione. */
:root {
--bg: #f6f7f9; --card: #ffffff; --ink: #0f172a; --muted: #5b6475; --line: #e3e6eb;
--accent: #0b5fff; --accent-ink: #ffffff; --accent-soft: #e8f0ff; --good: #0a7d3e; --warn: #b45309; --bad: #b91c1c;
--ask: #dcfce7; --ask-ink: #166534; --ref: #fef3c7; --ref-ink: #92400e;
--radius: 12px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #0f172a; --card: #172033; --ink: #e5e9f0; --muted: #94a3b8; --line: #263247;
--accent: #4f8cff; --accent-soft: #1c2a4a; --good: #4ade80; --warn: #fbbf24; --bad: #f87171;
--ask: #14532d; --ask-ink: #bbf7d0; --ref: #78350f; --ref-ink: #fde68a;
--shadow: 0 1px 2px rgba(0,0,0,.4);
}
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--accent); }
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 32px; }
.hidden { display: none !important; }
.top { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand btns" "sub sub";
align-items: center; column-gap: 10px; row-gap: 2px; padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { grid-area: brand; min-width: 0; }
.brand h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; white-space: nowrap; }
.sub { color: var(--muted); font-size: 12.5px; }
.top .sub { grid-area: sub; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head > div:first-child { min-width: 0; flex: 1 1 auto; }
.row-btns { grid-area: btns; display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 420px) { .icon-btn { width: 34px; height: 34px; font-size: 15px; } .row-btns { gap: 4px; } .brand h1 { font-size: 18px; } }
@media (min-width: 700px) { .top { grid-template-columns: auto 1fr auto; grid-template-areas: "brand sub btns"; } .sub { padding-left: 6px; } }
.lnk { color: var(--accent); cursor: pointer; }
.icon-btn { background: transparent; border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px;
font-size: 18px; color: var(--ink); cursor: pointer; }
.filters { padding: 12px 0 4px; }
#q { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); font-size: 15px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px;
padding: 6px 12px; font-size: 13.5px; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.more summary { cursor: pointer; color: var(--muted); font-size: 13.5px; padding: 6px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; padding: 8px 0; }
.grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.grid label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); align-self: end; padding: 8px 0; }
.grid input.set, .grid select.set, .grid label.check.set { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; border-radius: 8px; }
.grid label.check.set { padding-left: 8px; }
.facet { position: relative; }
.facet-btn { width: 100%; text-align: left; padding: 8px 30px 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 14px; cursor: pointer;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facet-btn::after { content: "⌄"; position: absolute; right: 10px; top: 4px; color: var(--muted); }
.facet-btn.set { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.facet-pop { position: absolute; z-index: 6; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 4px 0; }
.facet-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 10px 6px; border-bottom: 1px solid var(--line); }
.facet-head .hint { font-size: 11.5px; }
.facet-close { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.facet-row, .ld-row, .grid label.facet-row, .grid label.ld-row { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; font-size: 14px; color: var(--ink); }
.facet-row input { margin: 0; width: 18px; height: 18px; flex: 0 0 auto; }
.facet-row:hover { background: var(--accent-soft); }
.facet-row span { flex: 1 1 auto; }
.facet-row b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.facet-row.zero { opacity: .45; }
.facet-row.all { border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.hidden-note { padding: 10px 12px; border: 1px dashed var(--warn); border-radius: 10px; margin: 6px 0 10px; }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0 8px; border-top: 1px solid var(--line); margin-top: 6px; }
.filter-bar #filter-live { flex: 1 1 100%; font-weight: 600; color: var(--ink); }
.filter-bar .btn { padding: 11px 16px; font-size: 14.5px; font-weight: 600; }
.filter-bar .btn.primary { flex: 1 1 auto; box-shadow: 0 2px 6px rgba(11, 95, 255, .3); }
.filter-bar .btn.ghost { color: var(--muted); border-color: var(--line); }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 0; }
.active-filters:empty { display: none; }
.active-filters .chip { font-size: 12.5px; padding: 3px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); border: 1px dashed var(--accent); }
.active-filters .chip b { font-weight: 700; margin-left: 4px; }
.grid input, .grid select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 14px; }
.best { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 10px 0; }
.best .bucket { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.best h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.best .b-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 3px 0; cursor: pointer; }
.best .b-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.best .b-row b { color: var(--good); font-variant-numeric: tabular-nums; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0 6px; color: var(--muted); font-size: 13px; }
.results-head select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.list { display: flex; flex-direction: column; gap: 8px; }
.thead { display: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow);
display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "cmp name net" "cmp mat ytm" "cmp cpn ytm" "cmp price ytm"; gap: 2px 10px; align-items: start; }
.card:hover { border-color: var(--accent); }
.card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.cmp { grid-area: cmp; align-self: center; padding: 6px 2px; }
.cmp input { width: 18px; height: 18px; accent-color: var(--accent); }
.c-name { grid-area: name; } .c-mat { grid-area: mat; } .c-cpn { grid-area: cpn; } .c-price { grid-area: price; } .c-net { grid-area: net; text-align: right; } .c-ytm { grid-area: ytm; text-align: right; }
.c-mat, .c-cpn, .c-price, .c-ytm { color: var(--muted); font-size: 12.5px; }
.c-mat .lbl, .c-cpn .lbl, .c-price .lbl, .c-ytm .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; margin-right: 4px; color: var(--muted); }
.card .name { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.card .meta { color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.card .main { font-size: 20px; font-weight: 700; color: var(--good); font-variant-numeric: tabular-nums; line-height: 1.1; }
.card .main.na { color: var(--muted); font-size: 14px; font-weight: 500; }
button.fav { background: none; border: none; cursor: pointer; font-size: 17px; line-height: 1; color: var(--line); padding: 0 4px 0 0; vertical-align: -1px; }
button.fav.on { color: #f59e0b; }
button.fav:hover { color: #f59e0b; }
.head-tools { display: inline-flex; gap: 10px; margin-left: 10px; }
.note.risk { border-left: 3px solid var(--warn); }
.sim-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; font-size: 13.5px; }
.sim-ctl input[type=range] { width: 100%; }
.sim-ctl select { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.ld-universe { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 6px 0 10px; font-size: 13.5px; }
.ld-universe .row { margin: 8px 0 6px; }
.ld-presets { margin-top: 4px; }
.ld-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.ld-filters .ld-row { padding: 4px 2px; }
.ld-filters h4.sub { margin: 0 0 4px; }
.ld-scroll { max-height: 220px; overflow: auto; }
@media (max-width: 640px) { .ld-filters { grid-template-columns: 1fr; } }
table.ladder th { text-align: left; font-size: 12px; color: var(--muted); padding: 4px 0; border-bottom: 1px solid var(--line); }
table.ladder td:last-child, table.ladder th:last-child { text-align: right; }
@media (max-width: 520px) { .sim-ctl { grid-template-columns: 1fr; } }
.card .small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.c-net .small.tot { color: var(--ink); opacity: .75; }
.c-net .main.neg { color: var(--bad); }
.pos .c-net .main.pos { color: var(--good); }
@media (min-width: 900px) {
.thead, .card { display: grid; grid-template-columns: 34px minmax(240px, 2fr) 130px 120px 170px 140px 170px; grid-template-areas: "cmp name mat cpn price net ytm"; gap: 0 12px; align-items: center; }
.thead { padding: 4px 12px; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.thead .r { text-align: right; }
.card { padding: 8px 12px; border-radius: 8px; box-shadow: none; }
.c-mat .lbl, .c-cpn .lbl, .c-price .lbl { display: none; }
.c-net .small { display: none; }
.c-net .small.tot { display: block; font-size: 11px; white-space: nowrap; }
.c-ytm { text-align: left; white-space: nowrap; } .c-ytm .lbl { display: inline-block; width: 68px; }
.card .main { font-size: 17px; }
.list { gap: 4px; }
}
.cmp-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 6; display: flex; gap: 10px; align-items: center;
background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px 8px 16px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.sheet.wide { max-width: 1000px; }
.cmp-scroll { overflow-x: auto; }
table.cmp { border-collapse: collapse; width: 100%; font-size: 14px; }
table.cmp th, table.cmp td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 150px; }
table.cmp td:first-child, table.cmp th:first-child { color: var(--muted); font-size: 12.5px; min-width: 130px; position: sticky; left: 0; background: var(--card); }
table.cmp th .name { font-weight: 600; }
button.link { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font-size: 12.5px; }
.chart { min-height: 60px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; font-weight: 600; vertical-align: middle; }
.badge.ask { background: var(--ask); color: var(--ask-ink); }
.badge.ref, .badge.cur, .badge.info { background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.badge.warn { background: var(--ref); color: var(--ref-ink); }
.badge.stale, .badge.bad { background: #fee2e2; color: #991b1b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.stale, :root:not([data-theme="light"]) .badge.bad { background: #7f1d1d; color: #fecaca; } }
:root[data-theme="dark"] .badge.stale, :root[data-theme="dark"] .badge.bad { background: #7f1d1d; color: #fecaca; }
.note.risk.r0 { border-left-color: var(--good); } .note.risk.r1 { border-left-color: var(--accent); } .note.risk.r2 { border-left-color: var(--warn); }
.note.risk.r3 { border-left-color: var(--bad); background: #fee2e2; color: #7f1d1d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note.risk.r3 { background: #3b0f0f; color: #fecaca; } }
:root[data-theme="dark"] .note.risk.r3 { background: #3b0f0f; color: #fecaca; }
.more-btn { margin: 14px auto 0; display: block; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
footer { color: var(--muted); font-size: 12px; margin-top: 24px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet { background: var(--card); width: 100%; max-width: 720px; max-height: 92vh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; }
@media (min-width: 720px) { .modal { align-items: center; } .sheet { border-radius: 16px; max-height: 88vh; } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px 8px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 17px; line-height: 1.25; }
.sheet-body { padding: 12px 16px 20px; overflow: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.kpi { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.kpi .l { color: var(--muted); font-size: 11.5px; }
.kpi .v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .v.good { color: var(--good); }
h3 { font-size: 14px; margin: 16px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
table.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
table.kv td { padding: 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kv td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.note { background: var(--ref); color: var(--ref-ink); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 8px 0; }
.ok, .good { color: var(--good); } .ko { color: var(--bad); }
.hint { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; margin: 12px 0; }
.btn { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--accent); }
.amount { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.amount input { width: 140px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 15px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.inline-form input { flex: 1 1 140px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 14px; }
.card.pos { grid-template-columns: 1fr auto; grid-template-areas: "name net" "more more"; } .c-more { grid-area: more; }
.pos .c-net { text-align: right; }
.pos-actions { margin-top: 4px; font-size: 12.5px; }
h4.sub { margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
@media (min-width: 900px) { .card.pos { grid-template-columns: 1fr auto; grid-template-areas: "name net" "more more"; } .c-more { grid-area: more; } }
.isin-row { display: inline-flex; align-items: center; gap: 6px; }
.isin-row code { font-size: 13px; background: var(--bg); padding: 1px 6px; border-radius: 6px; user-select: all; }
button.copy { border: 1px solid var(--line); background: var(--card); color: var(--accent); border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.icon-btn.has { border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 35%, transparent); }
.inline-form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 14px; }
a.btn { text-decoration: none; display: inline-block; }
.auctions { padding: 6px 0 0; }
.auctions summary { cursor: pointer; font-size: 13.5px; color: var(--ink); padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.auctions details[open] summary { border-radius: var(--radius) var(--radius) 0 0; }
.auctions table { background: var(--card); border: 1px solid var(--line); border-top: 0; padding: 4px 12px; }
.auctions .hint { padding: 0 4px; }
.pos-more { margin-top: 6px; padding: 6px 8px; background: var(--bg); border-radius: 8px; }
.pos-more .kv td { font-size: 12.5px; }
button.badge.info { cursor: pointer; font: inherit; font-size: 11px; }
.range-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.range-row input[type=range] { flex: 1; min-width: 0; height: 36px; accent-color: var(--accent); }
.range-row .btn.step { flex: 0 0 auto; min-width: 48px; font-size: 20px; line-height: 1; padding: 8px 0; }
.range-lbl { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.range-lbl b { font-size: 18px; font-variant-numeric: tabular-nums; }
.sec-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sec-line > div:first-child { flex: 1 1 200px; min-width: 0; }
.sec-line .row { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.kv tr.tot td { border-top: 2px solid var(--line); }
.kv.tax th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.kv.tax td:first-child { white-space: nowrap; font-weight: 600; width: 1%; }
.kv.tax tr.warn td { background: color-mix(in srgb, var(--bad) 8%, transparent); }
.kv.tax tr.past td { opacity: .6; }
.group-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin: 14px 0 6px; flex-wrap: wrap; }
.pos .c-net .small.tot { display: block; opacity: 1; font-size: 11.5px; white-space: nowrap; margin-top: 4px; line-height: 1.35; }
.pos .c-net .small.tot.good { color: var(--good); } .pos .c-net .small.tot.ko { color: var(--bad); }
#pfsub-body > .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.gate { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 20px; }
.gate-box { width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 12px; }
.gate-box h2 { margin: 0; }
.gate-box p { margin: 0; }
.gate-box label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.gate-box input { font-size: 16px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
