/* =====================================================================
   MPF Portale Rivenditori - file tema unico
   Strati: 1 font | 2 token | 3 shell | 4 componenti | 5 regole globali
           e responsive | 6 effetti (profilo sobrio) | 7 moduli pagina | print
   ===================================================================== */

/* 1. FONT ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:wght@500;600&display=swap');

/* 2. DESIGN TOKEN ---------------------------------------------------- */
:root {
    /* Brand: nero/rosso del logo MPF; il blu operativo riprende i mockup del cliente */
    --mpf-ink: #151922;
    --mpf-ink-2: #1F2430;
    --mpf-ink-3: #2B3242;
    --mpf-red: #D2001E;
    --mpf-red-soft: #FCE8EB;
    --mpf-primary: #1A4F8B;
    --mpf-primary-dark: #123A67;
    --mpf-primary-light: #DCE8F6;
    --mpf-primary-ultra: #F1F6FC;
    --mpf-primary-rgb: 26, 79, 139;

    --mpf-bg: #F4F5F7;
    --mpf-surface: #FFFFFF;
    --mpf-surface-2: #F8F9FB;
    --mpf-border: #E1E4EA;
    --mpf-border-strong: #C9CED8;
    --mpf-text: #1A1E26;
    --mpf-text-muted: #596171;
    --mpf-text-soft: #7B8392;

    --mpf-success: #1C7343;
    --mpf-success-soft: #E4F3EA;
    --mpf-warning: #9A5B00;
    --mpf-warning-soft: #FDF1DD;
    --mpf-danger: #B42330;
    --mpf-danger-soft: #FBE7E9;
    --mpf-info: #1A5D8F;
    --mpf-info-soft: #E3EFF8;
    --mpf-mock: #6B4FA0;
    --mpf-mock-soft: #F0EBF8;

    --mpf-shadow-sm: 0 1px 2px rgba(21, 25, 34, .06);
    --mpf-shadow: 0 2px 8px rgba(21, 25, 34, .08);
    --mpf-shadow-lg: 0 12px 32px rgba(21, 25, 34, .16);

    --mpf-radius-sm: 6px;
    --mpf-radius: 10px;
    --mpf-radius-lg: 14px;

    --mpf-sidebar: 248px;
    --mpf-topbar: 64px;
    --mpf-bottomnav: 64px;

    --mpf-font-sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
    --mpf-font-serif: 'IBM Plex Serif', Georgia, serif;
}

/* 3. BASE E SHELL ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--mpf-bg); color: var(--mpf-text);
    font-family: var(--mpf-font-sans); line-height: 1.5;
}
h1, h2, h3, h4 { margin: 0; color: var(--mpf-ink); line-height: 1.25; }
h1 { font-family: var(--mpf-font-serif); font-weight: 600; font-size: 1.75rem; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .5rem; }
a { color: var(--mpf-primary); }
img { max-width: 100%; }
button { font-family: inherit; }
::selection { background: var(--mpf-primary-light); color: var(--mpf-ink); }
:focus-visible { outline: 3px solid rgba(var(--mpf-primary-rgb), .45); outline-offset: 2px; }

.mpf-app { display: flex; min-height: 100vh; }

.mpf-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--mpf-sidebar);
    background: var(--mpf-ink); color: #C9CED8; display: flex; flex-direction: column;
    z-index: 40;
}
.mpf-brand {
    height: var(--mpf-topbar); display: flex; align-items: center; gap: 10px;
    padding: 0 18px; border-bottom: 1px solid var(--mpf-ink-3);
}
.mpf-brand img { height: 30px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; }
.mpf-brand span { color: #fff; font-weight: 600; font-size: .95rem; line-height: 1.15; }
.mpf-brand small { display: block; color: #9AA2B1; font-weight: 400; font-size: .75rem; }
.mpf-nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.mpf-nav-group { font-size: .72rem; color: #8790A0; padding: 14px 12px 6px; letter-spacing: .02em; }
.mpf-nav a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 2px;
    border-radius: var(--mpf-radius-sm); color: #D5D9E1; text-decoration: none; font-weight: 500;
    min-height: 44px; position: relative;
}
.mpf-nav a:hover { background: var(--mpf-ink-2); color: #fff; }
.mpf-nav a.active { background: var(--mpf-ink-3); color: #fff; }
/* barretta rossa: richiama il colore del logo senza usarlo come colore d'azione */
.mpf-nav a.active::before {
    content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px;
    border-radius: 0 3px 3px 0; background: var(--mpf-red);
}
.mpf-nav .mpf-nav-tag {
    margin-left: auto; font-size: .68rem; padding: 1px 7px; border-radius: 999px;
    background: var(--mpf-ink-3); color: #C9CED8;
}
.mpf-sidebar-foot { padding: 12px; border-top: 1px solid var(--mpf-ink-3); }

.mpf-main { flex: 1; margin-left: var(--mpf-sidebar); min-width: 0; display: flex; flex-direction: column; }

.mpf-topbar {
    position: sticky; top: 0; z-index: 30; height: var(--mpf-topbar);
    display: flex; align-items: center; gap: 16px; padding: 0 24px;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--mpf-border);
}
.mpf-topbar-search { flex: 1; max-width: 560px; position: relative; }
.mpf-topbar-search input { padding-left: 38px; }
.mpf-topbar-search .mpf-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mpf-text-soft); }
.mpf-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* specificità doppia: .mpf-btn (definito dopo) imposterebbe display:inline-flex */
.mpf-topbar .mpf-topbar-burger, .mpf-topbar-logo { display: none; }
.mpf-cart-btn { position: relative; }
.mpf-cart-count {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--mpf-red); color: #fff; font-size: .7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.mpf-user {
    display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--mpf-radius);
    border: 1px solid transparent; background: none; cursor: pointer; text-align: left; color: inherit;
}
.mpf-user:hover { border-color: var(--mpf-border); background: var(--mpf-surface-2); }
.mpf-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--mpf-primary-light);
    color: var(--mpf-primary-dark); font-weight: 700; display: flex; align-items: center; justify-content: center;
    font-size: .85rem; flex: 0 0 auto;
}
.mpf-user-name { font-weight: 600; font-size: .88rem; line-height: 1.2; }
.mpf-user-sub { font-size: .76rem; color: var(--mpf-text-muted); }

/* min-width:0 consente ai contenuti flex (tabelle, griglie prodotti) di restringersi
   invece di allargare la pagina e creare scroll orizzontale */
.mpf-content { padding: 24px; min-width: 0; flex: 1; container-type: inline-size; }
.mpf-content-inner { max-width: 1440px; margin: 0 auto; }

.mpf-mockbar {
    background: var(--mpf-mock-soft); color: var(--mpf-mock); font-size: .78rem;
    padding: 6px 24px; border-bottom: 1px solid #E0D6F0; display: flex; gap: 8px; align-items: center;
}

.mpf-bottomnav { display: none; }
.mpf-drawer-mask { display: none; }

/* 4. COMPONENTI ------------------------------------------------------ */
.mpf-icon { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mpf-icon.sm { width: 16px; height: 16px; }
.mpf-icon.lg { width: 28px; height: 28px; }

.mpf-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.mpf-page-head p { color: var(--mpf-text-muted); margin: 4px 0 0; max-width: 760px; }
.mpf-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mpf-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; color: var(--mpf-text-muted); margin-bottom: 10px; }
.mpf-breadcrumb a { color: var(--mpf-text-muted); text-decoration: none; }
.mpf-breadcrumb a:hover { color: var(--mpf-primary); text-decoration: underline; }

.mpf-card { background: var(--mpf-surface); border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius-lg); padding: 20px; min-width: 0; }
.mpf-card + .mpf-card { margin-top: 16px; }
.mpf-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.mpf-card-head p { margin: 2px 0 0; color: var(--mpf-text-muted); font-size: .85rem; }
.mpf-card.flat { background: var(--mpf-surface-2); }

.mpf-grid { display: grid; gap: 16px; }
.mpf-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mpf-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mpf-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mpf-grid.side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.mpf-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mpf-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mpf-row.between { justify-content: space-between; }
.mpf-muted { color: var(--mpf-text-muted); }
.mpf-small { font-size: .82rem; }
.mpf-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mpf-strong { font-weight: 600; }
.mpf-divider { border: 0; border-top: 1px solid var(--mpf-border); margin: 14px 0; }

/* Bottoni: altezza minima 44px per il tocco */
.mpf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 18px; border-radius: var(--mpf-radius-sm);
    border: 1px solid var(--mpf-border-strong); background: var(--mpf-surface); color: var(--mpf-ink);
    font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.mpf-btn:hover:not(:disabled) { border-color: var(--mpf-primary); color: var(--mpf-primary); }
.mpf-btn.primary { background: var(--mpf-primary); border-color: var(--mpf-primary); color: #fff; }
.mpf-btn.primary:hover:not(:disabled) { background: var(--mpf-primary-dark); color: #fff; }
.mpf-btn.danger { color: var(--mpf-danger); border-color: #E7B3B8; }
.mpf-btn.danger.solid { background: var(--mpf-danger); color: #fff; border-color: var(--mpf-danger); }
.mpf-btn.ghost { border-color: transparent; background: transparent; }
.mpf-btn.ghost:hover:not(:disabled) { background: var(--mpf-primary-ultra); border-color: transparent; }
.mpf-btn.block { width: 100%; }
.mpf-btn.sm { min-height: 36px; padding: 0 12px; font-size: .85rem; }
.mpf-btn.icon { width: 44px; padding: 0; }
.mpf-btn.icon.sm { width: 36px; }
.mpf-btn:disabled { opacity: .55; cursor: not-allowed; }
.mpf-link-btn { background: none; border: 0; padding: 4px 0; color: var(--mpf-primary); font-weight: 600; cursor: pointer; font-size: inherit; text-decoration: none; min-height: 32px; }
.mpf-link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Form */
.mpf-form { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mpf-form .full { grid-column: 1 / -1; }
.mpf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mpf-field label, .mpf-label { font-size: .82rem; font-weight: 600; color: var(--mpf-ink-3); }
.mpf-field .hint { font-size: .78rem; color: var(--mpf-text-muted); }
.mpf-input, .mpf-select, .mpf-textarea, .mpf-field input[type=text], .mpf-field input[type=number], .mpf-field input[type=email], .mpf-field input[type=tel], .mpf-field select, .mpf-field textarea {
    width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--mpf-border-strong);
    border-radius: var(--mpf-radius-sm); background: var(--mpf-surface); color: var(--mpf-text);
    font: inherit; font-size: .95rem;
}
.mpf-field textarea, .mpf-textarea { min-height: 96px; resize: vertical; }
.mpf-input:focus, .mpf-select:focus, .mpf-field input:focus, .mpf-field select:focus, .mpf-field textarea:focus {
    outline: none; border-color: var(--mpf-primary); box-shadow: 0 0 0 3px rgba(var(--mpf-primary-rgb), .16);
}
.mpf-field .invalid, .mpf-field input.invalid, .mpf-field select.invalid, .mpf-field textarea.invalid { border-color: var(--mpf-danger); }
.validation-message, .mpf-error { color: var(--mpf-danger); font-size: .8rem; }
.mpf-input-suffix { position: relative; }
.mpf-input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--mpf-text-muted); font-size: .85rem; pointer-events: none; }
.mpf-input-suffix input { padding-right: 52px; }

.mpf-check { display: flex; align-items: flex-start; gap: 10px; min-height: 36px; cursor: pointer; font-size: .92rem; }
.mpf-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--mpf-primary); flex: 0 0 auto; }

.mpf-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--mpf-border-strong); border-radius: var(--mpf-radius-sm); overflow: hidden; background: var(--mpf-surface); }
.mpf-seg button { min-height: 42px; padding: 0 14px; border: 0; border-right: 1px solid var(--mpf-border); background: none; cursor: pointer; font-weight: 500; color: var(--mpf-text); }
.mpf-seg button:last-child { border-right: 0; }
.mpf-seg button.on { background: var(--mpf-primary); color: #fff; }

.mpf-options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); }
.mpf-option {
    border: 1px solid var(--mpf-border-strong); border-radius: var(--mpf-radius); background: var(--mpf-surface);
    padding: 12px 14px; text-align: left; cursor: pointer; min-height: 56px; color: var(--mpf-text);
    display: flex; flex-direction: column; gap: 2px; font: inherit;
}
.mpf-option strong { font-size: .92rem; }
.mpf-option span { font-size: .78rem; color: var(--mpf-text-muted); }
.mpf-option.on { border-color: var(--mpf-primary); box-shadow: inset 0 0 0 1px var(--mpf-primary); background: var(--mpf-primary-ultra); }

/* Badge e chip: lo stato non è mai solo colore, c'è sempre il testo */
.mpf-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
    font-size: .76rem; font-weight: 600; background: var(--mpf-surface-2); color: var(--mpf-text-muted);
    border: 1px solid var(--mpf-border); white-space: nowrap;
}
.mpf-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mpf-badge.plain::before { display: none; }
.mpf-badge.success { background: var(--mpf-success-soft); color: var(--mpf-success); border-color: transparent; }
.mpf-badge.warning { background: var(--mpf-warning-soft); color: var(--mpf-warning); border-color: transparent; }
.mpf-badge.danger { background: var(--mpf-danger-soft); color: var(--mpf-danger); border-color: transparent; }
.mpf-badge.info { background: var(--mpf-info-soft); color: var(--mpf-info); border-color: transparent; }
.mpf-badge.brand { background: var(--mpf-red-soft); color: var(--mpf-red); border-color: transparent; }
.mpf-badge.mock { background: var(--mpf-mock-soft); color: var(--mpf-mock); border-color: transparent; }
.mpf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--mpf-primary-ultra); color: var(--mpf-primary-dark); font-size: .78rem; font-weight: 500; }
.mpf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mpf-chip button { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; display: flex; }

/* Avvisi */
.mpf-notice { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--mpf-radius); font-size: .88rem; background: var(--mpf-info-soft); color: #173F5F; align-items: flex-start; }
.mpf-notice.warning { background: var(--mpf-warning-soft); color: #5E3A00; }
.mpf-notice.success { background: var(--mpf-success-soft); color: #11452A; }
.mpf-notice.danger { background: var(--mpf-danger-soft); color: #6B1219; }
.mpf-notice.mock { background: var(--mpf-mock-soft); color: #4A3572; }
.mpf-notice strong { display: block; margin-bottom: 2px; }

/* Tabelle: complete su desktop, schede sotto 768px (data-label scritta nel markup) */
.mpf-table-wrap { width: 100%; min-width: 0; }
.mpf-table-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.mpf-table-toolbar .mpf-count { font-size: .82rem; color: var(--mpf-text-muted); }
.mpf-table-toolbar .push { margin-left: auto; }
.mpf-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mpf-table th {
    text-align: left; font-size: .78rem; font-weight: 600; color: var(--mpf-text-muted);
    padding: 10px 12px; border-bottom: 2px solid var(--mpf-border); white-space: normal; vertical-align: bottom;
}
.mpf-table th.mpf-num { text-align: right; }
.mpf-table th button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.mpf-table th.sorted { color: var(--mpf-primary); }
.mpf-table td { padding: 12px; border-bottom: 1px solid var(--mpf-border); vertical-align: middle; overflow-wrap: anywhere; }
.mpf-table tbody tr.clickable { cursor: pointer; }
.mpf-table tbody tr.clickable:hover { background: var(--mpf-primary-ultra); }
.mpf-table td.actions { white-space: nowrap; text-align: right; }
.mpf-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--mpf-text-muted); }
.mpf-pager .mpf-row { gap: 6px; }

/* Tabs */
/* le linguette vanno a capo invece di scorrere: tutte restano visibili anche sul telefono */
.mpf-tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--mpf-border); margin-bottom: 16px; }
.mpf-tabs button {
    border: 0; background: none; padding: 12px 14px; font-weight: 600; color: var(--mpf-text-muted);
    cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; min-height: 46px; font-size: .9rem;
}
.mpf-tabs button.on { color: var(--mpf-ink); border-bottom-color: var(--mpf-primary); }
.mpf-tabs button .mpf-tab-count { color: var(--mpf-text-soft); font-weight: 500; }

/* Modale */
.mpf-modal-mask { position: fixed; inset: 0; background: rgba(21, 25, 34, .5); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; animation: mpfFade .15s ease; }
.mpf-modal { background: var(--mpf-surface); border-radius: var(--mpf-radius-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--mpf-shadow-lg); animation: mpfRise .2s ease; }
.mpf-modal.wide { width: min(880px, 100%); }
.mpf-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--mpf-border); }
.mpf-modal-body { padding: 20px; }
.mpf-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--mpf-border); flex-wrap: wrap; }

/* Toast */
.mpf-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.mpf-toast { background: var(--mpf-ink); color: #fff; padding: 12px 16px; border-radius: var(--mpf-radius); box-shadow: var(--mpf-shadow-lg); display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; animation: mpfRise .2s ease; }
.mpf-toast.success { border-left: 4px solid #3FB97A; }
.mpf-toast.error { border-left: 4px solid #F06A75; }
.mpf-toast.info { border-left: 4px solid #6FA8E0; }

/* Stati vuoto / caricamento / errore */
.mpf-empty { text-align: center; padding: 40px 16px; color: var(--mpf-text-muted); }
.mpf-empty .mpf-icon { width: 40px; height: 40px; color: var(--mpf-border-strong); margin-bottom: 8px; }
.mpf-empty.success .mpf-icon { color: var(--mpf-success); }
.mpf-empty h3 { color: var(--mpf-ink); margin-bottom: 4px; }
.mpf-skeleton { background: linear-gradient(90deg, #ECEEF2 25%, #F6F7F9 50%, #ECEEF2 75%); background-size: 200% 100%; animation: mpfSkel 1.3s linear infinite; border-radius: 8px; min-height: 16px; }
.mpf-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 60vh; color: var(--mpf-text-muted); }
.mpf-spinner { width: 34px; height: 34px; border: 3px solid var(--mpf-primary-light); border-top-color: var(--mpf-primary); border-radius: 50%; animation: mpfSpin .8s linear infinite; }

/* KPI */
.mpf-kpi { background: var(--mpf-surface); border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius-lg); padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
.mpf-kpi .label { font-size: .8rem; color: var(--mpf-text-muted); }
.mpf-kpi .value { font-family: var(--mpf-font-serif); font-size: 1.7rem; font-weight: 600; color: var(--mpf-ink); line-height: 1.2; }
.mpf-kpi .sub { font-size: .78rem; color: var(--mpf-text-muted); }
a.mpf-kpi:hover { border-color: var(--mpf-primary); }

/* Prezzi */
.mpf-price { font-family: var(--mpf-font-serif); font-weight: 600; font-size: 1.35rem; color: var(--mpf-ink); font-variant-numeric: tabular-nums; }
.mpf-price.lg { font-size: 1.9rem; }
.mpf-price-old { text-decoration: line-through; color: var(--mpf-text-soft); font-size: .85rem; margin-left: 6px; }
.mpf-price-label { font-size: .76rem; color: var(--mpf-text-muted); }
.mpf-noprice { display: flex; align-items: center; gap: 8px; color: var(--mpf-warning); font-weight: 600; font-size: .9rem; }

/* Riepilogo importi */
.mpf-sum { display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.mpf-sum > div { display: flex; justify-content: space-between; gap: 12px; }
.mpf-sum > div span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.mpf-sum .total { border-top: 1px solid var(--mpf-border); padding-top: 10px; font-weight: 700; font-size: 1.05rem; }

/* Stepper */
.mpf-steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; counter-reset: s; }
.mpf-steps li { list-style: none; display: flex; align-items: center; gap: 8px; color: var(--mpf-text-muted); font-size: .88rem; font-weight: 500; }
.mpf-steps li::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--mpf-border-strong); display: flex; align-items: center; justify-content: center; font-size: .8rem; background: var(--mpf-surface); }
.mpf-steps li.on { color: var(--mpf-ink); }
.mpf-steps li.on::before { background: var(--mpf-primary); border-color: var(--mpf-primary); color: #fff; }
.mpf-steps li.done::before { background: var(--mpf-success); border-color: var(--mpf-success); color: #fff; content: "✓"; }
.mpf-steps li + li::after { content: none; }
.mpf-steps { padding: 0; margin-top: 0; }

/* Timeline stati ordine */
.mpf-timeline { list-style: none; padding: 0; margin: 0; }
.mpf-timeline li { position: relative; padding: 0 0 18px 28px; }
.mpf-timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--mpf-border-strong); }
.mpf-timeline li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--mpf-border); }
.mpf-timeline li:last-child::after { display: none; }
.mpf-timeline li.done::before { background: var(--mpf-success); }
.mpf-timeline li.current::before { background: var(--mpf-primary); box-shadow: 0 0 0 4px var(--mpf-primary-light); }
.mpf-timeline li.cancel::before { background: var(--mpf-danger); }

/* Popover informativo (costo copia) */
.mpf-info-pop { position: relative; display: inline-flex; }
.mpf-help { border: 0; background: none; color: var(--mpf-primary); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 4px; font-size: .8rem; font-weight: 600; min-height: 32px; }

/* 5. REGOLE GLOBALI E RESPONSIVE ------------------------------------ */
@media (max-width: 1279px) {
    :root { --mpf-sidebar: 216px; }
    .mpf-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mpf-grid.side { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1023px) {
    .mpf-grid.side { grid-template-columns: minmax(0, 1fr); }
    .mpf-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mpf-col-md { display: none; }
}

/* Sotto 1024px la sidebar diventa un pannello a scomparsa e compare la barra inferiore */
@media (max-width: 1023px) {
    .mpf-sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 280px; }
    .mpf-app.nav-open .mpf-sidebar { transform: none; box-shadow: var(--mpf-shadow-lg); }
    .mpf-app.nav-open .mpf-drawer-mask { display: block; position: fixed; inset: 0; background: rgba(21, 25, 34, .45); z-index: 35; }
    .mpf-main { margin-left: 0; }
    .mpf-topbar { padding: 0 12px; gap: 8px; }
    .mpf-topbar .mpf-topbar-burger { display: inline-flex; }
    .mpf-topbar-logo { display: flex; align-items: center; }
    .mpf-topbar-logo img { height: 28px; }
    .mpf-user-text { display: none; }
    .mpf-content { padding: 16px 16px calc(var(--mpf-bottomnav) + 24px); }
    .mpf-mockbar { padding: 6px 16px; }
    .mpf-bottomnav {
        display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
        height: var(--mpf-bottomnav); background: var(--mpf-surface); border-top: 1px solid var(--mpf-border); z-index: 30;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mpf-bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .7rem; color: var(--mpf-text-muted); text-decoration: none; position: relative; }
    .mpf-bottomnav a.active { color: var(--mpf-primary); font-weight: 600; }
    .mpf-bottomnav .mpf-cart-count { top: 6px; right: calc(50% - 22px); }
    .mpf-toasts { bottom: calc(var(--mpf-bottomnav) + 12px); right: 12px; }
}

@media (max-width: 767px) {
    html { font-size: 15px; }
    h1 { font-size: 1.4rem; }
    .mpf-topbar-search { display: none; }
    .mpf-topbar-search.mobile-open { display: block; position: absolute; left: 8px; right: 8px; top: 10px; max-width: none; }
    .mpf-grid.cols-2, .mpf-grid.cols-3, .mpf-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
    .mpf-grid.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mpf-form { grid-template-columns: minmax(0, 1fr); }
    .mpf-card { padding: 16px; border-radius: var(--mpf-radius); }
    .mpf-page-head { align-items: flex-start; }
    .mpf-page-actions { width: 100%; }
    .mpf-page-actions .mpf-btn { flex: 1; }
    .mpf-modal-mask { align-items: flex-end; padding: 0; }
    .mpf-modal { width: 100%; border-radius: var(--mpf-radius-lg) var(--mpf-radius-lg) 0 0; max-height: 92vh; }
    .mpf-modal-foot .mpf-btn { flex: 1; }

    /* Tabella in modalità schede */
    .mpf-table thead { display: none; }
    .mpf-table, .mpf-table tbody, .mpf-table tr, .mpf-table td { display: block; width: 100%; }
    .mpf-table tr { border: 1px solid var(--mpf-border); border-left: 3px solid var(--mpf-primary); border-radius: var(--mpf-radius); margin-bottom: 10px; padding: 6px 12px; background: var(--mpf-surface); }
    .mpf-table td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; padding: 6px 0; text-align: right; }
    .mpf-table td::before { content: attr(data-label); flex: 0 0 40%; text-align: left; font-size: .76rem; font-weight: 600; color: var(--mpf-text-muted); }
    .mpf-table td[data-label=""]::before { display: none; }
    .mpf-table td.mpf-num { white-space: normal; }
    .mpf-table td.actions { justify-content: flex-end; }
    .mpf-table td.primary-cell { font-weight: 600; text-align: left; justify-content: flex-start; }
    .mpf-table td.primary-cell::before { display: none; }
}

/* 6. EFFETTI (profilo sobrio) --------------------------------------- */
@keyframes mpfFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mpfRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mpfSpin { to { transform: rotate(360deg); } }
@keyframes mpfSkel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* 7. MODULI DI PAGINA ------------------------------------------------ */

/* Catalogo: filtri laterali + griglia prodotti */
.mpf-catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.mpf-filters { background: var(--mpf-surface); border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius-lg); padding: 16px; position: sticky; top: calc(var(--mpf-topbar) + 16px); max-height: calc(100vh - var(--mpf-topbar) - 32px); overflow-y: auto; }
.mpf-filter-group { padding: 12px 0; border-bottom: 1px solid var(--mpf-border); }
.mpf-filter-group:last-child { border-bottom: 0; }
.mpf-filter-group h3 { font-size: .85rem; margin-bottom: 8px; }
.mpf-filter-group .mpf-check { min-height: 32px; font-size: .88rem; }
.mpf-filter-group .count { margin-left: auto; color: var(--mpf-text-soft); font-size: .78rem; }
.mpf-filters-toggle { display: none; }
.mpf-cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mpf-cat-tabs button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--mpf-border-strong); background: var(--mpf-surface); cursor: pointer; font-weight: 600; color: var(--mpf-text); font-size: .88rem; }
.mpf-cat-tabs button.on { background: var(--mpf-ink); color: #fff; border-color: var(--mpf-ink); }

.mpf-products { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.mpf-product {
    background: var(--mpf-surface); border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius-lg);
    display: flex; flex-direction: column; overflow: hidden; min-width: 0; transition: border-color .15s ease, box-shadow .15s ease;
}
.mpf-product:hover { border-color: var(--mpf-border-strong); box-shadow: var(--mpf-shadow); }
.mpf-product-img { height: 170px; display: flex; align-items: center; justify-content: center; background: var(--mpf-surface); padding: 12px; border-bottom: 1px solid var(--mpf-border); position: relative; text-decoration: none; }
.mpf-product-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.mpf-product-img .mpf-badge { position: absolute; top: 10px; left: 10px; }
.mpf-product-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mpf-product-brand { font-size: .74rem; color: var(--mpf-text-muted); font-weight: 600; letter-spacing: .02em; }
.mpf-product-name { font-weight: 600; color: var(--mpf-ink); text-decoration: none; line-height: 1.3; }
.mpf-product-name:hover { color: var(--mpf-primary); }
.mpf-product-code { font-size: .78rem; color: var(--mpf-text-soft); }
.mpf-product-specs { font-size: .8rem; color: var(--mpf-text-muted); }
.mpf-product-foot { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.mpf-img-fallback { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--mpf-text-soft); font-size: .75rem; }
.mpf-img-fallback .mpf-icon { width: 44px; height: 44px; }

.mpf-stock { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; }
.mpf-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mpf-stock.ok { color: var(--mpf-success); }
.mpf-stock.arr { color: var(--mpf-warning); }
.mpf-stock.no { color: var(--mpf-text-muted); }

.mpf-qty { display: inline-flex; align-items: center; border: 1px solid var(--mpf-border-strong); border-radius: var(--mpf-radius-sm); overflow: hidden; background: var(--mpf-surface); }
.mpf-qty button { width: 40px; height: 40px; border: 0; background: var(--mpf-surface-2); cursor: pointer; font-size: 1.1rem; color: var(--mpf-ink); }
.mpf-qty input { width: 48px; height: 40px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; }
.mpf-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Dettaglio prodotto */
.mpf-pdp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "hero buy" "tabs buy"; gap: 20px; align-items: start; }
.mpf-pdp .pdp-hero-card { grid-area: hero; }
.mpf-pdp .pdp-tabs-card { grid-area: tabs; margin-top: 0; }
.mpf-pdp .mpf-buybox { grid-area: buy; }
.mpf-pdp-hero { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; }
.mpf-pdp-img { background: var(--mpf-surface); border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius-lg); height: 260px; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mpf-pdp-img img { max-height: 100%; object-fit: contain; }
.mpf-buybox { position: sticky; top: calc(var(--mpf-topbar) + 16px); }
.mpf-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.mpf-specs div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--mpf-border); font-size: .88rem; }
.mpf-specs div span:first-child { color: var(--mpf-text-muted); }
.mpf-specs div span:last-child { text-align: right; font-weight: 500; }
.mpf-mini-list { display: flex; flex-direction: column; }
.mpf-mini-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--mpf-border); }
.mpf-mini-item:last-child { border-bottom: 0; }
.mpf-mini-item .grow { flex: 1; min-width: 0; }
.mpf-mini-item .title { font-weight: 600; font-size: .9rem; }
.mpf-mini-item .sub { font-size: .78rem; color: var(--mpf-text-muted); }

.mpf-copycost { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mpf-copycost > div { border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius); padding: 10px 12px; }
.mpf-copycost .v { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.mpf-copycost .l { font-size: .75rem; color: var(--mpf-text-muted); }

/* Contatto commerciale */
.mpf-contact { display: flex; flex-direction: column; gap: 8px; }
.mpf-contact .mpf-btn { justify-content: flex-start; }

/* Dashboard */
.mpf-hero { background: var(--mpf-ink); color: #E7EAF0; border-radius: var(--mpf-radius-lg); padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.mpf-hero h1 { color: #fff; }
.mpf-hero p { color: #B9C0CC; margin: 6px 0 0; }
.mpf-news { display: flex; flex-direction: column; }
.mpf-news-item { padding: 14px 0; border-bottom: 1px solid var(--mpf-border); }
.mpf-news-item:last-child { border-bottom: 0; }
.mpf-news-item .date { font-size: .76rem; color: var(--mpf-text-muted); }
.mpf-news-item h3 { margin: 2px 0 4px; }
.mpf-news-body { font-size: .9rem; color: var(--mpf-text); overflow-wrap: anywhere; }
.mpf-news-body p { margin: 0 0 6px; }
.mpf-news-body ul { margin: 4px 0; padding-left: 20px; }
.mpf-news-body img { max-width: 100%; height: auto; }
.mpf-news-body.clamp { max-height: 4.6em; overflow: hidden; position: relative; }
.mpf-news-body.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2em; background: linear-gradient(transparent, var(--mpf-surface)); }
.mpf-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.mpf-tile { border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius); overflow: hidden; text-decoration: none; color: inherit; background: var(--mpf-surface); display: flex; flex-direction: column; }
.mpf-tile img { width: 100%; height: 110px; object-fit: cover; background: var(--mpf-surface-2); }
.mpf-tile div { padding: 10px 12px; font-weight: 600; font-size: .88rem; }
.mpf-tile:hover { border-color: var(--mpf-primary); }

/* Comparatore */
.mpf-compare { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mpf-solution { background: var(--mpf-surface); border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mpf-solution.best { border-color: var(--mpf-success); box-shadow: inset 0 0 0 1px var(--mpf-success); }
.mpf-solution .rank { font-size: .76rem; font-weight: 700; color: var(--mpf-text-muted); }
.mpf-solution-img { height: 140px; display: flex; align-items: center; justify-content: center; }
.mpf-solution-img img { max-height: 100%; object-fit: contain; }
.mpf-solution dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: .84rem; }
.mpf-solution dt { color: var(--mpf-text-muted); }
.mpf-solution dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
@media (max-width: 1279px) { .mpf-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .mpf-compare { grid-template-columns: minmax(0, 1fr); } }

/* PrintNow */
.mpf-pn-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.mpf-pn-card { background: var(--mpf-surface); border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius-lg); padding: 16px; display: flex; gap: 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.mpf-pn-card:hover { border-color: var(--mpf-primary); }
.mpf-pn-card.on { border-color: var(--mpf-primary); box-shadow: inset 0 0 0 1px var(--mpf-primary); }
.mpf-pn-card img { width: 84px; height: 84px; object-fit: contain; flex: 0 0 auto; }
.mpf-pn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "result params"; gap: 16px; align-items: start; }
.mpf-pn-layout .pn-params { grid-area: params; }
.mpf-pn-layout .pn-result { grid-area: result; margin-top: 0; }
@media (max-width: 1023px) { .mpf-pn-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "params" "result"; } }
.mpf-kpi .value.mpf-profit { color: var(--mpf-success); }
.mpf-result-big { font-family: var(--mpf-font-serif); font-size: 2rem; font-weight: 600; color: var(--mpf-success); font-variant-numeric: tabular-nums; }
.mpf-range { width: 100%; accent-color: var(--mpf-primary); height: 32px; }

/* Carrello */
.mpf-cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--mpf-border); }
.mpf-cart-line img { width: 72px; height: 60px; object-fit: contain; }
.mpf-cart-line .ph { width: 72px; height: 60px; display: flex; align-items: center; justify-content: center; background: var(--mpf-surface-2); border-radius: 8px; color: var(--mpf-text-soft); }
@media (max-width: 767px) {
    .mpf-cart-line { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "img info del" "img qty tot"; row-gap: 8px; }
    .mpf-cart-line img, .mpf-cart-line .ph { grid-area: img; width: 56px; height: 52px; }
    .mpf-cart-line .info { grid-area: info; }
    .mpf-cart-line .mpf-qty { grid-area: qty; justify-self: start; }
    .mpf-cart-line .tot { grid-area: tot; }
    .mpf-cart-line .del { grid-area: del; }
}

@media (max-width: 1023px) {
    .mpf-catalog { grid-template-columns: minmax(0, 1fr); }
    .mpf-filters { display: none; position: fixed; inset: 0 0 0 auto; width: min(340px, 92vw); max-height: none; border-radius: 0; z-index: 85; top: 0; box-shadow: var(--mpf-shadow-lg); }
    .mpf-filters.open { display: block; }
    .mpf-filters-toggle { display: inline-flex; }
    .mpf-pdp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "buy" "tabs"; }
    .mpf-buybox { position: static; }
    .mpf-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    .mpf-pdp-hero { grid-template-columns: minmax(0, 1fr); }
    .mpf-pdp-img { height: 210px; }
    .mpf-specs { grid-template-columns: minmax(0, 1fr); }
    .mpf-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .mpf-product-img { height: 120px; }
    .mpf-product-body { padding: 10px; }
    .mpf-product-specs { display: none; }
}
@media (max-width: 359px) { .mpf-products { grid-template-columns: minmax(0, 1fr); } }


/* Ricerca rapida, menu utente, login */
.mpf-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--mpf-surface); border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius); box-shadow: var(--mpf-shadow-lg); z-index: 50; overflow: hidden; }
.mpf-suggest button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--mpf-border); background: none; cursor: pointer; text-align: left; color: var(--mpf-text); min-height: 44px; }
.mpf-suggest button:hover { background: var(--mpf-primary-ultra); }
.mpf-suggest button.all { color: var(--mpf-primary); font-weight: 600; border-bottom: 0; }
.mpf-usermenu { position: relative; }
.mpf-dropdown { position: absolute; right: 0; top: calc(100% + 6px); width: 260px; background: var(--mpf-surface); border: 1px solid var(--mpf-border); border-radius: var(--mpf-radius); box-shadow: var(--mpf-shadow-lg); z-index: 50; padding: 6px; }
.mpf-dropdown-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--mpf-border); margin-bottom: 4px; overflow-wrap: anywhere; }
.mpf-dropdown a, .mpf-dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; background: none; border-radius: var(--mpf-radius-sm); color: var(--mpf-text); text-decoration: none; cursor: pointer; font-size: .9rem; min-height: 44px; text-align: left; }
.mpf-dropdown a:hover, .mpf-dropdown button:hover { background: var(--mpf-primary-ultra); }
.mpf-mobile-only { display: none; }
.mpf-mockbar .short { display: none; }
@media (max-width: 767px) { .mpf-mockbar .long { display: none; } .mpf-mockbar .short { display: inline; } }
@media (max-width: 767px) { .mpf-mobile-only { display: inline-flex; } }
.mpf-agent-compact { display: flex; flex-direction: column; gap: 4px; }
.mpf-agent-compact.dark { color: #C9CED8; }
.mpf-agent-compact.dark .mpf-strong { color: #fff; }
.mpf-agent-compact.dark .mpf-btn { background: var(--mpf-ink-2); color: #fff; border-color: var(--mpf-ink-3); margin-top: 6px; }
.mpf-toast-close { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; display: flex; opacity: .8; }
.mpf-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--mpf-ink); }
.mpf-login-card { background: var(--mpf-surface); border-radius: var(--mpf-radius-lg); padding: 28px; width: min(560px, 100%); box-shadow: var(--mpf-shadow-lg); }
.mpf-login-logo { height: 54px; width: auto; margin-bottom: 12px; }
.mpf-login-card h1 { margin-bottom: 4px; }
.mpf-login-card > p { margin-bottom: 16px; }
.mpf-login-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 1px solid var(--mpf-border-strong); border-radius: var(--mpf-radius); background: var(--mpf-surface); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.mpf-login-option:hover { border-color: var(--mpf-primary); background: var(--mpf-primary-ultra); }
.mpf-seg.invalid { border-color: var(--mpf-danger); }
details summary { min-height: 32px; }

#blazor-error-ui { background: var(--mpf-warning-soft); color: #5E3A00; bottom: 0; box-shadow: var(--mpf-shadow); display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* PRINT ------------------------------------------------------------- */
@media print {
    .mpf-sidebar, .mpf-topbar, .mpf-bottomnav, .mpf-mockbar, .mpf-page-actions, .mpf-no-print, .mpf-toasts { display: none !important; }
    .mpf-main { margin: 0; }
    .mpf-content { padding: 0; }
    .mpf-card { border: 1px solid #999; break-inside: avoid; }
    @page { size: A4; margin: 1.2cm; }
}
.mpf-print-only { display: none; }
@media print { .mpf-print-only { display: block; } }

/* Riduzione movimento: sempre ultimo blocco */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
