/* Moduli + form anagrafiche — stile Verdent (arancio PLUS) */
:root {
    --gp-orange: #e67800;
    --gp-bg: #f0f2f5;
    --gp-card: #ffffff;
    --gp-text: #1a1a2e;
    --gp-muted: #4a4a6a;
}

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

.gp-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.gp-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.gp-page-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--gp-orange);
}

.gp-breadcrumb {
    font-size: 13px;
    color: var(--gp-muted);
    margin-bottom: 8px;
}

.gp-breadcrumb a {
    color: var(--gp-orange);
    text-decoration: none;
}

.gp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.gp-btn-primary {
    background: var(--gp-orange);
    color: #fff;
}

.gp-btn-primary:hover { filter: brightness(1.05); }

.gp-btn-secondary {
    background: #fff;
    color: var(--gp-text);
    border: 1px solid #d1d5db;
}

.gp-btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Griglia moduli home */
.gp-mod-section {
    margin-bottom: 28px;
}

.gp-mod-section h2 {
    margin: 0 0 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gp-muted);
    font-weight: 700;
}

.gp-mod-grid {
    display: grid;
    gap: 12px;
}

.gp-mod-grid--home {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto 24px;
}

.gp-mod-grid--tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 0 auto;
}

@media (max-width: 520px) {
    .gp-mod-grid--tiles { grid-template-columns: 1fr; }
}

.module-tile--ordini { background: #7c3aed; }

.gp-breadcrumb--center { text-align: center; }

.gp-hero--compact { margin-bottom: 24px; }

.gp-hero--compact h1 { font-size: 1.75rem; }

.gp-hero--compact .gp-welcome { margin-top: 8px; }

.gp-back-home {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
}

.gp-back-home a {
    color: var(--gp-orange);
    font-weight: 600;
    text-decoration: none;
}

/* Tile stile Verdent — friendly, ~20 utenti */
.module-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 20px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

a.module-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.module-tile--anag { background: #e67800; }
.module-tile--card { background: #2563eb; }
.module-tile--printer { background: #7c3aed; }
.module-tile--pay { background: #1e3a5f; }

.module-tile--soon {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.2);
}

.tile-icon {
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: 8px;
}

.tile-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.tile-subtitle {
    font-size: 0.78rem;
    opacity: 0.92;
    margin-top: 6px;
    line-height: 1.35;
    font-weight: 500;
}

.gp-hint { font-weight: 400; color: #9ca3af; font-size: 11px; }

.gp-hint-block {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--gp-muted);
    line-height: 1.45;
}

.gp-storico-wrap {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
}

.gp-storico-wrap h3 {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--gp-muted);
}

.gp-field input:focus,
.gp-field select:focus,
.gp-field textarea:focus {
    outline: none;
    border-color: var(--gp-orange);
    box-shadow: 0 0 0 3px rgba(230, 120, 0, 0.15);
}

/* Card / tabella */
.gp-card {
    background: var(--gp-card);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.gp-card h2 {
    margin: 0 0 14px;
    font-size: 1rem;
    color: var(--gp-text);
}

.gp-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.gp-search-bar input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.gp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.gp-table th,
.gp-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.gp-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gp-muted);
    background: #f9fafb;
}

.gp-table tr:hover td { background: #fffbeb; }

.gp-table a {
    color: var(--gp-orange);
    font-weight: 600;
    text-decoration: none;
}

.gp-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.gp-badge-ok { background: #dcfce7; color: #166534; }
.gp-badge-off { background: #f3f4f6; color: #6b7280; }

/* Form */
.gp-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: flex-end;
}

.gp-form-grid--wide { display: flex; flex-direction: column; }

.gp-field-full { flex: 1 1 100%; width: 100%; }

.gp-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gp-muted);
    margin-bottom: 4px;
}

.gp-field input,
.gp-field select,
.gp-field textarea {
    width: 100%;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.gp-field input[type="file"] {
    width: auto;
    max-width: 100%;
}

.gp-field textarea { min-height: 72px; resize: vertical; }

.gp-combo { position: relative; z-index: 1; }
.gp-combo:focus-within { z-index: 60; }
.gp-combo-list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 280px;
    overflow: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}
.gp-combo-list button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: #fff;
    padding: 8px 12px;
    font: inherit;
    cursor: pointer;
}
.gp-combo-list button:hover { background: #fff7ed; }
.gp-combo-list small { display: block; color: #64748b; font-size: 12px; }

.gp-art-suggest {
    position: fixed;
    z-index: 80;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}
.gp-art-suggest-item {
    display: flex;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    line-height: 1.3;
}
.gp-art-suggest-item:hover,
.gp-art-suggest-item.is-on { background: #fff7ed; }
.gp-art-suggest-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 700;
    color: #c2410c;
    flex: 0 0 auto;
    min-width: 52px;
}
.gp-art-suggest-name {
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gp-art-suggest-msg { padding: 10px 12px; font-size: 12px; color: #6b7280; }
.gp-art-suggest-msg--err { color: #b91c1c; }
.gp-cli-suggest {
    z-index: 120;
    max-height: 320px;
}
.gp-cli-suggest-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: 0;
    background: #fff;
    cursor: pointer;
    font: inherit;
}
.gp-cli-suggest-item:hover,
.gp-cli-suggest-item.is-on { background: #fff7ed; }
.gp-cli-suggest-item small { display: block; color: #64748b; font-size: 12px; }
.gp-hint { margin: 4px 0 0; font-size: 12px; color: #64748b; }

.gp-alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.gp-alert-warn {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.gp-alert-ok {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.gp-alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.gp-subrows { margin-top: 8px; }

.gp-subrow {
    display: grid;
    grid-template-columns: 140px 1fr auto auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
}

.gp-subrow-ind {
    display: grid;
    grid-template-columns: 1fr 1.2fr 72px 1fr 56px 52px 52px auto auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .gp-subrow,
    .gp-subrow-ind { grid-template-columns: 1fr; }
}

.gp-badge-flag {
    background: #fff7ed;
    color: #9a3412;
    margin-left: 6px;
    vertical-align: middle;
}

.gp-flag-th,
.gp-flag-cell {
    text-align: center !important;
    white-space: nowrap;
}

.gp-tick {
    color: #e67800;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.gp-tick-off {
    color: #cbd5e1;
    font-size: 20px;
    line-height: 1;
}

.gp-savebar {
    position: sticky;
    bottom: 0;
    z-index: 8;
    background: #fff;
    margin: 16px 0 0;
    padding: 12px 16px 14px;
    border: 2px solid #e67800;
    border-radius: 12px;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
}

.gp-flags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.gp-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    color: #1a1a2e;
    cursor: pointer;
}

.gp-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--gp-orange);
}

.gp-check small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.4;
}

.gp-flags-link {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: #9a3412;
    flex-basis: 100%;
}

.gp-flags-link a {
    color: var(--gp-orange);
    font-weight: 700;
}

.gp-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #fed7aa;
}

.gp-storico {
    font-size: 13px;
    color: var(--gp-muted);
}

.gp-storico li { margin-bottom: 4px; }

.gp-empty {
    text-align: center;
    padding: 32px;
    color: #9ca3af;
}

.gp-page--wide { max-width: 1180px; }

.gp-badge-warn { background: #fef3c7; color: #92400e; }
.gp-badge-open { background: #dbeafe; color: #1d4ed8; }
.gp-badge-card { background: #dbeafe; color: #1d4ed8; }
.gp-badge-printer { background: #f3e8ff; color: #7e22ce; }

.gp-btn-card { background: #2563eb; color: #fff; }
.gp-btn-printer { background: #9333ea; color: #fff; }

.gp-table-edit input,
.gp-table-edit select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}

.ditbl-scroll { overflow-x: auto; }

.gp-uscita {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fafbfc;
}

.gp-uscita-head {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.gp-check-wrap { display: flex; align-items: end; }

.gp-doc-line { font-size: 13px; margin-top: 4px; }

.muted { color: #6b7280; font-size: 13px; }

.gp-dup-banner {
    display: none;
    margin-top: 8px;
}

.gp-dup-banner.visible { display: block; }

/* Apertura ordine stile Fatture in Cloud */
.gp-page--fic { max-width: 1280px; }

.fic-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
    align-items: start;
}

.fic-origine {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fic-origine-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.fic-origine-opt:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.fic-origine-opt input { accent-color: #2563eb; }

.fic-copy-panel { margin-top: 14px; }

.fic-copy-bar,
.fic-copy-fic,
.fic-copy-pgp {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 10px;
}
.fic-copy-bar[hidden],
.fic-copy-fic[hidden],
.fic-copy-pgp[hidden],
#fonte-import[hidden] {
    display: none !important;
}
.fic-copy-bar .gp-field { margin: 0; min-width: 0; }
.fic-copy-tipo { width: 148px; flex: 0 0 148px; }
.fic-copy-num { width: 88px; flex: 0 0 88px; }
.fic-copy-anno { width: 76px; flex: 0 0 76px; }
.fic-copy-fic,
.fic-copy-pgp {
    flex: 0 0 auto;
}
.fic-copy-btn {
    height: 42px;
    padding: 0 14px;
    white-space: nowrap;
    flex: 0 0 auto;
}
/* Native <input type=file> is huge (width:100% from .gp-field input). Keep it out of layout. */
.fic-copy-bar .fic-pgp-input,
.gp-page--ord .fic-pgp-input,
#fonte-pgp-file.fic-pgp-input {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    position: absolute !important;
    pointer-events: none;
}
.fic-pgp-name {
    max-width: 180px;
    line-height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #6b7280;
}
.fic-copy-status { margin: 8px 0 0; min-height: 1.2em; }

.fic-fonte-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    max-height: 240px;
    overflow: auto;
}

.fic-fonte-btn {
    display: flex;
    align-items: baseline;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    margin-bottom: 6px;
    font: inherit;
}

.fic-fonte-btn:hover { border-color: #2563eb; background: #f8fafc; }

.fic-fonte-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    padding: 2px 6px;
}

.fic-fonte-btn small { margin-left: auto; color: #6b7280; }

.fic-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.fic-list-head h2 { margin: 0; }

.fic-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 8px;
    align-items: start;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 8px 10px;
    margin-bottom: 10px;
    background: #fff;
    counter-increment: voce;
}

.fic-move {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
    align-items: center;
}
.fic-move::before {
    content: counter(voce);
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    line-height: 1;
    margin-bottom: 4px;
}

.fic-move-btn {
    width: 28px;
    height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.fic-move-btn:hover:not(:disabled) {
    border-color: #e67800;
    color: #e67800;
    background: #fff;
}

.fic-move-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.fic-trash {
    border: none;
    background: transparent;
    cursor: pointer;
    color: #ef4444;
    font-size: 16px;
    padding: 18px 0 0;
    line-height: 1;
}

.fic-line { min-width: 0; }
.fic-line .gp-field label {
    font-size: 11px;
    margin-bottom: 2px;
}
.fic-line .gp-field input,
.fic-line .gp-field select,
.fic-line .gp-field textarea {
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 6px;
}

.fic-row-top {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px 10px;
    align-items: flex-end;
}

.fic-col { min-width: 0; }

.fic-col--codice { flex: 0 0 auto; width: calc(12ch + 1.6rem); }
.fic-col--nome { flex: 3.2 1 0; min-width: 8em; }
.fic-col--qty { flex: 0 0 auto; width: 5.4em; }
.fic-col--unita { flex: 0 0 auto; width: calc(3ch + 1.8rem); }
.fic-col--prezzo { flex: 0 0 auto; width: 6.2em; }
.fic-col--sconto { flex: 0 0 auto; width: calc(4ch + 1.8rem); }
.fic-col--iva { flex: 0 0 auto; width: 7.2em; }
.fic-col--importo { flex: 0 0 auto; width: 6.4em; }
.fic-col--iva select.f-iva {
    width: 100%;
    max-width: 7.2em;
    padding-right: 1.4rem;
    text-overflow: ellipsis;
}

.fic-row-mid {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px 14px;
    margin-top: 8px;
    align-items: flex-start;
}

.fic-desc { flex: 1 1 auto; min-width: 0; }

.fic-mid-right {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px 16px;
    flex: 1 1 16em;
    align-items: flex-end;
    min-width: 0;
}

.fic-row-bot {
    margin-top: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.fic-cat-field { max-width: 140px; flex: 0 0 140px; }

.fic-desc textarea { min-height: 52px; resize: vertical; }

.fic-money {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.fic-eur {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.04em;
}
.fic-money input { flex: 1; min-width: 0; }

.gp-page--ord .f-qty,
.gp-page--ord .f-prezzo,
.gp-page--ord .f-sconto,
.gp-page--ord .f-importo {
    -moz-appearance: textfield;
    appearance: textfield;
}
.gp-page--ord .f-qty::-webkit-outer-spin-button,
.gp-page--ord .f-qty::-webkit-inner-spin-button,
.gp-page--ord .f-prezzo::-webkit-outer-spin-button,
.gp-page--ord .f-prezzo::-webkit-inner-spin-button,
.gp-page--ord input[type="number"]::-webkit-outer-spin-button,
.gp-page--ord input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.gp-page--ord input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.fic-add-btn {
    width: auto;
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    background: #e67800;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    min-height: 40px;
}

.fic-add-btn:hover { filter: brightness(1.05); }

.fic-row-act {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}

.fic-act {
    flex: 0 0 auto;
    min-height: 40px;
    min-width: 40px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #1a1a2e;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.fic-act.f-add {
    background: #e67800;
    border-color: #e67800;
    color: #fff;
}

.fic-act.f-copy:hover { border-color: #e67800; color: #e67800; }

.fic-foot {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.fic-iva-list { margin-bottom: 8px; }

.fic-iva-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #475569;
    margin-bottom: 4px;
}

.fic-iva-line .fic-iva-art { color: #64748b; }

.fic-foot-tot .fic-sum-row { margin-bottom: 6px; }
.fic-foot-tot .fic-sum-total { margin-top: 8px; padding-top: 8px; }

.gp-uscita-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.gp-uscita-docs {
    margin-top: 8px;
    font-size: 13px;
    color: #475569;
}

.gp-uscita-doc {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 4px 0;
    border-bottom: 1px solid #e5e7eb;
}

.gp-uscita-doc:last-child { border-bottom: 0; }

#uscite-card .fic-list-head {
    align-items: center;
    margin-bottom: 4px;
}

#btn-nuova-uscita {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
}
.ord-fic-head {
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}
.ord-docs-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.ord-docs-title h2 { margin: 0; }
.gp-docs-eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f3e8ff;
    color: #6b21a8;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}
.gp-docs-eye:hover { background: #e9d5ff; }
.ord-doc-stato {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    line-height: 1.2;
    flex: 0 0 auto;
}
.ord-doc-stato.is-nero { background: #111827; color: #fff; }
.ord-doc-stato.is-arancione { background: #ea580c; color: #fff; }
.ord-doc-stato.is-verde { background: #16a34a; color: #fff; }
#docs-card .gp-alert { margin: 8px 0; }
.gp-docq-miss { color: #b91c1c; font-weight: 700; }
.ord-fic-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    flex: 1 1 auto;
    justify-content: flex-end;
}
.ord-fic-bar .gp-btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
}

.fic-summary {
    position: sticky;
    top: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.fic-summary h2 { margin: 0 0 12px; font-size: 16px; }

.fic-sum-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #64748b;
}

.fic-sum-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    color: #0f172a;
    font-size: 15px;
}

.fic-finalizza {
    width: 100%;
    margin-top: 16px;
    justify-content: center;
    background: #16a34a;
    color: #fff;
    padding: 12px 16px;
}

.fic-finalizza:hover { filter: brightness(1.05); }

@media (max-width: 980px) {
    .fic-layout { grid-template-columns: 1fr; }
    .fic-summary { position: static; }
    .fic-row-top { flex-wrap: wrap; }
    .fic-row-mid { flex-wrap: wrap; }
    .fic-col--codice { width: auto; flex: 1 1 12em; }
    .fic-col--iva { width: 7.2em; flex: 0 0 auto; }
    .fic-col--unita { width: calc(3ch + 1.8rem); flex: 0 0 auto; }
    .fic-col--sconto { width: calc(4ch + 1.8rem); flex: 0 0 auto; }
}

/* Ordini — layout friendly, chiaro, poco colore */
.module-tile--peach,
.module-tile--peach-soft {
    color: #1a1a2e;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}
.module-tile--peach { border-top: 4px solid #e67800; }
.module-tile--peach-soft { border-top: 4px solid #f4a261; }
a.module-tile--peach:hover,
a.module-tile--peach-soft:hover { color: #1a1a2e; background: #fafafa; }

.module-tile.module-tile--photo {
    min-height: 188px;
    padding: 20px 14px 18px;
}
.module-tile .tile-photo {
    display: block;
    margin: 0 auto 12px;
    max-width: 100%;
    object-fit: contain;
    flex: 0 0 auto;
}
.module-tile .tile-photo--card {
    width: auto;
    height: 6.6rem;
    max-width: 72%;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
}
.module-tile .tile-photo--printer {
    width: auto;
    height: 6.6rem;
    max-width: 78%;
}
@media (max-width: 900px) {
    .module-tile.module-tile--photo {
        min-height: 168px;
        padding: 16px 12px 14px;
    }
    .module-tile .tile-photo--printer { height: 5.4rem; }
}

.ord-start {
    min-height: calc(100vh - 48px);
    background: #f7f7f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 16px 48px;
}
.ord-start-hero {
    text-align: center;
    max-width: 36rem;
    margin-bottom: 28px;
}
.ord-start-crumb {
    margin: 0 0 10px;
    font-size: 13px;
    color: #6b7280;
}
.ord-start-crumb a { color: #e67800; text-decoration: none; font-weight: 600; }
.ord-start-hero h1 {
    margin: 0;
    font-size: 2rem;
    color: #1a1a2e;
    letter-spacing: -0.02em;
}
.ord-start-hero p {
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 1.5;
    color: #4b5563;
}
.ord-start-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 44rem;
}
.ord-start-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 210px;
    padding: 28px 24px;
    border-radius: 20px;
    text-decoration: none;
    color: #1a1a2e;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ord-start-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
    color: #1a1a2e;
}
.ord-start-tile--new { border-top: 5px solid #e67800; }
.ord-start-tile--list { border-top: 5px solid #d1d5db; }
.ord-start-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e67800;
}
.ord-start-tile--list .ord-start-icon { color: #4b5563; }
.ord-start-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.ord-start-sub { font-size: 0.95rem; line-height: 1.4; color: #6b7280; font-weight: 500; }

.ord-offerta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px 16px;
}
.ord-offerta-copy {
    flex: 1 1 14rem;
    min-width: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #374151;
}
.ord-offerta-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ord-offerta-btns .gp-btn {
    min-height: 40px;
}

.gp-page--ord {
    max-width: 1180px;
    background: transparent;
}
body:has(.gp-page--ord),
body:has(.ord-start) {
    background: #f7f7f8;
}

.ord-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}
.gp-page-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gp-page-header-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.gp-page-header-left .gp-btn-primary {
    background: #e67800;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(230, 120, 0, 0.35);
}
.gp-btn-green,
.gp-page-header-left .gp-btn-green {
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(39, 174, 96, 0.35);
}
.gp-btn-green:hover,
.gp-page-header-left .gp-btn-green:hover { filter: brightness(1.05); }
.gp-page-header-left #payBanner {
    flex: 1 1 100%;
    width: 100%;
}
.gp-btn-ghost {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}
.gp-card--soft {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px 22px 20px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.gp-page--ord .gp-card h2,
.gp-page--ord .fic-list-head h2 {
    color: #1a1a2e;
    font-size: 1.05rem;
}
.gp-page--ord .gp-field label { color: #4b5563; font-size: 13px; }
.gp-page--ord .gp-field input,
.gp-page--ord .gp-field select,
.gp-page--ord .gp-field textarea {
    padding: 11px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}
.gp-page--ord .gp-field input:focus,
.gp-page--ord .gp-field select:focus,
.gp-page--ord .gp-field textarea:focus {
    border-color: #e67800;
    box-shadow: 0 0 0 3px rgba(230, 120, 0, 0.12);
}

.gp-page--ord .fic-origine-opt {
    padding: 10px 16px;
    border-radius: 12px;
    border-color: #e5e7eb;
    background: #fff;
    color: #374151;
}
.gp-page--ord .fic-origine-opt:has(input:checked) {
    border-color: #e67800;
    background: #fff;
    color: #1a1a2e;
}
.gp-page--ord .fic-origine-opt input { accent-color: #e67800; }

.gp-page--ord .fic-summary {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    padding: 20px;
}
.gp-page--ord .fic-summary h2 { color: #1a1a2e; }
.gp-page--ord .fic-sum-total {
    border-top: 1px solid #e5e7eb;
    color: #1a1a2e;
}
.gp-page--ord .fic-finalizza { background: #e67800; }

#ord-items { counter-reset: voce; }
.fic-doc {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: auto;
    background: #fff;
    margin-bottom: 12px;
}
.fic-doc-head,
.fic-closed {
    display: grid;
    grid-template-columns: 36px 5.2rem minmax(8rem, 1fr) 6.2rem 8.2rem 8.6rem 32px;
    gap: 4px 10px;
    align-items: center;
    min-width: 720px;
}
.fic-doc-head {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}
.fic-doc-head .num,
.fic-closed .num { text-align: right; }
.gp-page--ord .fic-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 10px 8px;
    margin: 0;
    background: #fff;
    box-shadow: none;
}
.gp-page--ord .fic-item:nth-child(even) { background: #f8fafc; }
.gp-page--ord .fic-item:last-child { border-bottom: 0; }
.gp-page--ord .fic-item:focus-within { background: #fff7ed; }
.fic-trash { padding-top: 22px; }
.gp-page--ord .fic-desc textarea { min-height: 52px; background: #fff; }
.gp-page--ord .f-importo { background: #fff; font-weight: 700; color: #1a1a2e; }
.gp-page--ord .fic-add-btn {
    width: auto;
    border: none;
    background: #e67800;
    color: #fff;
    border-radius: 10px;
}
.gp-page--ord .fic-add-btn:hover { background: #d96e00; color: #fff; border-color: transparent; }

.ord-search {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    background: #fff;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: none;
}
.ord-search input {
    flex: 1;
    border: 0;
    padding: 10px 12px;
    font-size: 15px;
    background: transparent;
    outline: none;
}
.ord-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ord-card {
    display: block;
    padding: 16px 18px;
    background: #fff;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    border-left: 3px solid #e5e7eb;
}
.ord-card:hover { background: #fafafa; border-left-color: #e67800; }
.ord-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ord-card-num { color: #1a1a2e; font-size: 1.05rem; }
.ord-card-name { margin-top: 4px; font-size: 15px; font-weight: 600; color: #1a1a2e; }
.ord-card-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 13px;
    color: #6b7280;
}
.ord-empty {
    text-align: center;
    padding: 48px 16px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}

@media (max-width: 860px) {
    .ord-start-grid { grid-template-columns: 1fr; }
}
.gp-field-full { grid-column: 1 / -1; }
.pay-term-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.pay-term-row select { min-width: 220px; flex: 1; }

/* Testata ordine: campi a sinistra, larghezza ≈ contenuto */
.ord-testata {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: flex-end;
}
.ord-testata .gp-field {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: 100%;
}
.ord-testata .ot-num input { width: 8.6rem; }
.ord-testata .ot-sito input { width: 7.6rem; }
.ord-testata .ot-po input { width: 7.6rem; }
.ord-testata .ot-stato input { width: 5.4rem; }
.ord-testata .ot-metodo input { width: 4.4rem; font-weight: 700; letter-spacing: 0.02em; }
.ord-testata .ot-pay {
    width: 13.5rem;
    max-width: 100%;
}
.ord-testata .ot-pay select { width: 100%; min-width: 0; }
.ord-testata .ot-ogg,
.ord-testata .ot-subj,
.ord-testata .ot-note,
.ord-testata .ot-docq {
    flex: 1 1 100%;
    width: 100%;
}
.ord-testata .ot-jobstato {
    flex: 0 0 11rem;
    width: 11rem;
    max-width: 100%;
}
.ord-testata .ot-jobstato select { width: 100%; }
.ord-testata .ot-ogg textarea,
.ord-testata .ot-subj textarea,
.ord-testata .ot-note textarea {
    width: 100%;
    min-height: 2.8em;
    height: auto;
    resize: vertical;
}
.gp-page--ord .ord-testata .ot-ogg textarea,
.gp-page--ord .ord-testata .ot-subj textarea {
    min-height: 2.8em;
    height: auto;
}
.gp-page--ord .dsec {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 10px 0 12px;
    overflow: hidden;
}
.gp-page--ord .dsec[hidden] { display: none !important; }
.gp-page--ord .dsec-h {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    letter-spacing: 0.02em;
}
.gp-page--ord .dsec-b { padding: 10px 12px; background: #fff; }
.gp-page--ord .dfield {
    display: flex;
    flex-wrap: wrap;
    padding: 6px 0;
    font-size: 13px;
    align-items: center;
    gap: 6px 8px;
}
.gp-page--ord .dfield .dlab {
    min-width: 110px;
    color: #4a4a6a;
    font-weight: 600;
    font-size: 12px;
}
.gp-page--ord .dfield .dval {
    color: #1a1a2e;
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.gp-page--ord .dbtn {
    display: inline-block;
    padding: 3px 9px;
    border: 0;
    border-radius: 5px;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
}
.gp-awb-val .gp-awb-chip,
.gp-page--ord .gp-awb-val .gp-awb-chip,
.gp-page--ord .f-ship-status {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    margin: 0;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    vertical-align: middle;
    flex: 0 0 auto;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.gp-doc-trash {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #dc2626;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
}
.gp-doc-trash:hover { background: #fee2e2; }
.gp-docq-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}
.gp-docq-lab {
    min-width: 7.5rem;
    color: #4a4a6a;
    font-weight: 600;
    font-size: 12px;
}
.gp-docq-val,
.gp-docq-val--awb,
.gp-awb-val {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #1a1a2e;
}
.gp-awb-corr {
    flex: 0 0 auto;
    font-weight: 700;
    color: #1a1a2e;
}
.gp-awb-copy {
    flex: 0 0 auto;
    border-radius: 5px;
    background: #1a6b9a;
    color: #fff;
}
.gp-awb-val .dbtn.gp-awb-chip {
    border-radius: 5px;
}
.gp-awb-val .f-ship-status {
    border-radius: 999px;
}
.gp-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    border: 0;
    cursor: pointer;
}
.gp-pill-fic { background: #16a085; }
.gp-docq-num { font-weight: 800; color: #0f766e; text-decoration: underline; }
.f-ship-status { min-height: 28px; }
.gp-pill-ddt { background: #8e44ad; }
.gp-pill-trk { background: #e67e22; }
.gp-pill-usc { background: #1a6b9a; }
.ord-testata .gp-field label {
    font-size: 11px;
    margin-bottom: 2px;
}
.ord-testata .gp-field input,
.ord-testata .gp-field select,
.ord-testata .gp-field textarea {
    width: auto;
    padding: 7px 8px;
    font-size: 13px;
    border-radius: 8px;
}
.ord-testata .ot-ogg textarea,
.ord-testata .ot-subj textarea,
.ord-testata .ot-note textarea,
.ord-testata .ot-pay select,
.ord-testata .ot-jobstato select { width: 100%; }
.gp-page--ord .ord-testata .ot-ogg textarea,
.gp-page--ord .ord-testata .ot-subj textarea {
    min-height: 2.8em;
    height: auto;
}
.ord-testata .pay-term-row {
    flex-wrap: nowrap;
    gap: 6px;
}
.ord-testata .pay-term-row select {
    min-width: 0;
    flex: 1;
}
.ord-testata-plus {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
}
.ord-save {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0;
}
.ord-save .gp-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 5.6rem;
}
@media (max-width: 920px) {
    .ord-testata .gp-field { width: auto; }
}

.cli-panel {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}
.cli-panel--testata {
    margin-top: 0;
    margin-bottom: 16px;
}
.cli-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: flex-start;
}
.cli-change {
    margin-top: 12px;
}
.cli-ship-flag {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    cursor: pointer;
}
.cli-sped-nome {
    margin: 8px 0 10px;
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 3px solid #c5cad3;
    background: #f7f8fa;
}
.cli-sped-nome.is-on {
    border-left-color: #1976d2;
    background: #e3f2fd;
}
.cli-sped-nome-lbl {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: #4a4a6a;
}
.cli-sped-nome.is-on .cli-sped-nome-lbl { color: #1565c0; }
.cli-sped-nome-lbl input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 1px 0 0;
    flex: 0 0 auto;
}
.cli-sped-nome-hint {
    font-size: 11px;
    font-weight: 400;
    color: #4a4a6a;
    margin: 4px 0 0 26px;
    line-height: 1.45;
}
.cli-sped-nome-on {
    font-size: 12px;
    font-weight: 700;
    color: #1565c0;
    margin: 6px 0 0 26px;
}
.od-ship-grid.is-edit input,
.od-ship-grid.is-edit textarea,
.od-ship-grid input:not(:disabled),
.od-ship-grid textarea:not(:disabled) {
    background: #fff;
}
.ord-dlg-actions--wide {
    flex-wrap: wrap;
    justify-content: flex-end;
}
.gp-uscita-addr {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #1a1a2e;
    white-space: pre-wrap;
}
.cli-ship-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.cli-ship-row select {
    width: auto;
    flex: 1;
    min-width: 0;
}
.cli-ship-row .gp-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}
.cli-addr p.cli-empty {
    color: #6b7280;
    font-style: italic;
}
.cli-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.cli-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a1a2e;
}
.cli-ids, .cli-meta {
    margin: 4px 0 0;
    font-size: 13px;
    color: #4b5563;
    white-space: pre-wrap;
}
.cli-addr-grid {
    display: grid;
    grid-template-columns: minmax(17rem, 0.95fr) minmax(18rem, 1.15fr);
    gap: 12px;
    margin-top: 14px;
    align-items: start;
}
.cli-addr {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
}
.cli-addr--bill #cli-bill {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
}
.cli-addr h3 {
    margin: 0 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}
.cli-addr p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    color: #1a1a2e;
}
.cli-addr select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font: inherit;
    background: #fff;
}
.ord-mod-wrap { position: relative; }
.ord-mod-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 240px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    padding: 6px;
    z-index: 20;
}
.ord-mod-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    color: #1a1a2e;
    cursor: pointer;
}
.ord-mod-menu button:hover { background: #f3f4f6; }
.gp-card--po { padding-top: 16px; padding-bottom: 16px; }

.ord-dlg {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 560px;
    width: calc(100% - 24px);
}
.ord-dlg::backdrop { background: rgba(15, 23, 42, 0.35); }
.ord-dlg-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}
.ord-dlg-card h2 { margin: 0 0 6px; color: #1a1a2e; }
.ord-dlg-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin-top: 12px;
}
.ord-dlg-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

@media (max-width: 720px) {
    .cli-addr-grid,
    .ord-dlg-fields { grid-template-columns: 1fr; }
}

.od-page {
    max-width: 1080px;
    margin: 0 auto;
    background: #f0f2f5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
body:has(.od-page) { background: #e8eaed; }
.od-head {
    background: #fff;
    padding: 12px 16px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.od-head-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.od-num { font-size: 18px; font-weight: 800; color: #8e44ad; }
.od-badge {
    background: #8e44ad;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}
.od-cust { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.od-meta { width: 100%; flex-basis: 100%; font-size: 12px; color: #4a4a6a; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.od-wc-chip {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    background: #e8eef5;
    color: #1a5276;
}
.od-wc-chip.is-ok { background: #dcfce7; color: #166534; }
.od-wc-chip.is-err { background: #fee2e2; color: #991b1b; }
.od-wc-chip.is-off { background: #f3f4f6; color: #6b7280; }
.od-wc-foot { margin-left: 12px; }
.od-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.od-btn {
    display: inline-flex;
    align-items: center;
    border: 0;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
}
.od-btn-ghost { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.od-sec { margin: 12px 16px; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #e0e0e0; }
.od-sec-h { color: #fff; font-size: 13px; font-weight: 800; padding: 8px 12px; }
.od-sec-b { padding: 12px; }
.od-grid { display: grid; gap: 8px 12px; }
.od-grid-4 { grid-template-columns: repeat(4, 1fr); }
.od-grid-5 { grid-template-columns: repeat(5, 1fr); margin-top: 10px; }
.od-grid .od-field-half { max-width: 50%; }
.od-grid .od-field-date { max-width: 50%; min-width: 9.5rem; }
.od-grid label, .od-ta, .od-campi label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
    color: #4a4a6a;
}
.od-grid input, .od-grid select, .od-ta textarea, .od-ta select,
.od-campi input, .od-campi select {
    font: inherit;
    font-weight: 500;
    font-size: 13px;
    color: #1a1a2e;
    padding: 6px 8px;
    border: 1px solid #c5cad3;
    border-radius: 6px;
    background: #fff;
}
.od-grid input:disabled { background: #e8ecf1; }
.od-campi {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: flex-end;
}
.od-campi .od-po-ref { width: auto; flex: 0 0 auto; }
.od-campi .od-f-job { flex: 0 0 auto; }
.od-campi .od-f-job input { width: calc(36ch + 1.6rem); max-width: 100%; }
.od-campi .od-f-art { flex: 1 1 14rem; min-width: min(100%, 10rem); }
.od-campi .od-f-art input { width: 100%; }
.od-campi .od-f-qty { flex: 0 0 auto; }
.od-campi .od-f-qty input { width: 5.6rem; max-width: 100%; }
.od-campi .od-f-forn { flex: 0 0 auto; }
.od-campi .od-f-forn select { width: auto; min-width: 8.5rem; max-width: 100%; }
.od-campi .od-f-date { flex: 0 0 auto; }
.od-campi .od-f-half { flex: 0 0 auto; }
.od-campi .od-f-half input, .od-campi .od-f-half select {
    width: auto;
    min-width: 7.2rem;
    max-width: 12rem;
}
.od-flag {
    justify-content: flex-end;
    color: #27ae60;
    font-weight: 700;
    min-height: 48px;
}
.od-flag input, .od-flags input { width: 18px; height: 18px; accent-color: #27ae60; }
.od-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 10px;
    padding: 8px 10px;
    background: #f7faf8;
    border-radius: 6px;
    border: 1px solid #e0ebe4;
}
.od-flags label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #27ae60;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.od-ta { margin-top: 10px; width: 100%; }
.od-ta textarea { min-height: 60px; resize: vertical; width: 100%; }
.od-ta-notes textarea { min-height: 110px; }
.od-ta-hint { font-weight: 500; color: #6b7280; font-size: 11px; }
.od-field-row { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.od-lab { min-width: 120px; color: #4a4a6a; font-weight: 700; font-size: 12px; }
.od-val { color: #1a1a2e; }
.od-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.od-tbl th, .od-tbl td { padding: 6px 8px; border-bottom: 1px solid #e8ecf1; text-align: left; }
.od-tbl th { color: #4a4a6a; font-size: 11px; }
.od-tbl .num { text-align: right; }
.od-tbl .muted, .od-sec-b .muted { color: #999; }
.od-tbl-lines {
    table-layout: fixed;
    width: 100%;
}
.od-tbl-lines col.od-col-n { width: 3.2em; }
.od-tbl-lines col.od-col-codice { width: 6.8em; }
.od-tbl-lines col.od-col-desc { width: auto; }
.od-tbl-lines col.od-col-qty { width: 4.4em; }
.od-tbl-lines col.od-col-prezzo,
.od-tbl-lines col.od-col-usc,
.od-tbl-lines col.od-col-tot { width: calc(8ch + 1.2rem); }
.od-tbl-lines col.od-col-sconto { width: calc(4ch + 1.2rem); }
.od-tbl-lines col.od-col-iva { width: 3.4em; }
.od-tbl-lines col.od-col-act { width: 2.6em; }
.od-tbl-lines th {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.od-tbl-lines th.num,
.od-tbl-lines td.od-col-qty,
.od-tbl-lines td.od-col-prezzo,
.od-tbl-lines td.od-col-sconto,
.od-tbl-lines td.od-col-usc,
.od-tbl-lines td.od-col-iva,
.od-tbl-lines td.od-col-tot,
.od-tbl-lines td.od-col-n,
.od-tbl-lines td.od-col-act {
    padding-left: 3px;
    padding-right: 3px;
}
.od-tbl-lines input, .od-tbl-lines textarea, .od-tbl-lines button.od-mini {
    font: inherit;
    font-size: 12px;
    box-sizing: border-box;
}
.od-tbl-lines input:not(.od-mini) {
    width: 100%;
    max-width: 100%;
    padding: 4px 4px;
    border: 1px solid #c5cad3;
    border-radius: 4px;
    background: #fff;
}
.od-tbl-lines input.num { text-align: right; }
.od-tbl-lines input:disabled { background: #e8ecf1; color: #4a4a6a; }
.od-tbl-lines tr.item-main-row td,
.od-tbl-lines tr.itemDescRow td {
    vertical-align: middle;
}
.od-tbl-lines td.od-col-act { text-align: center; vertical-align: middle; }
.od-tbl-lines .f-del,
.od-tbl-lines .f-copy {
    padding: 4px 6px;
    min-width: 0;
    width: 100%;
    justify-content: center;
    display: inline-flex;
    margin-top: 0;
}
.od-num-cell .f-cat {
    display: flex;
    margin-top: 3px;
    width: 100%;
    min-width: 0;
    padding: 2px 0;
}
.od-tbl-lines .od-num-cell {
    text-align: center;
    vertical-align: middle;
}
.od-tbl-lines .itemRowNum { display: block; font-size: 11px; font-weight: 700; color: #4a4a6a; margin-bottom: 2px; }
.od-mini {
    display: block;
    width: 100%;
    border: 0;
    background: #5d6d7e;
    color: #fff;
    font-size: 10px;
    line-height: 14px;
    padding: 0;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 1px;
}
.od-mini:disabled { opacity: 0.35; cursor: default; }
.od-desc-extra {
    flex: 0 1 40em;
    width: auto;
    min-width: min(30em, 100%);
    max-width: 60em;
    min-height: 42px;
    resize: vertical;
    font: inherit;
    font-size: 12px;
    font-style: italic;
    color: #1a1a2e;
    background: #fff;
    border: 1px solid #c5cad3;
    border-radius: 4px;
    padding: 6px 8px;
    line-height: 1.35;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.od-aq-row .od-job-lbl {
    display: flex;
    flex: 0 0 auto;
}
.od-aq-row .od-job-lbl input.f-job-n,
.od-aq-row input.f-job-n {
    width: calc(12ch + 1.2rem) !important;
    max-width: calc(12ch + 1.2rem);
    text-align: left;
}
.od-page.is-multijob .od-desc-extra {
    flex: 0 1 40em;
    min-width: min(30em, 100%);
    max-width: 60em;
}
.od-page.is-multijob #job_n {
    max-width: 100%;
}
.od-aq-row,
.od-aq-pair {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: flex-start;
    width: 100%;
}
.od-aq-row label,
.od-aq-pair label {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #4a4a6a;
    white-space: nowrap;
}
.od-aq-row input,
.od-aq-pair input { width: 72px !important; }
.od-aq-row input.is-off,
.od-aq-row input:disabled,
.od-aq-pair input.is-off,
.od-aq-pair input:disabled {
    background: #e8ecf1 !important;
    color: #9ca3af;
}
.od-tot-cell {
    text-align: right;
    vertical-align: middle;
}
.od-tot-cell .f-tot { display: block; width: 100%; margin: 0; }
.od-cat-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #c5cad3;
    background: #f4f6f9;
    color: #1a5276;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
.od-cost-lbl {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #4a4a6a;
    white-space: nowrap;
}
.od-cost-lbl input {
    width: 72px;
    text-align: right;
    padding: 4px 6px;
    border: 1px solid #c5cad3;
    border-radius: 4px;
}
.od-sum-group { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; font-size: 13px; font-weight: 700; }
.od-lines-foot { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.od-fa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.od-fa-h { font-weight: 700; color: #2980b9; margin-bottom: 6px; }
.od-dfield { display: flex; gap: 8px; font-size: 13px; margin: 4px 0; }
.od-dlab { color: #4a4a6a; min-width: 9em; }
.od-dval { color: #1a1a2e; }
@media (max-width: 900px) {
    .od-fa-grid { grid-template-columns: 1fr; }
}
.od-addr { white-space: pre-wrap; margin: 8px 0 0; font-size: 13px; color: #1a1a2e; line-height: 1.4; }
.od-hint { font-size: 12px; color: #6b7280; margin: 0 0 8px; }
.od-ship-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin: 10px 0;
}
.od-ship-grid label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
    color: #4a4a6a;
}
.od-ship-grid .od-span-2 { grid-column: 1 / -1; }
.od-ship-grid input,
.od-ship-grid textarea {
    font: inherit;
    font-weight: 500;
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid #c5cad3;
    border-radius: 6px;
    background: #f4f6f9;
    color: #1a1a2e;
}
.od-ship-grid textarea {
    min-height: 52px;
    resize: vertical;
}
.od-docs-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.od-docs-list { font-size: 12px; }
.od-doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 6px;
    padding: 7px 10px;
    margin-bottom: 4px;
}
.od-doc-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; color: #1a1a2e; }
.od-doc-date { display: block; font-size: 11px; color: #6b7280; font-weight: 400; margin-top: 2px; }
.od-doc-actions { display: inline-flex; gap: 4px; flex: none; flex-wrap: wrap; align-items: center; }
.od-doc-btn { padding: 4px 10px !important; font-size: 11px !important; }
.od-sped-tog {
    min-width: 40px;
    min-height: 28px;
    padding: 0 8px !important;
    font-weight: 800;
    letter-spacing: .02em;
    flex: 0 0 auto;
}
@media (max-width: 900px), (pointer: coarse) {
    .od-sped-tog { min-width: 44px; min-height: 40px; }
}
.od-sped-tog.is-on { background: #059669 !important; color: #fff; }
.od-sped-tog.is-off { background: #6b7280 !important; color: #fff; }
.od-sped-tog.is-user-off { background: #ea580c !important; color: #fff; }
.od-doc-row--mail { flex-direction: column; align-items: stretch; }
.od-doc-mail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.od-mail-atts { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.od-mail-att { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.od-mail-att-name { font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #1a1a2e; }
.od-foot {
    background: #fff;
    border-top: 2px solid #e0e0e0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #4a4a6a;
}
.od-storico-end {
    display: flex;
    justify-content: flex-end;
    padding: 10px 16px 0;
}
.od-storico-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}
.gp-uscita-tbl .usc-qty {
    width: 4.8em;
    max-width: 6rem;
    text-align: right;
}
.gp-uscita-tbl .usc-del {
    min-height: 40px;
    padding: 0 10px;
    flex: 0 0 auto;
}
@media (max-width: 900px) {
    .od-grid-4, .od-grid-5 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .od-grid-4, .od-grid-5 { grid-template-columns: 1fr; }
}

.gp-page--docs { max-width: 1100px; }
.gp-doc-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    margin: 0 0 16px;
    background: #1a1a2e;
    border-radius: 10px;
}
.gp-doc-tab {
    flex: 1 1 9rem;
    text-align: center;
    padding: 14px 10px;
    border-radius: 10px;
    background: #888;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}
.gp-doc-tab:hover { color: #fff; filter: brightness(1.08); }
.gp-doc-tab.is-active {
    background: #7c3aed;
    box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.7);
}
.gp-doc-help {
    max-width: none;
    background: #fff8dc;
    border-color: #f0e0a0;
    margin-bottom: 16px;
}
.gp-doc-tot { margin: 0 0 12px; color: #4b5563; font-size: 14px; }
.gp-doc-note { margin: 0 0 12px; color: #92400e; font-size: 13px; }
.gp-card--hub { max-width: 48rem; width: 100%; }

.pt-nav-user {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    white-space: nowrap;
}
.gp-unlock-panel {
    margin: 28px auto 0;
    max-width: 720px;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 18px 20px;
}
.gp-unlock-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.gp-unlock-head h2 { margin: 0; font-size: 14px; color: #374151; }
.gp-unlock-head span { font-size: 12px; color: #9ca3af; }
.gp-unlock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    margin-bottom: 8px;
}
.gp-unlock-name { font-size: 13px; font-weight: 700; color: #374151; }
.gp-unlock-meta { font-size: 11px; color: #92400e; }
.gp-unlock-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gp-unlock-pass {
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    min-width: 160px;
    background: #fff;
}
#login-unlock-msg { font-size: 12px; margin: 8px 0 0; }
