/* Automazioni (tab "Automazioni" della scheda azienda del backoffice Partner).
   Solo classi auto-* e automation-*: nessuno stile globale. Componenti, colori e raggi sono quelli del sito. */

.automations-surface { --auto-slate: var(--slate, #475569); --auto-danger-ink: var(--danger-ink, #991b1b); --auto-warn-ink: var(--warning-ink, #b45309); }

/* ===== riquadri (stati vuoto, caricamento, errore e pannelli dello storico) ===== */
.auto-frame { margin: 0 24px 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.auto-skeleton { width: 100%; border-collapse: separate; border-spacing: 0; }
.auto-skeleton th { padding: 10px 14px; text-align: left; font-size: 13px; font-weight: 700; color: var(--auto-slate); background: var(--surface-soft); border-bottom: 1px solid var(--border); white-space: nowrap; }
.auto-skeleton td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.auto-skeleton tr:last-child td { border-bottom: 0; }
.auto-sk { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border) 50%, var(--bg-soft) 75%) 0 0 / 200% 100%; animation: auto-shimmer 1.4s linear infinite; }
.auto-skeleton-wrap { display: grid; gap: 14px; padding: 16px; }
.auto-sk-row { height: 34px; }
@keyframes auto-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .auto-sk { animation: none; } }

.auto-ghosts { display: grid; gap: 0; }
.auto-ghost { display: flex; align-items: center; gap: 14px; height: 58px; margin: 8px 12px; padding: 0 16px; border: 2px dashed var(--border-strong); border-radius: 12px; opacity: .55; }
.auto-ghost i { display: block; height: 10px; border-radius: 5px; background: var(--border); }
.btn.auto-ghost-cta, .auto-ghost-cta { width: calc(100% - 24px); height: 58px; margin: 8px 12px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 2px dashed var(--primary); border-radius: 12px; background: var(--primary-tint-1); color: var(--primary-strong); font-weight: 800; font-size: 15px; }
.auto-ghost-cta:hover { background: var(--primary-soft); }

.auto-errstrip { display: flex; align-items: center; gap: 12px; margin: 12px; padding: 12px 16px; border: 2px solid var(--danger); border-radius: 12px; background: var(--danger-soft); color: var(--auto-danger-ink); font-weight: 800; }
.auto-errstrip > :last-child { margin-left: auto; }

.auto-banner { display: flex; align-items: center; gap: 10px; margin: 0 24px 12px; padding: 9px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; background: var(--success-soft); color: var(--success-ink, #047857); }
.auto-banner.is-bad { background: var(--danger-soft); color: var(--auto-danger-ink); }
/* Avviso (es. corsa saltata): non e' un errore, tono ambra come lo stato Saltata. */
.auto-banner.is-warn { background: var(--warning-soft); color: var(--auto-warn-ink); border: 1px solid #fde68a; }
.auto-banner > :last-child:not(:first-child):not(span) { margin-left: auto; }

/* ===== elenco ===== */
.automations-table .auto-two { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.automations-table .auto-off { color: var(--muted); }
.automations-table .auto-run { color: var(--success); border-color: #a7f3d0; background: var(--success-soft); }
.automations-table .auto-run:hover { border-color: var(--success); background: #d1fae5; color: var(--success); }

.auto-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.auto-pill.is-ok { background: var(--success); color: #fff; }
.auto-pill.is-err { background: var(--danger); color: #fff; }
.auto-pill.is-skip, .automations-table .auto-pill.is-skip { background: var(--warning-soft); color: var(--auto-warn-ink, #b45309); border: 1px solid #fde68a; }
.auto-pill.is-run { background: var(--primary); color: #fff; }
.auto-pill.is-man { background: var(--primary-soft); color: var(--primary-ink); }
.auto-pill.is-plan { background: var(--bg-soft); color: var(--auto-slate); }

/* ===== storico ===== */
.auto-hbar { display: flex; align-items: center; gap: 12px; padding: 22px 24px 14px; flex-wrap: wrap; }
.auto-hbar h2 { margin: 0; font-size: 20px; font-weight: 800; }
.auto-when { color: var(--auto-slate); font-weight: 600; }
.auto-hpush { margin-left: auto; display: flex; align-items: flex-end; gap: 10px; }
.auto-hpush .auto-day-field input { width: 150px; }
.auto-rerun-error { flex-basis: 100%; text-align: right; }
.auto-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; margin: 0 24px 24px; }
.auto-split .auto-frame { margin: 0; }
.auto-dhead { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.auto-dhead b { margin-right: auto; font-size: 14px; font-weight: 800; white-space: nowrap; }
.auto-chip { height: 28px; padding: 0 9px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.auto-dhead [aria-pressed="true"] { background: var(--primary-ink); border-color: var(--primary-ink); color: #fff; }
.automations-table .auto-row-selected td { background: var(--primary-soft); }
.automations-table .auto-rec { display: flex; flex-direction: column; gap: 2px; }
.auto-esito-ok { color: var(--success); font-weight: 700; }
.auto-esito-skip { color: var(--auto-warn-ink); font-weight: 700; }
.auto-esito-err { color: var(--auto-danger-ink); font-weight: 700; }

/* ===== maschera crea/modifica ===== */
.automation-overlay-top { z-index: 1210; }
.automation-dialog { width: min(94vw, 1120px); max-height: 94vh; }
/* Modal "In uso da N automazioni": tre colonne brevi, non serve la larghezza della maschera dell'automazione. */
.automation-dialog.auto-usage-dialog { width: min(94vw, 820px); }
.auto-usage-sk { display: flex; flex-direction: column; gap: 10px; }
.auto-usage-none { justify-content: center; opacity: 1; border-color: var(--border-strong); color: var(--auto-slate, #475569); font-size: 14px; font-weight: 700; }
/* Il badge "In uso da N" e' un pulsante: stessa pill di .auto-pill.is-man, con hover e fuoco da tastiera (DevExpress azzera sfondo, bordo e anello). */
body.nh-v2 .btn.auto-pill-btn { min-height: 0; height: 24px; padding: 0 10px; border: 0; border-radius: 999px; font-family: inherit; text-transform: none; cursor: pointer; }
body.nh-v2 .btn.auto-pill-btn::first-letter { text-transform: none; }
body.nh-v2 .btn.auto-pill-btn.is-man { background: var(--primary-soft); color: var(--primary-ink); }
body.nh-v2 .btn.auto-pill-btn.is-man:hover { background: color-mix(in srgb, var(--primary) 18%, var(--primary-soft)); }
body.nh-v2 .btn.auto-pill-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.auto-usage-sk:focus { outline: none; }
/* Contrasto forzato: lo sfondo sparisce, il bordo fa riconoscere il chip come pulsante. */
@media (forced-colors: active) {
    body.nh-v2 .btn.auto-pill-btn { border: 1px solid ButtonText; }
}
.auto-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0 32px; padding: 4px 0 0; }
.auto-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.auto-col > h3 { margin: 0; padding-bottom: 6px; border-bottom: 2px solid var(--primary-soft); font-size: 15px; font-weight: 800; color: var(--primary-ink); }
.auto-pgroup { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-soft); }
.auto-bare { margin: 0; }
.auto-field-error { display: block; margin-top: 4px; color: var(--auto-danger-ink); font-size: 13px; font-weight: 600; }
.automation-dialog [aria-invalid="true"], .automation-dialog [aria-invalid="true"] input { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.auto-interval .auto-suffix { display: flex; align-items: center; gap: 8px; color: var(--auto-slate); }
.auto-interval .auto-suffix input { width: 90px; }
.auto-time { width: 150px; }
.auto-fgroup { display: flex; flex-direction: column; gap: 6px; }
.auto-flabel { font-size: 13px; font-weight: 700; color: var(--auto-slate); }
.auto-days { display: flex; gap: 6px; }
.auto-mgrid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; }
.auto-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.auto-dayb { min-width: 52px; height: 36px; padding: 0 8px; font-weight: 800; }
.auto-mgrid .auto-dayb { min-width: 0; height: 32px; padding: 0; font-size: 13px; }
.auto-dayb-wide { min-width: 0; }
.auto-dayb[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.auto-sum { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-ink); font-size: 15px; font-weight: 800; }
.automation-dock .auto-active { margin-right: auto; order: -1; }
.automation-dock { align-items: center; }
.auto-dock-msg { color: var(--auto-danger-ink); font-weight: 700; }

@media (max-height: 800px) {
  .auto-cols { gap: 0 24px; }
  .auto-col { gap: 10px; }
}

/* Nome = link come nel prototipo (blu, grassetto); il resto della tabella resta quello del sito. */
.automations-table .table-name-link { color: var(--primary-strong); font-weight: 700; font-size: 14.5px; cursor: pointer; white-space: normal; }
.automations-table .table-name-link:hover, .automations-table .table-name-link:focus-visible { color: var(--primary-ink); }

/* Etichette della maschera come nel prototipo: normali, 13px, grassetto, colore ardesia. */
.automation-dialog .field label, .automation-dialog label.field, .automation-dialog .auto-flabel { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--auto-slate, #475569); }

/* Celle che vanno a capo (come nel prototipo) invece di tagliare con i puntini. */
.automations-table td { white-space: normal; overflow: visible; text-overflow: clip; }
.automations-table td.actions-col, .automations-table td:has(.auto-switch) { white-space: nowrap; }
/* Senza scroll orizzontale la tabella comprime le colonne in proporzione e la colonna azioni puo' restare piu' stretta dei pulsanti:
   invece di uscire dalla cella (nowrap di .expense-header-table) vanno a capo come nella .row-actions base del sito. */
.data-table.automations-table .row-actions { flex-wrap: wrap; row-gap: 4px; }
/* Interruttore "Attiva" senza testo: gap di .switch-line (8px) e spazio dell'etichetta DevExpress (8px) lo portavano a 56px,
   piu' della cella compressa (~46px a 1280 nell'area stretta) e, con overflow visibile, facevano scorrere la tabella. */
.automations-table .auto-switch { gap: 0; }
.automations-table .auto-switch > label { display: none; }

/* Interruttore come nel prototipo (40x24, pallino bianco). Il sito disegna ogni DxCheckBox come casella: qui solo per questa pagina,
   con specificita' maggiore delle regole globali (che hanno !important). */
body.nh-v2 :is(.automations-surface, .automation-dialog) .auto-switch.dxbl-checkbox:not(.dxbl-checkbox-radio) .dxbl-checkbox-check-element { width: 40px !important; min-width: 40px !important; height: 24px !important; border: 0 !important; border-radius: 999px !important; background: var(--border-strong) !important; transition: background .2s !important; }
body.nh-v2 :is(.automations-surface, .automation-dialog) .auto-switch.dxbl-checkbox:not(.dxbl-checkbox-radio) .dxbl-checkbox-check-element::before { content: "" !important; inset: 3px auto auto 3px !important; width: 18px !important; height: 18px !important; border-radius: 50% !important; background: #fff !important; box-shadow: 0 1px 3px rgba(15, 23, 42, .3) !important; transform: none !important; transition: transform .2s var(--ease, cubic-bezier(.16, 1, .3, 1)) !important; }
body.nh-v2 :is(.automations-surface, .automation-dialog) .auto-switch.dxbl-checkbox:not(.dxbl-checkbox-radio) .dxbl-checkbox-check-element::after { display: none !important; }
body.nh-v2 :is(.automations-surface, .automation-dialog) .auto-switch.dxbl-checkbox:not(.dxbl-checkbox-radio).dxbl-checkbox-checked .dxbl-checkbox-check-element { background: var(--primary) !important; }
body.nh-v2 :is(.automations-surface, .automation-dialog) .auto-switch.dxbl-checkbox:not(.dxbl-checkbox-radio).dxbl-checkbox-checked .dxbl-checkbox-check-element::before { transform: translateX(16px) !important; }
body.nh-v2 :is(.automations-surface, .automation-dialog) .auto-switch.dxbl-checkbox:not(.dxbl-checkbox-radio):has(input:disabled) .dxbl-checkbox-check-element { opacity: .55; }
@media (prefers-reduced-motion: reduce) { body.nh-v2 :is(.automations-surface, .automation-dialog) .auto-switch.dxbl-checkbox:not(.dxbl-checkbox-radio) .dxbl-checkbox-check-element, body.nh-v2 :is(.automations-surface, .automation-dialog) .auto-switch.dxbl-checkbox:not(.dxbl-checkbox-radio) .dxbl-checkbox-check-element::before { transition: none !important; } }

/* Maschera come nel prototipo (le conferme restano quelle standard del sito): testata a gradiente, pulsante di chiusura tondo, barra azioni su fondo chiaro. */
body.nh-v2 .editor-dialog.automation-dialog { border: 0; border-radius: 18px; overflow: hidden; }
body.nh-v2 .automation-overlay:not(.automation-overlay-top) .editor-dialog .surface-head { padding: 16px 24px; border-bottom: 0; background: linear-gradient(135deg, var(--primary-ink) 0%, var(--primary) 70%, var(--primary-hero-end) 100%); color: #fff; }
body.nh-v2 .automation-overlay:not(.automation-overlay-top) .editor-dialog .surface-head h2 { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 0; }
body.nh-v2 .automation-overlay:not(.automation-overlay-top) .editor-dialog .modal-shell-close-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; }
body.nh-v2 .automation-overlay:not(.automation-overlay-top) .editor-dialog .modal-shell-close-button:hover { background: rgba(255, 255, 255, .32); }
.automation-dialog .editor-body { padding: 20px 24px 0; }
.automation-dock { margin: 12px -24px 0; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-soft); }
.automation-dock .modal-form-main-actions { display: flex; width: 100%; align-items: center; gap: 10px; }
.automation-dock .auto-active { order: -1; margin-right: auto; }
@media (max-height: 800px) {
  body.nh-v2 .automation-overlay:not(.automation-overlay-top) .editor-dialog .surface-head { padding: 10px 24px; }
  .automation-dialog .editor-body { padding: 14px 24px 0; }
  .automation-dock { margin-top: 8px; padding: 10px 24px; }
}

/* Campi della maschera: etichette e misure del prototipo (le etichette dei campi di testo sono uno span dentro label.field). */
body.nh-v2 .automation-dialog label.field > span:first-child, body.nh-v2 .automation-dialog .field > label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--auto-slate, #475569); }
body.nh-v2 .automation-dialog label.field .required-mark { color: inherit; }
body.nh-v2 .automation-dialog input.form-control, body.nh-v2 .automation-dialog input[type="time"], body.nh-v2 .automation-dialog input[type="datetime-local"], body.nh-v2 .automation-dialog input[type="number"] { min-height: 34px; height: 34px; border: 1px solid var(--muted); border-radius: var(--radius, 8px); background: #fff; font-size: 14px; }
body.nh-v2 .automation-dialog dxbl-combo-box { min-height: 34px; }
body.nh-v2 .automation-dialog dxbl-combo-box:has(input:disabled) { border: 1px solid var(--border-strong); background: var(--surface-soft); }
body.nh-v2 .automation-overlay:not(.automation-overlay-top) .editor-dialog .modal-shell-close-button { width: 34px; height: 34px; font-size: 22px; line-height: 1; }

/* Rifiniture dopo il confronto con il prototipo. */
body.nh-v2 .automation-dialog .field > label { font-weight: 700 !important; color: var(--auto-slate, #475569) !important; font-size: 13px; }
body.nh-v2 .automation-overlay:not(.automation-overlay-top) .editor-dialog .modal-shell-close-button, body.nh-v2 .automation-overlay:not(.automation-overlay-top) .editor-dialog .modal-shell-close-button span { color: #fff !important; }
.auto-dayb[aria-pressed="true"], .auto-dayb[aria-pressed="true"]:is(:hover, :focus, :active, :focus-visible) { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
.auto-sum svg { width: 18px; height: 18px; flex: none; }
.auto-banner svg, .auto-errstrip svg { width: 18px; height: 18px; flex: none; }
body.nh-v2 .automation-dialog dxbl-combo-box:is([disabled], .dxbl-disabled) { border: 1px solid var(--border-strong); background: var(--surface-soft); }

/* Storico: date su una riga, riga scelta evidenziata, pannelli alti quanto la finestra con scorrimento nella tabella. */
.automations-runs .table-name-link { white-space: nowrap; }
.automations-table tr.auto-row-selected > td { background: var(--primary-soft) !important; }
.auto-split .table-responsive { max-height: calc(100dvh - 400px); overflow: auto; }
/* D2: l'errore dei giorni sposta il fuoco sul primo giorno senza cerchiare il gruppo (il messaggio sta sotto). */
.automation-dialog .auto-fgroup[aria-invalid="true"] { border-color: transparent; box-shadow: none; }
body.nh-v2 .auto-hpush label.field > span:first-child { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--auto-slate, #475569); }

/* Messaggi di errore dei campi: rossi e leggibili anche dentro .field (che li metterebbe in maiuscolo piccolo). */
body.nh-v2 .automation-dialog .auto-field-error, body.nh-v2 .automations-surface .auto-field-error { color: var(--auto-danger-ink, #991b1b) !important; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }
body.nh-v2 .automation-dialog .auto-dock-msg { color: var(--auto-danger-ink, #991b1b); font-size: 14px; font-weight: 700; margin-right: 12px; }

/* ===== Catalogo job (backoffice Partner): elenco e pagina del job a tutta larghezza ===== */
.auto-grow { flex: 1; }
.auto-pill.is-ro { background: var(--warning-soft); color: var(--warning-ink, #b45309); border: 1px solid #fde68a; }
.auto-job-table .auto-code { white-space: nowrap; font: 600 13px/1.4 Consolas, "Cascadia Mono", monospace; color: inherit; background: none; padding: 0; }
/* Torna al catalogo: la freccia condivisa non porta il tratto da sola. */
.auto-phead .btn .button-icon-svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auto-job-table .auto-off-row td { color: var(--auto-slate); }
.auto-filter { width: 200px; min-width: 0; }
.auto-filter-wide { width: 230px; }
body.nh-v2 .auto-filter > label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--auto-slate, #475569); }

.auto-phead { display: flex; align-items: center; gap: 12px; padding: 24px 24px 16px; }
.auto-jsec { padding: 20px 24px 24px; border-top: 1px solid var(--border); }
.auto-jsec > h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; color: var(--primary-ink); }
.auto-jgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 20px; align-items: start; }
.auto-c3 { grid-column: span 3; } .auto-c4 { grid-column: span 4; } .auto-c5 { grid-column: span 5; } .auto-c8 { grid-column: span 8; }
.auto-jgrid > * { min-width: 0; }
.auto-jgrid .auto-swline { align-self: end; display: flex; align-items: center; height: 34px; }
/* ".field span" di site.css (12px, maiuscolo) vince su una sola classe: serve la specificita' maggiore. */
.auto-job-page .field .auto-why { color: var(--auto-slate); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.auto-jsk { display: grid; gap: 22px; padding: 20px 24px 28px; border-top: 1px solid var(--border); }
.auto-sk-label { width: 90px; margin-bottom: 8px; }
.auto-job-page .auto-sk.auto-sk-row { height: 34px; border-radius: var(--radius, 8px); }

/* Campi della pagina: etichette, misure e sola lettura come nel prototipo. */
.auto-job-page .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body.nh-v2 .auto-job-page .field > label, body.nh-v2 .auto-job-page label.field > span:first-child, .auto-job-page .auto-flabel { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--auto-slate, #475569); }
body.nh-v2 .auto-job-page input.form-control, body.nh-v2 .auto-job-page input[type="number"], body.nh-v2 .auto-job-page input[type="date"] { min-height: 34px; height: 34px; border: 1px solid var(--muted); border-radius: var(--radius, 8px); background: #fff; font-size: 14px; }
body.nh-v2 .auto-job-page textarea.form-control { min-height: 64px; height: 64px; resize: none; line-height: 1.35; border: 1px solid var(--muted); border-radius: var(--radius, 8px); background: #fff; font-size: 14px; }
body.nh-v2 .auto-job-page :is(input.form-control, textarea.form-control):disabled { border-color: var(--border-strong); background: var(--surface-soft); color: var(--auto-slate); cursor: not-allowed; }
body.nh-v2 .auto-job-page dxbl-combo-box { min-height: 34px; }
body.nh-v2 .auto-job-page dxbl-combo-box:is([disabled], .dxbl-disabled, :has(input:disabled)) { border: 1px solid var(--border-strong); background: var(--surface-soft); }
.auto-job-page [aria-invalid="true"], .auto-job-page [aria-invalid="true"] input { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
body.nh-v2 .auto-job-page .auto-field-error { color: var(--auto-danger-ink, #991b1b) !important; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }

/* Esecutore a due scelte. */
.auto-fgroup { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.auto-opts { display: flex; gap: 6px; }
.auto-opts > * { flex: 1; }
.auto-opt { width: 100%; height: 34px; padding: 0 12px; font-weight: 700; font-size: 14px; }
.auto-opt[aria-checked="true"], .auto-opt[aria-checked="true"]:is(:hover, :focus, :active, :focus-visible) { background: var(--primary-ink) !important; border-color: var(--primary-ink) !important; color: #fff !important; }

/* Procedura con prefisso fisso. */
.auto-pfx { display: flex; align-items: stretch; height: 34px; border: 1px solid var(--muted); border-radius: var(--radius, 8px); background: #fff; overflow: hidden; }
body.nh-v2 .auto-job-page .auto-pfx > span { text-transform: none; letter-spacing: 0; }
.auto-pfx > span { display: flex; align-items: center; padding: 0 8px 0 10px; background: var(--bg-soft); border-right: 1px solid var(--border-strong); color: var(--auto-slate); font-weight: 700; font-size: 14px; white-space: nowrap; }
.auto-pfx .auto-bare { flex: 1; min-width: 0; }
body.nh-v2 .auto-job-page .auto-pfx input.form-control { border: 0; border-radius: 0; box-shadow: none; height: 100%; }
.auto-pfx.is-dis { border-color: var(--border-strong); background: var(--surface-soft); }
.auto-pfx.is-bad { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.auto-pfx.is-bad [aria-invalid="true"] { box-shadow: none; }

/* Parametri. */
.auto-job-page .auto-pgroup { display: flex; flex-direction: column; gap: 10px; padding: 0; border: 0; background: none; }
.auto-prow { display: grid; grid-template-columns: minmax(0, 1.4fr) 104px minmax(0, 1fr) 92px 32px; gap: 8px; align-items: center; }
.auto-prow-h { font-size: 13px; font-weight: 700; color: var(--auto-slate); }
.auto-prow .auto-switch { margin-left: 8px; }
.auto-perr { grid-column: 1 / -1; margin-top: -4px; }
.auto-job-page .auto-del:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--auto-danger-ink); }
/* Aggiungi parametro: pulsante compatto con "+", non una barra a tutta larghezza. */
.btn.auto-addp, .auto-addp { width: auto; align-self: flex-start; height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--primary); border-radius: 12px; background: var(--primary-tint-1); color: var(--primary-strong); font-weight: 800; font-size: 14px; }
.auto-addp:hover { background: var(--primary-soft); }
.auto-addp .button-icon-svg { width: 16px; height: 16px; }
/* Parametri in sola lettura: stesso stato disabilitato degli altri campi (anche numero, data e menu del Predefinito). */
body.nh-v2 .auto-job-page .auto-prow :is(input, textarea):is(:disabled, [readonly]) { border-color: var(--border-strong); background: var(--surface-soft); color: var(--auto-slate); cursor: not-allowed; box-shadow: none; }
body.nh-v2 .auto-job-page .auto-prow dxbl-combo-box:is([disabled], .dxbl-disabled, :has(input:disabled)) { border: 1px solid var(--border-strong); background: var(--surface-soft); }
.auto-json { margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); font: 13px/1.45 Consolas, "Cascadia Mono", monospace; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Barra azioni agganciata in basso nel contenitore della pagina: stessa larghezza del contenuto, indipendente dalla sidebar (resta sotto modali e popup combo 1050). */
.auto-job-page { margin-bottom: 16px; }
.auto-bar { position: sticky; z-index: 40; bottom: 0; height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 24px; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(15, 23, 42, .08); }
.auto-bar .btn { height: 38px; padding: 0 20px; }
.auto-errlink { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: var(--auto-danger-ink); font-weight: 800; font-size: 14px; }
.auto-errlink:hover { color: var(--danger); }
.auto-errlink svg { width: 18px; height: 18px; flex: none; }
/* Il contenitore che scorre e' la pagina (html/body): il Tab non deve finire sotto la barra. overflow-x: clip al posto di hidden (come per la mappa sedi)
   evita che html/body diventino contenitori di scorrimento e rompano lo sticky. */
html:has(.auto-bar), body:has(.auto-bar) { scroll-padding-bottom: 88px; overflow-x: clip; }
.auto-ptitle { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 24px; font-weight: 800; line-height: 1.2; color: var(--text); }
/* Errore sui parametri: l'anello sta sulla riga o sul gruppo vuoto, non su tutti i campi (il messaggio sta sotto). */
.auto-job-page .auto-pwrap[aria-invalid="true"] { border-color: transparent; box-shadow: none; }
.auto-job-page .auto-pwrap[aria-invalid="true"] input:not([aria-invalid="true"]) { border-color: var(--muted); box-shadow: none; }

@media (max-height: 800px) {
  .auto-jsec { padding-top: 16px; padding-bottom: 20px; }
  .auto-phead { padding-top: 20px; padding-bottom: 12px; }
  body.nh-v2 .auto-job-page textarea.form-control { min-height: 56px; height: 56px; }
}
