a { color: #2b3445;}
a:hover
{ 
	color: #0f766e;
	text-decoration: none;
}

input[type="checkbox"] { zoom: 1.5; }

.cursorPointer{ cursor: pointer; }

.nav-link { color: white !important; max-width: 100%;}
.nav-link:hover { color: #8ee3e0 !important;}
.menu-link-attivo { background: linear-gradient(135deg, #0f4c5c 0%, #0f766e 58%, #2a9d8f 100%) !important; }

.toggleWrapper { cursor: pointer; }
.toggleThis { padding-inline-start: 20px; display: none; }
.toggleThis li { list-style: none; }

.display-none { display: none !important; }
.display-webkit-box { display: -webkit-box; }

.btn-primary
{
  background-color: #2b3445;
  border-color: #4b566b;
}

.btn-primary:hover
{ 
  background-color: #2b3445;
  color: #faf737;
}

.v-align-super { vertical-align: super !important; }

.foto_prodotto_anteprima
{
  max-width: 100%;
  max-height: 300px;
  height: 300px;
  width:auto;
  border-radius: 3px;
}

.modal_preview_foto_prodotto_anteprima
{
	position: fixed;
  left: calc(50% - 150px);
  top: calc(50% - 150px);
  z-index: 100;
}

.minWidth150 { min-width: 150px !important; }
.maxHeight150 { max-height: 150px !important }

.width100P { width: 100%; }

.BarraAvanzamentoVerde
{
  width: 1px;
  background-color: green;
  height: 30px;
}

.customer-site-box {
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  margin: 18px 0 24px;
  padding: 18px 18px 8px;
}

.customer-site-box-title {
  color: #1f2933;
  font-size: 15px;
  font-style: italic;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}

/* Backend screens */
.admin-screen-page {
  max-width: 1680px;
  margin: 0 auto;
}

.admin-screen-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-screen-title {
  color: #1f2933;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.admin-screen-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Storico cliente: intestazione, filtro e tabelle leggibili anche con molti anni di dati */
.customer-history-page {
  padding-bottom: 18px;
}
.customer-history-hero {
  align-items: center;
  background: linear-gradient(135deg, #0f4c5c 0%, #168b87 100%);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 76, 92, .18);
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 22px 24px;
}
.customer-history-identity {
  align-items: center;
  display: flex;
  min-width: 0;
}
.customer-history-icon {
  align-items: center;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  display: flex;
  flex: 0 0 50px;
  font-size: 22px;
  height: 50px;
  justify-content: center;
  margin-right: 15px;
}
.customer-history-kicker {
  color: rgba(255, 255, 255, .75);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 3px;
  text-transform: uppercase;
}
.customer-history-hero .admin-screen-title {
  color: #fff;
  font-size: 24px;
}
.customer-history-subtitle {
  color: rgba(255, 255, 255, .82);
  margin: 3px 0 0;
}
.customer-history-back {
  border: 0;
  color: #0f6670;
  font-weight: 700;
  white-space: nowrap;
}
.customer-history-toolbar {
  align-items: center;
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .05);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px 16px;
}
.customer-history-code {
  background: #eef7f8;
  border-radius: 999px;
  color: #0f6670;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}
.customer-history-filter-label {
  color: #667085;
  font-size: 13px;
  margin-left: 12px;
}
.customer-history-filter {
  position: relative;
}
.customer-history-filter select {
  appearance: none;
  min-width: 150px;
  padding-right: 32px;
}
.customer-history-filter > i {
  color: #168b87;
  pointer-events: none;
  position: absolute;
  right: 11px;
  top: 11px;
}
.customer-history-metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}
.customer-history-metric {
  align-items: center;
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .05);
  display: flex;
  padding: 14px 16px;
}
.customer-history-metric-icon {
  align-items: center;
  border-radius: 10px;
  display: flex;
  flex: 0 0 38px;
  height: 38px;
  justify-content: center;
  margin-right: 12px;
}
.customer-history-metric-sales { background: #eaf7f2; color: #16834b; }
.customer-history-metric-changes { background: #fff5e6; color: #b54708; }
.customer-history-metric-years { background: #eef2ff; color: #4f46a5; }
.customer-history-metric strong,
.customer-history-metric span { display: block; }
.customer-history-metric strong { color: #172b4d; font-size: 21px; line-height: 1.15; }
.customer-history-metric div > span { color: #667085; font-size: 12px; margin-top: 3px; }
.customer-history-empty-notice {
  align-items: center;
  background: #fffaf0;
  border: 1px solid #f2d39b;
  border-radius: 10px;
  color: #7a4b00;
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px 16px;
}
.customer-history-empty-icon {
  align-items: center;
  background: #fff0c9;
  border-radius: 50%;
  display: flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
}
.customer-history-empty-notice strong { display: block; }
.customer-history-empty-notice p { color: #8b6a35; font-size: 13px; margin: 2px 0 0; }
.customer-history-panel { margin-bottom: 14px; }
.customer-history-table-wrap { border: 1px solid #e7ebf1; border-radius: 8px; overflow-x: auto; }
.customer-history-table { min-width: 820px; }
.customer-history-table thead th {
  background: #f7f9fb;
  border-bottom: 1px solid #dfe5ec;
  color: #52606d;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.customer-history-table tbody tr { transition: background-color .15s ease; }
.customer-history-table tbody tr:hover { background: #f5fbfb; }
.customer-history-table tbody td { border-top: 1px solid #edf0f4; color: #344054; vertical-align: middle; }
.customer-history-table tbody td:first-child { color: #667085; white-space: nowrap; }
.customer-history-table .badge { font-size: 11px; font-weight: 700; padding: 6px 8px; }

@media (max-width: 767px) {
  .customer-history-hero { align-items: stretch; flex-direction: column; padding: 18px; }
  .customer-history-hero .admin-screen-title { font-size: 20px; }
  .customer-history-back { align-self: flex-start; margin-top: 16px; }
  .customer-history-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .customer-history-filter select { width: 100%; }
  .customer-history-metrics { grid-template-columns: 1fr; }
  .customer-history-empty-notice { align-items: flex-start; flex-wrap: wrap; }
  .customer-history-empty-notice .btn { margin-left: 46px !important; }
}

/* Liste legacy rese coerenti con le schermate moderne */
.legacy-list-page {
  padding-bottom: 22px;
}

.legacy-list-page .breadcrumb {
  margin-bottom: 16px;
}

.legacy-list-page .admin-screen-header {
  margin-bottom: 18px;
}

.admin-screen-subtitle {
  color: #667085;
  font-size: 14px;
  margin: 4px 0 0;
}

.legacy-list-page > .row:not(.d-none) {
  margin-left: 0;
  margin-right: 0;
}

.legacy-list-page .admin-panel {
  border-radius: 14px;
}

.legacy-list-page .admin-panel-header small {
  color: #7b8794;
  font-size: 12px;
  font-weight: 500;
}

.legacy-list-page .admin-panel-body {
  overflow-x: auto;
}

.legacy-list-page .table {
  margin-bottom: 0;
  min-width: 760px;
}

.legacy-list-page .table thead th {
  white-space: nowrap;
}

.legacy-list-page .dataTables_wrapper {
  padding-top: 0;
}

.legacy-list-page .dataTables_wrapper .dataTables_filter input,
.legacy-list-page .dataTables_wrapper .dataTables_length select {
  border-color: #d6e5e8;
  border-radius: 8px;
}

.login-page .card-login {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15, 76, 92, .16);
  overflow: hidden;
}

.login-page .card-login .card-header {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 16px 20px;
}

.login-page .card-login .card-body {
  padding: 28px;
}

.login-page .card-login .form-control {
  border-radius: 9px;
  min-height: 44px;
}

.login-page .card-login .button-rosso-lineare {
  border-radius: 9px;
  font-weight: 700;
  min-height: 44px;
}

@media (max-width: 767px) {
  .admin-screen-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-screen-actions {
    justify-content: flex-start;
  }

  .legacy-list-page .admin-screen-actions .btn {
    flex: 1 1 auto;
  }

  .login-page .card-login .card-body {
    padding: 22px 18px;
  }
}

/* -------------------------------------------------------------------------
   Sistema grafico comune
   ------------------------------------------------------------------------- */
:root {
  --app-ink: #172b4d;
  --app-muted: #667085;
  --app-line: #dfe6ee;
  --app-surface: #ffffff;
  --app-bg: #eef4f7;
  --app-teal: #0f766e;
  --app-teal-dark: #0f4c5c;
  --app-red: #d94b53;
  --app-shadow: 0 6px 22px rgba(15, 38, 61, .07);
}

html,
body {
  min-height: 100%;
}

body#page-top {
  background: var(--app-bg);
  color: #344054;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
}

body#page-top a {
  color: var(--app-teal);
}

body#page-top a:hover {
  color: var(--app-teal-dark);
}

.navbar.sfondo-nav-side {
  background: linear-gradient(110deg, #0b3d4a 0%, #0f766e 72%, #168b87 100%);
  box-shadow: 0 2px 14px rgba(9, 48, 62, .22);
  min-height: 62px;
  position: relative;
  z-index: 1030;
}

.backend-brand-logo {
  height: auto;
  max-height: 38px;
  object-fit: contain;
  width: 142px;
}

#sidebarToggle {
  border-radius: 8px;
  margin-left: 6px;
  padding: 7px 10px;
}

#sidebarToggle:hover {
  background: rgba(255, 255, 255, .13);
}

#wrapper {
  background: var(--app-bg);
}

.sidebar.sfondo-nav-side {
  background: linear-gradient(180deg, #0b4552 0%, #0e5963 52%, #0d4654 100%);
  box-shadow: 4px 0 18px rgba(15, 48, 65, .12);
  padding-top: 15px;
}

.sidebar > .text-center {
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  margin: 0 14px 12px;
  padding-bottom: 15px;
}

.sidebar > .text-center h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 7px !important;
}

.sidebar .nav-item > .nav-link {
  border-radius: 8px;
  font-size: 13px;
  margin: 2px 9px;
  min-height: 42px;
  padding: 11px 13px;
  transition: background-color .15s ease, transform .15s ease;
}

.sidebar .nav-item > .nav-link:hover {
  background: rgba(255, 255, 255, .09);
  transform: translateX(1px);
}

.sidebar .nav-item > .nav-link.menu-link-attivo,
.sidebar .nav-item > .nav-link.active {
  background: linear-gradient(135deg, rgba(42, 157, 143, .95), rgba(15, 118, 110, .92)) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.sidebar .toggleThis {
  background: rgba(3, 32, 44, .18);
  border-radius: 8px;
  margin: 2px 9px 7px;
  padding: 5px 0;
}

.sidebar .toggleThis .nav-link {
  border-radius: 6px;
  font-size: 12px;
  margin: 1px 5px;
  min-height: 36px;
  padding: 9px 12px 9px 22px;
}

#content-wrapper {
  background: var(--app-bg);
  min-height: calc(100vh - 62px);
}

#content-wrapper > .container-fluid {
  padding: 22px 24px 0;
}

.breadcrumb {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(223, 230, 238, .9);
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(15, 38, 61, .03);
  color: var(--app-muted);
  margin-bottom: 18px;
  padding: 10px 14px;
}

.breadcrumb a {
  font-weight: 600;
}

.admin-screen-page,
.admin-form-page {
  width: 100%;
}

.admin-screen-header,
.admin-page-heading {
  margin-bottom: 18px;
}

.admin-screen-title,
.admin-page-heading h1 {
  color: var(--app-ink);
  letter-spacing: -.02em;
}

.admin-screen-header p,
.admin-page-heading p {
  color: var(--app-muted) !important;
  font-size: 14px;
}

.admin-panel,
.card,
.panel {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 12px;
  box-shadow: var(--app-shadow);
}

.admin-panel {
  overflow: hidden;
}

.admin-panel-header,
.card-header,
.panel-heading {
  background: #f8fafc;
  border-bottom: 1px solid var(--app-line);
  color: var(--app-ink);
  font-size: 14px;
  font-weight: 700;
  min-height: 50px;
  padding: 14px 17px;
}

.admin-panel-body,
.card-body,
.panel-body {
  padding: 18px;
}

.panel-heading:empty {
  display: none;
}

.admin-panel .table,
.card .table,
.panel .table {
  margin-bottom: 0;
}

.table {
  color: #344054;
}

.table thead th {
  background: #f7f9fb;
  border-bottom: 1px solid #d9e1ea;
  color: #52606d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.table td,
.table th {
  border-color: #e8edf2;
  padding: 12px 13px;
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color .15s ease;
}

.table tbody tr:hover {
  background: #f4fbfb;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #fbfcfd;
}

.table-striped tbody tr:nth-of-type(odd):hover {
  background-color: #f4fbfb;
}

.table-bordered {
  border: 1px solid var(--app-line);
}

.table-responsive {
  border-radius: 8px;
}

.btn {
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  padding: 9px 14px;
  transition: box-shadow .15s ease, transform .15s ease, background-color .15s ease;
}

.btn:hover {
  box-shadow: 0 4px 10px rgba(15, 38, 61, .12);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary,
.button-rosso-lineare {
  background: linear-gradient(135deg, #0f766e, #168b87);
  border-color: #0f766e;
  color: #fff !important;
}

.btn-primary:hover,
.button-rosso-lineare:hover {
  background: linear-gradient(135deg, #0b625d, #0f766e);
  border-color: #0b625d;
}

.btn-outline-primary {
  border-color: #66aaa8;
  color: #0f766e;
}

.btn-outline-secondary {
  border-color: #b9c5d1;
  color: #52606d;
}

.btn-danger,
.btn-outline-danger {
  color: #b42318;
}

.form-control,
.custom-select,
.select2-container--default .select2-selection--single {
  border: 1px solid #cfd9e3;
  border-radius: 7px;
  color: #344054;
  min-height: 40px;
}

.form-control:focus,
.custom-select:focus {
  border-color: #5da9a5;
  box-shadow: 0 0 0 .18rem rgba(42, 157, 143, .14);
}

label,
.etichetta {
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.form-text,
.text-muted,
small.text-muted {
  color: var(--app-muted) !important;
}

.alert {
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15, 38, 61, .04);
}

.badge {
  border-radius: 999px;
  font-weight: 700;
  padding: 5px 9px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #cfd9e3;
  border-radius: 7px;
  min-height: 36px;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #5da9a5;
  box-shadow: 0 0 0 .18rem rgba(42, 157, 143, .12);
  outline: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #0f766e !important;
  border-color: #0f766e !important;
  color: #fff !important;
}

.modal-content {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(15, 38, 61, .2);
  overflow: hidden;
}

.modal-header {
  background: #f8fafc;
  border-bottom-color: var(--app-line);
}

.sticky-footer {
  background: transparent;
  color: #8492a6;
  min-height: 45px;
  padding: 14px 0;
}

.admin-screen-actions,
.rental-hero-actions,
.document-list-hero-actions {
  gap: 8px;
}

.admin-screen-actions .btn,
.admin-page-heading .btn {
  white-space: nowrap;
}

@media (max-width: 991px) {
  #content-wrapper > .container-fluid {
    padding: 18px 16px 0;
  }
}

@media (max-width: 767px) {
  #content-wrapper > .container-fluid {
    padding: 14px 10px 0;
  }

  .admin-panel-header,
  .card-header,
  .panel-heading {
    padding: 12px 13px;
  }

  .admin-panel-body,
  .card-body,
  .panel-body {
    padding: 13px;
  }

  .admin-screen-header,
  .admin-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-screen-actions {
    justify-content: flex-start;
  }

  .admin-screen-actions .btn,
  .admin-page-heading .btn {
    width: 100%;
  }

  .breadcrumb {
    font-size: 13px;
    margin-bottom: 12px;
  }
}

/* Sidebar: icone uniformi e sottomenu piu leggibili */
.sidebar .nav-item > .nav-link {
  align-items: center;
  display: flex;
}
.sidebar .nav-item > .nav-link > i:first-child {
  flex: 0 0 1.35rem;
  margin-right: .55rem;
  text-align: center;
}
.sidebar .nav-item > .nav-link > .fa-caret-down {
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: 0;
}
.sidebar-role-badge {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  display: inline-block;
  font-size: 10px;
  letter-spacing: .04em;
  padding: 3px 9px;
  text-transform: uppercase;
}
.app-readonly .readonly-hidden {
  display: none !important;
}
.app-readonly form [disabled] {
  cursor: not-allowed;
}
.role-readonly-banner {
  background: #eef6ff;
  border: 1px solid #b7d5f5;
  border-radius: 8px;
  color: #185a91;
  font-size: 13px;
  margin-bottom: 14px;
  padding: 10px 14px;
}
.sidebar .toggleThis .nav-link {
  font-size: .92rem;
  padding-left: 1.5rem;
}
.sidebar.toggled .nav-item > .nav-link {
  justify-content: center;
}
.sidebar.toggled .nav-item > .nav-link > i:first-child {
  margin-right: 0;
}

/* Clienti: azioni separate, leggibili e coerenti anche con molte icone */
.customer-row-actions {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  justify-content: center;
  min-width: 214px;
  white-space: nowrap;
}
.customer-row-action {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  text-decoration: none !important;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  width: 32px;
}
.customer-row-action:hover {
  transform: translateY(-1px);
}
.customer-row-action-edit { background: #eef5ff; border-color: #8bb8f3; color: #1769c2; }
.customer-row-action-sales { background: #eefaf3; border-color: #8bd0a8; color: #16834b; }
.customer-row-action-rental { background: #fff8e7; border-color: #e8c76b; color: #9a6a00; }
.customer-row-action-stock { background: #f1f3f6; border-color: #b9c1cc; color: #4e5b6c; }
.customer-row-action-transport { background: #edfaff; border-color: #80c9de; color: #127b99; }
.customer-row-action-delete { background: #fff0f1; border-color: #e5a2a8; color: #bd2330; }
.customer-row-action-edit:hover { background: #dceaff; color: #0f55a3; }
.customer-row-action-sales:hover { background: #d9f5e5; color: #106b3d; }
.customer-row-action-rental:hover { background: #ffefbd; color: #775000; }
.customer-row-action-stock:hover { background: #e2e7ed; color: #344152; }
.customer-row-action-transport:hover { background: #d8f3fb; color: #0b617c; }
.customer-row-action-delete:hover { background: #ffe0e3; color: #9d1723; }

.customer-list-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto 16px;
  max-width: 1680px;
}
.customer-list-subtitle {
  color: #667085;
  margin: 3px 0 0;
}

@media (max-width: 767px) {
  .customer-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .customer-row-actions {
    min-width: 0;
  }
}

.admin-panel {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .08);
  margin-bottom: 22px;
  overflow: hidden;
}

.admin-panel-header {
  align-items: center;
  background: #f8f9fb;
  border-bottom: 1px solid #e1e6ef;
  color: #1f2933;
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 16px;
}

.admin-panel-body {
  padding: 18px;
}

.admin-table-wrap {
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  overflow-x: auto;
}

.admin-table-wrap table {
  margin-bottom: 0;
}

.admin-table-wrap thead th {
  background: #f8f9fb;
  border-bottom: 1px solid #d9dee5;
  color: #1f2933;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table-wrap tbody td {
  vertical-align: middle;
}

.admin-table-wrap .dataTables_wrapper {
  padding: 0;
}

.admin-table-wrap .dataTables_length,
.admin-table-wrap .dataTables_filter {
  margin: 12px 12px 14px;
}

.admin-table-wrap .dataTables_info,
.admin-table-wrap .dataTables_paginate {
  margin: 12px;
}

.admin-form-page {
  max-width: 1280px;
  margin: 0 auto;
}

.admin-form-card {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .12);
  overflow: hidden;
}

.admin-form-card > .card-body {
  background: #f6f8fb;
  padding: 22px;
}

.admin-form-section {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 16px;
}

.admin-form-section-title {
  border-bottom: 1px solid #edf0f5;
  color: #1f2933;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
}

.admin-form-page label,
.admin-form-page .etichetta {
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 6px;
  text-align: left !important;
  text-transform: uppercase;
}

.admin-form-page .form-control,
.admin-form-page select.form-control {
  border-color: #d8dee8;
  border-radius: 6px;
  min-height: 42px;
}

.admin-form-page .form-control:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 .16rem rgba(183, 22, 70, .14);
}

.admin-form-page h2 {
  color: #1f2933;
  font-size: 17px;
  font-weight: 700;
  margin: 8px 0 16px;
}

.admin-metric-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.admin-metric {
  background: #f8f9fb;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  padding: 12px;
}

.admin-metric-label {
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-metric-value {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}

/* DDT */
.ddt-form-page {
  max-width: 1680px;
  margin: 0 auto;
}

.ddt-form-card {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .12);
  overflow: hidden;
}

.ddt-form-card > .card-body {
  background: #f6f8fb;
  padding: 24px;
}

.ddt-form-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 56px;
}

.ddt-header-action {
  color: #2b3445;
  font-weight: 700;
}

.ddt-section {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  margin-bottom: 22px;
  padding: 18px;
}

.ddt-section-title {
  border-bottom: 1px solid #edf0f5;
  color: #1f2933;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.ddt-form-page .form-group {
  margin-bottom: 12px;
}

.ddt-form-page .etichetta {
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left !important;
  text-transform: uppercase;
}

.ddt-form-page .form-control,
.ddt-form-page .select2-container--default .select2-selection--single {
  border-color: #d8dee8;
  border-radius: 6px;
  min-height: 42px;
}

.ddt-form-page .form-control:focus,
.ddt-form-page .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #0f766e;
  box-shadow: 0 0 0 .16rem rgba(183, 22, 70, .14);
}

.ddt-form-page .select2-container {
  max-width: 100%;
}

.ddt-form-page .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px;
}

.ddt-form-page .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px;
}

.ddt-table-scroll {
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  overflow-x: auto;
}

.ddt-table-scroll .table {
  margin-bottom: 0;
}

.ddt-pickup-table th,
.ddt-pickup-table td,
.ddt-transport-table th,
.ddt-transport-table td {
  vertical-align: middle;
}

.ddt-pickup-table th,
.ddt-transport-table th {
  background: #f8f9fb;
  color: #1f2933;
  font-size: 13px;
  font-weight: 700;
}

.ddt-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.ddt-product-row {
  align-items: end;
  background: #f8f9fb;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding: 12px;
}

.ddt-product-field-main {
  grid-column: span 3;
  order: 1;
}

.ddt-product-field-price {
  grid-column: span 3;
  order: 6;
}

.ddt-product-field-unit,
.ddt-product-field-qty,
.ddt-product-field-vat,
.ddt-product-actions {
  grid-column: span 1;
}

.ddt-product-field-unit {
  order: 2;
}

.ddt-product-field-qty {
  order: 3;
}

.ddt-product-field-price-qty {
  grid-column: span 2;
  order: 4;
}

.ddt-product-field-unit-price {
  grid-column: span 2;
  order: 5;
}

.ddt-product-field-note {
  grid-column: span 6;
  order: 7;
}

.ddt-product-field-discount {
  grid-column: span 2;
  order: 8;
}

.ddt-product-field-vat {
  order: 9;
}

.ddt-product-field-amount {
  grid-column: span 2;
  order: 10;
}

.ddt-product-actions {
  order: 11;
}

.ddt-adjustment-row {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.ddt-adjustment-row .ddt-product-field-main {
  grid-column: span 5;
}

.ddt-adjustment-row .ddt-product-field-unit-price {
  grid-column: span 2;
}

.ddt-adjustment-row .ddt-product-field-note {
  grid-column: span 3;
}

.ddt-adjustment-row .ddt-product-field-vat {
  grid-column: span 1;
}

.ddt-adjustment-row .ddt-product-actions {
  grid-column: span 1;
}

.ddt-manual-description {
  display: none;
}

.ddt-product-field label {
  color: #4b5563;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.ddt-product-row .form-control,
.ddt-product-row .select2-container--default .select2-selection--single {
  min-height: 38px;
}

.ddt-product-row .select2-container {
  width: 100% !important;
}

.ddt-product-field-amount .form-control {
  background: #e9eef5;
  font-weight: 700;
}

.ddt-price-qty-display {
  background: #e9eef5;
}

.ddt-product-actions {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 38px;
}

.ddt-product-actions .btn {
  height: 38px;
  width: 38px;
}

.ddt-forfait-toggle {
  align-items: center;
  display: flex;
  gap: 8px;
}

.ddt-transport-details {
  color: #4b5563;
  font-size: 13px;
  min-height: 20px;
}

.ddt-public-entity-fields {
  display: none;
}

.ddt-pickup-card {
  border: 1px solid #d9dee5;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.ddt-pickup-card .card-header {
  background: #f2f4f7;
  color: #1f2933;
}

.ddt-pickup-table {
  margin-bottom: 0;
}

.ddt-summary-card {
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
  height: 100%;
}

.ddt-summary-card .card-header {
  background: #f8f9fb;
  color: #1f2933;
}

.ddt-form-actions {
  justify-content: center;
  margin-top: 8px;
}

@media (max-width: 1399px) {
  .ddt-product-row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .ddt-product-field-main {
    grid-column: span 3;
  }

  .ddt-product-field-price {
    grid-column: span 3;
  }

  .ddt-product-field-unit,
  .ddt-product-field-qty {
    grid-column: span 1;
  }

  .ddt-product-field-price-qty,
  .ddt-product-field-unit-price,
  .ddt-product-field-discount,
  .ddt-product-field-amount {
    grid-column: span 2;
  }

  .ddt-product-field-note {
    grid-column: span 6;
  }

  .ddt-adjustment-row .ddt-product-field-main {
    grid-column: span 5;
  }

  .ddt-adjustment-row .ddt-product-field-unit-price {
    grid-column: span 2;
  }

  .ddt-adjustment-row .ddt-product-field-note {
    grid-column: span 3;
  }

  .ddt-adjustment-row .ddt-product-field-vat {
    grid-column: span 1;
  }
}

@media (max-width: 991px) {
  .ddt-form-card > .card-body {
    padding: 18px;
  }

  .ddt-section {
    padding: 14px;
  }

  .ddt-product-field-main,
  .ddt-product-field-price {
    grid-column: 1 / -1;
  }

  .ddt-product-field-unit,
  .ddt-product-field-qty,
  .ddt-product-field-price-qty,
  .ddt-product-field-note,
  .ddt-product-field-discount,
  .ddt-product-field-vat {
    grid-column: span 3;
  }

  .ddt-product-field-unit-price,
  .ddt-product-field-amount {
    grid-column: span 5;
  }

  .ddt-adjustment-row .ddt-product-field-main,
  .ddt-adjustment-row .ddt-product-field-unit-price {
    grid-column: span 5;
  }

  .ddt-adjustment-row .ddt-product-field-note {
    grid-column: span 5;
  }

  .ddt-adjustment-row .ddt-product-field-vat {
    grid-column: span 2;
  }

  .ddt-product-actions {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .ddt-form-card {
    border-radius: 0;
    margin-top: 0 !important;
  }

  .ddt-form-card > .card-body {
    padding: 12px;
  }

  .ddt-form-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .ddt-header-action {
    width: 100%;
  }

  .ddt-section-title {
    font-size: 15px;
  }

  .ddt-product-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ddt-product-field-main,
  .ddt-product-field-price,
  .ddt-product-field-unit-price,
  .ddt-product-field-amount {
    grid-column: 1 / -1;
  }

  .ddt-adjustment-row .ddt-product-field-note {
    grid-column: 1 / -1;
  }

  .ddt-product-field-unit,
  .ddt-product-field-qty,
  .ddt-product-field-price-qty,
  .ddt-product-field-note,
  .ddt-product-field-discount,
  .ddt-product-field-vat {
    grid-column: span 1;
  }

  .ddt-product-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .ddt-pickup-table {
    min-width: 560px;
  }

  .ddt-transport-table,
  .ddt-transport-table tbody,
  .ddt-transport-table tr,
  .ddt-transport-table th,
  .ddt-transport-table td {
    display: block;
    width: 100% !important;
  }

  .ddt-transport-table tr {
    border-bottom: 1px solid #e1e6ef;
    padding: 8px 0;
  }

  .ddt-transport-table tr:last-child {
    border-bottom: 0;
  }

  .ddt-transport-table th {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .ddt-transport-table td {
    border-top: 0;
    padding-top: 0;
  }

  .ddt-summary-card .form-group {
    margin-bottom: 14px;
  }
}

#ddt-table {
  border-collapse: separate;
  border-spacing: 0 8px;
  border: 0;
  width: 100% !important;
}

#ddt-table_wrapper,
#ddt-table_wrapper .dataTables_scroll,
#ddt-table_wrapper .dataTables_scrollHead,
#ddt-table_wrapper .dataTables_scrollBody,
#ddt-table_wrapper .dataTables_scrollHeadInner,
#ddt-table_wrapper .dataTables_scrollHeadInner table,
#ddt-table_wrapper .dataTables_scrollBody table {
  width: 100% !important;
}

#ddt-table thead th {
  background: #f8f9fb;
  border-bottom: 1px solid #d9dee5;
  color: #1f2933;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: uppercase;
}

#ddt-table tbody tr {
  background: #fff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, .08);
}

#ddt-table tbody td {
  border-top: 1px solid #eef1f5;
  border-bottom: 1px solid #eef1f5;
  vertical-align: middle;
}

#ddt-table tbody td:first-child {
  border-left: 1px solid #eef1f5;
  border-radius: 6px 0 0 6px;
}

#ddt-table tbody td:last-child {
  border-right: 1px solid #eef1f5;
  border-radius: 0 6px 6px 0;
}

.ddt-number {
  color: #111827;
  font-size: 16px;
  font-weight: 700;
}

.ddt-customer {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.ddt-total {
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.ddt-actions {
  white-space: nowrap;
}

.ddt-empty-return-action {
  font-size: 12px;
  font-weight: 700;
  margin: 0 4px;
  padding: 3px 8px;
}

.ddt-actions a:hover,
.ddt-actions button:hover {
  text-decoration: none;
}

.breadcrumb {
  align-items: center;
  font-size: 17px;
}

.breadcrumb > li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb > li + li {
  padding-left: .5rem;
}

.breadcrumb > li + li::before {
  display: inline-block;
  padding-right: .5rem;
  color: #6c757d;
  content: "/";
}

.breadcrumb > .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
}

#ddt-table_wrapper .dataTables_length,
#ddt-table_wrapper .dataTables_filter {
  margin-bottom: 14px;
}

#ddt-table_wrapper .dataTables_info {
  color: #4b5563;
  padding-top: 12px;
}

@media (max-width: 991px) {
  .admin-screen-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-screen-actions {
    justify-content: flex-start;
  }

  .admin-metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-form-card > .card-body,
  .admin-panel-body {
    padding: 16px;
  }
}

@media (max-width: 767px) {
  .admin-screen-title {
    font-size: 19px;
  }

  .admin-screen-actions .btn {
    width: 100%;
  }

  .admin-form-card {
    border-radius: 0;
    margin-top: 0 !important;
  }

  .admin-form-card > .card-body,
  .admin-panel-body {
    padding: 12px;
  }

  .admin-form-section {
    padding: 12px;
  }

  .admin-metric-row {
    grid-template-columns: 1fr;
  }
}

/* Dashboard */
.dashboard-hero,
.document-list-hero {
  align-items: center;
  background: linear-gradient(135deg, #0f4c5c 0%, #2a9d8f 100%);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(142, 0, 40, .18);
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 22px 26px;
}

.dashboard-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  opacity: .75;
}

.dashboard-title,
.document-list-hero h1 {
  font-size: 25px;
  font-weight: 700;
  margin: 2px 0 4px;
}

.dashboard-subtitle,
.document-list-hero p {
  margin: 0;
  opacity: .88;
}

.dashboard-date {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 7px;
  font-weight: 600;
  padding: 9px 13px;
  white-space: nowrap;
}

.dashboard-metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.dashboard-metric {
  align-items: center;
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  color: #1f2933;
  display: flex;
  gap: 13px;
  min-height: 92px;
  padding: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.dashboard-metric:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, .1);
  color: #1f2933;
  text-decoration: none;
  transform: translateY(-2px);
}

.dashboard-metric-wide { grid-column: span 1; }

.dashboard-metric-icon {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 48px;
  font-size: 19px;
  height: 48px;
  justify-content: center;
}

.metric-customers { background: #f0edf7; color: #604a82; }
.metric-ddt { background: #e2f4f2; color: #0f766e; }
.metric-invoices { background: #e8f6ef; color: #198754; }
.metric-total { background: #edf0f4; color: #364152; }

.dashboard-metric strong {
  display: block;
  font-size: 21px;
  line-height: 1.15;
}

.dashboard-metric small {
  color: #667085;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.dashboard-actions-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-action {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe4ec;
  border-radius: 9px;
  color: #273142;
  display: flex;
  gap: 13px;
  min-height: 78px;
  padding: 13px 15px;
  transition: border-color .15s ease, background .15s ease;
}

.dashboard-action > i {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 17px;
  height: 42px;
  justify-content: center;
}

.dashboard-action strong,
.dashboard-action small {
  display: block;
}

.dashboard-action small {
  color: #667085;
  font-size: 12px;
  margin-top: 2px;
}

.dashboard-action:hover {
  background: #fafbfc;
  border-color: #b9c1cc;
  color: #0f766e;
  text-decoration: none;
}

.action-primary > i { background: #e2f4f2; color: #0f766e; }
.action-neutral > i { background: #edf0f4; color: #364152; }
.action-warning > i { background: #fff3cd; color: #856404; }
.action-info > i { background: #edf0f7; color: #53617a; }
.action-dark > i { background: #e8f6ef; color: #198754; }
.action-danger > i { background: #fff0f0; color: #b42318; }
.action-payment > i { background: #fff5e6; color: #b54708; }
.action-statistics > i { background: #eef2ff; color: #4f46a5; }

.dashboard-panel-link {
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-recent-row {
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  color: #283445;
  display: grid;
  gap: 10px;
  grid-template-columns: 90px minmax(0, 1fr) 82px 92px;
  min-height: 58px;
  padding: 10px 16px;
}

.dashboard-recent-row:last-child { border-bottom: 0; }
.dashboard-recent-row:hover { background: #fafbfc; color: #0f766e; text-decoration: none; }
.dashboard-document-number { font-weight: 700; }
.dashboard-document-customer { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-document-date { color: #667085; font-size: 12px; }
.dashboard-recent-row strong { text-align: right; white-space: nowrap; }
.dashboard-empty { color: #667085; padding: 30px 18px; text-align: center; }

/* DDT list */
.document-list-primary-action { color: #263244; font-weight: 700; }

.ddt-list-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.ddt-list-metric {
  align-items: center;
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: 9px;
  color: #253044;
  display: flex;
  gap: 12px;
  min-height: 76px;
  padding: 13px 15px;
}

a.ddt-list-metric:hover { box-shadow: 0 5px 15px rgba(15, 23, 42, .08); color: #253044; text-decoration: none; }
.ddt-list-metric.metric-attention { background: #fffdf5; border-color: #f1cf72; }
.ddt-list-metric > i { font-size: 21px; width: 26px; text-align: center; }
.ddt-list-metric strong, .ddt-list-metric small { display: block; }
.ddt-list-metric strong { font-size: 18px; }
.ddt-list-metric small { color: #667085; font-size: 11px; text-transform: uppercase; }
.ddt-customer-place { color: #7a8493; display: block; margin-top: 2px; }
.ddt-row-actions { white-space: nowrap; }

.document-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  white-space: nowrap;
}

.document-status-invoiced { background: #e4f5eb; color: #167443; }
.document-status-pending { background: #fff3cd; color: #856404; }

.document-empty-state {
  color: #667085;
  padding: 55px 20px;
  text-align: center;
}

.document-empty-state > i { color: #b9c1cc; font-size: 42px; margin-bottom: 14px; }
.document-empty-state h3 { color: #283445; font-size: 18px; }

/* DDT, service invoice and credit-note forms */
.ddt-form-card { border-radius: 12px; }

.ddt-form-header {
  color: #fff;
  padding: 15px 20px;
}

.document-form-heading {
  align-items: center;
  display: flex;
  gap: 12px;
}

.document-form-icon {
  align-items: center;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 9px;
  display: inline-flex;
  flex: 0 0 43px;
  font-size: 18px;
  height: 43px;
  justify-content: center;
}

.document-form-heading strong,
.document-form-heading small { display: block; }
.document-form-heading strong { font-size: 18px; }
.document-form-heading small { font-size: 12px; margin-top: 2px; opacity: .84; }
.document-form-credit .document-form-icon { color: #ffe08a; }

.ddt-section {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
}

.ddt-section-title i { color: #0f766e; }
.ddt-summary-card { border-radius: 9px; overflow: hidden; }
.ddt-summary-card .card-header { background: #f5f6f8; color: #263244; }
.ddt-form-actions { margin: 2px 0 0; padding: 0 4px 8px; }
.ddt-form-actions .btn { min-height: 42px; font-weight: 700; }

.customer-riba-panel {
  background: #fffaf0;
  border: 1px solid #efd99a;
  border-radius: 9px;
  margin-top: 4px;
  padding: 14px 16px 2px;
}

.customer-riba-panel-heading {
  align-items: center;
  border-bottom: 1px solid #f1e4bd;
  color: #654f12;
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.customer-riba-panel-heading small {
  color: #806f3d;
  font-weight: 400;
}

/* Noleggio contenitori */
.rental-hero {
  align-items: center;
  background: linear-gradient(135deg, #0f4c5c 0%, #2a9d8f 100%);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(142, 0, 40, .16);
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 21px 24px;
}
.rental-hero h1 { font-size: 23px; font-weight: 700; margin: 0 0 4px; }
.rental-hero p { margin: 0; opacity: .86; }
.rental-hero-actions { align-items:center; display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; margin-left:24px; }
.rental-hero-action { align-items:center; border:1px solid transparent; border-radius:8px; box-shadow:0 3px 9px rgba(16,24,40,.12); display:inline-flex; font-size:14px; font-weight:700; justify-content:center; min-height:42px; padding:9px 13px; text-decoration:none !important; transition:background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .15s ease; white-space:nowrap; }
.rental-hero-action:hover { box-shadow:0 6px 14px rgba(16,24,40,.2); transform:translateY(-1px); }
.rental-hero-action i { font-size:14px; }
.rental-hero-action-plus { background:#20ad4b; border-color:#20ad4b; color:#fff; }
.rental-hero-action-plus:hover { background:#16883a; border-color:#16883a; color:#fff; }
.rental-hero-action-minus { background:rgba(7,65,76,.72); border-color:rgba(255,255,255,.24); color:#fff; }
.rental-hero-action-minus:hover { background:#084b58; border-color:rgba(255,255,255,.48); color:#fff; }
.rental-hero-action-pickup { background:#ffc21a; border-color:#ffc21a; color:#3c2b00; }
.rental-hero-action-pickup:hover { background:#e9a900; border-color:#e9a900; color:#2c2000; }
.rental-hero-action-back { background:#fff; border-color:#fff; color:#18333b; }
.rental-hero-action-back:hover { background:#eef7f6; border-color:#eef7f6; color:#0f4c5c; }
.rental-toolbar .admin-panel-body { align-items: center; display: flex; justify-content: space-between; }
.rental-metrics { display: grid; gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 18px; }
.rental-metrics > div { align-items: center; background:#fff; border:1px solid #e1e6ef; border-radius:9px; display:flex; gap:13px; padding:14px 16px; }
.rental-metrics > div:only-child { grid-column: 1 / -1; }
.rental-metrics i { align-items:center; background:#e2f4f2; border-radius:50%; color:#0f766e; display:inline-flex; height:42px; justify-content:center; width:42px; }
.rental-metrics strong,.rental-metrics small { display:block; }
.rental-metrics strong { font-size:19px; }
.rental-metrics small { color:#667085; font-size:11px; text-transform:uppercase; }
.rental-badge { background:#edf0f4; border-radius:999px; display:inline-block; font-size:11px; font-weight:700; padding:5px 9px; }
.rental-actions { align-items:center; display:inline-flex; gap:7px; white-space:nowrap; }
.rental-action { align-items:center; border:1px solid transparent; border-radius:7px; display:inline-flex; font-size:12px; font-weight:700; gap:6px; justify-content:center; min-height:34px; padding:7px 10px; text-decoration:none !important; transition:background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .15s ease; }
.rental-action:hover { box-shadow:0 3px 8px rgba(16,24,40,.14); transform:translateY(-1px); }
.rental-action-view { background:#eff6ff; border-color:#60a5fa; color:#1464c4; }
.rental-action-view:hover { background:#dbeafe; border-color:#3b82f6; color:#0f4fa3; }
.rental-action-pickup { background:#fff8e6; border-color:#f2b800; color:#9a6700; }
.rental-action-pickup:hover { background:#ffefb8; border-color:#d99f00; color:#795400; }
.rental-action i { font-size:14px; }
.rental-rate-grid { display:grid; gap:14px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.rental-rate-card { background:#f8f9fb; border:1px solid #e1e6ef; border-radius:9px; margin:0; padding:15px; }
.rental-rate-card > span { color:#263244; display:block; font-weight:700; margin-bottom:10px; }
.rental-customer-rates th { background:#f6f7f9; color:#344054; font-size:12px; text-transform:uppercase; }
.rental-customer-rates td { vertical-align:middle; }
.mdb-table th { white-space:nowrap; }
.mdb-table td { vertical-align:middle; }
.mdb-table .input-group { min-width:125px; }
.mdb-row-form { margin:0; }
.mdb-page-actions {
  align-items: center;
  border-top: 1px solid #e5e9ef;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
}
.mdb-page-actions .btn {
  flex: 0 0 auto;
  font-weight: 700;
}
.mdb-status { border-radius:999px; display:inline-block; font-size:11px; font-weight:700; padding:5px 9px; white-space:nowrap; }
.mdb-status-da_calcolare { background:#edf0f4; color:#475467; }
.mdb-status-da_fatturare { background:#e4f5eb; color:#167443; }
.mdb-status-riportato { background:#fff3cd; color:#856404; }
.mdb-status-fatturato { background:#e7f0ff; color:#2458a6; }
.mdb-status-nessun_addebito { background:#f2f4f7; color:#667085; }
@media(max-width:991px){.rental-rate-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:767px){.rental-hero,.rental-toolbar .admin-panel-body{align-items:stretch;flex-direction:column;gap:12px}.rental-hero-actions{justify-content:stretch;margin-left:0;width:100%}.rental-hero-action{flex:1 1 calc(50% - 4px)}.rental-metrics,.rental-rate-grid{grid-template-columns:1fr}.rental-toolbar .form-inline{align-items:stretch;display:flex;flex-direction:column}.rental-toolbar .form-control{margin-bottom:8px;margin-right:0!important}}
@media(max-width:767px){.rental-action{height:34px;padding:7px;width:36px}.rental-action span{display:none}}
@media(max-width:767px){.mdb-page-actions{align-items:stretch;flex-direction:column}.mdb-page-actions .btn{width:100%}}


@media (max-width: 1199px) {
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metric-wide { grid-column: span 2; }
  .dashboard-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ddt-list-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .dashboard-hero,
  .document-list-hero,
  .ddt-form-header { align-items: stretch; flex-direction: column; gap: 14px; }
  .dashboard-date { align-self: flex-start; }
  .dashboard-metrics,
  .dashboard-actions-grid,
  .ddt-list-metrics { grid-template-columns: 1fr; }
  .dashboard-metric-wide { grid-column: span 1; }
  .dashboard-recent-row { grid-template-columns: 78px minmax(0, 1fr) 82px; }
  .dashboard-document-date { display: none; }
  .document-list-primary-action,
  .ddt-header-action { width: 100%; }
  .document-form-heading small { line-height: 1.35; }
  .customer-riba-panel-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* Theme Zocca: blu petrolio e ottanio */
body#page-top {
  background: #eef5f6;
  color: var(--brand-ink);
}

#wrapper,
#content-wrapper {
  background: #eef5f6;
}

.navbar.sfondo-nav-side {
  background: linear-gradient(90deg, #12343b 0%, #0f4c5c 100%) !important;
  box-shadow: 0 2px 12px rgba(15, 76, 92, .18);
}

.sidebar.sfondo-nav-side {
  background: linear-gradient(180deg, #123f4b 0%, #0f4c5c 100%) !important;
  box-shadow: 3px 0 18px rgba(15, 76, 92, .16);
}

.sidebar .nav-link {
  border-left: 3px solid transparent;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.sidebar .nav-link:hover {
  background: rgba(42, 157, 143, .2);
  border-left-color: #7bd6cf;
  color: #e8ffff !important;
}

.sidebar .menu-link-attivo,
.menu-link-attivo {
  background: linear-gradient(90deg, #0f766e 0%, #2a9d8f 100%) !important;
  border-left-color: #b8fff6 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(15, 118, 110, .24);
}

.button-rosso-lineare,
.sfondo-rosso-lineare,
.page-item.active > .page-link {
  background: linear-gradient(135deg, #0f4c5c 0%, #0f766e 58%, #2a9d8f 100%) !important;
  border-color: #0f766e !important;
}

.button-rosso-lineare:hover,
.sfondo-rosso-lineare:hover {
  background: #0f4c5c !important;
  border-color: #0f4c5c !important;
}

.btn-primary,
.sfondo-rosso {
  background-color: #0f766e !important;
  border-color: #0f766e !important;
}

.btn-primary:hover,
.sfondo-rosso:hover {
  background-color: #0f4c5c !important;
  border-color: #0f4c5c !important;
}

.admin-screen-title,
.admin-panel-header,
.admin-form-section-title,
.ddt-section-title {
  color: #12343b;
}

.admin-panel,
.admin-form-section,
.ddt-section,
.admin-metric,
.dashboard-metric,
.dashboard-action,
.ddt-list-metric,
.rental-metrics > div {
  border-color: #d6e5e8;
}

.admin-panel-header,
.admin-table-wrap thead th,
.ddt-pickup-table th,
.ddt-transport-table th,
#ddt-table thead th {
  background: #f1f8f8;
  color: #12343b;
}

.admin-form-page .form-control:focus,
.ddt-form-page .form-control:focus,
.ddt-form-page .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #0f766e;
  box-shadow: 0 0 0 .16rem rgba(15, 118, 110, .16);
}

.dashboard-hero,
.document-list-hero,
.rental-hero,
.ddt-invoices-header,
.invoices-header,
.customer-editor-header,
.transport-header,
.site-editor-header {
  background: linear-gradient(135deg, #0f4c5c 0%, #0f766e 58%, #2a9d8f 100%) !important;
  box-shadow: 0 10px 28px rgba(15, 76, 92, .2) !important;
}

.dashboard-metric:hover,
.dashboard-action:hover,
.ddt-list-metric:hover {
  border-color: #7bc9c5;
}

.dashboard-action:hover,
.dashboard-recent-row:hover {
  color: #0f766e;
}

.dashboard-panel-link,
.dashboard-metric-icon,
.ddt-section-title i,
.site-summary i,
.tariff-value {
  color: #0f766e !important;
}

.metric-ddt,
.action-primary > i,
.rental-metrics i {
  background: #e2f4f2;
  color: #0f766e;
}

.action-danger > i {
  background: #fff0f0;
  color: #c2413a;
}

.rental-badge,
.mdb-status-da_calcolare {
  background: #e7f5f4;
  color: #245661;
}

.transport-save-bar .btn {
  background: #0f766e !important;
  border-color: #0f766e !important;
}

.backend-brand-logo {
  height: 40px;
  object-fit: contain;
  width: 142px;
}

.img-sfondo-login {
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(15, 76, 92, .12);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 76, 92, .12);
  max-width: min(92vw, 360px);
  padding: 10px 16px;
}

.foto_prodotto_anteprima,
.img_miniatura {
  background: #fff;
  border: 1px solid #d6e5e8;
  border-radius: 8px;
  object-fit: contain;
  padding: 4px;
}

@media (max-width: 767px) {
  .backend-brand-logo {
    height: 34px;
    width: 118px;
  }
}

/* Ultimo livello di coerenza applicato a tutte le pagine legacy */
body#page-top {
  background: #eef4f7 !important;
}

#content-wrapper,
#content-wrapper .container-fluid {
  background: #eef4f7;
}

#content-wrapper .container-fluid {
  padding-bottom: 10px;
}

.container_no_max_width,
.admin-form-page,
.customer-list-toolbar {
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
}

.container_no_max_width > .card,
.admin-form-page > .card,
.admin-form-page > .panel,
.row > [class*="col-"] > .panel,
.row > [class*="col-"] > .card {
  margin-bottom: 20px;
}

.row > [class*="col-"] > .panel,
.row > [class*="col-"] > .card {
  overflow: hidden;
}

.panel-default > .panel-body,
.panel > .panel-body {
  background: #fff;
}

.card-header.sfondo-rosso-lineare,
.panel-heading.sfondo-rosso-lineare {
  color: #fff;
}

.card-header:not(.sfondo-rosso-lineare),
.panel-heading:not(.sfondo-rosso-lineare) {
  color: #172b4d;
}

.table-hover tbody tr:hover,
.table-striped.table-hover tbody tr:hover {
  background-color: #f2fbfa;
}

.table.dataTable thead th,
table.dataTable thead th {
  border-bottom-color: #d7e2ea;
}

.dataTables_wrapper {
  color: #667085;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  font-size: 13px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  background: #fff;
  margin: 0 5px;
  padding: 5px 9px;
}

.card-header h1,
.card-header h2,
.panel-heading h1,
.panel-heading h2 {
  color: inherit;
}

.form-group {
  margin-bottom: 16px;
}

.form-control::placeholder {
  color: #98a2b3;
}

.custom-control-label,
.form-check-label {
  font-weight: 500;
}

.btn-block {
  min-height: 40px;
}

.float-right.button40HAuto,
.float-left.button40HAuto {
  min-height: 40px;
}

.empty-state,
.text-center.text-muted.py-5,
.text-center.text-muted.py-4 {
  color: #7b8794 !important;
}

@media (max-width: 767px) {
  .container_no_max_width,
  .admin-form-page,
  .customer-list-toolbar {
    width: 100%;
  }

  .row {
    margin-left: -7px;
    margin-right: -7px;
  }

  .row > [class*="col-"] {
    padding-left: 7px;
    padding-right: 7px;
  }

  .float-right.button40HAuto,
  .float-left.button40HAuto {
    float: none !important;
    margin: 0 0 8px !important;
    width: 100%;
  }
}
