.sivit-frm {
  font-family: Arial, sans-serif;
  max-width: 950px;
  margin: 1.5em auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 24px 28px 12px 28px;
}

.sivit-frm label {
  font-weight: 600;
  margin-bottom: 0.18em;
  display: block;
}

.sivit-frm input,
.sivit-frm select,
.sivit-frm button {
  font-size: 15px;
}

.sivit-frm .row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3em;
  margin-bottom: 1.1em;
}

.sivit-frm .col {
  flex: 1 1 170px;
  display: flex;
  flex-direction: column;
}

.sivit-frm .col-small {
  flex: 0 1 110px;
  display: flex;
  flex-direction: column;
}

.sivit-frm .col-button {
  flex: 0 1 auto;
  align-self: flex-end;
}

.sivit-frm button {
  background: #1568b6;
  color: #fff;
  border: none;
  padding: 0.58em 1.1em;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.13s;
}

.sivit-frm button:disabled {
  background: #ccc;
  color: #fff;
  cursor: not-allowed;
}

.sivit-frm button:hover:not(:disabled) {
  background: #135192;
}

.sivit-frm .sub-heading {
  font-size: 1.17em;
  font-weight: 700;
  margin: 1.1em 0 0.5em;
  color: #255589;
}

.sivit-frm hr {
  margin: 1em 0 1.2em 0;
  border: none;
  border-top: 1px solid #e3e3e3;
}

.sivit-frm table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  background: #fafbfc;
  border-radius: 9px;
  overflow: hidden;
}

.sivit-frm th, .sivit-frm td {
  border: 1px solid #d5dbe3;
  padding: 7px 10px;
  font-size: 14px;
  vertical-align: middle;
  text-align: left;
}

.sivit-frm th {
  background: #f4f8fa;
  font-weight: 700;
}

.sivit-frm td {
  background: #fff;
}

.sivit-frm .text-right {
  text-align: right;
}

.sivit-frm .btn_remove,
.sivit-frm .btn_remove_table_row {
  background: #d9303e;
  color: #fff;
  border: none;
  padding: 0.38em 0.78em;
  cursor: pointer;
  border-radius: 3px;
  font-size: 13px;
}

.sivit-frm .btn_remove:hover,
.sivit-frm .btn_remove_table_row:hover {
  background: #ba2232;
}

.sivit-frm .btn_edit_table_row {
  background: #ffa033;
  color: #222;
  border: none;
  padding: 0.38em 0.78em;
  cursor: pointer;
  border-radius: 3px;
  margin-right: 4px;
  font-size: 14px;
  transition: background 0.13s;
}

.sivit-frm .btn_edit_table_row:hover {
  background: #ff8400;
  color: #fff;
}

.sivit-frm .edit-input {
  width: 80px;
  font-size: 14px;
  padding: 3px 5px;
  border: 1px solid #a4b5c3;
  border-radius: 2px;
}

.sivit-frm .widefat.fixed.striped {
  background: #fafbfc;
}

.sivit-frm .icon-edit {
  display: inline-block;
  vertical-align: middle;
  width: 1em;
  height: 1em;
  margin-right: 2px;
}

.sivit-frm .btn_cancel_preventivo {
  background: #d9303e;
  color: #fff;
  border: none;
  padding: 0.6em 1.1em;
  border-radius: 4px;
  margin-top: 1em;
  font-weight: 500;
  transition: background 0.14s;
}

.sivit-frm .btn_cancel_preventivo:hover {
  background: #ba2232;
}

@media (max-width: 700px) {
  .sivit-frm, .sivit-frm table { padding: 0; max-width: 99vw; }
  .sivit-frm .row { flex-direction: column; gap: 0.5em; }
  .sivit-frm th, .sivit-frm td { font-size: 12px; padding: 5px 4px; }
}

.sivit-frm .delta-warning {
  color: #d9303e;
  font-weight: 600;
  font-size: 13px;
}

.sivit-frm .delta-note {
  color: #ff9800;
  font-weight: 600;
  font-size: 13px;
}

.sivit-frm .success-note {
  color: #258636;
  font-weight: 600;
  font-size: 13px;
}

.sivit-frm .totale-row th, .sivit-frm .totale-row td {
  background: #e5f0fa;
  font-size: 15px;
}

/* Toggle switch */
.sivit-frm .sivit-toggle {
  display: inline-flex;
  align-items: center;
}
.sivit-frm .sivit-toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.sivit-frm .sivit-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
}
.sivit-frm .sivit-toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cfd8dc;
  border: 1px solid #b0bec5;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.sivit-frm .sivit-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.sivit-frm .sivit-toggle-input:checked + .sivit-toggle-label .sivit-toggle-track {
  background: #2e7d32;
  border-color: #2e7d32;
}
.sivit-frm .sivit-toggle-input:checked + .sivit-toggle-label .sivit-toggle-thumb {
  transform: translateX(20px);
}
.sivit-frm .sivit-toggle-input:focus-visible + .sivit-toggle-label .sivit-toggle-track {
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.25);
}
