/* GestPro — estensioni del design system FatturePRO. */

:root {
  --gp-radius: 12px;
}

.gp-logo-mark,
.gp-auth-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}

.gp-logo-mark i,
.gp-auth-logo i { font-size: 18px; }
.gp-nav-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.18); }
.gp-environment-badge { display: flex; align-items: center; gap: 7px; color: var(--fp-sidebar-dim); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.gp-icon-button { border: 0; padding: 0; background: transparent; }
.gp-flashes { position: relative; z-index: 3; }
.gp-auth-flashes { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 20; width: min(560px, calc(100% - 32px)); }

.fp-topbar-actions { display: flex; align-items: center; gap: 8px; }
.fp-scheme-open-btn { width: 100%; }

/* Auth */
.gp-auth-card-row { min-height: 520px; }
.gp-auth-intro { border-right: 1px solid #f1f5f9; background: linear-gradient(145deg, #fff 0%, #f7faff 100%); }
.gp-auth-logo { color: #2563eb; background: #eff6ff; border-color: #dbeafe; }
.gp-auth-brand { font-size: 22px; font-weight: 800; color: #0f172a; letter-spacing: -.5px; }
.gp-auth-brand-sub { font-size: 9px; color: #94a3b8; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.gp-auth-heading { font-size: clamp(29px, 4vw, 42px); line-height: 1.08; letter-spacing: -1.4px; font-weight: 800; color: #0f172a; margin-bottom: 15px; }
.gp-auth-copy { font-size: 14px; line-height: 1.65; color: #64748b; max-width: 510px; margin-bottom: 28px; }
.auth-feature-card { min-height: 112px; display: flex; flex-direction: column; }
.auth-feature-card > i { font-size: 19px; margin-bottom: 10px; }
.auth-feature-card strong { color: #0f172a; font-size: 13px; }
.auth-feature-card span { color: #94a3b8; font-size: 11.5px; margin-top: 2px; }
.gp-feature-blue { color: #2563eb; }
.gp-feature-green { color: #16a34a; }
.gp-feature-purple { color: #7c3aed; }
.gp-feature-amber { color: #d97706; }
.gp-powered-dark { color: #94a3b8; }
.gp-form-eyebrow, .gp-label { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
.gp-form-eyebrow { color: #2563eb; margin-bottom: 7px; }
.gp-label { display: block; margin-bottom: 6px; }
.gp-auth-form-title { font-size: 26px; font-weight: 800; color: #0f172a; letter-spacing: -.5px; margin: 0 0 6px; }
.gp-auth-form-copy { font-size: 13px; color: #94a3b8; margin-bottom: 26px; }
.gp-password-toggle { position: absolute; border: 0; background: transparent; color: #94a3b8; right: 11px; top: 50%; transform: translateY(-50%); }
.gp-setup-card { max-width: 880px; }
.gp-setup-side { color: #fff; background: linear-gradient(155deg, #1d4ed8 0%, #2563eb 65%, #3b82f6 100%); }
.gp-setup-side .gp-auth-logo { color: #fff; background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.2); }
.gp-setup-copy { margin: 15px 0 30px; color: rgba(255,255,255,.76); font-size: 13px; line-height: 1.6; }
.gp-setup-step { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.12); }
.gp-setup-step > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.15); font-size: 11px; font-weight: 800; }
.gp-setup-step div { display: flex; flex-direction: column; }
.gp-setup-step strong { font-size: 13px; }
.gp-setup-step small { font-size: 11px; color: rgba(255,255,255,.65); }

/* Shared */
.gp-form-layout { display: grid; gap: 14px; max-width: 980px; margin: 0 auto; }
.gp-document-list-tabs { display: flex; gap: 2px; margin-bottom: 13px; overflow-x: auto; border-bottom: 1px solid var(--fp-border); }
.gp-document-list-tabs a { padding: 9px 13px; color: var(--fp-sub); border-bottom: 2px solid transparent; text-decoration: none; font-size: 11px; font-weight: 750; white-space: nowrap; }
.gp-document-list-tabs a:hover { color: var(--fp-text); }
.gp-document-list-tabs a.active { color: var(--fp-blue); border-bottom-color: var(--fp-blue); }
.gp-doc-series-code { display: inline-flex; padding: 5px 9px; border-radius: 7px; color: var(--fp-blue); background: var(--fp-blue-bg); font: 800 12px ui-monospace, monospace; }
.gp-series-types { display: grid; gap: 5px; }
.gp-form-narrow { max-width: 800px; }
.gp-form-main { width: 100%; }
.gp-required-note { color: var(--fp-sub); font-size: 10px; font-weight: 500; }
.gp-sticky-actions { position: sticky; bottom: 14px; z-index: 10; display: flex; justify-content: flex-end; gap: 8px; padding: 11px; background: color-mix(in srgb, var(--fp-bgc) 92%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--fp-border); border-radius: 12px; box-shadow: 0 10px 35px rgba(15,23,42,.12); }
.gp-page-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gp-search { display: flex; align-items: center; gap: 8px; min-width: min(420px, 100%); padding: 4px 5px 4px 11px; border: 1px solid var(--fp-border); background: var(--fp-bgc); border-radius: 9px; }
.gp-search > i { color: var(--fp-dim); }
.gp-search input { flex: 1; min-width: 80px; border: 0; background: transparent; outline: 0; color: var(--fp-text); font-size: 13px; }
.gp-contact-search-wrap { position: relative; }
.gp-contact-search-box { position: relative; display: flex; align-items: center; }
.gp-contact-search-box > i { position: absolute; left: 12px; z-index: 2; color: var(--fp-dim); }
.gp-contact-search-box .form-control { padding-left: 36px; padding-right: 38px; }
.gp-contact-search-box .spinner-border { position: absolute; right: 13px; color: var(--fp-blue); }
.gp-contact-results { position: absolute; z-index: 1060; top: calc(100% + 5px); left: 0; right: 0; max-height: 240px; overflow-y: auto; padding: 5px; border: 1px solid var(--fp-border); border-radius: 9px; background: var(--fp-bgc); box-shadow: 0 14px 35px rgba(15,23,42,.16); }
.gp-contact-result { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; color: var(--fp-text); border: 0; border-radius: 7px; background: transparent; text-align: left; }
.gp-contact-result:hover, .gp-contact-result:focus { background: var(--fp-blue-bg); outline: 0; }
.gp-contact-result strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gp-contact-result small { flex-shrink: 0; color: var(--fp-sub); font-size: 10px; text-transform: capitalize; }
.gp-contact-empty { padding: 13px 10px; color: var(--fp-sub); font-size: 11px; text-align: center; }
.gp-contact-selected { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.gp-contact-chip { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; padding: 6px 7px 6px 10px; border: 1px solid var(--fp-blue-br); border-radius: 9px; color: var(--fp-text); background: var(--fp-blue-bg); }
.gp-contact-chip > span { display: flex; min-width: 0; flex-direction: column; }
.gp-contact-chip strong { overflow: hidden; max-width: 260px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.gp-contact-chip small { color: var(--fp-sub); font-size: 9px; }
.gp-contact-chip button { width: 25px; height: 25px; display: grid; place-items: center; flex-shrink: 0; padding: 0; color: var(--fp-sub); border: 0; border-radius: 6px; background: transparent; font-size: 10px; }
.gp-contact-chip button:hover { color: var(--fp-red); background: rgba(220,38,38,.08); }
.gp-supplier-chip { flex-wrap: wrap; }
.gp-primary-choice { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; color: var(--fp-sub); font-size: 9px; font-weight: 700; cursor: pointer; }
.gp-primary-choice input { margin: 0; accent-color: var(--fp-blue); }
.gp-setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gp-setting-tile { min-height: 92px; padding: 13px; border: 1px solid var(--fp-border); border-radius: 10px; background: var(--fp-bgi); }
.gp-setting-tile .form-check-label { display: flex; flex-direction: column; gap: 2px; }
.gp-setting-tile .form-check-label strong { color: var(--fp-text); font-size: 12px; }
.gp-setting-tile .form-check-label small { color: var(--fp-sub); font-size: 10px; font-weight: 400; }
.gp-setting-detail { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--fp-border); }
.gp-barcode-list { display: grid; gap: 8px; }
.gp-barcode-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 8px; }
.gp-barcode-index { color: var(--fp-sub); font-size: 10px; font-weight: 800; }
@media (max-width: 767px) { .gp-setting-grid { grid-template-columns: 1fr; } }
.gp-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gp-filters .form-select { width: auto; min-width: 160px; }
.gp-count { color: var(--fp-sub); font-size: 12px; white-space: nowrap; }
.gp-table-primary { font-size: 13px; font-weight: 700; color: var(--fp-text); }
.gp-table-secondary { font-size: 11px; color: var(--fp-sub); margin-top: 2px; }
.gp-table-link, .gp-link { color: var(--fp-blue); text-decoration: none; font-weight: 700; }
.gp-link { font-size: 12px; }
.gp-table-link:hover, .gp-link:hover { text-decoration: underline; }
.gp-code { display: inline-block; padding: 3px 7px; border-radius: 6px; background: var(--fp-bgi); border: 1px solid var(--fp-border); color: var(--fp-sub); font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.gp-clickable-row { cursor: pointer; }
.gp-clickable-row:hover .gp-table-primary { color: var(--fp-blue); }

.gp-soft-badge, .gp-status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 9px; font-size: 10px; line-height: 1; font-weight: 800; white-space: nowrap; }
.gp-soft-badge.blue, .gp-status.blue { color: #2563eb; background: rgba(37,99,235,.1); }
.gp-soft-badge.green, .gp-status.green { color: #15803d; background: rgba(22,163,74,.1); }
.gp-soft-badge.amber, .gp-status.amber { color: #b45309; background: rgba(217,119,6,.1); }
.gp-soft-badge.red, .gp-status.red { color: #b91c1c; background: rgba(220,38,38,.1); }
.gp-soft-badge.purple, .gp-status.purple { color: #6d28d9; background: rgba(124,58,237,.1); }
.gp-soft-badge.gray, .gp-status.gray { color: #64748b; background: rgba(100,116,139,.1); }
.gp-status > span { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }

.gp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 330px; padding: 40px; text-align: center; }
.gp-empty-small { min-height: 170px; }
.gp-empty-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: var(--fp-blue); background: var(--fp-blue-bg); font-size: 24px; margin-bottom: 15px; }
.gp-empty-icon.success { color: var(--fp-green); background: var(--fp-green-bg); }
.gp-empty h3 { font-size: 17px; font-weight: 800; margin-bottom: 5px; }
.gp-empty p { max-width: 380px; color: var(--fp-sub); font-size: 13px; margin-bottom: 17px; }
.gp-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gp-card-header > div:first-child { display: flex; flex-direction: column; }
.gp-card-title { color: var(--fp-text); font-size: 13px; font-weight: 800; }
.gp-card-sub { color: var(--fp-sub); font-size: 10.5px; font-weight: 500; margin-top: 2px; }

/* Dashboard */
.gp-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.gp-eyebrow { display: flex; align-items: center; gap: 7px; color: var(--fp-sub); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.gp-eyebrow > span { width: 18px; height: 2px; border-radius: 2px; background: var(--fp-blue); }
.gp-welcome h1 { margin: 5px 0 4px; font-size: 27px; font-weight: 800; letter-spacing: -.8px; }
.gp-welcome p { color: var(--fp-sub); font-size: 13px; margin: 0; }
.gp-year-picker { display: flex; align-items: center; gap: 8px; }
.gp-year-picker label { color: var(--fp-sub); font-size: 11px; font-weight: 700; }
.gp-year-picker .form-select { width: 90px; }
.gp-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gp-kpi-card { position: relative; min-height: 140px; padding: 17px; overflow: hidden; border: 1px solid var(--fp-border); border-radius: 12px; background: var(--fp-bgc); box-shadow: var(--fp-shadow); }
.gp-kpi-icon { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; }
.gp-kpi-icon.blue, .gp-quick-icon.blue { color: #2563eb; background: rgba(37,99,235,.09); }
.gp-kpi-icon.green, .gp-quick-icon.green { color: #16a34a; background: rgba(22,163,74,.09); }
.gp-kpi-icon.amber, .gp-quick-icon.amber { color: #d97706; background: rgba(217,119,6,.09); }
.gp-kpi-icon.red { color: #dc2626; background: rgba(220,38,38,.09); }
.gp-kpi-icon.purple, .gp-quick-icon.purple { color: #7c3aed; background: rgba(124,58,237,.09); }
.gp-kpi-label { color: var(--fp-sub); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin: 3px 42px 14px 0; }
.gp-kpi-value { color: var(--fp-text); font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; letter-spacing: -.8px; }
.gp-kpi-meta { color: var(--fp-sub); font-size: 10.5px; margin-top: 8px; }
.gp-kpi-meta.positive { color: var(--fp-green); }
.gp-kpi-meta.negative { color: var(--fp-red); }
.gp-chart-wrap { position: relative; height: 260px; }
.gp-quick-list { padding-top: 8px; padding-bottom: 8px; }
.gp-quick-action { display: grid; grid-template-columns: 37px 1fr 14px; gap: 10px; align-items: center; padding: 10px 4px; color: var(--fp-text); text-decoration: none; border-bottom: 1px solid var(--fp-border); }
.gp-quick-action:last-child { border-bottom: 0; }
.gp-quick-action:hover strong { color: var(--fp-blue); }
.gp-quick-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; }
.gp-quick-action div { display: flex; min-width: 0; flex-direction: column; }
.gp-quick-action strong { font-size: 12px; }
.gp-quick-action small { color: var(--fp-sub); font-size: 10px; }
.gp-quick-action > i { color: var(--fp-dim); font-size: 10px; }
.gp-due-list { padding-top: 8px; padding-bottom: 8px; }
.gp-due-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 10px 2px; color: var(--fp-text); text-decoration: none; border-bottom: 1px solid var(--fp-border); }
.gp-due-item:last-child { border-bottom: 0; }
.gp-due-date { width: 38px; height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--fp-amber); background: var(--fp-amber-bg); border-radius: 8px; font-size: 14px; font-weight: 800; }
.gp-due-date small { font-size: 8px; text-transform: uppercase; }
.gp-due-date.overdue { color: var(--fp-red); background: var(--fp-red-bg); }
.gp-due-item div { min-width: 0; display: flex; flex-direction: column; }
.gp-due-item div strong { overflow: hidden; color: var(--fp-text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.gp-due-item div small { color: var(--fp-sub); font-size: 10px; }
.gp-due-item > b { font-size: 11px; }
.gp-empty-inline { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--fp-green); }
.gp-empty-inline i { font-size: 29px; }
.gp-empty-inline span { color: var(--fp-sub); font-size: 12px; }

/* Invoice editor and detail */
.gp-invoice-lines th { white-space: nowrap; }
.gp-invoice-lines td { min-width: 88px; padding: 9px 5px; }
.gp-invoice-lines .gp-line-description { min-width: 310px; }
.gp-invoice-lines .line-total { min-width: 105px; white-space: nowrap; }
.gp-summary-sticky { position: sticky; top: 78px; }
.gp-total-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--fp-sub); font-size: 12px; border-bottom: 1px solid var(--fp-border); }
.gp-total-row strong { color: var(--fp-text); }
.gp-total-row.grand { align-items: flex-end; padding: 15px 0; border-bottom: 0; font-weight: 800; }
.gp-total-row.grand span { color: var(--fp-text); font-size: 14px; }
.gp-total-row.grand strong { color: var(--fp-blue); font-size: 24px; letter-spacing: -.6px; }
.gp-summary-note, .gp-boundary-note { display: flex; gap: 9px; padding: 11px; color: var(--fp-sub); background: var(--fp-bgi); border: 1px solid var(--fp-border); border-radius: 9px; font-size: 10.5px; line-height: 1.5; }
.gp-summary-note i, .gp-boundary-note i { flex-shrink: 0; color: var(--fp-blue); }
.gp-document-hero { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 14px; border: 1px solid var(--fp-border); border-radius: 12px; background: var(--fp-bgc); box-shadow: var(--fp-shadow); }
.gp-doc-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: var(--fp-blue); background: var(--fp-blue-bg); font-size: 21px; }
.gp-document-hero h1 { margin: 0; font-size: 19px; font-weight: 800; }
.gp-document-hero p { color: var(--fp-sub); font-size: 11px; margin: 0; }
.gp-doc-total { margin-left: auto; display: flex; flex-direction: column; text-align: right; }
.gp-doc-total span { color: var(--fp-sub); font-size: 10px; }
.gp-doc-total strong { color: var(--fp-text); font-size: 22px; letter-spacing: -.5px; }
.gp-recipient { display: flex; align-items: center; gap: 12px; }
.gp-recipient-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0; color: var(--fp-blue); background: var(--fp-blue-bg); border-radius: 11px; font-size: 12px; font-weight: 800; }
.gp-recipient > div:last-child { display: flex; flex-direction: column; }
.gp-recipient strong { font-size: 13px; }
.gp-recipient span, .gp-recipient small { color: var(--fp-sub); font-size: 10.5px; }
.gp-action-stack { display: grid; gap: 8px; }
.gp-action-stack form { width: 100%; }
.gp-action-stack p { color: var(--fp-sub); font-size: 10px; line-height: 1.45; margin: -2px 2px 3px; }
.gp-success-box { display: flex; gap: 9px; align-items: center; padding: 10px; color: var(--fp-green); background: var(--fp-green-bg); border-radius: 9px; }
.gp-success-box > i { font-size: 20px; }
.gp-success-box div { display: flex; flex-direction: column; }
.gp-success-box strong { font-size: 11px; }
.gp-success-box small { font-size: 9px; overflow-wrap: anywhere; }
.gp-detail-row { display: flex; justify-content: space-between; padding: 7px 0; color: var(--fp-sub); font-size: 11px; border-bottom: 1px solid var(--fp-border); }
.gp-detail-row:last-child { border-bottom: 0; }
.gp-detail-row strong { color: var(--fp-text); }
.gp-timeline { display: grid; gap: 4px; }
.gp-timeline-item { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 8px; min-height: 62px; }
.gp-timeline-item::before { content: ''; position: absolute; top: 14px; bottom: -4px; left: 4px; width: 1px; background: var(--fp-border); }
.gp-timeline-item:last-child::before { display: none; }
.gp-timeline-item > span { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 3px; border: 2px solid var(--fp-bgc); border-radius: 50%; background: var(--fp-blue); box-shadow: 0 0 0 2px var(--fp-blue-bg); }
.gp-timeline-item div { display: flex; flex-direction: column; }
.gp-timeline-item strong { font-size: 10.5px; }
.gp-timeline-item small { color: var(--fp-sub); font-size: 9px; }
.gp-timeline-item p { color: var(--fp-sub); font-size: 9.5px; line-height: 1.4; margin: 2px 0 0; }
.gp-date-badge { display: inline-flex; width: 50px; flex-direction: column; align-items: center; padding: 5px 7px; color: var(--fp-amber); background: var(--fp-amber-bg); border-radius: 8px; }
.gp-date-badge.overdue { color: var(--fp-red); background: var(--fp-red-bg); }
.gp-date-badge strong { font-size: 16px; line-height: 1; }
.gp-date-badge small { margin-top: 3px; font-size: 8px; text-transform: uppercase; }

/* FatturaPA */
.gp-sdi-hero { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 13px; color: #fff; background: linear-gradient(120deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%); border-radius: 14px; box-shadow: 0 12px 28px rgba(29,78,216,.18); }
.gp-sdi-hero-icon { width: 56px; height: 56px; display: grid; place-items: center; flex-shrink: 0; border-radius: 14px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.15); font-size: 25px; }
.gp-sdi-hero .gp-eyebrow { color: rgba(255,255,255,.68); }
.gp-sdi-hero .gp-eyebrow span { background: #93c5fd; }
.gp-sdi-hero h1 { margin: 4px 0 2px; font-size: 23px; font-weight: 800; letter-spacing: -.5px; }
.gp-sdi-hero p { margin: 0; color: rgba(255,255,255,.72); font-size: 11px; }
.gp-channel-state { margin-left: auto; min-width: 180px; display: flex; flex-direction: column; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.gp-channel-state span { color: rgba(255,255,255,.65); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.gp-channel-state strong { font-size: 15px; margin: 2px 0; }
.gp-channel-state small { color: rgba(255,255,255,.67); font-size: 9.5px; }
.gp-notice { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; margin-bottom: 13px; border: 1px solid; border-radius: 10px; }
.gp-notice > i { margin-top: 2px; font-size: 17px; }
.gp-notice > div { display: flex; flex-direction: column; }
.gp-notice strong { font-size: 11px; }
.gp-notice span { font-size: 10px; line-height: 1.45; }
.gp-notice.amber { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.gp-notice.blue { color: #1e40af; background: #eff6ff; border-color: #bfdbfe; }
.gp-progress-ring { --progress: 0; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--fp-blue) calc(var(--progress) * 1%), var(--fp-border) 0); }
.gp-progress-ring::before { content: ''; grid-area: 1/1; width: 33px; height: 33px; border-radius: 50%; background: var(--fp-bgc); }
.gp-progress-ring span { grid-area: 1/1; z-index: 1; color: var(--fp-text); font-size: 8px; font-weight: 800; }
.gp-checklist { display: grid; gap: 3px; }
.gp-check-item { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; padding: 7px 0; }
.gp-check-item > i { color: var(--fp-dim); font-size: 14px; }
.gp-check-item.done > i { color: var(--fp-green); }
.gp-check-item div { display: flex; flex-direction: column; }
.gp-check-item strong { font-size: 11px; }
.gp-check-item small { color: var(--fp-sub); font-size: 9.5px; }
.gp-flow { display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr; gap: 5px; align-items: center; margin: 10px 0 21px; }
.gp-flow-node { min-height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px; border: 1px solid var(--fp-border); border-radius: 11px; background: var(--fp-bgi); }
.gp-flow-node i { color: var(--fp-sub); font-size: 22px; margin-bottom: 7px; }
.gp-flow-node strong { font-size: 11px; }
.gp-flow-node small { color: var(--fp-sub); font-size: 9px; }
.gp-flow-node.active { border-color: var(--fp-blue-br); background: var(--fp-blue-bg); }
.gp-flow-node.active i { color: var(--fp-blue); }
.gp-flow-node.sdi { color: #fff; border-color: #1d4ed8; background: #1d4ed8; }
.gp-flow-node.sdi i, .gp-flow-node.sdi small { color: rgba(255,255,255,.75); }
.gp-flow-arrow { color: var(--fp-dim); text-align: center; }
.gp-flow-return { display: flex; align-items: center; gap: 10px; margin: 0 12px 15px; color: var(--fp-blue); }
.gp-flow-return > span { flex: 1; height: 1px; background: var(--fp-blue-br); }
.gp-flow-return > div { display: flex; flex: 2; flex-direction: column; }
.gp-flow-return strong { color: var(--fp-text); font-size: 10.5px; }
.gp-flow-return small { color: var(--fp-sub); font-size: 9px; }
.gp-event-log { display: grid; padding-top: 6px; padding-bottom: 6px; }
.gp-event { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--fp-border); }
.gp-event:last-child { border-bottom: 0; }
.gp-event-direction { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; }
.gp-event-direction.in { color: var(--fp-green); background: var(--fp-green-bg); }
.gp-event-direction.out { color: var(--fp-blue); background: var(--fp-blue-bg); }
.gp-event > div { display: flex; flex-direction: column; }
.gp-event strong { font-size: 10.5px; }
.gp-event small { color: var(--fp-sub); font-size: 9.5px; }
.gp-event time { color: var(--fp-sub); font-size: 9px; }

@media (max-width: 1100px) {
  .gp-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .gp-auth-intro { display: none; }
  .gp-page-actions, .gp-welcome { align-items: stretch; flex-direction: column; }
  .gp-page-actions .gp-search, .gp-filters, .gp-filters .gp-search { width: 100%; min-width: 0; }
  .gp-filters .form-select { flex: 1; width: auto; }
  .gp-kpi-grid { grid-template-columns: 1fr; }
  .gp-kpi-card { min-height: 125px; }
  .gp-document-hero { align-items: flex-start; flex-wrap: wrap; }
  .gp-doc-total { width: 100%; margin-left: 60px; text-align: left; }
  .gp-sdi-hero { align-items: flex-start; flex-wrap: wrap; }
  .gp-channel-state { width: 100%; margin-left: 0; }
  .gp-flow { grid-template-columns: 1fr; }
  .gp-flow-arrow { transform: rotate(90deg); }
  .gp-event { grid-template-columns: 28px 1fr; }
  .gp-event time { grid-column: 2; }
  .gp-sticky-actions { bottom: 72px; }
}

/* ── Documento stampabile (dettaglio fattura/preventivo/ordine/DDT) ──────── */
.gp-doc-print { background: var(--fp-bgc); border: 1px solid var(--fp-border); border-radius: 12px; box-shadow: var(--fp-shadow); padding: 28px 32px; }
.gp-doc-print-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 2px solid var(--fp-blue); }
.gp-doc-print-company { font-size: 18px; font-weight: 800; color: var(--fp-text); }
.gp-doc-print-meta { font-size: 11.5px; color: var(--fp-sub); line-height: 1.5; margin-top: 4px; }
.gp-doc-print-type { text-align: right; flex-shrink: 0; }
.gp-doc-print-type-label { font-size: 15px; font-weight: 800; color: var(--fp-blue); letter-spacing: .04em; }
.gp-doc-print-type-num, .gp-doc-print-type-date { font-size: 11.5px; color: var(--fp-sub); margin-top: 2px; }
.gp-doc-print-recipient { margin-bottom: 18px; }
.gp-doc-print-recipient-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--fp-dim); }
.gp-doc-print-recipient-name { font-size: 14px; font-weight: 700; color: var(--fp-text); margin-top: 2px; }
.gp-doc-print-recipient-meta { font-size: 11.5px; color: var(--fp-sub); line-height: 1.5; margin-top: 2px; }
.gp-doc-print-extra { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11.5px; color: var(--fp-sub); margin-bottom: 14px; }
.gp-doc-print-table { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
.gp-doc-print-table thead th { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--fp-dim); text-align: left; padding: 7px 8px; border-bottom: 1.5px solid var(--fp-border); white-space: nowrap; }
.gp-doc-print-table th.r, .gp-doc-print-table td.r { text-align: right; }
.gp-doc-print-table td { padding: 7px 8px; font-size: 12.5px; color: var(--fp-text); border-bottom: 1px solid var(--fp-bgi); vertical-align: top; }
.gp-doc-print-table td.fw { font-weight: 700; }
.gp-doc-print-code { font-size: 10.5px; color: var(--fp-sub); margin-top: 1px; }
.gp-doc-print-totals { display: flex; justify-content: flex-end; margin-top: 12px; }
.gp-doc-print-totals table { width: 320px; border-collapse: collapse; }
.gp-doc-print-totals th { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--fp-dim); text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--fp-border); }
.gp-doc-print-totals th.r, .gp-doc-print-totals td.r { text-align: right; }
.gp-doc-print-totals td { padding: 5px 8px; font-size: 12px; color: var(--fp-sub); }
.gp-doc-print-totals tr.fw td { font-weight: 700; color: var(--fp-text); border-top: 1px solid var(--fp-border); }
.gp-doc-print-totals tr.grand td { font-size: 14px; font-weight: 800; color: #fff; background: var(--fp-blue); padding: 9px 8px; }
.gp-doc-print-totals tr.grand td:first-child { border-radius: 8px 0 0 8px; }
.gp-doc-print-totals tr.grand td:last-child { border-radius: 0 8px 8px 0; }
.gp-doc-print-notes { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--fp-border); font-size: 11.5px; color: var(--fp-sub); white-space: pre-line; }

@media print {
  .no-print, #fp-sidebar, #fp-topbar, #fp-bottom-nav, #fp-overlay { display: none !important; }
  #fp-main, #fp-content { margin: 0 !important; padding: 0 !important; }
  .gp-doc-print { box-shadow: none !important; border: none !important; padding: 0 !important; }
}

/* Editor condiviso delle righe documento */
.gp-line-table-wrap { width: 100%; overflow-x: auto; overflow-y: visible; }
.gp-document-lines { min-width: 1120px; }
.gp-document-lines th { white-space: nowrap; }
.gp-document-lines td { position: relative; vertical-align: middle; }
.gp-document-lines .gp-line-order { width: 42px; min-width: 42px; padding-left: 5px; padding-right: 5px; }
.gp-document-lines .gp-line-code { min-width: 155px; }
.gp-document-lines .gp-line-description-col { min-width: 240px; }
.gp-document-lines .line-unit { min-width: 54px; }
.gp-document-lines .line-quantity,
.gp-document-lines .line-price,
.gp-document-lines .line-discount,
.gp-document-lines .line-vat { min-width: 62px; }
.gp-line-move { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.gp-line-move button { width: 18px; height: 24px; display: grid; place-items: center; padding: 0; color: var(--fp-sub); border: 1px solid var(--fp-border); border-radius: 5px; background: var(--fp-bgc); }
.gp-line-move button:hover:not(:disabled) { color: var(--fp-blue); border-color: var(--fp-blue-br); background: var(--fp-blue-bg); }
.gp-line-move button:disabled { opacity: .3; cursor: default; }
.gp-product-search { position: relative; min-width: 145px; }
.gp-product-results { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: min(430px, 80vw); max-height: 280px; overflow-y: auto; padding: 5px; border: 1px solid var(--fp-border); border-radius: 9px; background: var(--fp-bgc); box-shadow: 0 14px 35px rgba(15,23,42,.16); }
.gp-product-result { width: 100%; display: grid; grid-template-columns: 105px 1fr; gap: 3px 10px; padding: 8px 9px; text-align: left; color: var(--fp-text); border: 0; border-radius: 7px; background: transparent; }
.gp-product-result:hover,
.gp-product-result:focus { background: var(--fp-blue-bg); outline: none; }
.gp-product-result strong { color: var(--fp-blue); font-size: 10.5px; }
.gp-product-result span { font-size: 10.5px; }
.gp-product-result small { grid-column: 2; color: var(--fp-sub); font-size: 9px; }
.gp-product-result-empty { display: block; padding: 10px; color: var(--fp-sub); font-size: 10px; }
.gp-line-availability { min-width: 68px; font-variant-numeric: tabular-nums; }
