/* Gastronomia Ordini - stile
   Colori ripresi dai fogli originali: verde cassetta, grigio-verde chiaro,
   tinta verde per l'operatore e tinta rosata per il responsabile. */
:root {
  --ink: #1d2a21;
  --ink-soft: #55645a;
  --green-950: #16361b;
  --green-900: #1f4a25;
  --green-700: #2e6b34;
  --green-500: #4f8a55;
  --green-200: #cfe0cc;
  --green-100: #e6e9df;
  --paper: #f2f4ef;
  --white: #ffffff;
  --line: #cdd5c9;
  --line-soft: #e1e6dd;
  --op: #e6ece1;       /* a cura dell'operatore */
  --re: #f5ebe6;       /* a cura del responsabile */
  --neg: #b3261e;
  --neg-bg: #fbe9e7;
  --pos: #8a5a00;
  --pos-bg: #fff3d6;
  --focus: #0b57d0;
  --warn: #c77700;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bahnschrift", "Segoe UI Semibold", "Segoe UI", system-ui, sans-serif;
  --row-h: 34px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.hidden { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------- schermate */
.screen { position: fixed; inset: 0; display: flex; }

/* ------------------------------------------------------------- accesso */
#login { background: var(--white); }
.login-art {
  flex: 1 1 52%;
  background: var(--green-900);
  color: #fff;
  padding: 7vh 6vw;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "wght" 700, "wdth" 75;
  font-stretch: 75%;
  font-size: clamp(64px, 11vw, 150px);
  line-height: .9;
  letter-spacing: .01em;
  text-transform: none;
}
.tagline { font-size: 20px; margin: 22px 0 0; color: var(--green-200); max-width: 26ch; line-height: 1.35; }
.slats {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background:
    repeating-linear-gradient(180deg, transparent 0 34px, rgba(0,0,0,.22) 34px 38px),
    linear-gradient(180deg, transparent, rgba(0,0,0,.18));
  pointer-events: none;
}
.login-form {
  flex: 1 1 48%; max-width: 560px; margin: auto; padding: 0 56px;
  display: flex; flex-direction: column;
}
.login-form h1 { font-family: var(--font-display); font-size: 40px; margin: 0 0 6px; font-weight: 600; }
.hint { margin: 0 0 26px; color: var(--ink-soft); }
label { font-weight: 600; font-size: 14px; margin: 14px 0 6px; display: block; }
.check { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 16px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green-700); }
input[type=text], input[type=password], input[type=date], input[type=number], select {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
input:focus, select:focus { border-color: var(--green-700); outline: 2px solid var(--focus); outline-offset: 0; }
.pwrow { display: flex; gap: 8px; }
.form-error { min-height: 22px; color: var(--neg); font-size: 14px; margin: 8px 0; }
.login-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; color: var(--ink-soft); font-size: 13px; }

button.primary {
  background: var(--green-700); color: #fff; border: 0; border-radius: 6px; padding: 0 18px; height: 40px; font-weight: 600;
}
button.primary:hover { background: var(--green-900); }
button.primary.big { height: 48px; font-size: 16px; }
button.primary:disabled { background: #9db39f; cursor: default; }
button.secondary { background: #fff; border: 1px solid var(--green-700); color: var(--green-900); border-radius: 6px; padding: 0 14px; height: 40px; font-weight: 600; }
button.secondary:hover { background: var(--green-100); }
button.danger { background: var(--neg); color: #fff; border: 0; border-radius: 6px; padding: 0 16px; height: 40px; font-weight: 600; }
button.ghost { background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 0 14px; height: 40px; }
button.ghost:hover { background: var(--green-100); }
button.link { background: none; border: 0; color: var(--green-700); text-decoration: underline; padding: 4px 0; }

#setup { background: var(--paper); align-items: center; justify-content: center; }
.setup-card { width: min(620px, 92vw); background: #fff; padding: 36px 40px; border: 1px solid var(--line); border-radius: 10px; }
.setup-card h1 { font-family: var(--font-display); font-size: 30px; margin: 0 0 8px; font-weight: 600; }
.setup-card p { color: var(--ink-soft); line-height: 1.5; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ------------------------------------------------------------- app */
#main { flex-direction: column; background: var(--paper); }

#topbar {
  display: flex; align-items: center; gap: 22px;
  background: var(--green-900); color: #fff; height: 60px; padding: 0 18px; flex: none;
}
.brand { min-width: 190px; line-height: 1; }
.store-name {
  font-family: var(--font-display); font-weight: 700; font-size: 30px;
  font-variation-settings: "wght" 700, "wdth" 80; letter-spacing: .02em;
}
.store-sub { font-size: 12px; color: var(--green-200); margin-top: 3px; }
#tabs { display: flex; gap: 2px; align-self: stretch; }
#tabs button {
  background: none; border: 0; color: #d6e5d3; padding: 0 16px; font-weight: 600; position: relative; height: 100%;
}
#tabs button:hover { color: #fff; background: rgba(255,255,255,.06); }
#tabs button[aria-current=page] { color: #fff; }
#tabs button[aria-current=page]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 4px; background: #e9c46a; border-radius: 3px 3px 0 0; }
#tabs .dot { display: inline-block; width: 8px; height: 8px; background: #e9c46a; border-radius: 50%; margin-left: 7px; vertical-align: 1px; }

.datenav { display: flex; align-items: center; gap: 4px; margin-left: auto; position: relative; }
.datenav button { background: rgba(255,255,255,.10); border: 0; color: #fff; height: 38px; border-radius: 6px; }
.datenav button:hover { background: rgba(255,255,255,.2); }
.datenav .icon { width: 38px; font-size: 24px; line-height: 1; padding-bottom: 3px; }
.datenav .datebtn { padding: 0 16px; min-width: 250px; font-weight: 600; }
.datenav .today { padding: 0 14px; margin-left: 6px; font-weight: 600; }
#datePicker { position: absolute; left: 44px; top: 36px; width: 1px; height: 1px; opacity: 0; pointer-events: none; padding: 0; border: 0; }

.userbox { position: relative; }
.userbtn { background: rgba(255,255,255,.10); border: 0; color: #fff; height: 38px; padding: 0 14px; border-radius: 6px; font-weight: 600; }
.userbtn:hover { background: rgba(255,255,255,.2); }
.menu { position: absolute; right: 0; top: 44px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; min-width: 190px; box-shadow: 0 10px 28px rgba(0,0,0,.18); z-index: 50; overflow: hidden; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 11px 16px; }
.menu button:hover { background: var(--green-100); }

#subbar {
  flex: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line);
}
#subbar:empty { display: none; }
.search { position: relative; }
.search input { width: 280px; height: 38px; padding-left: 34px; }
.search::before { content: ""; position: absolute; left: 11px; top: 11px; width: 11px; height: 11px; border: 2px solid var(--ink-soft); border-radius: 50%; }
.search::after { content: ""; position: absolute; left: 22px; top: 23px; width: 7px; height: 2px; background: var(--ink-soft); transform: rotate(45deg); }
.chips { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.chips button { background: #fff; border: 0; padding: 0 14px; height: 36px; font-weight: 600; color: var(--ink-soft); }
.chips button + button { border-left: 1px solid var(--line); }
.chips button[aria-pressed=true] { background: var(--green-700); color: #fff; }
.spacer { flex: 1; }
.field-inline { display: flex; align-items: center; gap: 8px; }
.field-inline label { margin: 0; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.field-inline input[type=date] { height: 38px; width: 160px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; order: 10; flex: 1 0 100%; }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--line-soft); color: var(--ink-soft); white-space: nowrap; }
.pill.ok { background: var(--green-200); color: var(--green-950); }
.pill b { font-weight: 700; }

.banner { flex: none; padding: 9px 18px; background: var(--pos-bg); color: #5c3b00; border-bottom: 1px solid #ecd9a6; font-weight: 600; }
.banner.info { background: var(--green-100); color: var(--green-950); border-color: var(--green-200); }
.banner.error { background: var(--neg-bg); color: #7a1912; border-color: #f0c2bd; }
.banner button { margin-left: 12px; }

#content { flex: 1; overflow: auto; position: relative; background: #fff; }
#content:focus { outline: none; }

#statusbar {
  flex: none; display: flex; align-items: center; gap: 18px; padding: 8px 18px; background: var(--green-100); border-top: 1px solid var(--line); min-height: 52px;
}
#statusbar .stat { display: flex; align-items: baseline; gap: 6px; }
#statusbar .stat .big { font-family: var(--font-display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
#statusbar .stat .lbl { color: var(--ink-soft); font-size: 13px; }
#statusbar .save-state { margin-left: auto; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.save-state .ind { width: 10px; height: 10px; border-radius: 50%; background: var(--green-500); }
.save-state.dirty .ind { background: var(--warn); }
.save-state.err .ind { background: var(--neg); }

/* ------------------------------------------------------------- tabelle */
table.grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-variant-numeric: tabular-nums; }
.grid th, .grid td { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); height: var(--row-h); padding: 0; white-space: nowrap; }
.grid thead th {
  position: sticky; top: 0; z-index: 3; background: var(--green-700); color: #fff; font-weight: 600; font-size: 13px;
  padding: 4px 8px; height: auto; white-space: normal; text-align: center; line-height: 1.2; vertical-align: middle;
  border-right: 1px solid rgba(255,255,255,.18); border-bottom: 0;
}
.grid thead tr.group th { top: 0; height: 28px; font-size: 12.5px; border-bottom: 1px solid rgba(255,255,255,.25); }
.grid thead tr.cols th { top: 28px; }
.grid thead th.th-op { background: #5d7d58; }
.grid thead th.th-re { background: #8a6a58; }
.grid thead th.corner { left: 0; z-index: 5; text-align: left; }
.grid tbody th.art {
  position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; font-weight: 500; padding: 0 10px; min-width: 300px; max-width: 300px;
  overflow: hidden; text-overflow: ellipsis; border-right: 2px solid var(--line);
}
.grid tbody tr:nth-child(even) th.art { background: #fafbf8; }
.grid tbody tr:nth-child(even) td:not(.op):not(.re) { background: #fafbf8; }
.grid tbody tr:hover th.art, .grid tbody tr:hover td { background: #f1f6ee; }
.grid tbody tr:hover td.op { background: #dfe9d9; }
.grid tbody tr:hover td.re { background: #f1e1d9; }
.grid tr.has th.art { box-shadow: inset 4px 0 0 var(--green-500); font-weight: 700; }
.grid tr.off th.art { color: var(--ink-soft); font-style: italic; }
.grid td { text-align: right; padding: 0 8px; min-width: 84px; }
.grid td.txt { text-align: left; }
.grid td.op { background: var(--op); }
.grid td.re { background: var(--re); }
.grid td.calc { color: var(--ink-soft); background: #f6f7f4; }
.grid td.neg, .grid td.neg input { color: var(--neg); font-weight: 700; background: var(--neg-bg); }
.grid td.pos { color: var(--pos); font-weight: 700; background: var(--pos-bg); }
.grid td.sum { font-weight: 700; }
.grid td.has-val { color: var(--ink); }
.grid td.in { padding: 0; }
.grid td.in input, .grid td.in select {
  width: 100%; height: calc(var(--row-h) - 1px); border: 0; border-radius: 0; background: transparent; padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums;
}
.grid td.in input.t, .grid td.in select { text-align: left; }
.grid td.in input:focus, .grid td.in select:focus { background: #fff; outline: 2px solid var(--focus); outline-offset: -2px; }
.grid td.in input.bad { background: var(--neg-bg); outline: 2px solid var(--neg); outline-offset: -2px; }
.grid td.in input[type=date] { min-width: 132px; font-size: 14px; }
.grid td.w-note { min-width: 320px; }
.grid td.w-sel { min-width: 220px; }
.grid td.w-sup { min-width: 170px; }
.grid td.w-inv { min-width: 120px; }
.grid tfoot td, .grid tfoot th { position: sticky; bottom: 0; z-index: 3; background: var(--green-100); font-weight: 700; border-top: 2px solid var(--green-700); }
.grid tfoot th.art { left: 0; z-index: 4; text-align: left; padding: 0 10px; }
.grid td.zero { color: #b6beb3; }
.empty { padding: 60px 24px; text-align: center; color: var(--ink-soft); }
.empty b { display: block; font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.grid th.st { min-width: 84px; }

/* ------------------------------------------------------------- negozi / gestione */
.page { padding: 22px 26px; max-width: 1180px; }
.page h2 { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin: 0 0 4px; }
.page p.lead { color: var(--ink-soft); margin: 0 0 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; font-variation-settings: "wght" 700, "wdth" 82; }
.card .line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.card .line b { color: var(--ink); }
.card .actions { margin-top: 6px; display: flex; gap: 8px; }

.subtabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 0 0 18px; }
.subtabs button { background: none; border: 0; padding: 10px 16px; font-weight: 600; color: var(--ink-soft); border-bottom: 4px solid transparent; margin-bottom: -2px; }
.subtabs button[aria-current=page] { color: var(--green-900); border-bottom-color: var(--green-700); }

.listrow { display: grid; grid-template-columns: 76px 1fr 90px 76px; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
.listrow.head { font-weight: 700; color: var(--ink-soft); font-size: 13px; position: sticky; top: 0; background: #fff; z-index: 2; border-bottom: 2px solid var(--line); }
.listrow input[type=text] { height: 34px; }
.listrow .mv { display: flex; gap: 4px; }
.listrow .mv button { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 5px; }
.listrow .mv button:disabled { opacity: .35; cursor: default; }
.listrow.off input[type=text] { color: var(--ink-soft); text-decoration: line-through; }
.tarerow { display: grid; grid-template-columns: 1fr 140px 80px; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
.tarerow input { height: 34px; }
.userrow { display: grid; grid-template-columns: 180px 1fr 120px 150px minmax(300px, auto); gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.userrow.head { font-weight: 700; color: var(--ink-soft); font-size: 13px; border-bottom: 2px solid var(--line); }
.toolrow { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; flex-wrap: wrap; }
.toolrow input[type=text] { width: 320px; height: 38px; }
.note { color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; }

/* ------------------------------------------------------------- modali / avvisi */
#modalRoot .overlay { position: fixed; inset: 0; background: rgba(15,30,18,.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 12px; width: min(540px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.modal header { padding: 20px 24px 0; }
.modal h2 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.modal .body { padding: 10px 24px 6px; line-height: 1.5; }
.modal .body label { margin-top: 12px; }
.modal footer { padding: 16px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
#toastRoot { position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--green-950); color: #fff; padding: 11px 18px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.3); font-weight: 600; max-width: 70vw; }
.toast.error { background: var(--neg); }
.busy { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 300; overflow: hidden; background: rgba(233,196,106,.25); }
.busy-bar { height: 100%; width: 35%; background: #e9c46a; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .busy-bar { animation: none; width: 100%; } }

/* ------------------------------------------------------------- stampa */
#printArea { display: none; }
@media print {
  html, body { height: auto; overflow: visible; background: #fff; }
  body > *:not(#printArea):not(#pageStyle) { display: none !important; }
  #printArea { display: block !important; color: #000; font-family: "Segoe UI", Arial, sans-serif; font-size: 10.5pt; }
  #printArea h1 { font-size: 15pt; margin: 0 0 2mm; }
  #printArea .meta { margin: 0 0 4mm; font-size: 10.5pt; display: flex; gap: 10mm; flex-wrap: wrap; }
  #printArea table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  #printArea th, #printArea td { border: .6pt solid #777; padding: 1.2mm 1.6mm; text-align: right; }
  #printArea th { background: #e6e9df !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; text-align: center; font-size: 9pt; }
  #printArea td.l, #printArea th.l { text-align: left; }
  #printArea tr { break-inside: avoid; }
  #printArea thead { display: table-header-group; }
  #printArea td.neg { color: #b3261e; font-weight: 700; }
  #printArea tfoot td, #printArea tfoot th { font-weight: 700; background: #f0f2ec !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #printArea .sign { display: flex; justify-content: space-between; gap: 20mm; margin-top: 16mm; }
  #printArea .sign div { flex: 1; border-top: .8pt solid #000; padding-top: 2mm; text-align: center; font-size: 9.5pt; }
}

/* ------------------------------------------------------------- registro modifiche */
.page:has(.logtable) { max-width: none; }
.tablewrap { overflow: auto; max-height: calc(100vh - 260px); border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.logtable td { font-size: 13.5px; }
.logtable td.txt { white-space: normal; min-width: 120px; max-width: 320px; }
.logtable tr.log-sede td { background: var(--pos-bg); }
.toolrow select { height: 38px; padding: 0 10px; width: auto; min-width: 150px; }
.toolrow label.check { margin: 0 6px; display: inline-flex; gap: 8px; align-items: center; }
@media print { .tablewrap { max-height: none; overflow: visible; } }
.logtable td, .logtable td.txt { text-align: left; }

.modal ul.changes { margin: 8px 0 12px 18px; padding: 0; font-size: 14px; line-height: 1.5; max-height: 220px; overflow: auto; }

/* ------------------------------------------------------------- differenze */
#statusbar .stat .big.sm { font-size: 17px; }
#statusbar .stat .big.zero { color: var(--ink-soft); font-weight: 500; }
#statusbar .dstat { gap: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.grid tr.hasdiff > th.art { box-shadow: inset 4px 0 0 var(--neg); }
.chips button.chip-diff[aria-pressed="true"] { background: var(--neg); border-color: var(--neg); color: #fff; }
.diffpanel { margin: 14px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.diffpanel h3 { margin: 0 0 10px; font-size: 16px; }
.diffpanel .dgrid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.diffpanel .dcard { padding: 10px 12px; border-radius: 6px; background: var(--paper, #f6f8f4); }
.diffpanel .dcard .t { font-size: 13px; color: var(--ink-soft); }
.diffpanel .dcard .v { display: flex; gap: 16px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.diffpanel .v .neg { color: var(--neg); } .diffpanel .v .pos { color: var(--pos); } .diffpanel .v .zero { color: var(--ink-soft); font-weight: 500; }
.diffpanel table { border-collapse: collapse; width: 100%; font-size: 14px; }
.diffpanel th, .diffpanel td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.diffpanel th:first-child, .diffpanel td:first-child { text-align: left; }
.diffpanel td.neg { color: var(--neg); font-weight: 700; } .diffpanel td.pos { color: var(--pos); font-weight: 700; }
@media (max-width: 900px) { .diffpanel .dgrid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- logo nella schermata di accesso */
.login-logo { position: relative; z-index: 1; display: block; width: min(100%, 680px); height: auto; margin-top: 9vh; }
@media (max-height: 640px) { .login-logo { margin-top: 4vh; } }

/* ------------------------------------------------------------- caricamento massivo e punti vendita */
.userrow .actions { display: flex; gap: 8px; justify-content: flex-end; }
.userrow.off b, .userrow.off > span { color: var(--ink-soft); }
.userrow.off > span:nth-child(2) { text-decoration: line-through; }
.creds { margin: 10px 0; padding: 12px 16px; border: 1px dashed var(--green-700); border-radius: 8px; background: var(--green-100); font-size: 18px; line-height: 1.8; }
.creds b { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; }
.imp h3 { font-size: 15px; margin: 18px 0 6px; color: var(--green-900); }
.imp textarea { width: 100%; margin: 10px 0 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; resize: vertical; }
.imp textarea:focus { border-color: var(--green-700); outline: 2px solid var(--focus); outline-offset: 0; }
.imp-src { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.imp-mode { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400; }
.imp-mode.on { border-color: var(--green-700); background: var(--green-100); }
.imp-mode input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green-700); flex: none; }
.imp-mode b { display: block; }
.imp-mode .note { display: block; }
.imp-preview { min-height: 60px; padding: 4px 0; }
.imp-preview.stale { opacity: .55; }
.imp-preview .pills { margin: 8px 0; order: 0; flex: none; }
.pill.warn { background: var(--pos-bg); color: var(--pos); }
.imp-errors { margin: 8px 0; padding: 10px 14px; border: 1px solid var(--neg); border-radius: 8px; background: var(--neg-bg); color: var(--neg); }
.imp-errors ul { margin: 6px 0 6px 18px; padding: 0; line-height: 1.5; max-height: 170px; overflow: auto; }
.imp-risk { font-weight: 600; }
.imp-det { margin: 4px 0; }
.imp-det summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
.imp-det.warn summary { color: var(--pos); }
.modal footer { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line-soft); }

/* gastronomia: intestazione fornitore */
.grid tr.sup th{background:#e4e9e1;color:#1f4a25;font-weight:700;text-align:left;padding:8px 10px;letter-spacing:.03em;position:sticky;left:0}
@media (max-width:700px){.grid tr.sup,.grid tr.sup th{display:block;width:100%}}
