/* Demo "Modulo ordini": app di esempio con dati fittizi. Colori presi dal logo. */
:root {
    --navy: #0a3d78;
    --blue: #1670c4;
    --sky: #2b95e3;
    --soft: #f3f7fc;
    --line: #dde5ef;
    --text: #1d2a3a;
    --muted: #64748b;
    --ok: #12894a;
    --ok-bg: #eaf7f0;
    --err: #c62828;
    --warn-bg: #fff6dd;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(10, 61, 120, .06), 0 6px 20px rgba(10, 61, 120, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: #eef3f9;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
a { color: var(--blue); }

/* ---------- fascia demo ---------- */
.ribbon {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px;
    padding: 8px 16px; background: var(--navy); color: #dbeafe; font-size: 13px; text-align: center;
}
.ribbon strong { color: #fff; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; background: var(--sky); padding: 1px 8px; border-radius: 999px; margin-right: 6px; }
.ribbon-cta { color: #fff; font-weight: 700; text-decoration: none; border: 1px solid rgba(255, 255, 255, .5); padding: 3px 12px; border-radius: 999px; }
.ribbon-cta:hover { background: #fff; color: var(--navy); }
.ribbon-link { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ribbon-link:hover { color: #bfe0ff; }
.app-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; max-width: 760px; margin: 14px auto 0; padding: 16px 20px; color: #fff; border-radius: var(--radius); background: linear-gradient(120deg, var(--navy), var(--blue)); box-shadow: var(--shadow); }
.app-link-txt { flex: 1 1 340px; }
.app-link b { font-size: 16px; }
.app-link p { margin: 4px 0 0; font-size: 14px; color: #dbeafe; }
.app-link .btn { background: #fff; color: var(--navy); border-color: #fff; }
.app-link .btn:hover { background: var(--soft); }
.linkhint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 16px 0; }
.flow div { flex: 1 1 150px; padding: 12px 14px; text-align: center; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.flow div b { display: block; color: var(--navy); }
.flow div.hi { background: var(--navy); border-color: var(--navy); color: #dbeafe; }
.flow div.hi b { color: #fff; }
.flow i { align-self: center; font-style: normal; font-size: 20px; color: var(--sky); }
.ribbon-reset { background: none; border: 0; color: #bcd6f5; text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
.ribbon-reset:hover { color: #fff; }

/* ---------- struttura ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 80px; }
.top { display: flex; align-items: center; gap: 18px; padding: 18px 0 14px; }
.top .logo { height: 64px; width: auto; display: block; }
.is-login .top { display: none; }
.top-title { border-left: 3px solid var(--sky); padding-left: 16px; }
.top-title strong { display: block; font-size: 22px; line-height: 1.15; color: var(--navy); }
.top-title small { color: var(--muted); font-size: 13px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- pulsanti ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--blue);
    background: var(--blue); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
    transition: background .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); }
.btn.outline { background: #fff; color: var(--blue); }
.btn.outline:hover { background: var(--soft); color: var(--navy); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.link { border-color: transparent; background: none; color: var(--blue); }
.btn.link:hover { background: var(--soft); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, .tab:focus-visible, .pill:focus-visible, .tipq:focus-visible, .rt-bar button:focus-visible, .chap:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--sky) 55%, transparent); outline-offset: 2px;
}
.pill {
    height: 30px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13px; cursor: pointer;
    background: #fff; border: 1px solid var(--blue); color: var(--blue);
}
.pill:hover { background: var(--blue); color: #fff; }
.pill.danger { border-color: var(--err); color: var(--err); }
.pill.danger:hover { background: var(--err); color: #fff; }

/* ---------- campi ---------- */
input, select, textarea {
    width: 100%; height: 40px; padding: 0 10px; background: #fff; border: 1px solid #c9d4e2; border-radius: 6px; font-size: 15px;
}
input:focus, select:focus, textarea:focus, .rt:focus { outline: 2px solid color-mix(in srgb, var(--sky) 40%, transparent); border-color: var(--blue); }
input.bad, select.bad { border-color: var(--err); background: #fff5f5; }
label.lab { display: block; margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #44546a; }
.req { color: var(--err); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; }
.grid .wide { grid-column: span 2; }
fieldset.group { margin: 0 0 16px; padding: 14px 16px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
fieldset.group legend { padding: 0 6px; margin-left: -6px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--navy); }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.msg { margin-top: 12px; padding: 12px 16px; border-radius: 8px; border-left: 4px solid; font-weight: 600; }
.msg.ok { background: var(--ok-bg); border-color: var(--ok); color: #0c5c31; }
.msg.err { background: #fff2f2; border-color: var(--err); color: var(--err); }

/* ---------- accesso ---------- */
.login { max-width: 460px; margin: 24px auto 0; padding: 28px 26px; text-align: center; }
.login img { height: 86px; margin-bottom: 6px; }
.login h1 { margin: 6px 0 4px; font-size: 22px; color: var(--navy); }
.login p { margin: 0 0 18px; color: var(--muted); }
.login .row { display: flex; gap: 10px; }
.login .row input { height: 46px; font-size: 16px; }
.login .row .btn { height: 46px; }
.login .demo-hint { margin-top: 16px; padding: 10px 12px; background: var(--soft); border-radius: 8px; font-size: 13px; color: var(--muted); }
.login .demo-hint code { background: #fff; border: 1px solid var(--line); padding: 1px 7px; border-radius: 4px; color: var(--navy); font-weight: 700; }
.login .err { margin: 10px 0 0; color: var(--err); font-weight: 600; }
.login-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 760px; margin: 24px auto 0; }
.login-feats div { padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; color: var(--muted); }
.login-feats b { display: block; color: var(--navy); font-size: 14px; margin-bottom: 2px; }

/* ---------- barra agente e schede ---------- */
.agentbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.agentbar .who { margin-right: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tab {
    height: 42px; padding: 0 18px; border: 1px solid #c9d4e2; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0;
    background: #fff; color: #44546a; font-weight: 700; font-size: 14px; cursor: pointer;
}
.tab:hover { background: var(--soft); }
.tab.on { color: var(--blue); border-bottom-color: var(--blue); background: var(--soft); }

/* ---------- scelta cliente ---------- */
.pick { padding: 18px; margin-bottom: 18px; border: 2px solid var(--blue); border-radius: var(--radius); background: #fff; }
.pick-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.combo { position: relative; flex: 1 1 320px; max-width: 640px; }
.combo input { height: 48px; font-size: 16px; }
.opts { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid #c9d4e2; border-radius: 8px; box-shadow: 0 10px 30px rgba(10, 61, 120, .18); max-height: 320px; overflow: auto; }
.opts li { padding: 9px 12px; cursor: pointer; font-size: 14px; }
.opts li[aria-selected="true"] { background: var(--soft); }
.opts li.empty { color: var(--muted); cursor: default; }
.opts b { margin-right: 10px; color: var(--navy); }
.opts small { display: block; color: var(--muted); font-size: 12px; }
.chosen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; margin-bottom: 18px; background: #fff; border: 2px solid var(--blue); border-radius: var(--radius); }
.chosen .lab { margin: 0; }
.chosen strong { font-size: 17px; }
.tagnew { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 4px; background: var(--warn-bg); color: #7a5b00; font-size: 11px; font-weight: 700; }

/* ---------- tabella listino ---------- */
.tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; margin: 0; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.tablewrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
.list th, .list td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.3; }
.list thead th { position: sticky; top: 0; z-index: 1; background: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #44546a; text-align: left; }
.list .num { text-align: right; white-space: nowrap; }
.list thead th.num { white-space: normal; }
.list th.in, .list td.in { width: 70px; min-width: 56px; text-align: center; padding-left: 4px; padding-right: 4px; }
.list th.in.sel, .list td.in.sel { width: 80px; min-width: 76px; }
.list td.in input, .list td.in select { height: 32px; padding: 0 4px; text-align: center; font-size: 14px; }
.list td.in select { text-align-last: center; }
.list .secrow td { background: var(--soft); color: var(--navy); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 9px 10px; }
.list .c-code { font-weight: 700; white-space: nowrap; padding-left: 10px; }
.list .name { display: block; font-weight: 600; }
.list .meta { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.list .c-prz { font-weight: 600; }
.list .c-tot { font-weight: 700; }
.list tr.prod.on td { background: var(--ok-bg); }
.list tr.prod.on .c-crt input { border-color: var(--ok); font-weight: 700; }
.filtered .secrow:not(.addsec), .filtered tr.prod:not(.on):not(.add) { display: none; }
.cash { display: flex; align-items: center; justify-content: center; min-height: 32px; margin: 0; cursor: pointer; }
.list td.in .cash input { width: 20px; height: 20px; accent-color: var(--blue); }
.list .add input { height: 32px; padding: 0 6px; font-size: 14px; }
.list .add td.c-code input { width: 100%; min-width: 84px; font-weight: 700; }
.list .add .adddesc { display: flex; gap: 6px; align-items: center; }
.list .add .adddesc input { min-width: 140px; }
.list .add td.num input { width: 100%; min-width: 76px; text-align: right; }
.list .add .del { flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid #c9d4e2; border-radius: 6px; background: #fff; color: var(--err); font-size: 20px; line-height: 1; cursor: pointer; }
.list .add .del:hover { background: #fff5f5; }
.addwrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 0 0; }
.addwrap .hint { margin: 0; flex: 1 1 260px; }

/* ---------- note ---------- */
.notes { margin-top: 18px; }
.rt-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.rt-bar button { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 34px; padding: 0 8px; border: 1px solid #c9d4e2; border-radius: 6px; background: #fff; color: #333; cursor: pointer; font-size: 15px; }
.rt-bar button:hover { background: var(--soft); }
.rt-bar svg { display: block; pointer-events: none; }
.rt { min-height: 120px; max-height: 340px; overflow-y: auto; padding: 8px 10px; background: #fff; border: 1px solid #c9d4e2; border-radius: 6px; line-height: 1.45; }
.rt:empty::before { content: attr(data-ph); color: #8a97a8; pointer-events: none; }
.rt ul, .rt ol { margin: 0 0 .5em 1.4em; padding: 0; }
.files { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.files .hint { flex: 1 1 260px; margin: 0; }
.filelist { flex: 1 1 100%; margin: 0; padding: 0; list-style: none; }
.filelist li { margin: 4px 0 0; padding: 6px 10px; background: var(--soft); border-radius: 6px; font-size: 13px; }
.filelist button { margin-left: 6px; border: 0; background: none; color: var(--err); font-size: 18px; line-height: 1; cursor: pointer; }

/* ---------- barra totali ---------- */
.bar {
    position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
    margin-top: 16px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -4px 18px rgba(10, 61, 120, .1);
}
.totals { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.totals div { display: flex; flex-direction: column; }
.totals span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.totals strong { font-size: 21px; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--navy); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- storico e statistiche ---------- */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; align-items: end; padding: 14px; margin-bottom: 12px; }
.fact { display: flex; gap: 8px; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 14px; }
.kpi { padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.kpi span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kpi strong { font-size: 20px; color: var(--navy); font-variant-numeric: tabular-nums; }
.detail td { background: var(--soft); padding: 10px 12px !important; }
.detailnote { margin-top: 10px; padding: 8px 12px; background: #fff; border-left: 4px solid var(--blue); font-size: 14px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.stat { padding: 14px 16px; }
.stat h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); }
.brow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; margin: 0 0 9px; font-size: 13px; }
.brow .l { overflow: hidden; text-overflow: ellipsis; }
.brow small { display: block; color: var(--muted); font-size: 11px; }
.track { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; }
.fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--blue), var(--sky)); transition: width .5s ease; }
.val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- guida ---------- */
.guide { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }
.toc { position: sticky; top: 12px; padding: 14px; }
.toc h2 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); }
.toc input { height: 36px; font-size: 14px; margin-bottom: 8px; }
.chap { display: flex; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: 14px; color: #33445a; cursor: pointer; }
.chap:hover { background: var(--soft); }
.chap .n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); color: var(--blue); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.chap.on { background: color-mix(in srgb, var(--sky) 14%, #fff); color: var(--navy); font-weight: 700; }
.chap.on .n { background: var(--blue); color: #fff; }
.progress { height: 4px; margin: 10px 0 2px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); transition: width .3s; }
.article { padding: 26px 30px 30px; min-height: 420px; }
.article .kick { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sky); }
.article h2 { margin: 2px 0 12px; font-size: 28px; line-height: 1.2; color: var(--navy); }
.article h3 { margin: 24px 0 6px; font-size: 18px; color: var(--navy); }
.article p, .article li { font-size: 16px; line-height: 1.6; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 4px 0; }
.article table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.article th, .article td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article th { background: var(--soft); color: var(--navy); }
.article td.r { text-align: right; white-space: nowrap; }
.callout { margin: 16px 0; padding: 12px 16px; border-left: 4px solid var(--sky); background: var(--soft); border-radius: 0 8px 8px 0; }
.callout.warn { border-color: #e0a800; background: var(--warn-bg); }
.callout b { color: var(--navy); }
.formula { margin: 12px 0; padding: 12px 16px; border-radius: 8px; background: #0f2a4d; color: #e8f1fd; font-family: Consolas, "Courier New", monospace; font-size: 14px; overflow-x: auto; }
.try { margin: 18px 0 0; }
.gnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.faq details { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; background: #fff; }
.faq summary { padding: 11px 14px; font-weight: 700; color: var(--navy); cursor: pointer; }
.faq details[open] summary { border-bottom: 1px solid var(--line); background: var(--soft); }
.faq details p { margin: 0; padding: 12px 14px; }
.cta { margin-top: 28px; padding: 20px 22px; border-radius: var(--radius); color: #fff; background: linear-gradient(120deg, var(--navy), var(--blue)); }
.cta h3 { margin: 0 0 4px; color: #fff; }
.cta p { margin: 0 0 12px; color: #dbeafe; }
.cta .btn { background: #fff; color: var(--navy); border-color: #fff; }
.cta .btn:hover { background: var(--soft); }
.gselect { display: none; margin-bottom: 12px; }

/* ---------- suggerimenti, finestre, tour ---------- */
.tipq {
    display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin: -3px 0 -3px 4px; padding: 0; vertical-align: middle;
    border: 1px solid var(--blue); border-radius: 50%; background: #fff; color: var(--blue); font: 700 10px/1 system-ui, sans-serif; cursor: help; text-transform: none;
}
.tipq:hover, .tipq:focus-visible { background: var(--blue); color: #fff; }
.notips .tipq { display: none; }
#tip { position: fixed; z-index: 1000; max-width: 280px; padding: 8px 11px; background: #14233a; color: #fff; border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, .28); font-size: 13px; line-height: 1.4; pointer-events: none; }
.modalback { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 25, 48, .55); }
.modal { width: 100%; max-width: 440px; padding: 22px; background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.modal h3 { margin: 0 0 8px; color: var(--navy); }
.modal p { margin: 0 0 18px; white-space: pre-line; }
.modal .acts { display: flex; justify-content: flex-end; gap: 10px; }
.panel { position: fixed; z-index: 800; top: 70px; right: 16px; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow: auto; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(10, 61, 120, .28); }
.panel h3 { margin: 0 0 10px; color: var(--navy); }
.panel .row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.panel .faq summary { font-size: 14px; padding: 8px 12px; }
.panel .faq details p { font-size: 14px; padding: 8px 12px; }
.panel .x { float: right; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.spot { position: fixed; z-index: 950; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(8, 25, 48, .62); border: 2px solid var(--sky); pointer-events: none; transition: all .25s ease; }
.tour { position: fixed; z-index: 960; width: min(360px, calc(100vw - 16px)); padding: 16px 18px; background: #fff; border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.tour small { color: var(--sky); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.tour h4 { margin: 2px 0 6px; font-size: 17px; color: var(--navy); }
.tour p { margin: 0 0 12px; font-size: 14px; }
.tour .acts { display: flex; align-items: center; gap: 8px; }
.tour .acts .sp { flex: 1; }
.tour .skip { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
.toast { position: fixed; z-index: 990; left: 50%; bottom: 90px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: #14233a; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }

/* ---------- telefono e tablet verticale ---------- */
@media (max-width: 849px) {
    .top .logo { height: 48px; }
    .top-title strong { font-size: 18px; }
    .grid .wide { grid-column: auto; }
    .login-feats { grid-template-columns: 1fr; }
    .tablewrap { border: 0; overflow: visible; background: none; box-shadow: none; }
    table.list, .list tbody { display: block; }
    .list thead { display: none; }
    .list .secrow { display: block; margin-top: 14px; }
    .list .secrow td { display: block; border: 1px solid var(--line); border-radius: 8px 8px 0 0; }
    .list tr.prod { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px 8px; padding: 10px; background: #fff; border: 1px solid var(--line); border-top: 0; }
    .list tr.prod.on { background: var(--ok-bg); }
    .list tr.prod td { display: block; padding: 0 !important; border: 0; background: none !important; }
    .list .c-code { grid-column: 1 / -1; font-size: 12px; color: #667; }
    .list .c-desc { grid-column: 1 / -1; }
    .list .c-list, .list .c-prz { grid-column: span 5; text-align: left; }
    .list td.in { grid-column: span 2; width: auto; min-width: 0; }
    .list td.in.c-om, .list td.in.sel { grid-column: span 3; width: auto; min-width: 0; }
    .list td.in.c-cash { grid-column: 1 / -1; }
    .list .c-imp { grid-column: span 4; text-align: left; }
    .list .c-iva { grid-column: span 2; text-align: left; }
    .list .c-tot { grid-column: span 4; text-align: left; }
    .list td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #6b7a8e; white-space: nowrap; }
    .list td.in input, .list td.in select { height: 40px; font-size: 16px; }
    .cash { justify-content: flex-start; gap: 10px; min-height: 40px; }
    .cash::after { content: attr(data-label); font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #555; }
    .list td.in .cash input { width: 24px; height: 24px; }
    .list tr.add input { width: 100%; height: 40px; font-size: 16px; }
    .list tr.add td:not(.in) input { text-align: left; }
    .list .add .adddesc input { min-width: 0; }
    .list .add td.num input { text-align: left; }
    .list .add .del { width: 40px; height: 40px; }
    .addwrap .btn { flex: 1 1 100%; }
    .bar { padding: 10px 12px; gap: 10px; }
    .totals { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 2px 8px; width: 100%; }
    .totals span { font-size: 10px; }
    .totals strong { font-size: 14px; white-space: nowrap; }
    .actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
    .actions .btn { height: 44px; padding: 0 8px; font-size: 13px; }
    .guide { grid-template-columns: 1fr; }
    .toc { position: static; display: none; }
    .gselect { display: block; }
    .article { padding: 20px 18px 24px; }
    .article h2 { font-size: 23px; }
    .article table { display: block; overflow-x: auto; }
    .hist .list tbody { display: table-row-group; }
    .tablewrap.hist { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
    .hist table.list { display: table; }
    .hist .list thead { display: table-header-group; }
    .hist .list tr { display: table-row; }
    .hist .list td, .hist .list th { display: table-cell; }
    .stats { grid-template-columns: 1fr; }
    .brow { grid-template-columns: minmax(0, 1fr) auto; }
    .track { grid-column: 1 / -1; order: 3; }
    .login .row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

@font-face{font-family:'Bricolage Grotesque';src:url(/assets/fonts/bricolage-grotesque.woff2) format('woff2');font-weight:200 800;font-display:swap}.site-back{display:inline-flex;align-items:center;gap:10px;flex-shrink:0;margin-left:auto;height:48px;padding:0 8px 0 22px;border-radius:999px;background:#FFC400;color:#241A00!important;font:700 16px/1 'Bricolage Grotesque',system-ui,sans-serif;text-decoration:none!important;white-space:nowrap;transition:border-radius .4s cubic-bezier(.2,0,0,1),background .2s,box-shadow .2s}.site-back i{font-style:normal;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#241A00;color:#FFC400;font-size:18px;transition:transform .45s cubic-bezier(.22,1,.36,1)}.site-back:hover,.site-back:focus-visible{border-radius:16px;background:#ffd13d;box-shadow:0 6px 18px rgba(255,196,0,.35)}.site-back:hover i,.site-back:focus-visible i{transform:translateX(-3px)}.site-back:focus-visible{outline:3px solid #FFC400;outline-offset:3px}@media(max-width:600px){.site-back{height:44px;padding:0 6px 0 16px;font-size:14px;gap:8px}.site-back i{width:28px;height:28px}}
