/* ═══════════════════════════════════════════════════════════
   SERIGEST FILE GRAFICI — Customer My Account
   Design: minimal, modern, clean
   ═══════════════════════════════════════════════════════════ */

/* ── Reset helpers ─────────────────────────────────────── */
.sfg-account *,
.sfg-dashboard-widget *,
.sfg-modal *,
.sfg-thankyou * {
    box-sizing: border-box;
}

/* ══ THANK-YOU PAGE NOTICE ══════════════════════════════════ */
.sfg-thankyou {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    margin: 28px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.sfg-thankyou__inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    flex-wrap: wrap;
}

.sfg-thankyou--upload {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
}
.sfg-thankyou--upload .sfg-thankyou__inner {
    border-bottom: 1px solid rgba(251, 191, 36, 0.35);
}

.sfg-thankyou--review {
    background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: #bbf7d0;
}
.sfg-thankyou--review .sfg-thankyou__inner {
    border-bottom: 1px solid rgba(74, 222, 128, 0.35);
}

.sfg-thankyou__icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    color: #0f172a;
}
.sfg-thankyou__icon .sfg-ico {
    width: 26px;
    height: 26px;
}

.sfg-thankyou__body {
    flex: 1;
    min-width: 200px;
}

.sfg-thankyou__heading {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.sfg-thankyou__text {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.6;
}

.sfg-thankyou__list {
    margin: 12px 0 0;
    padding: 0 0 0 1.15em;
    font-size: 13px;
    color: #92400e;
    line-height: 1.55;
}

.sfg-thankyou--review .sfg-thankyou__list {
    color: #166534;
}

.sfg-thankyou__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 22px;
    margin: 0 24px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.sfg-thankyou--upload .sfg-thankyou__btn {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
}
.sfg-thankyou--review .sfg-thankyou__btn {
    background: linear-gradient(145deg, #0f172a 0%, #15803d 100%);
    color: #fff;
}
.sfg-thankyou__btn:hover {
    opacity: 0.95;
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .sfg-thankyou__inner {
        padding: 18px;
    }
    .sfg-thankyou__btn {
        width: calc(100% - 48px);
        margin-left: 24px;
        margin-right: 24px;
    }
}

/* ══ Icons (inline SVG) ═════════════════════════════════════ */
.sfg-ico {
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
    color: currentColor;
}
.sfg-ico--sm { width: 16px; height: 16px; }
.sfg-ico--xs { width: 14px; height: 14px; vertical-align: -0.12em; }
.sfg-ico--steps { width: 14px; height: 14px; opacity: 0.35; }

.sfg-badge .sfg-ico,
.sfg-osum .sfg-ico,
.sfg-detail-summary__chip .sfg-ico {
    margin-right: 4px;
}

.sfg-btn .sfg-ico {
    margin-right: 6px;
}

.sfg-account {
    --sfg-ink: #0f172a;
    --sfg-muted: #64748b;
    --sfg-line: #e2e8f0;
    --sfg-surface: #ffffff;
    --sfg-surface-2: #f8fafc;
    --sfg-accent: #0f172a;
    --sfg-warn: #b45309;
    --sfg-danger: #dc2626;
    --sfg-ok: #15803d;
    --sfg-radius: 16px;
    --sfg-radius-sm: 12px;
    --sfg-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 20px rgba(15, 23, 42, 0.06);

    max-width: 800px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--sfg-ink);
}

/* ══ Page intro (lista) ═══════════════════════════════════ */
.sfg-page-hero {
    margin-bottom: 28px;
    padding: 24px 24px 22px;
    background: linear-gradient(145deg, #f8fafc 0%, #fff 55%);
    border: 1px solid var(--sfg-line);
    border-radius: var(--sfg-radius);
    box-shadow: var(--sfg-shadow);
}

.sfg-page-hero__title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--sfg-ink);
}

.sfg-page-hero__lead {
    margin: 0 0 20px;
    font-size: 0.95rem;
    color: var(--sfg-muted);
    max-width: 52ch;
}

.sfg-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sfg-steps__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

.sfg-steps__item--arrow {
    padding: 0 2px;
}

.sfg-steps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sfg-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.sfg-steps__label {
    white-space: nowrap;
}

@media (max-width: 520px) {
    .sfg-page-hero {
        padding: 18px 18px 16px;
    }
    .sfg-steps__item--arrow {
        display: none;
    }
    .sfg-steps {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ══ Empty state ════════════════════════════════════════════ */
.sfg-empty-state {
    text-align: center;
    padding: 48px 28px;
    background: var(--sfg-surface-2);
    border: 1px dashed #cbd5e1;
    border-radius: var(--sfg-radius);
}

.sfg-empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 20px;
    background: #fff;
    color: #94a3b8;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.sfg-empty-state__icon .sfg-ico {
    width: 48px;
    height: 48px;
}

.sfg-empty-state__title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--sfg-ink);
}

.sfg-empty-state__text {
    margin: 0 auto;
    max-width: 36ch;
    font-size: 0.9375rem;
    color: var(--sfg-muted);
    line-height: 1.6;
}

/* ══ Detail hero + summary ═════════════════════════════════ */
.sfg-detail-hero {
    margin-bottom: 28px;
}

.sfg-detail-summary {
    margin-top: 16px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 70%);
    border: 1px solid #fde68a;
    border-radius: var(--sfg-radius-sm);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.12);
}

.sfg-detail-summary__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sfg-detail-summary__title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #92400e;
}

.sfg-detail-summary__jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--sfg-accent);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #fde68a;
    transition: background 0.15s, transform 0.12s;
}
.sfg-detail-summary__jump:hover {
    background: #fffbeb;
    text-decoration: none;
    transform: translateY(-1px);
}

.sfg-detail-summary__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sfg-detail-summary__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.sfg-detail-summary__chip--missing {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}
.sfg-detail-summary__chip--rejected {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}
.sfg-detail-summary__chip--proof {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* ══ STATUS BADGES ══════════════════════════════════════════ */
.sfg-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: .02em;
}

.sfg-badge--pending  { background: #fef9ee; color: #b45309; border: 1px solid #fde68a; }
.sfg-badge--approved { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.sfg-badge--rejected { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.sfg-badge--revised  { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.sfg-badge--missing  { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

.sfg-badge--proof-none              { background: #f9fafb;  color: #9ca3af;  border: 1px solid #e5e7eb; }
.sfg-badge--proof-pending_review    { background: #fef9ee;  color: #b45309;  border: 1px solid #fde68a; }
.sfg-badge--proof-approved          { background: #f0fdf4;  color: #15803d;  border: 1px solid #bbf7d0; }
.sfg-badge--proof-changes_requested { background: #fef9ee;  color: #92400e;  border: 1px solid #fde68a; }

/* ══ BUTTONS ════════════════════════════════════════════════ */
.sfg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s ease;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.sfg-btn--primary {
    background: #111;
    color: #fff;
    border-color: #111;
}
.sfg-btn--primary:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff;
    text-decoration: none;
}

.sfg-btn--approve {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}
.sfg-btn--approve:hover {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
    text-decoration: none;
}

.sfg-btn--changes {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}
.sfg-btn--changes:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111;
    text-decoration: none;
}

.sfg-btn--ghost {
    background: transparent;
    color: #6b7280;
    border-color: #e5e7eb;
    padding: 7px 14px;
    font-size: 12px;
}
.sfg-btn--ghost:hover {
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
}

/* ══ MENU BADGE ═════════════════════════════════════════════ */
.sfg-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 100px;
    line-height: 1;
    margin-left: 5px;
    vertical-align: middle;
}

/* ══ DASHBOARD WIDGET ═══════════════════════════════════════ */
.sfg-dw {
    margin: 32px 0 0;
}

.sfg-dw--panel {
    padding: 20px 20px 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 40%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
}

.sfg-dw__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.sfg-dw__title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #64748b;
}

.sfg-dw__badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 100px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.sfg-dw__badge--soft {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.sfg-dw__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.sfg-dw__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .12s;
}
.sfg-dw__row:hover {
    border-color: #e5e7eb;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.sfg-dw__row-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.sfg-dw__row-num {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    flex-shrink: 0;
}

.sfg-dw__row-date {
    font-size: 12px;
    color: #b0b7c3;
}

.sfg-dw__row-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
    border: 1px solid transparent;
    flex-shrink: 0;
}
.sfg-dw__row-pill--missing  { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.sfg-dw__row-pill--rejected { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.sfg-dw__row-pill--proof    { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.sfg-dw__row-pill--review   { background: #fef9ee; color: #b45309; border-color: #fde68a; }
.sfg-dw__row-pill--ok       { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

.sfg-dw__row-arrow {
    display: inline-flex;
    color: #cbd5e1;
    flex-shrink: 0;
    transition: color .12s, transform .12s;
}
.sfg-dw__row:hover .sfg-dw__row-arrow {
    color: #475569;
    transform: translateX(3px);
}

.sfg-dw__footer-link {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .12s;
}
.sfg-dw__footer-link:hover {
    color: #0f172a;
    text-decoration: none;
}

/* ══ ORDERS INDEX (list view) ════════════════════════════════ */
.sfg-orders-index {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── Order card ─────────────────────────────────────────────── */
.sfg-order-card {
    position: relative;
    display: block;
    background: var(--sfg-surface, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .16s, border-color .15s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.sfg-order-card--urgent,
.sfg-order-card--missing {
    border-color: #fecaca;
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.08);
}
.sfg-order-card--waiting {
    border-color: #fde68a;
}

/* Riga destra: badge + nastro nello stesso flex (no position:absolute) */
.sfg-order-card__top-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.sfg-order-card__badges {
    display: contents;
}

.sfg-order-card__ribbon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 11px;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 999px;
    box-sizing: border-box;
}

.sfg-order-card__ribbon-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #dc2626;
    animation: sfg-pulse 1.8s ease-in-out infinite;
}

@keyframes sfg-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.92); }
}

.sfg-order-card__bar {
    height: 4px;
    background: #f1f5f9;
    overflow: hidden;
}

.sfg-order-card__bar-fill {
    display: block;
    height: 100%;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.35s ease;
}

.sfg-order-card--urgent .sfg-order-card__bar-fill,
.sfg-order-card--missing .sfg-order-card__bar-fill {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.sfg-order-card--waiting .sfg-order-card__bar-fill {
    background: linear-gradient(90deg, #eab308, #ca8a04);
}

.sfg-order-card:hover {
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
    border-color: #cbd5e1;
}

/* Top row */
.sfg-order-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 12px;
    flex-wrap: wrap;
}

.sfg-order-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sfg-order-card__num {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    letter-spacing: -.01em;
}

.sfg-order-card__date {
    font-size: 12px;
    color: #9ca3af;
}

.sfg-order-card__wc-status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    background: #f3f4f6;
    border-radius: 100px;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* Product preview strip */
.sfg-order-card__products {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 14px;
    flex-wrap: wrap;
}

.sfg-order-card__product {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sfg-order-card__product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
    flex-shrink: 0;
    background: #f9fafb;
}

.sfg-order-card__product-placeholder {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    flex-shrink: 0;
}

.sfg-order-card__product-name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Separator between products */
.sfg-order-card__product + .sfg-order-card__product {
    padding-left: 12px;
    border-left: 1px solid #f3f4f6;
}

.sfg-order-card__more {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    padding-left: 12px;
    border-left: 1px solid #f3f4f6;
}

/* Footer row */
.sfg-order-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 14px;
    border-top: 1px solid #f9fafb;
}

.sfg-order-card__files-count {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.sfg-order-card__arrow {
    display: inline-flex;
    color: #cbd5e1;
    transition: color .15s, transform .15s;
}
.sfg-order-card:hover .sfg-order-card__arrow {
    color: #475569;
    transform: translateX(4px);
}

/* Summary pills */
.sfg-osum {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 100px;
    white-space: nowrap;
    border: 1px solid transparent;
    box-sizing: border-box;
}
.sfg-osum--rejected { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.sfg-osum--pending  { background: #fef9ee; color: #b45309; border-color: #fde68a; }
.sfg-osum--proof    { background: transparent; color: #374151; border-color: transparent; gap: 5px; }

.sfg-proof-notify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 100px;
    line-height: 1;
    vertical-align: middle;
}
.sfg-osum--missing  { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.sfg-osum--changes  { background: #fef9ee; color: #92400e; border-color: #fde68a; }
.sfg-osum--ok       { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

/* ══ DETAIL NAV ═════════════════════════════════════════════ */
.sfg-detail-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.sfg-detail-nav__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.sfg-detail-nav__back:hover {
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.sfg-detail-nav__order {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sfg-detail-nav__num {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.sfg-detail-nav__date {
    font-size: 0.8125rem;
    color: #94a3b8;
}

.sfg-order-block__status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    background: #f3f4f6;
    border-radius: 100px;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* ══ PRODUCT BLOCK ══════════════════════════════════════════ */
.sfg-product-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.sfg-product-block__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.sfg-product-block__thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sfg-product-block__no-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    flex-shrink: 0;
}

.sfg-product-block__name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* ══ FILE CARD (sfg-lav) ════════════════════════════════════ */
.sfg-lav {
    border-bottom: 1px solid #f3f4f6;
    scroll-margin-top: 1.25rem;
}
.sfg-lav:last-child { border-bottom: none; }

/* Header */
.sfg-lav__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
}

/* Thumbnail */
.sfg-lav__file-preview { flex-shrink: 0; width: 52px; }

.sfg-lav__thumb-link {
    display: block;
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
}
.sfg-lav__thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sfg-lav__thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s;
}
.sfg-lav__thumb-overlay .sfg-ico {
    width: 22px;
    height: 22px;
}
.sfg-lav__thumb-link:hover .sfg-lav__thumb-overlay { opacity: 1; }

.sfg-lav__file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    gap: 4px;
    transition: background .15s;
    cursor: pointer;
}
.sfg-lav__file-icon:hover { background: #e5e7eb; }

.sfg-lav__ext {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    color: #374151;
    background: #d1d5db;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: .04em;
}

/* Info */
.sfg-lav__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sfg-lav__name {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}

.sfg-lav__badges {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* View link */
.sfg-lav__view-link {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    padding: 5px 11px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    transition: all .15s;
    white-space: nowrap;
}
.sfg-lav__view-link:hover {
    background: #f3f4f6;
    color: #111;
    border-color: #d1d5db;
    text-decoration: none;
}

/* ── Rejected action area ─────────────────────────────── */
.sfg-lav__action {
    display: flex;
    gap: 14px;
    margin: 0 18px 16px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: linear-gradient(135deg, #fff5f5, #fff8f8);
}
.sfg-lav__action--missing {
    border-color: #fed7aa;
    background: linear-gradient(135deg, #fff7ed, #fffbf5);
}

/* Missing-state lav block */
.sfg-lav--missing { border-color: #fed7aa; }
.sfg-lav__file-icon--missing {
    background: #fff7ed;
    border: 1px dashed #fed7aa;
    color: #c2410c;
}

.sfg-lav__action-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 2px;
}

.sfg-lav__action-body { flex: 1; min-width: 0; }

.sfg-lav__admin-note {
    font-size: 13px;
    color: #7f1d1d;
    font-style: italic;
    margin: 0 0 12px;
    line-height: 1.5;
    padding: 10px 12px;
    background: rgba(220,38,38,.05);
    border-left: 3px solid #fca5a5;
    border-radius: 0 6px 6px 0;
}

.sfg-lav__action-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 10px;
}

.sfg-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sfg-upload-label { position: relative; cursor: pointer; }

.sfg-upload-label input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

.sfg-upload-label__text {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    transition: background .15s;
    white-space: nowrap;
}
.sfg-upload-label:hover .sfg-upload-label__text { background: #f3f4f6; }

.sfg-upload-status {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    min-height: 18px;
    color: #374151;
}
.sfg-upload-status.is-ok  { color: #15803d; }
.sfg-upload-status.is-err { color: #dc2626; }

/* ── Proof section ──────────────────────────────────────── */
.sfg-lav__proof {
    margin: 0 18px 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.sfg-lav__proof--pending_review    { border-color: #fde68a; }
.sfg-lav__proof--approved          { border-color: #bbf7d0; }
.sfg-lav__proof--changes_requested { border-color: #fde68a; }

.sfg-lav__proof-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
}
.sfg-lav__proof--pending_review .sfg-lav__proof-head {
    background: #fffbeb;
    border-bottom-color: #fde68a;
}
.sfg-lav__proof--approved .sfg-lav__proof-head {
    background: #f0fdf4;
    border-bottom-color: #bbf7d0;
}

.sfg-lav__proof-title {
    font-size: 11px;
    font-weight: 800;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .06em;
    flex: 1;
}

.sfg-lav__proof-preview {
    padding: 14px;
    background: #fff;
}

.sfg-lav__proof-img-link {
    display: inline-block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    max-width: min(100%, 280px);
    transition: box-shadow .15s;
}
.sfg-lav__proof-img-link:hover { box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08); }

.sfg-lav__proof-img {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    min-height: 120px;
    object-fit: cover;
}

.sfg-lav__proof-open {
    display: block;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    transition: background .15s;
}
.sfg-lav__proof-img-link:hover .sfg-lav__proof-open {
    background: #f3f4f6;
    color: #111;
}

.sfg-proof-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    transition: background .15s, border-color .15s;
}
.sfg-proof-link:hover { background: #f1f5f9; border-color: #cbd5e1; text-decoration: none; }

.sfg-proof-link__ico {
    display: inline-flex;
    color: #64748b;
}

/* CTA: proof pending review */
.sfg-lav__proof-cta {
    padding: 16px;
    background: #fffbeb;
    border-top: 1px solid #fde68a;
}

.sfg-lav__proof-cta-msg {
    font-size: 13px;
    color: #78350f;
    margin: 0 0 14px;
    line-height: 1.5;
}

.sfg-lav__proof-cta-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sfg-proof-note-form {
    margin-top: 6px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.sfg-proof-note-input {
    display: block;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    resize: vertical;
    margin-bottom: 10px;
    font-family: inherit;
    color: #111;
    transition: border-color .15s;
    background: #fafafa;
}
.sfg-proof-note-input:focus {
    outline: none;
    border-color: #111;
    background: #fff;
}

.sfg-proof-note-form__actions { display: flex; gap: 8px; }

.sfg-proof-feedback {
    font-size: 12px;
    font-weight: 600;
    min-height: 18px;
    margin-top: 8px;
}
.sfg-proof-feedback.is-ok  { color: #15803d; }
.sfg-proof-feedback.is-err { color: #dc2626; }

/* Proof outcome states */
.sfg-lav__proof-outcome {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
}
.sfg-lav__proof-outcome--ok {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    color: #15803d;
}
.sfg-lav__proof-outcome--ok .sfg-ico { flex-shrink: 0; }
.sfg-lav__proof-outcome--pending { background: #fffbeb; color: #92400e; }
.sfg-lav__proof-outcome--pending span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sfg-lav__proof-outcome--pending .sfg-ico { flex-shrink: 0; }

.sfg-lav__proof-note {
    margin: 0;
    font-size: 12px;
    font-style: italic;
    font-weight: 400;
    color: #78350f;
    padding: 0;
    border: none;
}

/* ══ FILE PREVIEW MODAL ═════════════════════════════════════ */
.sfg-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sfg-modal--hidden { display: none; }

body.sfg-modal-open { overflow: hidden; }

.sfg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.sfg-modal__box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.22);
    animation: sfg-modal-in .16s ease;
}

@keyframes sfg-modal-in {
    from { opacity: 0; transform: scale(.96) translateY(10px); }
    to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.sfg-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f3f4f6;
    gap: 12px;
    flex-shrink: 0;
    background: #fff;
}

.sfg-modal__title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sfg-modal__close {
    flex-shrink: 0;
    background: #f3f4f6;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, color .12s;
}
.sfg-modal__close:hover { background: #e5e7eb; color: #111; }

.sfg-modal__body {
    flex: 1;
    overflow-y: auto;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.sfg-modal__img-wrap {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sfg-modal__img {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 130px);
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,.1);
}

.sfg-modal__file-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px;
    text-align: center;
}

.sfg-modal__file-ext {
    font-size: 20px;
    font-weight: 800;
    color: #374151;
    background: #e5e7eb;
    padding: 10px 20px;
    border-radius: 10px;
    letter-spacing: .06em;
}

.sfg-modal__file-name {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0;
    word-break: break-all;
}

.sfg-modal__file-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.sfg-modal__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #f3f4f6;
    background: #fff;
    flex-shrink: 0;
}

/* Paginazione lista ordini (File di Stampa) */
.sfg-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 24px;
    padding: 18px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.sfg-pagination__info {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    order: 0;
}

.sfg-pagination__btn {
    min-width: 120px;
    text-align: center;
    border-radius: 10px !important;
    font-weight: 700 !important;
}

.sfg-pagination__btn--disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 480px) {
    .sfg-pagination {
        flex-direction: column;
    }
    .sfg-pagination__info {
        order: -1;
        width: 100%;
        text-align: center;
    }
}

/* ══ MOBILE ═════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .sfg-order-card__top    { padding: 14px 16px 10px; }
    .sfg-order-card__meta   { flex-wrap: wrap; gap: 6px; }
    .sfg-order-card__top-right {
        width: 100%;
        justify-content: flex-start;
    }
    .sfg-order-card__products { padding: 8px 16px 10px; gap: 10px; }
    .sfg-order-card__product-name { max-width: 110px; }
    .sfg-order-card__footer { padding: 8px 16px 12px; }

    .sfg-detail-nav { flex-direction: column; align-items: flex-start; gap: 10px; }

    .sfg-lav__header { padding: 12px 14px; gap: 10px; }
    .sfg-lav__file-preview,
    .sfg-lav__thumb-link,
    .sfg-lav__file-icon { width: 44px; height: 44px; }
    .sfg-lav__thumb { width: 44px; height: 44px; }
    .sfg-lav__view-link { display: none; }

    .sfg-lav__action,
    .sfg-lav__proof { margin-left: 14px; margin-right: 14px; }

    .sfg-lav__proof-img,
    .sfg-lav__proof-img-link { max-width: 100%; }

    .sfg-upload-row { flex-direction: column; align-items: flex-start; }
    .sfg-lav__proof-cta-btns { flex-direction: column; }
    .sfg-btn { width: 100%; justify-content: center; }
    .sfg-proof-note-form__actions { flex-direction: column; }

    .sfg-modal__box { border-radius: 12px; }
}
