
/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --moto-page-max-width: 1520px;
  --moto-page-gutter: 24px;
  --moto-bg: #f6f7fb;
  --moto-card: #ffffff;
  --moto-text: #172033;
  --moto-muted: #667085;
  --moto-line: #e6e8ef;
  --moto-brand: #d71920;
  --moto-brand-dark: #a90f15;
  --moto-shadow: 0 16px 40px rgba(16, 24, 40, 0.10);
}

body {
  margin: 0;
  color: var(--moto-text);
  background: var(--moto-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.is-busy {
  cursor: wait;
}

.session-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: min(var(--moto-page-max-width), calc(100% - var(--moto-page-gutter) - var(--moto-page-gutter)));
  margin: 0 auto;
  padding: 12px 0 4px;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
}

.session-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.session-brand__logo {
  display: block;
  height: 68px;
  object-fit: contain;
  object-position: left center;
}

.session-brand__logo--company {
  width: min(260px, 28vw);
}

.session-brand__logo--software {
  width: min(132px, 18vw);
}

.session-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
  min-width: 0;
  text-align: right;
}

.session-user__profile {
  color: inherit;
  text-decoration: none;
}

.session-user__profile:hover {
  color: var(--moto-brand);
}

.app-footer {
  width: min(var(--moto-page-max-width), calc(100% - var(--moto-page-gutter) - var(--moto-page-gutter)));
  margin: 28px auto 18px;
  padding-top: 14px;
  border-top: 1px solid var(--moto-line);
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.flash-tray {
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.flash-tray--session {
  position: fixed;
  top: 14px;
  left: max(24px, calc((100vw - 1520px) / 2));
  right: max(24px, calc((100vw - 1520px) / 2));
  z-index: 1000;
  justify-items: start;
  min-width: 0;
}

.flash-tray--auth {
  position: fixed;
  top: 28px;
  left: max(24px, calc((100vw - 1520px) / 2));
  right: max(24px, calc((100vw - 1520px) / 2));
  z-index: 1000;
  justify-items: center;
}

.flash-card {
  width: min(560px, 100%);
  max-height: 120px;
  margin: 0;
  padding: 13px 16px;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.16);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  animation: flash-card-overlay-fade 5.4s ease forwards;
}

.flash-card--notice {
  border: 1px solid rgba(26, 152, 91, 0.24);
  color: #147346;
}

.flash-card--alert,
.flash-card--warning {
  border: 1px solid rgba(215, 25, 32, 0.24);
  color: var(--moto-brand-dark);
}

@keyframes flash-card-overlay-fade {
  0%,
  72% {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  100% {
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
  }
}

.auth-shell {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 40px 20px;
  box-sizing: border-box;
  background:
    linear-gradient(145deg, rgba(64, 70, 82, 0.50) 0%, rgba(215, 25, 32, 0.14) 48%, rgba(215, 25, 32, 0.50) 100%),
    linear-gradient(135deg, #343a46 0%, #5b6472 48%, #c81f27 100%);
}

.auth-panel {
  width: min(460px, 100%);
}

.auth-panel__head {
  margin-bottom: 28px;
  color: #ffffff;
  text-align: center;
}

.auth-logo-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: min(560px, 100%);
  margin: 0 auto 20px;
  padding: 18px 20px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68));
  box-shadow:
    0 20px 56px rgba(16, 24, 40, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}

.auth-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.auth-logo--company {
  width: min(270px, 54%);
}

.auth-logo--software {
  width: min(180px, 38%);
}

.auth-panel__head h1 {
  margin: 12px 0 0;
  font-size: 36px;
  line-height: 1;
}

.auth-panel__head span {
  display: block;
  margin-top: 10px;
  color: #d7dde8;
  font-size: 15px;
  line-height: 1.45;
}

.auth-card {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form .field {
  gap: 8px;
}

.auth-form .field label {
  color: #344054;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.auth-form .field input {
  min-height: 48px;
  border-color: #cfd5e1;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.auth-form .field input:focus {
  border-color: var(--moto-brand);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.12);
}

.check-card--auth {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--moto-muted);
  font-size: 14px;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  box-shadow: 0 12px 26px rgba(169, 15, 21, 0.24);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.dashboard {
  width: min(var(--moto-page-max-width), calc(100% - var(--moto-page-gutter) - var(--moto-page-gutter)));
  margin: 0 auto;
  padding: 48px 0;
}

/* La dashboard non contiene tabelle: non deve mai estendere il documento
   orizzontalmente, neppure con zoom elevato o alert molto lunghi. */
body:has(.dashboard) {
  overflow-x: clip;
}

.dashboard__hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard__hero > * {
  min-width: 0;
}

.dashboard__hero > .brand-heading {
  flex: 1 1 0;
}

.brand-heading {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.brand-heading--dashboard {
  grid-template-columns: 112px minmax(0, 1fr);
}

.brand-heading__logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.dashboard__eyebrow {
  margin: 0 0 8px;
  color: var(--moto-brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
}

.dashboard__subtitle {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--moto-muted);
  font-size: 18px;
  line-height: 1.5;
}

.dashboard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-end;
}

.dashboard__side {
  display: grid;
  flex: 0 1 620px;
  width: min(100%, 620px);
  min-width: 0;
  max-width: 100%;
  justify-items: end;
  gap: 12px;
}

.dashboard-profile-alert {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 420px;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e1b443;
  border-radius: 12px;
  background: #fff8dc;
  color: #5d4300;
  box-shadow: 0 8px 18px rgb(76 54 0 / 8%);
}

.dashboard-profile-alert strong,
.dashboard-profile-alert span {
  display: block;
}

.dashboard-profile-alert strong {
  font-size: 14px;
}

.dashboard-profile-alert span {
  margin-top: 3px;
  font-size: 13px;
}

.dashboard-profile-alert__links {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.dashboard-profile-alert__links a {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 7px;
  background: #fff;
  color: #765300;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-profile-alert__links a:hover {
  background: #fff0bb;
}

.dashboard-profile-alert__toggle {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #765300;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.dashboard-profile-alert__overlay {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  padding: 12px 14px;
  border: 1px solid #e1b443;
  border-radius: 12px;
  background: #fff8dc;
  box-shadow: 0 16px 30px rgb(76 54 0 / 18%);
}

.dashboard-profile-alert__overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-profile-alert__overlay .link-button {
  color: #765300;
  font-size: 12px;
}

.dashboard-profile-alert__links--expanded {
  flex-wrap: wrap;
  overflow: visible;
}

.moto-table__head > .moto-table__sort-header {
  cursor: pointer;
  user-select: none;
}

.moto-table__head > .moto-table__sort-header::after {
  content: "↕";
  display: inline-block;
  margin-left: 6px;
  color: currentcolor;
  font-size: 11px;
  opacity: 0.5;
}

.moto-table__head > .moto-table__sort-header[aria-sort="ascending"]::after {
  content: "↑";
  opacity: 1;
}

.moto-table__head > .moto-table__sort-header[aria-sort="descending"]::after {
  content: "↓";
  opacity: 1;
}

.moto-table__head > .moto-table__sort-header:focus-visible {
  outline: 2px solid currentcolor;
  outline-offset: -3px;
}

.dashboard__favorites {
  position: relative;
}

.resource-head__favorites {
  order: 0 !important;
  flex: 0 0 auto;
}

@media (min-width: 1001px) {
  .page-shell--narrow .resource-head {
    grid-template-columns: minmax(0, 1.2fr) minmax(380px, 0.8fr);
  }
}

.dashboard-favorites-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #d9ab18;
  border-radius: 10px;
  background: #fff9df;
  color: #c99600;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.dashboard-favorites-toggle:hover {
  border-color: #b78600;
  background: #ffe47a;
  color: #8f6700;
}

.dashboard-favorite-star {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c99600;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.dashboard-favorite-star--active {
  color: #d19a00;
}

.dashboard-favorite-star:hover {
  color: #8f6700;
  transform: scale(1.08);
}

.dashboard-favorites-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  width: min(760px, calc(100vw - 48px));
  padding: 18px;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: var(--moto-card);
  box-shadow: var(--moto-shadow);
  text-align: left;
}

.dashboard-favorites-panel__head {
  margin-bottom: 14px;
}

.dashboard-favorites-panel__head span,
.dashboard-favorites-panel__head strong {
  display: block;
}

.dashboard-favorites-panel__head span {
  color: #9a7100;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-favorites-panel__head strong {
  margin-top: 3px;
  font-size: 20px;
}

.dashboard-favorites-panel__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-favorites-panel__empty {
  padding: 18px;
  border: 1px dashed #d9ab18;
  border-radius: 10px;
  color: var(--moto-muted);
  font-weight: 700;
  line-height: 1.45;
}

.dashboard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: var(--moto-card);
  color: var(--moto-text);
  font-weight: 700;
  text-decoration: none;
}

.dashboard-btn--primary {
  border-color: var(--moto-brand);
  background: var(--moto-brand);
  color: #ffffff;
}

.dashboard-btn:hover {
  border-color: var(--moto-brand);
}

.dashboard-btn--primary:hover {
  background: var(--moto-brand-dark);
}

.dashboard__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.dashboard-stat,
.dashboard-card {
  border: 1px solid var(--moto-line);
  border-radius: 14px;
  background: var(--moto-card);
  box-shadow: var(--moto-shadow);
}

.dashboard-stat {
  padding: 18px 20px;
  text-align: center;
}

.dashboard-stat span {
  display: block;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
}

.dashboard-stat--alert {
  border-color: rgba(215, 25, 32, 0.25);
}

.dashboard-stat--alert strong {
  color: var(--moto-brand);
}

@media (max-width: 1280px) {
  .dashboard__stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
  }

  .dashboard-stat {
    padding: 12px 13px;
  }

  .dashboard-stat span {
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .dashboard-stat strong {
    font-size: 24px;
  }
}

.dashboard__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 16px;
}

.dashboard__grid > .dashboard-card {
  flex: 1 1 calc((100% - 48px) / 4);
  max-width: calc((100% - 48px) / 4);
  min-width: 210px;
}

@media (max-width: 1100px) {
  .dashboard__hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard__side {
    flex: 0 0 auto;
    width: 100%;
    justify-items: start;
  }

  .dashboard__actions {
    justify-content: flex-start;
  }

  .dashboard__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard__grid--subcard {
  justify-content: center;
  margin-top: 16px;
}

.settings-segnaposto {
  flex: 1 1 min(620px, 100%);
  max-width: 620px;
  margin: 0;
}

.settings-segnaposto__form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
}

.settings-segnaposto__form .field {
  flex: 1 1 260px;
}

.mail-delivery-settings__grid {
  margin-top: 1.25rem;
}

.mail-delivery-settings__switch {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.mail-delivery-settings__switch input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
}

.mail-delivery-settings__switch label {
  display: block;
  font-weight: 800;
}

.mail-delivery-settings__switch small,
.mail-delivery-settings .field small {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
}

.mail-delivery-settings__clear-password {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
  font-size: 0.85rem;
}

.mail-delivery-settings__templates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.mail-template-card {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.mail-template-card__head {
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}

.mail-delivery-settings__templates h2,
.mail-delivery-settings__templates p {
  margin: 0;
}

.mail-delivery-settings__templates p {
  margin-top: 0.25rem;
  color: var(--muted);
}

.mail-delivery-settings__templates code {
  padding: 0.1rem 0.3rem;
  border-radius: 0.3rem;
  background: #eef2f7;
}

.mail-delivery-settings__test {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, .75fr) auto;
  align-items: end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.mail-delivery-settings__signature {
  display: grid;
  grid-template-columns: minmax(240px, .75fr) minmax(280px, 1fr) minmax(260px, .8fr);
  gap: 1rem;
  align-items: start;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.mail-delivery-settings__signature--wide { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .mail-delivery-settings__templates { grid-template-columns: 1fr; }
  .mail-delivery-settings__signature { grid-template-columns: 1fr; }
}

.mail-delivery-settings__signature h3,
.mail-delivery-settings__signature p { margin: 0; }
.mail-delivery-settings__signature p { margin-top: .25rem; color: var(--muted); }
.mail-delivery-settings__signature-preview { display: grid; gap: .6rem; margin-top: .8rem; }
.mail-delivery-settings__signature-preview img {
  display: block;
  width: 378px;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  object-position: left center;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.mail-delivery-settings__test h2,
.mail-delivery-settings__test p {
  margin: 0;
}

.mail-delivery-settings__test p {
  margin-top: .25rem;
  color: var(--muted);
}

@media (max-width: 800px) {
  .mail-delivery-settings__test,
  .mail-delivery-settings__signature { grid-template-columns: 1fr; align-items: stretch; }
}

.rfm-delivery-alert,
.rfm-delivery-preview {
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #efb5b9;
  border-radius: 16px;
  background: #fff1f2;
}

.rfm-delivery-sections {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 1rem;
}

.rfm-delivery-sections .rfm-delivery-sections__link {
  border-color: #315f8e;
  background: #315f8e;
  color: #fff;
}

.rfm-delivery-sections .rfm-delivery-sections__link:hover {
  border-color: #214b76;
  background: #214b76;
  color: #fff;
}

.rfm-delivery-preview-dialog {
  --workflow-modal-width: min(780px, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  background: transparent;
}

.rfm-delivery-preview-dialog::backdrop {
  background: rgba(19, 30, 52, .58);
}

.rfm-delivery-preview-dialog .workflow-modal__panel {
  position: static;
  width: 100%;
  max-width: none;
  max-height: min(82vh, 760px);
  overflow: auto;
}

.rfm-delivery-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin: .25rem 0 1rem;
}

.rfm-delivery-preview-summary > * {
  padding: .45rem .7rem;
  border-radius: 999px;
  background: #edf1f7;
}

.rfm-delivery-preview-summary__ready { color: #08783e; background: #dff2e7 !important; }
.rfm-delivery-preview-summary__blocked { color: #c51620; background: #f9dfe1 !important; }

.rfm-delivery-preview-group {
  margin-top: .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.rfm-delivery-preview-group h3 {
  margin: 0;
  padding: .75rem .9rem;
  background: #eef2f7;
}

.rfm-delivery-preview-group > div {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: .75rem;
  padding: .7rem .9rem;
  border-top: 1px solid var(--line);
}

.rfm-delivery-preview-group--ready h3 { color: #08783e; background: #eaf7ef; }
.rfm-delivery-preview-group--blocked h3 { color: #c51620; background: #fff0f1; }
.rfm-delivery-preview-group--blocked > div span { color: #c51620; }

.rfm-delivery-preview-dialog .workflow-modal__actions form { margin: 0; }

.rfm-delivery-alert {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.rfm-delivery-preview {
  border-color: #f0cd72;
  background: #fff9e8;
}

.rfm-delivery-preview h2,
.rfm-delivery-history h2 {
  margin: 0;
}

.rfm-delivery-preview ul {
  margin: 0.8rem 0 0;
}

.document-delivery-filters {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.document-delivery-filters--rfm-selection {
  grid-template-columns: 34px minmax(105px, 0.55fr) minmax(210px, 1.5fr) minmax(170px, 1.1fr) minmax(120px, 0.7fr) 115px minmax(145px, 0.8fr);
  gap: 0.65rem;
}

.document-delivery-filters--history {
  grid-template-columns: 145px 130px minmax(180px, 1fr) 120px 100px minmax(220px, 1.2fr);
  gap: 0.6rem;
  padding: 0.75rem;
}

.document-delivery-filters input[type="search"],
.document-delivery-filters input[type="date"],
.document-delivery-filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.document-delivery-filters input[type="search"]:focus,
.document-delivery-filters input[type="date"]:focus,
.document-delivery-filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.document-delivery-filters__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.rfm-delivery-table,
.rfm-delivery-history__table {
  min-width: 0;
}

.rfm-delivery-table__head,
.rfm-delivery-table__row {
  display: grid;
  grid-template-columns: 34px minmax(105px, 0.55fr) minmax(210px, 1.5fr) minmax(170px, 1.1fr) minmax(120px, 0.7fr) 115px minmax(145px, 0.8fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
}

.rfm-delivery-table__head,
.rfm-delivery-history__head {
  background: #dfe7f3;
  color: #17233a;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rfm-delivery-table__row {
  border-bottom: 1px solid var(--line);
}

.rfm-delivery-table__row--blocked {
  background: #fffafa;
}

.rfm-delivery-table__row > div,
.rfm-delivery-history__row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rfm-delivery-table__row small,
.rfm-delivery-history__row small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
}

.rfm-delivery-table__error {
  color: #c51620 !important;
  font-weight: 700;
}

.rfm-delivery-table__empty {
  padding: 1.2rem;
  color: var(--muted);
}

.rfm-delivery-status--sent {
  background: #dff2e7;
  color: #08783e;
}

.rfm-delivery-status--failed {
  background: #f9dfe1;
  color: #c51620;
}

.rfm-delivery-status--queued,
.rfm-delivery-status--sending {
  background: #fff0c7;
  color: #8a5a00;
}

.rfm-delivery-status--never {
  background: #e9edf4;
  color: #56657d;
}

.rfm-delivery-status--excluded {
  background: #eceff4;
  color: #49566b;
}

.rfm-delivery-status--manually_sent {
  background: #dceaf9;
  color: #175e9a;
}

.rfm-delivery-table__actions {
  display: grid;
  justify-items: start;
  gap: 0.25rem;
}

.rfm-delivery-table__actions button.moto-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.rfm-delivery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 1rem;
}

.rfm-delivery-footer__pagination,
.rfm-delivery-footer__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.rfm-delivery-footer__actions {
  margin-left: auto;
}

.rfm-delivery-history {
  margin-top: 1.2rem;
}

.rfm-delivery-history__table {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.rfm-delivery-history__head,
.rfm-delivery-history__row {
  display: grid;
  grid-template-columns: 145px 130px minmax(180px, 1fr) 120px 100px minmax(220px, 1.2fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem;
}

.rfm-delivery-history__row {
  border-top: 1px solid var(--line);
}

.rfm-delivery-disposition-history__head,
.rfm-delivery-disposition-history__row {
  display: grid;
  grid-template-columns: 145px 145px 130px 190px minmax(220px, 1fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem;
}

.rfm-delivery-disposition-history__head {
  background: #dfe7f3;
  color: #17233a;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rfm-delivery-disposition-history__row {
  border-top: 1px solid var(--line);
}

.rfm-delivery-disposition-dialog:not([open]) {
  display: none !important;
}

.rfm-delivery-disposition-dialog {
  --workflow-modal-width: min(560px, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  background: transparent;
}

.rfm-delivery-disposition-dialog::backdrop {
  background: rgba(19, 30, 52, 0.58);
}

.rfm-delivery-disposition-dialog .workflow-modal__panel {
  position: static;
  width: 100%;
  max-width: none;
  margin: 0;
}

.rfm-delivery-disposition-dialog h2 {
  margin: 0 0 0.4rem;
}

.rfm-delivery-disposition-dialog textarea {
  width: 100%;
}

.rfm-delivery-disposition-dialog form {
  display: grid;
  gap: 1rem;
}

@media (max-width: 1000px) {
  .document-delivery-filters {
    grid-template-columns: 1fr 1fr;
  }

  .document-delivery-filters--rfm-selection > div[aria-hidden="true"] {
    display: none;
  }

  .document-delivery-filters .document-delivery-filters__actions {
    grid-column: 1 / -1;
  }

  .rfm-delivery-table__head,
  .rfm-delivery-history__head {
    display: none;
  }

  .rfm-delivery-table__row,
  .rfm-delivery-history__row {
    grid-template-columns: 34px 1fr 1fr;
  }

  .rfm-delivery-history__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rfm-delivery-disposition-history__head {
    display: none;
  }

  .rfm-delivery-disposition-history__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rfm-delivery-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .rfm-delivery-footer__actions {
    margin-left: 0;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .document-delivery-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .document-delivery-filters .document-delivery-filters__actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .document-delivery-filters__actions .moto-btn {
    flex: 1 1 0;
  }
}

.dashboard__grid--permissions {
  justify-content: flex-start;
}

.dashboard__grid--permissions > .dashboard-card {
  flex: 1 1 220px;
  max-width: 280px;
}

.dashboard-card {
  position: relative;
  display: block;
  min-height: 170px;
  padding: 22px;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-card__link {
  display: block;
  min-height: inherit;
  color: inherit;
  text-decoration: none;
}

.dashboard-navigation-busy .dashboard-card__link {
  cursor: wait;
  pointer-events: none;
}

.dashboard-card--admin-operations {
  border-color: #e3a5a8;
  background: linear-gradient(145deg, #fff6f6 0%, #f9dfe1 100%);
}

.dashboard-card--admin-operations .dashboard-card__kicker { color: #a42c33; }
.dashboard-card--admin-operations:hover { border-color: #c62832; }

.dashboard-favorite-card {
  position: relative;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fafbfe;
  cursor: grab;
}

.dashboard-favorite-card--dragging {
  opacity: 0.45;
}

.dashboard-favorite-card__link {
  display: grid;
  gap: 5px;
  padding-right: 34px;
  color: inherit;
  text-decoration: none;
}

.dashboard-favorite-card__link .dashboard-card__kicker {
  width: fit-content;
  margin: 0;
}

.dashboard-favorite-card__link strong {
  font-size: 17px;
}

.dashboard-favorite-card__link > span:last-child {
  color: var(--moto-muted);
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-favorite-card .dashboard-favorite-star {
  top: 9px;
  right: 9px;
}

.dashboard-card--flip {
  position: relative;
  min-height: 190px;
  padding: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border: 0;
  perspective: 1200px;
}

.dashboard-card__inner {
  position: relative;
  display: block;
  min-height: 190px;
  transform-style: preserve-3d;
  transition: transform 560ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.dashboard-card__face {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  min-height: 190px;
  padding: 22px;
  box-sizing: border-box;
  border: 1px solid var(--moto-line);
  border-radius: 14px;
  background: var(--moto-card);
  box-shadow: var(--moto-shadow);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.dashboard-card__face--front {
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.dashboard-card__face--back {
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(64, 70, 82, 0.50) 0%, rgba(215, 25, 32, 0.14) 48%, rgba(215, 25, 32, 0.50) 100%),
    linear-gradient(135deg, #343a46 0%, #5b6472 48%, #c81f27 100%);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.24);
  transform: rotateY(180deg);
}

.dashboard-card--flip:hover,
.dashboard-card--flip:focus-visible {
  transform: none;
  outline: none;
}

.dashboard-card--flip:hover .dashboard-card__inner,
.dashboard-card--flip:focus-visible .dashboard-card__inner {
  transform: rotateY(180deg);
}

.dashboard-card:hover {
  transform: translateY(-2px);
  border-color: rgba(215, 25, 32, 0.45);
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.14);
}

.dashboard-card--flip:hover,
.dashboard-card--flip:focus-visible {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.dashboard-card--static:hover {
  transform: none;
  border-color: var(--moto-line);
  box-shadow: var(--moto-shadow);
}

.role-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.role-card__actions form {
  margin: 0;
}

.role-permission-groups {
  display: grid;
  gap: 20px;
}

.role-permission-group {
  display: grid;
  gap: 12px;
}

.role-permission-group h3 {
  margin: 0;
  color: var(--moto-text);
  font-size: 18px;
}

.role-permission-card {
  position: relative;
  min-height: 150px;
  cursor: pointer;
  opacity: 0.62;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.role-permission-card:has(.role-permission-card__input:checked) {
  border-color: rgba(215, 25, 32, 0.44);
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
  opacity: 1;
}

.role-permission-card__input {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  accent-color: var(--moto-brand);
}

.dashboard-card__kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(215, 25, 32, 0.10);
  color: var(--moto-brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-card--flip .dashboard-card__kicker {
  margin-bottom: 0;
}

.dashboard-card__face--back .dashboard-card__kicker {
  background: rgba(255, 255, 255, 0.12);
  color: #ffd7d9;
}

.dashboard-card strong {
  display: block;
  font-size: 22px;
}

.dashboard-card__face--front strong {
  font-size: 24px;
}

.dashboard-card__face--back strong {
  color: #ffffff;
}

.dashboard-card p {
  margin: 10px 0 0;
  color: var(--moto-muted);
  line-height: 1.45;
}

.dashboard-card__face--back p {
  color: #d7dde8;
}

.dashboard-card__symbol {
  position: relative;
  display: block;
  width: 58px;
  height: 58px;
  margin-bottom: 6px;
  color: var(--moto-brand);
}

.dashboard-card__symbol::before,
.dashboard-card__symbol::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.dashboard-card__symbol--admin::before {
  inset: 9px;
  border: 4px solid currentColor;
  border-radius: 14px;
}

.dashboard-card__symbol--admin::after {
  inset: 20px;
  border: 4px solid currentColor;
  border-radius: 50%;
  box-shadow:
    0 -25px 0 -10px currentColor,
    0 25px 0 -10px currentColor,
    25px 0 0 -10px currentColor,
    -25px 0 0 -10px currentColor;
}

.dashboard-card__symbol--quick::before {
  inset: 8px;
  border: 4px solid currentColor;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-28deg);
}

.dashboard-card__symbol--quick::after {
  width: 28px;
  height: 4px;
  left: 26px;
  top: 30px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-32deg);
  transform-origin: left center;
  box-shadow: -18px 11px 0 -1px rgba(215, 25, 32, 0.24);
}

.dashboard-card__symbol--acceptances::before {
  left: 12px;
  top: 8px;
  width: 34px;
  height: 44px;
  border: 4px solid currentColor;
  border-radius: 7px;
}

.dashboard-card__symbol--acceptances::after {
  left: 21px;
  top: 17px;
  width: 25px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 11px 0 currentColor, 0 22px 0 currentColor, -7px -15px 0 2px #ffffff, -7px -15px 0 6px currentColor;
}

.dashboard-card__symbol--reports::before {
  left: 13px;
  top: 7px;
  width: 36px;
  height: 46px;
  border: 4px solid currentColor;
  border-radius: 7px;
  background: linear-gradient(135deg, transparent 0 76%, rgba(215, 25, 32, 0.16) 77% 100%);
}

.dashboard-card__symbol--reports::after {
  left: 22px;
  top: 21px;
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 10px 0 currentColor, 0 20px 0 currentColor;
}

.dashboard-card__symbol--warehouse::before {
  left: 10px;
  top: 13px;
  width: 44px;
  height: 34px;
  border: 4px solid currentColor;
  border-radius: 7px;
  box-shadow: inset 0 12px 0 rgba(215, 25, 32, 0.16);
}

.dashboard-card__symbol--warehouse::after {
  left: 18px;
  top: 25px;
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 10px 0 currentColor;
}

.dashboard-card__symbol--settings::before {
  display: none;
}

.dashboard-card__symbol--settings::after {
  display: none;
}

.dashboard-card__symbol--workshop::before {
  display: none;
}

.dashboard-card__symbol--workshop::after {
  display: none;
}

.dashboard-card__symbol--statistics::before,
.dashboard-card__symbol--statistics::after {
  display: none;
}

.dashboard-card__symbol-chart {
  display: block;
  width: 58px;
  height: 58px;
}

.dashboard-card__symbol-image {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

@media (max-width: 820px) {
  .session-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .session-brand__logo {
    height: 56px;
  }

  .session-brand__logo--company {
    width: min(220px, 52vw);
  }

  .session-brand__logo--software {
    width: min(112px, 30vw);
  }

  .session-user {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }

  .app-footer {
    width: min(var(--moto-page-max-width), calc(100% - var(--moto-page-gutter) - var(--moto-page-gutter)));
    margin-top: 22px;
  }

  .flash-tray--auth {
    top: 28px;
  }

  .dashboard__hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-heading,
  .brand-heading--dashboard {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .dashboard__actions {
    justify-content: flex-start;
  }

  .dashboard__side {
    width: 100%;
    justify-items: start;
  }

  .dashboard-favorites-panel__grid {
    grid-template-columns: 1fr;
  }

}

.page-shell {
  width: min(var(--moto-page-max-width), calc(100% - var(--moto-page-gutter) - var(--moto-page-gutter)));
  margin: 0 auto;
  padding: 36px 0 56px;
}

/* Sui layout ampi lo spazio aggiuntivo favorisce codici e descrizione,
   mentre i campi numerici mantengono una larghezza leggibile. */
@media (min-width: 1469px) {
  .page-shell .report-lines--orders-customer .report-lines__head,
  .page-shell .report-lines--orders-customer .report-lines__row {
    grid-template-columns: 22px minmax(250px, 1.1fr) minmax(150px, 0.66fr) minmax(230px, 1.4fr) 42px 56px 130px 96px 46px;
  }

  .page-shell--report-form .report-lines--products .report-lines__head,
  .page-shell--report-form .report-lines--products .report-lines__row {
    grid-template-columns: 22px minmax(185px, 1fr) minmax(140px, 0.75fr) minmax(180px, 1.6fr) 42px 54px 88px 98px 68px 160px 42px;
  }
}

.flash {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.flash--notice {
  border: 1px solid rgba(26, 152, 91, 0.20);
  background: rgba(26, 152, 91, 0.10);
  color: #147346;
}

.flash--alert {
  border: 1px solid rgba(215, 25, 32, 0.22);
  background: rgba(215, 25, 32, 0.10);
  color: var(--moto-brand-dark);
}

.resource-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(440px, 0.85fr);
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 22px;
}

@media (min-width: 1001px) {
  .resource-head--product {
    grid-template-columns: minmax(0, 1.15fr) minmax(440px, 0.85fr);
  }

  .resource-head--intervention-reports {
    grid-template-columns: minmax(0, 1fr) minmax(805px, auto);
  }

  .resource-head--intervention-reports .resource-head__view-action {
    white-space: nowrap;
  }
}

.resource-head__title-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.resource-head__eyebrow {
  margin: 0 0 8px;
  color: var(--moto-brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-head h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1;
}

.resource-head__subtitle {
  max-width: none;
  margin: 12px 0 0;
  color: var(--moto-muted);
  font-size: 17px;
  line-height: 1.45;
}

.resource-head__actions,
.row-actions,
.form-actions,
.filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-head__actions {
  position: relative;
  width: 100%;
  min-width: 0;
  justify-content: flex-end;
}

.resource-head__actions::before {
  display: none;
}

.resource-head__actions--with-favorites {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.resource-head__navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (min-width: 1001px) {
  .resource-head--navigation-inline {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .resource-head--navigation-inline .resource-head__navigation {
    flex-wrap: nowrap;
  }

  .resource-head--navigation-inline .moto-btn {
    white-space: nowrap;
  }
}


.resource-head__actions > :not(.resource-head__view-action) {
  order: 0;
}

.resource-head__actions > .resource-head__view-action {
  order: 2;
}


.month-end-reports-primary-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 10px;
  order: 2;
}

.resource-head__actions > form:has(> .resource-head__view-action) {
  order: 2;
}

.ddt-direction-switch {
  display: flex;
  align-items: center;
}

.ddt-direction-switch select {
  box-sizing: border-box;
  min-width: 160px;
  height: 42px;
  padding: 8px 34px 8px 12px;
  border: 1px solid #315f8e;
  border-radius: 10px;
  background-color: #fff;
  color: var(--moto-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.ddt-fixed-direction {
  display: flex;
  align-items: center;
}

.resource-head__action-bar {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  order: 2;
  width: 100%;
}

.resource-head__action-bar .moto-btn:not(.moto-btn--danger) {
  border-color: #315f8e;
  background: #315f8e;
  color: #fff;
}

.resource-head__action-bar .moto-btn:not(.moto-btn--danger):hover {
  border-color: #214b76;
  background: #214b76;
}

.resource-head__action-bar .icon-button:not(.icon-button--warning) {
  border-color: #315f8e;
  background: #315f8e;
  color: #fff;
}

.resource-head__action-bar .icon-button:not(.icon-button--warning):hover {
  border-color: #214b76;
  background: #214b76;
}

.resource-head__action-bar .compact-search__panel {
  z-index: 60;
}

.moto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: var(--moto-card);
  color: var(--moto-text);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.moto-btn--primary {
  border-color: var(--moto-brand);
  background: var(--moto-brand);
  color: #fff;
}

.moto-btn--danger {
  border-color: #db3b3b;
  background: #db3b3b;
  color: #fff;
}

.moto-btn--compact {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
}

.moto-btn:hover {
  border-color: var(--moto-brand);
}

.moto-btn:disabled,
.moto-btn[disabled] {
  border-color: #d7dce6;
  background: #eef1f6;
  color: #9aa3b2;
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
}

.moto-btn:disabled:hover,
.moto-btn[disabled]:hover {
  border-color: #d7dce6;
  background: #eef1f6;
  color: #9aa3b2;
}

.moto-btn--primary:hover {
  background: var(--moto-brand-dark);
}

.moto-link {
  color: var(--moto-brand);
  font-weight: 800;
  text-decoration: none;
}

.moto-link:hover,
.moto-table__main a:hover {
  text-decoration: underline;
}

button.moto-link:disabled {
  color: #9aa3b2;
  cursor: not-allowed;
  text-decoration: none;
}

.filter-card,
.import-card,
.table-card,
.resource-form,
.detail-card,
.danger-zone {
  border: 1px solid var(--moto-line);
  border-radius: 16px;
  background: var(--moto-card);
  box-shadow: var(--moto-shadow);
}

.filter-card {
  margin-bottom: 18px;
  padding: 16px;
}

.products-filter-popover {
  position: relative;
}

.products-filter-popover summary {
  list-style: none;
}

.products-filter-popover summary::-webkit-details-marker {
  display: none;
}

.products-filter-popover .icon-button--active {
  border-color: var(--moto-brand);
  background: var(--moto-brand);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.12);
}

.products-filter-popover__panel {
  position: absolute;
  z-index: 70;
  top: calc(100% + 10px);
  right: 0;
  width: min(1040px, calc(100vw - 48px));
  padding: 18px;
  border: 1px solid var(--moto-line);
  border-radius: 16px;
  background: var(--moto-card);
  box-shadow: var(--moto-shadow);
}

/* I filtri condividono la presenza visiva del box di importazione, ma restano
   compatti e con i campi disposti sotto il titolo. */
.products-filter-popover__panel.import-card {
  display: block;
  margin-bottom: 0;
  padding: 18px;
  background: linear-gradient(135deg, #fff1f1 0%, #ffe7e8 100%);
  box-shadow: 0 22px 60px rgba(215, 25, 32, 0.16);
}

.products-filter-popover__panel.filter-popover {
  border-color: #83acd9;
  background: linear-gradient(135deg, #e8f3ff 0%, #cfe5ff 100%);
  box-shadow: 0 22px 60px rgba(33, 99, 168, 0.2);
}

.products-filter-popover__panel.filter-popover .import-card__eyebrow {
  color: var(--moto-primary);
}

.products-filter-popover__panel.filter-popover .filters__actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.products-filter-popover__head {
  margin-bottom: 16px;
}

.products-filter-popover__head h2 {
  margin: 0;
  color: var(--moto-navy);
  font-size: 1.05rem;
}

.products-filter-popover__head p {
  margin: 4px 0 0;
  color: var(--moto-muted);
  font-size: 0.9rem;
}

.filters.filters--products {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.product-active-filter-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: -6px 0 16px;
  color: var(--moto-muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.product-active-filter-strip .active-filters {
  margin-top: 0;
}

.active-filter {
  padding: 6px 10px;
  border: 1px solid #b8cce7;
  border-radius: 999px;
  background: #edf5ff;
  color: var(--moto-navy);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
}

.active-filter:hover {
  border-color: var(--moto-primary);
}

.icon-button--filter::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linejoin='round'%3E%3Cpath d='M2.5 3.5h19L14 11v6l-4 3.5V11z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linejoin='round'%3E%3Cpath d='M2.5 3.5h19L14 11v6l-4 3.5V11z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.import-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(680px, 1.25fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
  padding: 20px;
  border-color: rgba(215, 25, 32, 0.28);
  background: linear-gradient(135deg, #fff1f1 0%, #ffe7e8 100%);
  box-shadow: 0 22px 60px rgba(215, 25, 32, 0.16);
}

.import-card[hidden] {
  display: none;
}

.import-card--dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  width: min(1280px, calc(100vw - 48px));
  text-align: left;
}

.import-card--products {
  grid-template-columns: 1fr;
  align-items: start;
}

.import-card--products .import-form {
  grid-template-columns: minmax(300px, 1fr) minmax(380px, 1.35fr) minmax(150px, auto);
  width: 100%;
}

.import-card__eyebrow {
  margin: 0 0 7px;
  color: var(--moto-brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.import-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.import-card p {
  max-width: 720px;
  margin: 9px 0 0;
  color: var(--moto-muted);
  font-size: 14px;
  line-height: 1.45;
}

.import-form {
  display: grid;
  grid-template-columns: minmax(140px, 170px) minmax(380px, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.import-form .field {
  min-width: 0;
}

.file-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  overflow: hidden;
  border: 1px dashed var(--moto-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.file-picker__button {
  display: inline-flex;
  align-items: center;
  height: 30px;
  margin-left: 6px;
  padding: 0 10px;
  border: 1px solid rgba(215, 25, 32, 0.34);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-brand-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.file-picker__name {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picker__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker:hover .file-picker__button {
  background: rgba(215, 25, 32, 0.16);
}

.import-form input[type="file"] {
  min-width: 0;
}

.import-file-field:focus-within .file-picker {
  border-color: rgba(215, 25, 32, 0.55);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.10);
}

.import-form .moto-btn {
  width: 100%;
  white-space: nowrap;
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 32, 51, 0.46);
  cursor: wait;
}

.busy-overlay[hidden] {
  display: none;
}

.busy-overlay__card {
  display: grid;
  justify-items: center;
  width: min(360px, 100%);
  padding: 24px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.busy-overlay__card strong {
  margin-top: 14px;
  font-size: 18px;
}

.busy-overlay__card p {
  margin: 8px 0 0;
  color: var(--moto-muted);
  font-size: 14px;
  line-height: 1.4;
}

.busy-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(215, 25, 32, 0.18);
  border-top-color: var(--moto-brand);
  border-radius: 50%;
  animation: busy-spinner-rotate 0.8s linear infinite;
}

@keyframes busy-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.import-report {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(215, 25, 32, 0.24);
  border-radius: 16px;
  background: #fff8f8;
  box-shadow: var(--moto-shadow);
}

.import-report__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.import-report h2,
.import-report h3 {
  margin: 0;
  line-height: 1.2;
}

.import-report h2 {
  font-size: 22px;
}

.import-report h3 {
  font-size: 15px;
}

.import-report__section {
  padding: 14px;
  border: 1px solid rgba(215, 25, 32, 0.18);
  border-radius: 12px;
  background: #ffffff;
}

.import-report__section + .import-report__section {
  margin-top: 12px;
}

.import-report__section ol {
  max-height: 320px;
  margin: 12px 0 0;
  padding-left: 22px;
  overflow: auto;
  color: var(--moto-text);
  font-size: 14px;
  line-height: 1.45;
}

.import-report__section li + li {
  margin-top: 6px;
}

.import-report__section--alert {
  border-color: rgba(215, 25, 32, 0.30);
}

.import-resolution-form {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.import-conflict-table {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: #ffffff;
}

.import-conflict-table__head,
.import-conflict-table__row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.55fr) minmax(210px, 1fr) minmax(210px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.import-conflict-table__head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff5f5;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.import-conflict-table__row {
  border-top: 1px solid var(--moto-line);
}

.import-conflict-table__row strong,
.import-conflict-table__row span {
  display: block;
  overflow-wrap: anywhere;
}

.import-conflict-table__row > div > span {
  margin-top: 3px;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 800;
}

.choice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fafbfe;
  cursor: pointer;
}

.choice-card input {
  margin-top: 2px;
  accent-color: var(--moto-brand);
}

.choice-card:has(input:checked) {
  border-color: rgba(215, 25, 32, 0.55);
  background: rgba(215, 25, 32, 0.08);
}

.import-resolution-form__actions {
  justify-content: flex-end;
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
  gap: 14px;
  align-items: end;
}

.filters--single {
  grid-template-columns: minmax(320px, 1fr) auto;
}

.work-section {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 4px solid var(--moto-line);
}

.work-section--collapsible > summary {
  cursor: pointer;
  list-style: none;
}

.work-section--collapsible > summary::-webkit-details-marker {
  display: none;
}

.work-section__summary h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}

.work-section__chevron {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--moto-line);
  border-radius: 7px;
  background: #fff;
  color: var(--moto-muted);
  font-size: 20px;
  line-height: 1;
  transition: transform 160ms ease;
}

.work-section__chevron::before {
  content: "⌄";
}

.work-section--collapsible[open] .work-section__chevron {
  transform: rotate(180deg);
}

.work-section__content {
  display: grid;
  gap: 12px;
}

#acceptances-section {
  border-top-color: #147346;
}

#reports-section {
  border-top-color: var(--moto-brand);
}

#reports-section .section-head > .compact-search {
  margin-left: auto;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-head--standalone {
  margin-bottom: 14px;
}

.section-head__content {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.section-head__hint {
  margin: 5px 0 0;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 700;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--moto-muted);
}

.compact-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-search--open > .icon-button--search {
  display: none;
}

.compact-search__panel {
  display: grid;
  grid-template-columns: minmax(190px, 280px) 42px 42px;
  gap: 8px;
  align-items: center;
}

.compact-search__panel--with-select {
  grid-template-columns: minmax(190px, 240px) minmax(105px, 125px) 42px auto;
}

.resource-head__actions .compact-search {
  flex: 0 0 42px;
  width: 42px;
  min-height: 42px;
}

.resource-head__actions .compact-search:has(.compact-search__panel:not([hidden])) {
  flex: 1 1 190px;
  width: auto;
}

.resource-head__actions .compact-search--with-kind {
  flex: 0 1 auto;
  width: auto;
}

.resource-head__actions .compact-search--with-kind:has(.compact-search__panel:not([hidden])) {
  flex: 1 1 260px;
}

.resource-head__actions .compact-search--with-kind .icon-button--search,
.resource-head__actions .compact-search--with-kind .compact-search__panel {
  order: 1;
}

.resource-head__actions .compact-search--with-kind .compact-search__kind {
  order: 2;
  flex: 0 0 104px;
}

.resource-head__actions .compact-search--with-kind.compact-search--open {
  flex-wrap: nowrap;
}

.resource-head__actions .compact-search--with-kind.compact-search--open .compact-search__panel {
  flex: 1 1 auto;
  width: auto;
}

.resource-head__actions .compact-search__panel {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 42px 42px;
}

.resource-head__actions .compact-search__panel--with-select {
  grid-template-columns: minmax(0, 1fr) minmax(92px, 105px) 42px auto;
}

.compact-search__panel[hidden] {
  display: none;
}

.compact-search__kind {
  min-width: 104px;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
  font-weight: 700;
  padding: 9px 30px 9px 12px;
}

.compact-search input[type="search"],
.compact-search select {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
  padding: 9px 12px;
  outline: none;
}

.compact-search input[type="search"]:focus,
.compact-search select:focus {
  border-color: rgba(215, 25, 32, 0.55);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.10);
}

.compact-search__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: 1;
  width: 42px;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: var(--moto-card);
  color: var(--moto-muted);
  text-decoration: none;
}

.compact-search__panel > .icon-button--search.icon-button--primary {
  order: 2;
}

.compact-search__reset::before {
  content: "↻";
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}

.compact-search__reset:hover {
  border-color: var(--moto-brand);
  color: var(--moto-brand);
}

.field-hint {
  min-height: 18px;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 700;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: var(--moto-card);
  color: var(--moto-text);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--moto-brand);
}

.icon-button--active {
  border-color: var(--moto-brand);
  background: #fff4f5;
  color: var(--moto-brand-dark);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.10);
}

.resource-head__actions .table-filters__trigger--active {
  border-color: var(--moto-brand);
  background: var(--moto-brand);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.14);
}

.resource-head__actions .table-filters__trigger--active:hover {
  border-color: var(--moto-brand-dark);
  background: var(--moto-brand-dark);
}

.page-shell:has(.moto-table__filters:not([hidden])) .resource-head__actions .icon-button--search[data-action~="table-filters#toggle"] {
  border-color: var(--moto-brand);
  background: var(--moto-brand);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.14);
}

.page-shell:has(.moto-table__filters:not([hidden])) .resource-head__actions .icon-button--search[data-action~="table-filters#toggle"]:hover {
  border-color: var(--moto-brand-dark);
  background: var(--moto-brand-dark);
}

.resource-head__action-bar .products-filter-popover .icon-button--filter.icon-button--active {
  border-color: var(--moto-brand);
  background: var(--moto-brand);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.12);
}

.resource-head__action-bar .products-filter-popover .icon-button--filter.icon-button--active:hover {
  border-color: var(--moto-brand-dark);
  background: var(--moto-brand-dark);
}

.icon-button--primary {
  border-color: var(--moto-brand);
  background: var(--moto-brand);
  color: #fff;
}

.icon-button--search::before {
  content: "";
  width: 13px;
  height: 13px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: translate(-1px, -1px);
}

.icon-button--search::after {
  content: "";
  width: 8px;
  height: 2px;
  margin-left: -3px;
  background: currentColor;
  border-radius: 999px;
  transform: rotate(45deg) translate(2px, 6px);
}

.icon-button--warning {
  border-color: rgba(214, 122, 0, 0.34);
  background: #fff7e8;
  animation: workflow-warning-pulse 1.1s ease-in-out infinite;
}

.icon-button--warning::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 0;
  height: 0;
  border-right: 11px solid transparent;
  border-bottom: 20px solid #d67a00;
  border-left: 11px solid transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  text-indent: -3px;
}

.icon-button--close::before,
.icon-button--close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.icon-button--close::before {
  transform: rotate(45deg);
}

.icon-button--close::after {
  transform: rotate(-45deg);
}

@keyframes workflow-warning-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(214, 122, 0, 0.42);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(214, 122, 0, 0);
    transform: scale(1.08);
  }
}

.date-picker {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 6px;
  align-items: center;
}

.date-picker__display {
  width: 100%;
  height: 46px;
}

.date-picker__button {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid var(--moto-line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--moto-text);
  cursor: pointer;
}

.date-picker__button::before {
  content: "";
  position: absolute;
  inset: 11px 10px 10px;
  border: 2px solid currentColor;
  border-top-width: 5px;
  border-radius: 3px;
}

.date-picker__button::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  top: 21px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.date-picker__button:hover {
  border-color: var(--moto-brand);
  color: var(--moto-brand);
}

.date-picker__native {
  position: absolute;
  right: 17px;
  bottom: 0;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
  padding: 9px 12px;
  outline: none;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(215, 25, 32, 0.55);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.10);
}

.field--readonly input:disabled {
  color: var(--moto-muted);
  background: #f1f3f7;
  cursor: not-allowed;
}

.field .date-picker__native,
.page-shell--report-form .summary-tile--field .date-picker__native,
.report-lines__row .date-picker__native {
  position: absolute;
  right: 17px;
  bottom: 0;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.table-card {
  overflow-x: auto;
  overflow-y: visible;
}

.table-card--spaced {
  margin-bottom: 18px;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
}

#reports-section .compact-search--with-kind {
  flex-wrap: nowrap;
  min-width: 0;
}

#reports-section .compact-search--with-kind .compact-search__panel {
  order: 1;
}

#reports-section .compact-search--with-kind .compact-search__kind {
  order: 2;
  flex: 0 0 104px;
}

#reports-section .compact-search--with-kind.compact-search--open .compact-search__panel {
  flex: 1 1 auto;
  min-width: 0;
}

.table-pagination + .table-card {
  margin-top: 28px;
}

.table-pagination__per-page,
.table-pagination__summary,
.table-pagination__links,
.table-pagination__jump {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-pagination__per-page select {
  min-height: 38px;
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: var(--moto-card);
  color: var(--moto-text);
  font: inherit;
  font-weight: 800;
}

.table-pagination__page {
  min-width: 108px;
  text-align: center;
}

.table-pagination__jump label {
  color: var(--moto-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.table-pagination__jump input {
  width: 62px;
  min-height: 38px;
  box-sizing: border-box;
  padding: 7px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: var(--moto-card);
  color: var(--moto-text);
  font: inherit;
  font-weight: 800;
}

.table-pagination__jump .moto-btn {
  min-height: 38px;
  padding: 7px 12px;
}

.moto-btn--disabled {
  border-color: var(--moto-line);
  background: #eef1f6;
  color: #a0a7b4;
  cursor: not-allowed;
  opacity: 0.72;
}

.table-card__head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--moto-line);
  background: #fafbfe;
}

.moto-table {
  width: 100%;
  min-width: max-content;
}

.table-card--supplier-order-lines {
  overflow-x: visible;
}

.table-card--customer-or-suppliers {
  overflow-x: visible;
}

.table-card--vehicles {
  overflow-x: visible;
}

.table-card--created-reports {
  overflow-x: visible;
}

.table-card--acceptance-records {
  overflow-x: visible;
}

.table-card--products {
  overflow-x: visible;
}

.table-card--inventory {
  overflow-x: visible;
}

.table-card--orders {
  overflow-x: visible;
}

.table-card--ddts {
  overflow-x: visible;
}

.table-card--customer-or-suppliers .moto-table {
  min-width: 0;
}

.table-card--vehicles .moto-table {
  min-width: 0;
}

.table-card--created-reports .moto-table {
  min-width: 0;
}

.table-card--acceptance-records .moto-table {
  min-width: 0;
}

.table-card--products .moto-table {
  min-width: 0;
}

.table-card--inventory .moto-table {
  min-width: 0;
}

.table-card--orders .moto-table {
  min-width: 0;
}

.table-card--ddts .moto-table {
  min-width: 0;
}

.moto-table--supplier-order-lines {
  min-width: 0;
}

.moto-table__head,
.moto-table__row {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) minmax(110px, 0.6fr) minmax(190px, 1fr) minmax(220px, 1.2fr) minmax(80px, 0.4fr) minmax(130px, 0.6fr);
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}

.moto-table__empty {
  padding: 24px 28px;
  color: var(--moto-ink);
}

.moto-table__empty strong {
  display: block;
  font-size: 16px;
}

.moto-table__empty p {
  margin: 5px 0 0;
  color: var(--moto-muted);
}

.moto-table--customer-or-suppliers .moto-table__head,
.moto-table--customer-or-suppliers .moto-table__row,
.moto-table--customer-or-suppliers .moto-table__filters {
  grid-template-columns: minmax(0, 1.35fr) minmax(92px, 0.55fr) minmax(0, 0.9fr) minmax(0, 0.95fr) minmax(0, 1fr) minmax(82px, 0.4fr) minmax(92px, 0.45fr);
}

.moto-table--customer-or-suppliers .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(49, 103, 156, 0.16);
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--customer-or-suppliers .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--customer-or-suppliers .moto-table__filters input:not([type="submit"]),
.moto-table--customer-or-suppliers .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--customer-or-suppliers .moto-table__filters input:focus,
.moto-table--customer-or-suppliers .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table--customer-or-suppliers .moto-table__filters-actions {
  grid-column: 6 / -1;
  justify-content: flex-end;
}

.moto-table--customer-or-suppliers .moto-table__head > div,
.moto-table--customer-or-suppliers .moto-table__row > div {
  min-width: 0;
}

.moto-table--customer-or-suppliers .status-pill,
.moto-table--customer-or-suppliers .count-pill {
  white-space: normal;
}

.moto-table--customer-or-suppliers .row-actions {
  flex-wrap: wrap;
}

.moto-table--vehicles .moto-table__head,
.moto-table--vehicles .moto-table__row,
.moto-table--vehicles .moto-table__filters {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.15fr) minmax(0, 1.1fr) minmax(148px, 0.55fr);
}

.moto-table--vehicles .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(49, 103, 156, 0.16);
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--vehicles .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--vehicles .moto-table__filters input:not([type="submit"]),
.moto-table--vehicles .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--vehicles .moto-table__filters input:focus,
.moto-table--vehicles .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table--vehicles .moto-table__head > div,
.moto-table--vehicles .moto-table__row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.moto-table--vehicles .row-actions {
  flex-wrap: wrap;
}

.moto-table--reports .moto-table__head,
.moto-table--reports .moto-table__row {
  grid-template-columns: minmax(160px, 0.9fr) minmax(210px, 1.2fr) minmax(200px, 1.1fr) minmax(130px, 0.7fr) minmax(150px, 0.7fr);
}

.moto-table--created-reports .moto-table__head,
.moto-table--created-reports .moto-table__row,
.moto-table--created-reports .moto-table__filters {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.05fr) minmax(300px, 1.3fr) minmax(120px, 0.65fr);
}

.moto-table--created-reports .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(49, 103, 156, 0.16);
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--created-reports .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--created-reports .moto-table__filters input:not([type="submit"]),
.moto-table--created-reports .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--created-reports .moto-table__filters input:focus,
.moto-table--created-reports .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table--acceptance-generation .moto-table__filters {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(210px, 1.2fr) minmax(200px, 1.1fr) minmax(130px, 0.7fr) minmax(150px, 0.7fr);
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(49, 103, 156, 0.16);
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.table-card--acceptance-generation .moto-table {
  min-width: 0;
}

.moto-table--acceptance-generation .moto-table__head,
.moto-table--acceptance-generation .moto-table__row,
.moto-table--acceptance-generation .moto-table__filters {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 0.7fr) minmax(120px, 0.7fr);
}

.moto-table--acceptance-generation .moto-table__head > div,
.moto-table--acceptance-generation .moto-table__row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.moto-table--acceptance-generation .moto-table__filters[hidden] { display: none !important; }

.moto-table--acceptance-generation .moto-table__filters input:not([type="submit"]),
.moto-table--acceptance-generation .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--created-reports .moto-table__head > div,
.moto-table--created-reports .moto-table__row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.moto-table--created-reports .row-actions {
  flex-wrap: wrap;
}

.table-card--intervention-analysis {
  overflow: hidden;
}

.moto-table__filters--intervention-analysis {
  display: grid;
  grid-template-columns: 130px minmax(210px, 1fr) minmax(210px, 1fr) 145px 145px 165px 165px max-content;
  gap: 12px;
  align-items: center;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table__filters--intervention-analysis > div {
  min-width: 0;
}

.moto-table__filters--intervention-analysis .moto-table__filters-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.moto-table__filters--intervention-analysis .moto-table__filters-actions .moto-btn {
  flex: 0 0 auto;
}

.moto-table__filters--intervention-analysis input:not([type="submit"]),
.moto-table__filters--intervention-analysis select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table__filters--intervention-analysis input:focus,
.moto-table__filters--intervention-analysis select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

@media (max-width: 1480px) and (min-width: 641px) {
  .moto-table__filters--intervention-analysis {
    grid-template-columns: minmax(105px, 0.58fr) minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(110px, 0.68fr) minmax(110px, 0.68fr) minmax(125px, 0.82fr) minmax(125px, 0.82fr) max-content;
  }
}

.intervention-analysis-entries {
  overflow-x: visible;
  padding-inline: 12px;
}

.intervention-analysis-entries table {
  min-width: 0;
  table-layout: fixed;
}

.intervention-analysis-entries table th,
.intervention-analysis-entries table td {
  padding: 10px 3px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.intervention-analysis-entries table td {
  font-size: 12px;
  line-height: 1.4;
}

.intervention-analysis-entries table th {
  font-size: 10px;
}

.intervention-analysis-entries .status-pill {
  font-size: 11px;
  min-height: 24px;
  padding: 0 7px;
}

.intervention-analysis-entries .intervention-analysis-row--open {
  background: linear-gradient(90deg, #fff0f0 0%, #fffafa 72%);
}

.intervention-analysis-entries .intervention-analysis-row--open > td:first-child {
  box-shadow: inset 4px 0 0 #dc6262;
}

.intervention-analysis-entries .intervention-analysis-row--closed {
  background: linear-gradient(90deg, #edf9f1 0%, #fbfffc 72%);
}

.intervention-analysis-entries .intervention-analysis-row--closed > td:first-child {
  box-shadow: inset 4px 0 0 #65ae7b;
}

.intervention-analysis-entries td:nth-child(5),
.intervention-analysis-entries td:nth-child(6) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intervention-analysis-entries th:nth-child(8),
.intervention-analysis-entries td:nth-child(8) {
  text-align: center;
}

.intervention-analysis-entries th:nth-child(n + 9),
.intervention-analysis-entries td:nth-child(n + 9) {
  text-align: right;
}

.intervention-analysis-entries__number { width: 104px; }
.intervention-analysis-entries__date { width: 78px; }
.intervention-analysis-entries__customer { width: 12%; }
.intervention-analysis-entries__vehicle { width: 10%; }
.intervention-analysis-entries__labor-summary { width: auto; }
.intervention-analysis-entries__mechanics { width: 14%; }
.intervention-analysis-entries__rfm { width: 104px; }
.intervention-analysis-entries__status { width: 64px; }
.intervention-analysis-entries__hours { width: 34px; }
.intervention-analysis-entries__amount { width: 78px; }
.intervention-analysis-entries__total { width: 78px; }

.table-card--month-end-report-analysis {
  overflow: hidden;
}

.moto-table__filters--month-end-report-analysis {
  display: grid;
  grid-template-columns: 150px minmax(210px, 1fr) minmax(210px, 1fr) 165px 150px max-content;
  gap: 12px;
  align-items: center;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table__filters--month-end-report-analysis > div {
  min-width: 0;
}

.moto-table__filters--month-end-report-analysis .moto-table__filters-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.moto-table__filters--month-end-report-analysis .moto-table__filters-actions .moto-btn {
  flex: 0 0 auto;
}

.moto-table__filters--month-end-report-analysis input:not([type="submit"]),
.moto-table__filters--month-end-report-analysis select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table__filters--month-end-report-analysis input:focus,
.moto-table__filters--month-end-report-analysis select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.month-end-report-analysis-entries {
  overflow-x: visible;
}

.month-end-report-analysis-entries table {
  min-width: 0;
  table-layout: fixed;
}

.month-end-report-analysis-entries th,
.month-end-report-analysis-entries td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-end-report-analysis-entries th:nth-child(5),
.month-end-report-analysis-entries td:nth-child(5) {
  text-align: center;
}

.month-end-report-analysis-entries th:nth-child(n + 6),
.month-end-report-analysis-entries td:nth-child(n + 6) {
  text-align: right;
}

.month-end-report-analysis-entries__number { width: 11%; }
.month-end-report-analysis-entries__month { width: 10%; }
.month-end-report-analysis-entries__customer { width: 18%; }
.month-end-report-analysis-entries__vehicle { width: 22%; }
.month-end-report-analysis-entries__status { width: 10%; }
.month-end-report-analysis-entries__amount { width: 10%; }
.month-end-report-analysis-entries__total { width: 11%; }

@media (max-width: 1320px) and (min-width: 641px) {
  .moto-table__filters--month-end-report-analysis {
    grid-template-columns: minmax(110px, 0.65fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(125px, 0.82fr) minmax(115px, 0.7fr) max-content;
  }
}

.moto-table--month-end-reports .moto-table__head,
.moto-table--month-end-reports .moto-table__row,
.moto-table--month-end-reports .moto-table__filters {
  grid-template-columns: 24px minmax(66px, .43fr) minmax(0, 1.02fr) minmax(0, .95fr) minmax(140px, .58fr) minmax(70px, .34fr) minmax(65px, .36fr) minmax(116px, .44fr) minmax(215px, .68fr);
  gap: 10px;
  padding: 11px 14px;
}

.table-card:has(.moto-table--month-end-reports) {
  overflow-x: visible;
}

.moto-table--month-end-reports {
  min-width: 0;
}

.moto-table--month-end-reports .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(49, 103, 156, 0.16);
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--month-end-reports .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--month-end-reports .moto-table__filters input:not([type="submit"]),
.moto-table--month-end-reports .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--month-end-reports .moto-table__filters input:focus,
.moto-table--month-end-reports .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table--month-end-reports .moto-table__filters-actions {
  grid-column: 9 / -1;
  justify-content: flex-end;
}

.moto-table--month-end-reports .moto-table__head > div,
.moto-table--month-end-reports .moto-table__row > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moto-table--month-end-reports .moto-table__head > div:last-child { text-align: center; }

.moto-table--month-end-reports .moto-table__head { font-size: 11px; }
.moto-table--month-end-reports .moto-table__row { font-size: 14px; }
.moto-table--month-end-reports .status-pill { padding: 5px 9px; font-size: 11px; }

.moto-table--vat-rates .moto-table__head,
.moto-table--vat-rates .moto-table__row {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.35fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr);
}

.moto-table--month-end-reports .row-actions {
  flex-wrap: nowrap;
}

.month-end-report-actions { gap: 5px; align-items: center; }

.month-end-report-date__display,
.month-end-report-date__form { display: inline-flex; align-items: center; gap: 5px; }
.month-end-report-date__form[hidden],
.month-end-report-date__display[hidden] { display: none !important; }
.month-end-report-date__edit,
.month-end-report-date__save,
.month-end-report-date__cancel { display: inline-grid; width: 22px; height: 28px; place-items: center; flex: 0 0 22px; padding: 0; border: 1px solid var(--moto-line); border-radius: 7px; background: #fff; cursor: pointer; }
.month-end-report-date__edit { color: #2f6ca8; }
.month-end-report-date__edit:hover { border-color: #2f6ca8; background: #edf5ff; }
.month-end-report-date__edit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.month-end-report-date__input { width: 82px; min-width: 0; height: 28px; padding: 3px 5px; border: 1px solid var(--moto-line); border-radius: 7px; background: #fff; color: var(--moto-text); font: inherit; font-size: 11px; }
.month-end-report-date__save { border-color: #a7d9bb; background: #edf9f1; color: #198754; font-weight: 900; }
.month-end-report-date__cancel { border-color: #fecaca; background: #fff7f7; color: var(--moto-brand); font-size: 18px; line-height: 1; }

.month-end-report-invoice__form {
  display: flex;
  align-items: center;
  gap: 4px;
}

.month-end-report-invoice__form input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--moto-line);
  border-radius: 7px;
  background: #fff;
  color: var(--moto-text);
  font-size: 12px;
}

.month-end-report-invoice__save {
  width: 28px;
  height: 32px;
  flex: 0 0 28px;
  padding: 0;
  border: 1px solid #a7d9bb;
  border-radius: 7px;
  background: #edf9f1;
  color: #198754;
  cursor: pointer;
  font-weight: 900;
}

.month-end-report-invoice__save:hover { border-color: #198754; color: #12683f; }
.month-end-report-invoice__locked { color: var(--moto-muted); }
.month-end-report-invoice__linked { display: inline-flex; align-items: center; gap: 7px; }
.month-end-report-invoice__linked strong { min-width: 0; overflow-wrap: anywhere; }
.month-end-report-invoice__document { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid #a9c9ea; border-radius: 8px; background: #edf6ff; color: #24689f; }
.month-end-report-invoice__document:hover { border-color: #24689f; color: #164c79; }
.month-end-report-invoice__document svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.month-end-report-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--moto-line);
  border-radius: 9px;
  background: #fff;
  color: var(--moto-muted);
}

.month-end-report-action:hover { border-color: var(--moto-brand); color: var(--moto-brand); }
.month-end-report-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.moto-table--month-end-reports .moto-btn--compact { padding: 6px 8px; font-size: 11px; white-space: nowrap; }
.month-end-report-action--edit { color: #2f6ca8; }
.month-end-report-action--confirm { border-color: #a7d9bb; background: #edf9f1; color: #198754; }
.month-end-report-action--confirm:hover { border-color: #198754; color: #12683f; }
.month-end-report-action--delete { border-color: #f1b4b4; background: #fff3f3; color: #c62828; }
.month-end-report-action--delete:hover { border-color: #c62828; color: #9e1d1d; }

.table-action-form {
  display: inline-flex;
  margin: 0;
}

.table-action {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border: 1px solid #d8e0eb;
  border-radius: 9px;
  background: #fff;
  color: #65758c;
  line-height: 1;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.table-action:hover,
.table-action:focus-visible {
  border-color: var(--moto-brand);
  color: var(--moto-brand);
}

.table-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.table-action--success {
  border-color: #a7d9bb;
  background: #edf9f1;
  color: #198754;
}

.table-action--success:hover,
.table-action--success:focus-visible {
  border-color: #198754;
  color: #12683f;
}

.table-action--edit,
.table-action--mail {
  color: #2f6ca8;
}

.table-action--info {
  border-color: #b8cbe0;
  background: #f2f7fc;
  color: #2f6ca8;
  cursor: help;
}

.table-action--info:hover,
.table-action--info:focus-visible {
  border-color: #2f6ca8;
  color: #214f7c;
}

.table-action--danger {
  border-color: #f1b4b4;
  background: #fff3f3;
  color: #c62828;
}

.table-action--danger:hover,
.table-action--danger:focus-visible {
  border-color: #c62828;
  color: #9e1d1d;
}

.table-action:disabled,
.table-action--disabled {
  opacity: .45;
  cursor: not-allowed;
}

.electronic-invoice-import { grid-template-columns: minmax(290px, .85fr) minmax(460px, 1.15fr); align-items: center; }
.electronic-invoice-import__intro { min-width: 0; }
.electronic-invoice-import__features { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; padding: 0; list-style: none; }
.electronic-invoice-import__features li { padding: 5px 9px; border: 1px solid rgba(215, 25, 32, .18); border-radius: 999px; background: rgba(255, 255, 255, .72); color: var(--moto-brand-dark); font-size: 11px; font-weight: 900; }
.electronic-invoice-import__form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.electronic-invoice-import__file label { margin-bottom: 6px; }
.electronic-invoice-import__submit { display: grid; gap: 6px; min-width: 150px; }
.electronic-invoice-import__submit > span { color: var(--moto-muted); font-size: 11px; font-weight: 800; text-align: right; }

@media (max-width: 860px) {
  .electronic-invoice-import { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .electronic-invoice-import__form { grid-template-columns: 1fr; }
  .electronic-invoice-import__submit { min-width: 0; }
  .electronic-invoice-import__submit > span { text-align: left; }
}
.table-card--electronic-invoices { overflow-x: visible; }
.moto-table--electronic-invoices { min-width: 0; }
.moto-table--electronic-invoices .moto-table__head,
.moto-table--electronic-invoices .moto-table__row {
  grid-template-columns: minmax(82px, .5fr) minmax(76px, .4fr) minmax(150px, 1.2fr) minmax(72px, .4fr) minmax(86px, .45fr) minmax(48px, .26fr) minmax(144px, .7fr);
  gap: 10px;
  padding: 13px 18px;
}
.moto-table--electronic-invoices .moto-table__head { font-size: 11px; }
.moto-table--electronic-invoices .moto-table__row > div { min-width: 0; }
.moto-table--electronic-invoices .moto-table__main small,
.moto-table--electronic-invoices .moto-table__row > div:nth-child(3) { overflow-wrap: anywhere; }
.moto-table--electronic-invoices .row-actions { justify-content: flex-end; }
.moto-table--electronic-invoices .moto-btn--compact { padding: 6px 8px; font-size: 11px; }
.moto-table--electronic-invoices .electronic-invoice-row--unmatched { background: #fff3f3; box-shadow: inset 4px 0 0 #d71920; }
.electronic-invoice-customer { display: grid; justify-items: start; gap: 4px; }
.electronic-invoice-customer small { color: var(--moto-muted); font-size: 11px; }
.electronic-invoice-unmatched-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(215, 25, 32, .14); color: #b31319; font-size: 11px; font-weight: 900; }
.electronic-invoice-unmatched-warning { margin-bottom: 18px; padding: 16px 18px; border: 1px solid #e49a9d; border-left: 5px solid #d71920; border-radius: 10px; background: #fff3f3; color: #781116; }
.electronic-invoice-unmatched-warning strong { display: block; font-size: 16px; }
.electronic-invoice-unmatched-warning p { margin: 5px 0 0; line-height: 1.45; }
.electronic-invoice-document { padding: 0; overflow: hidden; }
.electronic-invoice-document__identity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .65fr) minmax(0, 1fr); gap: 22px; padding: 22px 24px; background: linear-gradient(115deg, #f9fbff, #fff); }
.electronic-invoice-document__identity > div { min-width: 0; }
.electronic-invoice-document__identity > div > span { display: block; color: var(--moto-muted); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.electronic-invoice-document__identity strong { display: block; margin-top: 5px; font-size: 16px; }
.electronic-invoice-document__identity small { display: block; margin-top: 3px; color: var(--moto-muted); overflow-wrap: anywhere; }
.electronic-invoice-document__number { padding: 3px 18px; border-right: 1px solid var(--moto-line); border-left: 1px solid var(--moto-line); text-align: center; }
.electronic-invoice-document__number b { display: block; margin-top: 8px; color: var(--moto-brand); font-size: 21px; }
.electronic-invoice-document__section { margin: 0 24px 18px; border: 1px solid var(--moto-line); border-radius: 10px; overflow: hidden; }
.electronic-invoice-document__section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; background: #f4f7fc; }
.electronic-invoice-document__section-head h2 { margin: 0; font-size: 16px; }
.electronic-invoice-document__section-head span { color: var(--moto-muted); font-size: 12px; font-weight: 800; }
.electronic-invoice-document__line { display: grid; grid-template-columns: 34px minmax(220px, 1fr) minmax(74px, .26fr) minmax(82px, .3fr) minmax(52px, .18fr) minmax(86px, .32fr); gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--moto-line); }
.electronic-invoice-document__line > span { min-width: 0; }
.electronic-invoice-document__line > span:not(:nth-child(2)) { text-align: right; white-space: nowrap; }
.electronic-invoice-document__line strong { display: block; }
.electronic-invoice-document__line small { display: block; margin-top: 3px; color: var(--moto-muted); font-size: 12px; overflow-wrap: anywhere; }
.electronic-invoice-document__line--head { padding-top: 8px; padding-bottom: 8px; background: #dfe7f4; color: #405170; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.electronic-invoice-document__bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.electronic-invoice-document__bottom .electronic-invoice-document__section { margin-right: 12px; }
.electronic-invoice-document__bottom .electronic-invoice-document__section + .electronic-invoice-document__section { margin-right: 24px; margin-left: 6px; }
.electronic-invoice-document__summary-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--moto-line); }
.electronic-invoice-document__summary-row > :last-child { text-align: right; }
.electronic-invoice-document__summary-row small { display: block; margin-top: 3px; color: var(--moto-muted); }
.electronic-invoice-document__notes p { margin: 0; padding: 12px 14px; }
.electronic-invoice-document__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0 24px 20px; color: var(--moto-muted); font-size: 12px; }
.electronic-invoice-document__meta strong { color: var(--moto-text); }

@media (max-width: 860px) {
  .moto-table--electronic-invoices .moto-table__head,
  .moto-table--electronic-invoices .moto-table__row { grid-template-columns: minmax(82px, .55fr) minmax(0, 1.35fr) minmax(72px, .45fr) minmax(50px, .3fr); }
  .moto-table--electronic-invoices .moto-table__head > :nth-child(2),
  .moto-table--electronic-invoices .moto-table__head > :nth-child(5),
  .moto-table--electronic-invoices .moto-table__head > :nth-child(6),
  .moto-table--electronic-invoices .moto-table__row > :nth-child(2),
  .moto-table--electronic-invoices .moto-table__row > :nth-child(5),
  .moto-table--electronic-invoices .moto-table__row > :nth-child(6) { display: none; }
  .electronic-invoice-document__identity { grid-template-columns: 1fr; }
  .electronic-invoice-document__number { padding: 14px 0; border-top: 1px solid var(--moto-line); border-bottom: 1px solid var(--moto-line); border-right: 0; border-left: 0; }
  .electronic-invoice-document__bottom { grid-template-columns: 1fr; }
  .electronic-invoice-document__bottom .electronic-invoice-document__section,
  .electronic-invoice-document__bottom .electronic-invoice-document__section + .electronic-invoice-document__section { margin-right: 24px; margin-left: 24px; }
}

@media (max-width: 620px) {
  .electronic-invoice-document__identity { padding: 18px; }
  .electronic-invoice-document__section { margin-right: 18px; margin-left: 18px; overflow-x: auto; }
  .electronic-invoice-document__lines { min-width: 600px; }
  .electronic-invoice-document__meta { padding-right: 18px; padding-left: 18px; }
  .electronic-invoice-document__bottom .electronic-invoice-document__section,
  .electronic-invoice-document__bottom .electronic-invoice-document__section + .electronic-invoice-document__section { margin-right: 18px; margin-left: 18px; }
}
.electronic-invoice-details { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.electronic-invoice-details strong, .electronic-invoice-details span { display: block; }
.electronic-invoice-details strong { color: var(--moto-muted); font-size: 12px; text-transform: uppercase; }
.electronic-invoice-details span { margin-top: 4px; font-weight: 800; }
.electronic-invoice-report-list, .electronic-invoice-candidates { display: grid; gap: 9px; }
.electronic-invoice-report-list__item, .electronic-invoice-candidates label { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--moto-line); border-radius: 8px; color: var(--moto-text); text-decoration: none; }
.electronic-invoice-candidates label { justify-content: flex-start; align-items: center; cursor: pointer; }

.reset-options { display: grid; gap: 10px; }
.reset-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 13px 14px; border: 1px solid var(--moto-line); border-radius: 10px; cursor: pointer; }
.reset-option:has(input:checked) { border-color: #d95b5b; background: #fff6f6; }
.reset-option input { margin: 4px 0 0; }
.reset-option strong, .reset-option small { display: block; }
.reset-option small { margin-top: 3px; color: var(--moto-muted); line-height: 1.35; }
.reset-option em { min-width: 32px; padding: 3px 8px; border-radius: 999px; background: #f1f3f6; color: var(--moto-ink); font-size: .85rem; font-style: normal; font-weight: 700; text-align: center; }


.moto-table--created-reports .row-actions--reports {
  display: grid;
  align-items: start;
  gap: 8px;
}

.row-actions--reports__primary,
.row-actions--reports__secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.row-actions--reports__secondary {
  justify-content: center;
  padding-top: 8px;
  border-top: 1px solid var(--moto-line);
}

.moto-table--vehicle-reports .moto-table__head,
.moto-table--vehicle-reports .moto-table__row {
  grid-template-columns: minmax(180px, 0.8fr) minmax(280px, 1.6fr) minmax(120px, 0.5fr) minmax(140px, 0.55fr);
}

.moto-table--acceptance-records .moto-table__head,
.moto-table--acceptance-records .moto-table__row,
.moto-table--acceptance-records .moto-table__filters {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.05fr) minmax(0, 0.55fr) minmax(0, 0.85fr) minmax(120px, 0.8fr);
}

.moto-table--acceptance-records .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(49, 103, 156, 0.16);
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--acceptance-records .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--acceptance-records .moto-table__filters input:not([type="submit"]),
.moto-table--acceptance-records .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--acceptance-records .moto-table__filters input:focus,
.moto-table--acceptance-records .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table--acceptance-records .moto-table__head > div,
.moto-table--acceptance-records .moto-table__row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.moto-table--acceptance-records .row-actions {
  flex-wrap: wrap;
}

.moto-table--mechanics .moto-table__head,
.moto-table--mechanics .moto-table__row {
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 0.45fr) minmax(130px, 0.35fr);
}

.mechanic-form .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.moto-table--users .moto-table__head,
.moto-table--users .moto-table__row {
  grid-template-columns: minmax(150px, 0.9fr) minmax(190px, 1fr) minmax(220px, 1.1fr) minmax(130px, 0.7fr) minmax(150px, 0.7fr);
}

.moto-table--products .moto-table__head,
.moto-table--products .moto-table__row,
.moto-table--products .moto-table__filters {
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.08fr) minmax(42px, 0.18fr) minmax(68px, 0.28fr) minmax(106px, 0.43fr) minmax(0, 0.72fr) minmax(112px, 0.45fr) minmax(172px, 0.6fr);
}

.moto-table--products .moto-table__head > .moto-table__sort-header {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow-wrap: normal;
}

.moto-table--products .moto-table__head > .moto-table__sort-header::after {
  flex: 0 0 auto;
  margin-left: 4px;
}

.moto-table--products .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--products .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--products .moto-table__filters input:not([type="submit"]),
.moto-table--products .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--products .moto-table__filters input:focus,
.moto-table--products .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table--products .moto-table__head > div,
.moto-table--products .moto-table__row > div,
.moto-table--products .product-supplier-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.moto-table--products .row-actions {
  flex-wrap: nowrap;
}

.moto-table--inventory .moto-table__head,
.moto-table--inventory .moto-table__row,
.moto-table--inventory .moto-table__filters {
  grid-template-columns: minmax(0, .52fr) minmax(0, .64fr) minmax(0, 1fr) minmax(40px, .14fr) repeat(4, minmax(76px, .25fr)) minmax(94px, .34fr);
}

.moto-table--inventory .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(49, 103, 156, 0.16);
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--inventory .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--inventory .moto-table__filters input:not([type="submit"]),
.moto-table--inventory .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--inventory .moto-table__filters input:focus,
.moto-table--inventory .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table--inventory .moto-table__head > div,
.moto-table--inventory .moto-table__row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inventory-quantity {
  display: inline-flex;
  min-width: 72px;
  justify-content: flex-end;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 800;
}

.inventory-adjustment-dialog__product { display: block; margin: 4px 0 16px; color: var(--moto-text); }
.inventory-adjustment-dialog__summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.inventory-adjustment-dialog__summary div { padding: 12px; border: 1px solid var(--moto-line); border-radius: 10px; background: #f7f9fc; }
.inventory-adjustment-dialog__summary dt { color: var(--moto-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.inventory-adjustment-dialog__summary dd { margin: 5px 0 0; font-size: 17px; font-weight: 900; }
.inventory-adjustment-dialog__operation { min-height: 24px; margin: 12px 0 0; color: var(--moto-primary); font-weight: 800; }

.inventory-quantity--available { background: #e9f7ee; color: #19733a; }
.inventory-quantity--zero { background: #eef1f5; color: #5d6878; }
.inventory-quantity--negative { background: #fff0f0; color: #cf2027; }
.inventory-quantity--incoming { background: #e8f2ff; color: #2266a6; }
.inventory-quantity--committed { background: #fff5df; color: #9a5c00; }

.moto-table--sales-price-lists .moto-table__head,
.moto-table--sales-price-lists .moto-table__row {
  grid-template-columns: minmax(240px, 1fr) minmax(130px, 0.45fr) minmax(100px, 0.35fr) minmax(160px, 0.55fr);
}

.product-supplier-list {
  display: grid;
  gap: 4px;
}

.product-suppliers-form {
  margin-top: 24px;
}

.detail-grid.detail-grid--product {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

.product-detail-column {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.detail-grid--product .detail-card {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
}

.detail-grid--product .detail-card__head {
  margin-bottom: 10px;
}

.product-side-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 18px;
}

.product-purchase-suppliers {
  margin-top: 0;
}

.product-overview {
  border-top: 4px solid var(--moto-brand);
}

.detail-list.detail-list--product {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px 14px;
}

.detail-list--product dd {
  margin-top: 2px;
  font-size: 14px;
}

.product-overview__amount {
  padding-left: 12px;
  border-left: 1px solid var(--moto-line);
}

.product-overview__amount dd {
  color: var(--moto-brand-dark);
  font-weight: 850;
}

.product-overview__amount--sale dd {
  color: #08744d;
}

@media (max-width: 1300px) {
  .detail-list.detail-list--product {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.detail-card__caption {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 750;
}

.product-history-list {
  display: grid;
  gap: 5px;
}

.product-history-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, auto) minmax(95px, auto);
  gap: 14px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid var(--moto-line);
}

.product-history-row:last-child {
  border-bottom: 0;
}

.product-history-row__main,
.product-history-row__document,
.product-history-row__amount {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.product-history-row__main strong,
.product-history-row__document strong,
.product-history-row__amount strong {
  color: var(--moto-text);
  font-size: 13px;
}

.product-history-row span {
  color: var(--moto-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.product-sales .empty-state {
  min-height: 0;
  padding: 10px 8px 0;
}

@media (max-width: 760px) {
  .detail-list.detail-list--product,
  .product-history-row {
    grid-template-columns: 1fr;
  }

  .product-history-row {
    gap: 4px;
    padding-block: 9px;
  }
}

.product-edit__purchase-summaries {
  margin-top: 18px;
}

.supplier-associations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.supplier-associations-list__row {
  display: inline-flex;
  max-width: 100%;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--moto-line);
  border-radius: 999px;
  background: #f7f9fd;
  font-size: 13px;
}

.supplier-associations-list__separator,
.supplier-associations-list__row small {
  color: var(--moto-muted);
}

.supplier-associations-list__row code {
  color: var(--moto-text);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.product-sales__summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}

.product-sales__summary > div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f5f8fd;
}

.product-sales__summary dt {
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-sales__summary dd {
  margin: 0;
  color: var(--moto-navy);
  font-weight: 850;
}

.product-sales__list {
  display: grid;
  gap: 6px;
  max-height: 410px;
  overflow: auto;
}

.product-sales__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
}

.product-sales__row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-sales__row span {
  color: var(--moto-muted);
  font-size: 12px;
}

.product-sales__amount {
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.product-suppliers-form__rows {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.product-supplier-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) auto 38px;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fff;
}

.product-supplier-row--removed { display: none !important; }

[data-ddt-supplier-code-picker] .combobox__menu {
  right: auto;
  width: min(680px, calc(100vw - 48px));
  max-height: min(260px, calc(100vh - 220px));
  display: block;
  padding: 4px;
  overflow-x: hidden;
}

[data-ddt-supplier-code-picker] .combobox__menu[hidden] {
  display: none;
}

[data-ddt-supplier-code-picker] .ddt-supplier-code-option {
  display: block;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  line-height: 1.25;
}

[data-ddt-supplier-code-picker] .ddt-supplier-code-option strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

.ddt-supplier-product-resolution {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--moto-muted);
  font-size: 12px;
}

.ddt-receipt-choice {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #f2f7fc;
  font-size: 12px;
}

.ddt-receipt-choice[hidden] { display: none; }
.ddt-receipt-choice__comparison { display: grid; gap: 5px; }
.ddt-receipt-choice__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ddt-receipt-choice small { color: var(--moto-muted); }
.supplier-line-received-code { display: block; margin-top: 4px; color: var(--moto-muted); font-size: 11px; white-space: normal; overflow-wrap: anywhere; }

.ddt-supplier-product-resolution[hidden] {
  display: none;
}

.ddt-temporary-code-replacement {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ddt-temporary-code-replacement label {
  color: var(--moto-muted);
  font-weight: 800;
}

.ddt-temporary-code-replacement select {
  min-width: 290px;
  height: 34px;
  padding-block: 4px;
  font-size: 12px;
}

.ddt-temporary-code-replacement[hidden] {
  display: none;
}

.ddt-imported-temporary-code,
.ddt-imported-temporary-actions,
.ddt-supplier-product-resolution__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ddt-imported-temporary-code[hidden],
.ddt-imported-temporary-actions[hidden],
.ddt-supplier-product-resolution__actions[hidden] {
  display: none;
}

.ddt-imported-temporary-code label {
  color: var(--moto-muted);
  font-weight: 800;
}

.ddt-imported-temporary-code input {
  width: min(320px, 100%);
  height: 34px;
  padding-block: 4px;
  font-size: 12px;
}

.ddt-supplier-product-status {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 2px 0 0;
}

.ddt-supplier-product-status[hidden] {
  display: none;
}

.ddt-supplier-product-status .field-hint {
  margin: 0;
}

.ddt-imported-order-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  margin-top: -2px;
  padding: 8px 10px;
  border: 1px solid #f2c16a;
  border-radius: 8px;
  background: #fff8e9;
  color: #8a5400;
  font-size: 12px;
  font-weight: 750;
}

.ddt-imported-order-summary[hidden] {
  display: none;
}

.ddt-imported-order-summary strong {
  color: var(--moto-text);
}

.moto-table--vehicle-categories .moto-table__head,
.moto-table--vehicle-categories .moto-table__row {
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.35fr);
}

.moto-table--ddts .moto-table__head,
.moto-table--ddts .moto-table__row,
.moto-table--ddts .moto-table__filters {
  grid-template-columns: minmax(100px, 0.62fr) 220px minmax(72px, 0.38fr) minmax(210px, 1.7fr) minmax(90px, 0.52fr) 180px;
}

.moto-table--ddts-unload .moto-table__head,
.moto-table--ddts-unload .moto-table__row,
.moto-table--ddts-unload .moto-table__filters {
  grid-template-columns: minmax(95px, 0.55fr) 210px minmax(72px, 0.32fr) minmax(180px, 1.25fr) 100px 115px 245px;
}

.moto-table--ddts .moto-table__head > div,
.moto-table--ddts .moto-table__row > div,
.moto-table--ddts .moto-table__filters > div {
  min-width: 0;
}

.moto-table--ddts .moto-table__row > div {
  overflow-wrap: anywhere;
}

.moto-table--ddts .moto-table__head > div:nth-child(2),
.moto-table--ddts .moto-table__row > div:nth-child(2) {
  text-align: center;
}

.moto-table--ddts .moto-table__head > div:nth-child(5),
.moto-table--ddts .moto-table__row > div:nth-child(5),
.moto-table--ddts .moto-table__filters > div:nth-child(5) input {
  text-align: right;
}

.moto-table--ddts .moto-table__head > div:last-child {
  text-align: right;
}

.moto-table--ddts .row-actions,
.moto-table--ddts .moto-table__filters-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  text-align: right;
}

.moto-table--ddts .row-actions > a {
  flex-shrink: 0;
  white-space: nowrap;
}

.moto-table--ddts .ddt-delivery-row-action {
  appearance: none;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--moto-brand);
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  line-height: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.ddt-delivery-row-status {
  flex-basis: 100%;
  color: var(--moto-muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.ddt-delivery-row-status--error {
  color: var(--moto-danger);
}

.rfm-delivery-history--standalone {
  margin: 0;
  padding: 0;
}

.rfm-delivery-history--standalone .rfm-delivery-history__table {
  margin: 0;
  border: 0;
  border-radius: inherit;
}

.ddt-date-range-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.quote-table__head, .quote-table__row, .quote-table__filters { display: grid; grid-template-columns: 145px 105px minmax(250px, 1fr) 150px 120px minmax(180px, auto); gap: 12px; align-items: center; padding: 13px 18px; }
.quote-table__head { background: #e1e8f2; color: #253755; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.quote-table__filters { border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%); }
.quote-table__filters input:not([type="submit"]), .quote-table__filters select { box-sizing: border-box; width: 100%; min-width: 0; height: 36px; margin: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font-size: 12px; }
.quote-table__filters input:focus, .quote-table__filters select:focus { border-color: var(--moto-primary); outline: 0; box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12); }
.quote-table__row { border-top: 1px solid var(--line); }
.quote-table__row small, .quote-detail__row small { display: block; margin-top: 3px; color: var(--muted); }
.quote-table__amount { text-align: right; }
.quote-status--draft { color: #a35d00; background: #fff0d5; }
.quote-status--confirmed, .quote-status--converted { color: #137443; background: #e3f5eb; }
.quote-head-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quote-lines { min-width: 0; margin: 0; padding: 0; border: 0; }
.quote-lines[disabled] { opacity: .55; }
.quote-lines-gate { margin: 18px 0; padding: 18px; border: 1px dashed #d19a28; border-radius: 12px; background: #fff8e8; font-weight: 700; }
.quote-lines-section { margin-top: 18px; }
.quote-section-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; }
.quote-section-head h2, .quote-section-head p { margin: 0; }
.quote-section-head p { margin-top: 3px; color: var(--muted); }
.quote-line-head, .quote-line { display: grid; gap: 8px; align-items: center; }
.quote-line-head { padding: 0 10px 6px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.quote-line { margin-bottom: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; }
.quote-line-head--labor, .quote-line--labor { grid-template-columns: 22px minmax(260px, 1fr) 60px 70px 105px 85px 38px; }
.quote-line-head--product, .quote-line--product { grid-template-columns: 22px minmax(130px,.75fr) minmax(120px,.65fr) minmax(210px,1.3fr) 48px 58px 95px 105px 72px 38px; }
.quote-line--product .ddt-components { grid-column: 1 / -1; }
.quote-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 18px; }
.quote-summary div { display: grid; gap: 5px; }.quote-summary span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.quote-detail { margin-bottom: 18px; }.quote-detail h2 { margin-top: 0; }
.quote-detail__head, .quote-detail__row { display: grid; grid-template-columns: minmax(260px, 1fr) 60px 70px 100px 80px 110px; gap: 10px; align-items: center; padding: 10px; }
.quote-detail__head { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.quote-detail__row { border-top: 1px solid var(--line); }.quote-detail__row > :not(:first-child) { text-align: right; }
@media (max-width: 1000px) {
  .quote-table__head, .quote-line-head { display: none; }
  .quote-table__row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .quote-table__row > :nth-child(3), .quote-table__row > :last-child { grid-column: 1 / -1; }
  .quote-line { grid-template-columns: 22px minmax(0, 1fr); align-items: start; }
  .quote-line > :not(.line-order-controls):not(.ddt-components) { grid-column: 2; }
  .quote-line > .ddt-components { grid-column: 1 / -1; }
  .quote-head-fields, .quote-summary, .quote-table__filters { grid-template-columns: 1fr; }
  .quote-table__filters > div[aria-hidden="true"] { display: none; }
}

.ddt-date-range-filter input {
  min-width: 0;
  padding-inline: 8px;
  font-size: 13px;
}

.moto-table--ddts .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--ddts .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--ddts .moto-table__filters input:not([type="submit"]),
.moto-table--ddts .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--ddts .moto-table__filters input:focus,
.moto-table--ddts .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table--orders .moto-table__head,
.moto-table--orders .moto-table__row,
.moto-table--orders .moto-table__filters {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 0.45fr) minmax(0, 1.45fr) minmax(0, 0.38fr) minmax(0, 0.45fr) minmax(0, 0.55fr);
}

.moto-table--orders .moto-table__head > div,
.moto-table--orders .moto-table__row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.moto-table--orders .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(49, 103, 156, 0.16);
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--orders .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--orders .moto-table__filters input:not([type="submit"]),
.moto-table--orders .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.order-index-vehicle {
  display: block;
  margin-top: 4px;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 700;
}

.moto-table--orders .row-actions {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.moto-table--orders .order-index-row--closed {
  background: linear-gradient(90deg, #edf9f1 0%, #fbfffc 72%);
  box-shadow: inset 4px 0 0 #65ae7b;
}

.moto-table--orders .order-index-row--available {
  background: linear-gradient(90deg, #fff7e8 0%, #fffdf8 72%);
  box-shadow: inset 4px 0 0 #e6a23c;
}

.moto-table--orders .order-index-row--unavailable {
  background: linear-gradient(90deg, #fff0f0 0%, #fffafa 72%);
  box-shadow: inset 4px 0 0 #dc6262;
}

.moto-table--orders .order-index-row--cancelled,
.order-index-details--cancelled {
  background: linear-gradient(90deg, #eef1f5 0%, #fafbfd 72%);
  box-shadow: inset 4px 0 0 #8d99a8;
}

.moto-table--orders .order-index-row--cancelled {
  color: #5c6775;
}

.order-index-decisions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 10px 18px 12px;
  border: 0;
  border-radius: 0;
}

.order-index-decisions--closed {
  background: linear-gradient(90deg, #edf9f1 0%, #fbfffc 72%);
  box-shadow: inset 4px 0 0 #65ae7b;
}

.order-index-decisions--available {
  background: linear-gradient(90deg, #fff7e8 0%, #fffdf8 72%);
  box-shadow: inset 4px 0 0 #e6a23c;
}

.order-index-decisions--unavailable {
  background: linear-gradient(90deg, #fff0f0 0%, #fffafa 72%);
  box-shadow: inset 4px 0 0 #dc6262;
}

/* Le due fasce rappresentano lo stesso ordine: l'hover deve seguirle insieme. */
.moto-table--orders .order-index-row--closed:hover,
.moto-table--orders .order-index-row--closed:has(+ .order-index-decisions:hover),
.moto-table--orders .order-index-row--closed:has(~ .order-index-details--closed:hover),
.moto-table--orders .order-index-row--closed:hover + .order-index-decisions--closed,
.moto-table--orders .order-index-row--closed:hover ~ .order-index-details--closed,
.order-index-decisions--closed:hover,
.order-index-decisions--closed:has(+ .order-index-details--closed:hover),
.order-index-decisions--closed:hover + .order-index-details--closed,
.order-index-details--closed:hover {
  background: linear-gradient(90deg, #e1f5e7 0%, #f7fff9 72%);
}

.moto-table--orders .order-index-row--available:hover,
.moto-table--orders .order-index-row--available:has(+ .order-index-decisions:hover),
.moto-table--orders .order-index-row--available:has(~ .order-index-details--available:hover),
.moto-table--orders .order-index-row--available:hover + .order-index-decisions--available,
.moto-table--orders .order-index-row--available:hover ~ .order-index-details--available,
.order-index-decisions--available:hover,
.order-index-decisions--available:has(+ .order-index-details--available:hover),
.order-index-decisions--available:hover + .order-index-details--available,
.order-index-details--available:hover {
  background: linear-gradient(90deg, #ffefcf 0%, #fffaf0 72%);
}

.moto-table--orders .order-index-row--unavailable:hover,
.moto-table--orders .order-index-row--unavailable:has(+ .order-index-decisions:hover),
.moto-table--orders .order-index-row--unavailable:has(~ .order-index-details--unavailable:hover),
.moto-table--orders .order-index-row--unavailable:hover + .order-index-decisions--unavailable,
.moto-table--orders .order-index-row--unavailable:hover ~ .order-index-details--unavailable,
.order-index-decisions--unavailable:hover,
.order-index-decisions--unavailable:has(+ .order-index-details--unavailable:hover),
.order-index-decisions--unavailable:hover + .order-index-details--unavailable,
.order-index-details--unavailable:hover {
  background: linear-gradient(90deg, #ffe1e1 0%, #fff7f7 72%);
}

.order-index-decisions__status {
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 700;
}

.order-index-decisions > [data-controller="order-workflow"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.order-index-number {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-index-expand {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--moto-line);
  border-radius: 7px;
  background: #fff;
  color: var(--moto-muted);
  cursor: pointer;
}

.order-index-expand span { transition: transform 160ms ease; }
.order-index-expand[aria-expanded="true"] span { transform: rotate(180deg); }

.order-index-details {
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.order-index-details--closed {
  background: linear-gradient(90deg, #edf9f1 0%, #fbfffc 72%);
  box-shadow: inset 4px 0 0 #65ae7b;
}

.order-index-details--available {
  background: linear-gradient(90deg, #fff7e8 0%, #fffdf8 72%);
  box-shadow: inset 4px 0 0 #e6a23c;
}

.order-index-details--unavailable {
  background: linear-gradient(90deg, #fff0f0 0%, #fffafa 72%);
  box-shadow: inset 4px 0 0 #dc6262;
}

.order-index-details__head,
.order-index-details__line {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(85px, 0.4fr) minmax(190px, 1.25fr) minmax(45px, 0.2fr) minmax(70px, 0.3fr) minmax(120px, 0.55fr) minmax(95px, 0.4fr) minmax(95px, 0.4fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.order-index-details__head {
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.order-index-details__line { border-top: 1px solid rgba(49, 103, 156, 0.14); }

.order-index-details--closed .order-index-details__line { border-top-color: #c7e6d0; }
.order-index-details--available .order-index-details__line { border-top-color: #f1d39a; }
.order-index-details--unavailable .order-index-details__line { border-top-color: #efcaca; }

.ddt-index-details {
  margin: 0;
  padding: 0 18px 12px;
  background: #fafcff;
  border-top: 1px solid var(--moto-line);
}

.ddt-index-details__head,
.ddt-index-details__line {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, .55fr) minmax(0, 1.25fr) minmax(0, .2fr) minmax(0, .35fr) minmax(0, .45fr) minmax(0, .45fr);
  gap: 12px;
  align-items: center;
}

.ddt-index-details__head > *,
.ddt-index-details__line > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ddt-index-details__head {
  padding: 11px 12px 7px;
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ddt-index-details__line {
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--moto-line);
}

.ddt-index-details__empty {
  padding: 10px 12px;
  color: var(--moto-muted);
  font-size: 14px;
}

.moto-table--supplier-order-lines .moto-table__head,
.moto-table--supplier-order-lines .moto-table__row,
.moto-table--supplier-order-lines .moto-table__filters {
  grid-template-columns: minmax(175px, 0.8fr) minmax(118px, 0.5fr) minmax(190px, 0.9fr) minmax(220px, 1fr) minmax(90px, 0.4fr) minmax(90px, 0.4fr) minmax(82px, 0.35fr) minmax(92px, 0.4fr);
}

.moto-table--supplier-order-lines .moto-table__row > div {
  min-width: 0;
}

.moto-table--supplier-order-lines .moto-table__filters {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(49, 103, 156, 0.16);
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table--supplier-order-lines .moto-table__filters[hidden] {
  display: none !important;
}

.moto-table--supplier-order-lines .moto-table__filters input:not([type="submit"]),
.moto-table--supplier-order-lines .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table--supplier-order-lines .moto-table__filters input:focus,
.moto-table--supplier-order-lines .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table__filters-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.moto-table__filters-actions .moto-btn {
  white-space: nowrap;
}

.supplier-order-index-supplier {
  display: flex;
  align-items: center;
  gap: 8px;
}

.supplier-order-index-references {
  display: grid;
  grid-column: 1 / -1;
  gap: 0;
  padding: 0 12px 2px;
  background: transparent;
}

.supplier-order-index-references__line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.2fr);
  gap: 12px;
  align-items: center;
  padding: 9px 0 0;
  color: var(--moto-muted);
  font-size: 13px;
}

.supplier-order-index-references__line strong {
  color: var(--moto-text);
}

.supplier-line-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-line-quantity-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.supplier-line-quantity-form input {
  width: 72px;
  min-height: 34px;
  box-sizing: border-box;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  color: var(--moto-text);
  font: inherit;
  padding: 6px 8px;
}

.supplier-line-quantity-cell {
  display: grid;
  gap: 8px;
}

.supplier-line-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.supplier-line-status-row strong {
  font-size: 13px;
}

.supplier-line-quantity-form span {
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
}

.supplier-line-actions {
  position: relative;
  min-width: 0;
}

.supplier-line-actions form {
  margin: 0;
}

.supplier-line-secondary-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}

.supplier-line-move-form {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.supplier-line-move-form select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  box-sizing: border-box;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
  font-size: 13px;
  padding: 6px 8px;
}

.supplier-line-actions > form:not(.supplier-line-move-form),
.supplier-line-actions > span {
  justify-self: start;
}

.supplier-line-actions-menu {
  position: relative;
}

.supplier-line-actions-menu > summary {
  list-style: none;
}

.supplier-line-actions-menu > summary::-webkit-details-marker {
  display: none;
}

.supplier-line-actions-menu__panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: min(680px, calc(100vw - 48px));
  padding: 10px;
  border: 1px solid #8ba8c4;
  border-radius: 10px;
  background: #eef5fd;
  box-shadow: 0 14px 32px rgba(24, 43, 72, 0.18);
}

.supplier-line-actions-menu__panel .supplier-line-move-form {
  flex: 1 1 auto;
  width: auto;
}

.supplier-line-actions-menu__panel .moto-btn {
  white-space: nowrap;
}

.supplier-line-actions-menu:not([open]) .supplier-line-actions-menu__panel {
  display: none;
}

.moto-table--ddt-lines .moto-table__head,
.moto-table--ddt-lines .moto-table__row {
  grid-template-columns: minmax(130px, 0.7fr) minmax(260px, 1.5fr) minmax(80px, 0.35fr) minmax(90px, 0.45fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr);
}

.moto-table--ddt-lines-load .moto-table__head,
.moto-table--ddt-lines-load .moto-table__row {
  grid-template-columns: minmax(130px, 0.65fr) minmax(140px, 0.65fr) minmax(120px, 0.55fr) minmax(230px, 1.2fr) minmax(80px, 0.35fr) minmax(90px, 0.45fr) minmax(130px, 0.6fr) minmax(120px, 0.55fr) minmax(120px, 0.55fr);
}

.moto-table--activity-logs .moto-table__head,
.moto-table--activity-logs .moto-table__row,
.moto-table__filters--activity-logs {
  grid-template-columns: minmax(230px, 0.95fr) minmax(130px, 0.7fr) minmax(120px, 0.62fr) minmax(0, 1.45fr) minmax(145px, 0.55fr);
  gap: 12px;
}

.table-card--activity-logs {
  overflow-x: visible;
}

.table-card--activity-logs .moto-table {
  min-width: 0;
}

.moto-table--activity-logs .moto-table__head > div,
.moto-table--activity-logs .moto-table__row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-log__when time {
  display: grid;
  gap: 2px;
}

.activity-log__when small {
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 750;
}

.moto-table__filters--activity-logs {
  display: grid;
  align-items: center;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.activity-log-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.moto-table__filters--activity-logs input,
.moto-table__filters--activity-logs select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table__filters--activity-logs input:focus,
.moto-table__filters--activity-logs select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.daily-labor-analysis-card {
  overflow-x: visible;
}

.analysis-total-card {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 12px;
  padding: 13px 18px;
  border: 1px solid #d5e2ef;
  border-radius: 12px;
  background: linear-gradient(90deg, #edf5fc 0%, #f9fbfe 100%);
  color: #315f8e;
}

.analysis-total-card span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.analysis-total-card strong {
  color: var(--moto-text);
  font-size: 22px;
}

.analysis-total-card small {
  color: var(--moto-muted);
  font-weight: 700;
}

.analysis-total-card--breakdown {
  grid-template-columns: repeat(5, minmax(120px, auto)) 1fr;
  gap: 14px 26px;
}

.split-payment-total {
  color: #9a6200;
}

.split-payment-total strong {
  color: #9a6200 !important;
}

.employee-performance-total-card {
  grid-template-columns: repeat(4, minmax(120px, auto)) 1fr;
}

.customer-performance-total-card {
  grid-template-columns: repeat(4, minmax(135px, auto)) 1fr;
}

.supplier-performance-total-card {
  grid-template-columns: repeat(3, minmax(150px, auto)) 1fr;
}

.warehouse-statistics-total-card {
  grid-template-columns: repeat(4, minmax(135px, auto)) 1fr;
}

.analysis-total-card--breakdown > div {
  display: grid;
  gap: 2px;
}

.analysis-total-card--breakdown > div strong {
  font-size: 18px;
}

.moto-table__filters--daily-labor-analysis {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(145px, 0.72fr) minmax(220px, 1.2fr) minmax(135px, 0.62fr) minmax(135px, 0.62fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table__filters--daily-labor-analysis input,
.moto-table__filters--daily-labor-analysis select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table__filters--daily-labor-analysis input:focus,
.moto-table__filters--daily-labor-analysis select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.moto-table__filters--employee-performance {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.6fr) minmax(150px, 0.6fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table__filters--employee-performance input,
.moto-table__filters--employee-performance select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table__filters--customer-performance {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, .58fr) minmax(150px, .58fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table__filters--customer-performance input,
.moto-table__filters--customer-performance select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font-size: 12px;
}

.moto-table__filters--customer-performance .date-picker {
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 6px;
}

.moto-table__filters--customer-performance .date-picker__display {
  min-width: 0;
}

.moto-table__filters--customer-performance .date-picker__button {
  width: 32px;
  height: 36px;
  border-radius: 8px;
  color: var(--moto-muted);
}

.moto-table__filters--customer-performance .date-picker__button::before {
  inset: 9px 7px 8px;
}

.moto-table__filters--customer-performance .date-picker__button::after {
  top: 18px;
  left: 11px;
  right: 11px;
}

.moto-table__filters--warehouse-statistics {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}

.moto-table__filters--warehouse-statistics input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font-size: 12px;
}

.warehouse-statistics-card {
  overflow: hidden;
}

.warehouse-statistics-entries {
  overflow-x: visible;
  padding-inline: 8px;
}

.warehouse-statistics-entries table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.warehouse-statistics-entries th,
.warehouse-statistics-entries td {
  padding: 10px 5px;
  overflow-wrap: anywhere;
}

.warehouse-statistics-entries th {
  font-size: 10px;
}

.warehouse-statistics-entries td {
  font-size: 12px;
}

.warehouse-statistics-entries th:nth-child(1) { width: 11%; }
.warehouse-statistics-entries th:nth-child(2) { width: 23%; }
.warehouse-statistics-entries th:nth-child(3) { width: 5%; }
.warehouse-statistics-entries th:nth-child(4) { width: 7%; }
.warehouse-statistics-entries th:nth-child(5),
.warehouse-statistics-entries th:nth-child(6) { width: 10%; }
.warehouse-statistics-entries th:nth-child(7),
.warehouse-statistics-entries th:nth-child(8),
.warehouse-statistics-entries th:nth-child(9) { width: 11.3%; }

.warehouse-statistics-entries th:nth-child(n + 4),
.warehouse-statistics-entries td:nth-child(n + 4) {
  text-align: right;
}

.warehouse-statistics-entries__note {
  margin: 8px 5px 2px;
  color: var(--moto-muted);
  font-size: 11px;
}

.warehouse-statistics-chart__legend-margin,
.warehouse-statistics-chart__bar--positive {
  background: #3b9a68;
}

.warehouse-statistics-chart__label {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.warehouse-statistics-chart__code {
  flex: 0 0 auto;
}

.warehouse-statistics-chart__description {
  min-width: 0;
  overflow: hidden;
  color: var(--moto-muted);
  font-weight: 600;
  text-overflow: ellipsis;
}

.warehouse-statistics-chart__bar--negative {
  background: #df6a6c;
}

.warehouse-statistics-chart__value--positive {
  color: #16704a !important;
}

.warehouse-statistics-chart__value--negative {
  color: #b6383d !important;
}

.customer-performance-entries td:not(:first-child),
.customer-performance-entries th:not(:first-child) {
  text-align: right;
}

.supplier-performance-entries td:not(:first-child),
.supplier-performance-entries th:not(:first-child) {
  text-align: right;
}

.employee-performance-total-card__margin strong,
.employee-performance-entries__margin {
  color: #16704a;
}

.employee-performance-entries td:nth-child(n + 3),
.employee-performance-entries th:nth-child(n + 3) {
  text-align: right;
}

.employee-performance-filter-card {
  margin-bottom: 18px;
  overflow: hidden;
}

.employee-performance-insights {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  gap: 18px;
  margin: 0 0 18px;
}

.employee-performance-chart-card,
.employee-performance-ranking-card {
  border: 1px solid var(--moto-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(21, 45, 78, .08);
}

.customer-performance-ranking-cards {
  display: grid;
  align-content: start;
  gap: 18px;
}

.employee-performance-ranking-card--lowest {
  border-color: #f1d5aa;
  background: linear-gradient(145deg, #fff8eb 0%, #fff 80%);
}

.employee-performance-ranking-card--lowest .employee-performance-ranking-card__eyebrow,
.employee-performance-ranking-card--lowest .employee-performance-ranking-card__amount {
  color: #9a5b0b !important;
}

.employee-performance-chart-card {
  padding: 20px;
}

.employee-performance-insights__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.employee-performance-insights h2 {
  margin: 0;
  font-size: 18px;
}

.employee-performance-insights p {
  margin: 5px 0 0;
  color: var(--moto-muted);
  font-size: 13px;
}

.employee-performance-chart-card__legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 800;
}

.employee-performance-chart-card__legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.employee-performance-chart-card__legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.employee-performance-chart-card__legend-cost,
.employee-performance-chart__bar--cost { background: #df6a6c; }
.employee-performance-chart-card__legend-revenue,
.employee-performance-chart__bar--revenue { background: #2f85b8; }

.employee-performance-chart {
  display: grid;
  gap: 13px;
}

.employee-performance-chart__row {
  display: grid;
  grid-template-columns: minmax(130px, .45fr) minmax(180px, 1fr) minmax(145px, .42fr);
  align-items: center;
  gap: 12px;
}

.employee-performance-chart__row > strong {
  font-size: 13px;
}

.employee-performance-chart__bars {
  display: grid;
  gap: 4px;
}

.employee-performance-chart__bar {
  display: block;
  min-width: 2px;
  height: 8px;
  border-radius: 999px;
}

.employee-performance-chart__values {
  display: grid;
  gap: 2px;
  color: var(--moto-muted);
  font-size: 12px;
  text-align: right;
}

.employee-performance-chart__values strong { color: #1c638d; }

.employee-performance-ranking-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 22px;
  border-color: #bedbcf;
  background: linear-gradient(145deg, #f1fbf5 0%, #fff 80%);
}

.employee-performance-ranking-card__eyebrow {
  margin: 0 !important;
  color: #278052 !important;
  font-size: 11px !important;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.employee-performance-ranking-card__name {
  font-size: 20px;
}

.employee-performance-ranking-card__amount {
  color: #16704a;
  font-size: 28px;
  font-weight: 900;
}

.employee-performance-ranking-card--disabled {
  border-color: #d9dee7;
  background: #f4f6f8;
}

.employee-performance-ranking-card--disabled .employee-performance-ranking-card__eyebrow { color: #747d89 !important; }
.employee-performance-insights__empty { margin: 0 !important; }

.daily-labor-analysis-entries {
  overflow-x: auto;
}

.daily-labor-analysis-entries table {
  min-width: 980px;
}

.daily-labor-export-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
  gap: 28px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--moto-line);
  border-radius: 16px;
  background: var(--moto-card);
  box-shadow: var(--moto-shadow);
}

.daily-labor-export-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.58fr);
  gap: 14px 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid #d8e2ee;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1f6fc 0%, #fbfcff 100%);
}

.daily-labor-export-card__kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fde8e9;
  color: var(--moto-brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.daily-labor-export-card__intro h2 {
  margin: 0;
  color: var(--moto-text);
  font-size: 24px;
}

.daily-labor-export-card__intro > p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--moto-muted);
  font-size: 15px;
  line-height: 1.5;
}

.daily-labor-export-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.daily-labor-export-card__details span {
  padding: 7px 9px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fafbfe;
  color: #315f8e;
  font-size: 12px;
  font-weight: 800;
}

.daily-labor-export-form__head {
  display: grid;
  grid-column: 1 / -1;
  gap: 3px;
  margin-bottom: 2px;
}

.daily-labor-export-form__head strong {
  color: var(--moto-text);
}

.daily-labor-export-form__head span {
  color: var(--moto-muted);
  font-size: 13px;
}

.daily-labor-export-form label {
  display: grid;
  gap: 6px;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-labor-export-form select {
  height: 40px;
}

.daily-labor-export-form .moto-btn {
  grid-column: 1 / -1;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.activity-log__changes {
  max-width: min(460px, 70vw);
  margin: 8px 0 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--moto-text);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .moto-table__filters--activity-logs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .moto-table__filters--activity-logs .moto-table__filters-actions {
    grid-column: 1 / -1;
  }

  .moto-table--activity-logs .moto-table__head {
    display: none;
  }

  .moto-table--activity-logs .moto-table__body {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .moto-table--activity-logs .moto-table__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    padding: 14px;
    border: 1px solid var(--moto-line);
    border-radius: 10px;
    background: #fff;
  }

  .moto-table--activity-logs .moto-table__row > div::before {
    display: block;
    margin-bottom: 4px;
    color: var(--moto-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .moto-table--activity-logs .moto-table__row > div:nth-child(1)::before { content: "Quando"; }
  .moto-table--activity-logs .moto-table__row > div:nth-child(2)::before { content: "Utente"; }
  .moto-table--activity-logs .moto-table__row > div:nth-child(3)::before { content: "Azione"; }
  .moto-table--activity-logs .moto-table__row > div:nth-child(4)::before { content: "Oggetto"; }
  .moto-table--activity-logs .moto-table__row > div:nth-child(5)::before { content: "Dettagli"; }

  .moto-table--activity-logs .moto-table__row > div:nth-child(4),
  .moto-table--activity-logs .moto-table__row > div:nth-child(5) {
    grid-column: 1 / -1;
  }
}

.moto-table--ddt-lines-unload .moto-table__head,
.moto-table--ddt-lines-unload .moto-table__row {
  grid-template-columns: minmax(130px, 0.7fr) minmax(230px, 1.45fr) minmax(70px, 0.3fr) minmax(78px, 0.35fr) minmax(105px, 0.48fr) minmax(82px, 0.36fr) minmax(120px, 0.55fr);
}

.moto-table--order-lines .moto-table__head,
.moto-table--order-lines .moto-table__row {
  grid-template-columns: minmax(130px, 0.65fr) minmax(260px, 1.35fr) minmax(80px, 0.35fr) minmax(90px, 0.4fr) minmax(90px, 0.4fr) minmax(120px, 0.55fr) minmax(120px, 0.55fr);
}

.moto-table--product-suppliers .moto-table__head,
.moto-table--product-suppliers .moto-table__row {
  grid-template-columns: minmax(150px, 1.15fr) minmax(150px, 1fr) minmax(80px, 0.42fr) minmax(90px, 0.5fr) minmax(90px, 0.5fr) minmax(105px, 0.6fr);
}

.moto-table--product-purchases .moto-table__head,
.moto-table--product-purchases .moto-table__row {
  grid-template-columns: minmax(145px, 1.1fr) minmax(125px, 0.9fr) minmax(70px, 0.38fr) minmax(82px, 0.45fr) minmax(82px, 0.45fr) minmax(72px, 0.38fr) minmax(94px, 0.48fr);
  gap: 6px;
}

.moto-table--product-purchases .moto-table__row > div {
  padding-block: 7px;
  font-size: 13px;
}

.moto-table--product-suppliers {
  min-width: 0;
}

.moto-table--product-suppliers .moto-table__head > div,
.moto-table--product-suppliers .moto-table__row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.supplier-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.supplier-summary-card {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  text-decoration: none;
  box-shadow: var(--moto-shadow);
}

.supplier-summary-card:hover,
.supplier-summary-card--active {
  border-color: rgba(215, 25, 32, 0.36);
  background: #fff8f8;
}

.supplier-summary-card strong {
  font-size: 17px;
}

.supplier-summary-card span {
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
}

.moto-table__head {
  border-radius: 14px 14px 0 0;
  border-bottom: 2px solid rgba(18, 31, 56, 0.18);
  background: #dfe5ef;
  color: #33415f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.moto-table__row {
  border-top: 1px solid var(--moto-line);
}

.moto-table__row:hover {
  background: #fafbfe;
}

.moto-table__main,
.moto-table__stack {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.moto-table__main a {
  color: var(--moto-text);
  text-decoration: none;
}

.moto-table__main span,
.moto-table__stack span {
  color: var(--moto-muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.intervention-report-type-and-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.intervention-report-type-and-status .status-pill {
  white-space: nowrap;
  flex-shrink: 0;
}

.intervention-report-status-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

.status-pill,
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill--customer {
  background: rgba(27, 117, 208, 0.12);
  color: #175ea6;
}

.status-pill--supplier {
  background: rgba(215, 25, 32, 0.12);
  color: var(--moto-brand);
}

.status-pill--open {
  background: rgba(215, 25, 32, 0.12);
  color: var(--moto-brand);
}

.status-pill--closed {
  background: rgba(26, 152, 91, 0.12);
  color: #147346;
}

.status-pill--partial {
  background: rgba(230, 162, 60, 0.18);
  color: #9a6200;
}

.status-pill--reopened {
  background: rgba(235, 159, 0, 0.16);
  color: #9a6200;
}

.attachment-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.attachment-tile {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.attachment-tile__preview {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: #fafbfe;
  color: var(--moto-brand-dark);
  font-weight: 900;
  text-decoration: none;
}

.attachment-tile__open {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.attachment-tile__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.attachment-tile__name {
  overflow: hidden;
  color: var(--moto-text);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.attachment-tile__name:hover {
  color: var(--moto-brand);
}

.attachment-tile__copy {
  display: grid;
  justify-items: center;
}

.attachment-tile__copy .moto-btn {
  width: 100%;
}

.attachment-clipboard [hidden] {
  display: none !important;
}

.attachment-clipboard__setup {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #f1c36d;
  border-radius: 10px;
  background: #fff8e8;
  color: #60430b;
  box-sizing: border-box;
}

.attachment-clipboard__setup > div {
  min-width: 0;
}

.attachment-clipboard__setup p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.attachment-clipboard__setup-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.attachment-clipboard__setup-actions .moto-btn {
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  box-sizing: border-box;
}

.attachment-clipboard__status {
  min-height: 1.25em;
  margin: 0 0 8px;
  color: var(--moto-muted);
  font-size: 12px;
  line-height: 1.25;
}

.attachment-tile__remove {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(215, 25, 32, 0.34);
  border-radius: 999px;
  background: #ffffff;
  color: var(--moto-brand);
  font: inherit;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.16);
}

.attachment-tile__remove:hover {
  background: var(--moto-brand);
  color: #ffffff;
}

.vehicle-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.vehicle-show-layout {
  align-items: stretch;
  margin-bottom: 22px;
}

.vehicle-edit-layout__attachments {
  position: sticky;
  top: 18px;
}

.vehicle-show-layout .vehicle-edit-layout__attachments {
  position: static;
}

.vehicle-edit-layout__attachments .attachment-gallery {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.vehicle-show-layout .attachment-gallery {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}

.status-pill--workshop {
  background: rgba(26, 152, 91, 0.12);
  color: #147346;
}

.count-pill {
  min-width: 34px;
  background: #eef1f7;
  color: var(--moto-text);
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 28px;
}

.empty-state p {
  margin: 0 0 6px;
  color: var(--moto-muted);
}

.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  justify-self: center;
}

.empty-state--compact {
  padding: 18px;
  border: 1px dashed var(--moto-line);
  border-radius: 12px;
  background: #fafbfe;
  box-shadow: none;
}

.resource-form {
  padding: 22px;
}

.resource-form--ddt {
  display: grid;
  gap: 24px;
}

.resource-form--order {
  display: grid;
  gap: 18px;
}

.resource-form--compact {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.product-form__details {
  display: grid;
  grid-template-columns: minmax(160px, 0.65fr) minmax(140px, 0.45fr) minmax(240px, 1fr);
  gap: 16px;
}

.product-form__description {
  grid-column: 1 / -1;
}

.form-grid__full-width {
  grid-column: 1 / -1;
}

.profile-password {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--moto-line);
}

.profile-password h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.profile-password p {
  margin: 0 0 16px;
  color: var(--moto-muted);
}

.form-grid--vehicle {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-or-supplier-form .form-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 16px;
}

.customer-or-supplier-form__company,
.customer-or-supplier-form__roles {
  grid-column: span 3;
}

.customer-or-supplier-form__roles .check-card {
  min-height: 46px;
  padding: 8px 12px;
}

.customer-or-supplier-form__price-list {
  grid-column: 1 / -1;
}

.customer-or-supplier-form__tax-code,
.customer-or-supplier-form__vat-number,
.customer-or-supplier-form__billing-code,
.customer-or-supplier-form__default-vat-rate {
  grid-column: span 2;
}

.customer-or-supplier-form__address {
  grid-column: span 3;
}

.customer-or-supplier-form__cap {
  grid-column: span 1;
}

.customer-or-supplier-form__county {
  grid-column: span 2;
}

.customer-or-supplier-form__province,
.customer-or-supplier-form__country,
.customer-or-supplier-form__telephone {
  grid-column: span 1;
}

.customer-or-supplier-form__email {
  grid-column: span 3;
}

.form-grid--auth {
  grid-template-columns: 1fr;
}

.form-grid--ddt-head {
  align-items: start;
}

.form-grid--ddt-head--fixed {
  grid-template-columns: minmax(320px, 1.45fr) minmax(190px, 0.75fr) minmax(210px, 0.85fr);
}

.form-grid--ddt-head--fixed .field > input,
.form-grid--ddt-head--fixed .field > select {
  min-height: 46px;
  height: 46px;
  box-sizing: border-box;
}

.ddt-head__intro {
  min-width: 0;
}

.ddt-direction-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e5f1ff;
  color: #1760a9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.acceptance-card--ddt-printing {
  display: grid;
  gap: 14px;
}

.ddt-printing-section__title {
  margin: 2px 0 -4px;
  color: var(--moto-text);
  font-size: 15px;
}

.form-grid--ddt-recipient {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.form-grid--ddt-recipient .ddt-recipient-name,
.form-grid--ddt-recipient .ddt-recipient-address {
  grid-column: span 3;
}

.form-grid--ddt-recipient .field:not(.ddt-recipient-name):not(.ddt-recipient-address) {
  grid-column: span 2;
}

.form-grid--ddt-transport {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ddt-transport-datetime {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
}

.form-grid--order-head {
  grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 0.8fr) minmax(150px, 0.7fr);
  align-items: start;
}

.order-section {
  border: 1px solid var(--moto-line);
  border-radius: 14px;
  background: #fff;
}

.order-section--head {
  position: relative;
  padding: 56px 18px 18px;
  border-left: 5px solid var(--moto-brand);
  background: #fbfcff;
}

.order-section--lines {
  padding: 18px;
  border-color: rgba(18, 31, 56, 0.14);
  box-shadow: inset 0 4px 0 rgba(215, 25, 32, 0.12);
}

.order-section--lines .section-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--moto-line);
}

.order-section--lines .report-lines {
  padding-top: 4px;
}

.order-notes {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--moto-line);
}

.resource-form--order .acceptance-field {
  gap: 7px;
}

.resource-form--order .acceptance-field label {
  font-size: 12px;
}

.resource-form--order .acceptance-field textarea {
  min-height: 42px;
  border-radius: 10px;
  font-size: 16px;
  padding: 9px 12px;
}

.order-head__party {
  grid-column: span 2;
}

.order-head__vehicle {
  grid-column: span 1;
}

.order-kind-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e5f1ff;
  color: #1760a9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ddt-party-field select,
.ddt-direction-field .check-card {
  height: 64px;
  min-height: 64px;
  box-sizing: border-box;
}

.ddt-direction-field .role-checks {
  align-items: stretch;
}

.resource-form--ddt .report-lines__footer {
  gap: 10px;
  padding-top: 10px;
}

.resource-form--ddt .acceptance-card--ddt-notes {
  margin-top: 8px;
}

.resource-form--ddt .acceptance-card--ddt-notes textarea {
  min-height: 59px;
  height: 59px;
  resize: vertical;
}

.acceptance-form {
  display: grid;
  gap: 20px;
}

.acceptance-form--compact {
  gap: 14px;
}

.acceptance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-tile {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: #fafbfe;
}

.summary-tile span,
.summary-tile--field label {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-tile strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.summary-tile .link-button {
  justify-self: start;
}

.summary-tile--field {
  gap: 7px;
}

.page-shell--report-form .acceptance-summary {
  gap: 8px;
}

.page-shell--report-form .acceptance-summary--six {
  grid-template-columns:
    minmax(160px, 1.1fr)
    minmax(135px, 0.85fr)
    minmax(210px, 1.45fr)
    minmax(155px, 1fr)
    minmax(115px, 0.7fr)
    minmax(135px, 0.9fr);
}

.page-shell--report-form .summary-tile {
  min-height: 54px;
  padding: 8px 10px;
}

.page-shell--report-form .summary-tile strong {
  font-size: 17px;
}

.page-shell--report-form .summary-tile--field {
  gap: 4px;
}

.page-shell--report-form .summary-tile--field input,
.page-shell--report-form .summary-tile--field select {
  min-height: 34px;
  padding: 5px 8px;
}

.acceptance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.acceptance-form--compact .acceptance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.acceptance-field--full {
  grid-column: 1 / -1;
}

.acceptance-form--compact .acceptance-summary {
  gap: 10px;
}

.acceptance-form--compact .summary-tile {
  min-height: 76px;
  padding: 12px;
}

.acceptance-form--compact .summary-tile strong {
  font-size: 20px;
}

.report-identity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 10px;
}

.report-identity-grid--with-usage {
  grid-template-columns: minmax(190px, 1.25fr) minmax(190px, 1.15fr) minmax(110px, 0.55fr) minmax(140px, 0.7fr);
}

.readonly-field {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid var(--moto-line);
  border-radius: 14px;
  background: #fafbfe;
}

.readonly-field--form-control {
  min-height: 46px;
  padding: 9px 10px;
  border-radius: 10px;
}

.readonly-field--form-control span {
  color: var(--moto-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.readonly-field span {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.readonly-field strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
}

.readonly-field small {
  min-height: 14px;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 650;
}

.readonly-field--metric strong {
  font-size: 18px;
}

.report-identity-grid--with-usage .readonly-field--identity {
  height: 92px;
  min-height: 92px;
  box-sizing: border-box;
  overflow: hidden;
}

.readonly-field--identity strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.readonly-field--identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readonly-field--problem {
  align-content: start;
  min-height: 74px;
}

.readonly-field--problem p {
  margin: 0;
  color: var(--moto-text);
  font-size: 16px;
  line-height: 1.3;
  white-space: pre-wrap;
}

.acceptance-field {
  gap: 10px;
}

.acceptance-form--compact .acceptance-field {
  gap: 6px;
}

.acceptance-field input,
.acceptance-field select,
.acceptance-field textarea {
  min-height: 58px;
  border-radius: 14px;
  font-size: 20px;
  padding: 14px 16px;
}

.acceptance-field textarea {
  line-height: 1.35;
}

.acceptance-form--compact .acceptance-field input,
.acceptance-form--compact .acceptance-field select,
.acceptance-form--compact .acceptance-field textarea {
  min-height: 46px;
  border-radius: 12px;
  font-size: 16px;
  padding: 9px 12px;
}

.acceptance-form--compact .acceptance-field--problem textarea {
  min-height: 92px;
}

.acceptance-field label {
  font-size: 14px;
}

.combobox {
  position: relative;
}

.combobox__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  display: grid;
  gap: 8px;
  max-height: min(300px, calc(100vh - 180px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border: 1px solid var(--moto-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--moto-shadow);
}

.combobox__menu[hidden] {
  display: none;
}

.combobox__option[hidden],
.combobox__empty[hidden] {
  display: none;
}

.combobox__option {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: #fafbfe;
  color: var(--moto-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.combobox__empty {
  padding: 14px;
  border: 1px dashed var(--moto-line);
  border-radius: 12px;
  background: #fafbfe;
  color: var(--moto-muted);
  font-weight: 700;
}

.combobox__create {
  width: 100%;
  min-height: 44px;
  border: 1px dashed rgba(215, 25, 32, 0.5);
  border-radius: 12px;
  background: rgba(215, 25, 32, 0.06);
  color: var(--moto-primary);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.combobox__create[hidden],
.combobox__quick-create[hidden],
.combobox__error[hidden] {
  display: none;
}

.combobox__quick-create {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: #fafbfe;
}

.combobox__quick-create label {
  font-size: 13px;
  font-weight: 800;
}

.combobox__quick-create input,
.combobox__quick-create select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--moto-line);
  border-radius: 9px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
}

.combobox__quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.combobox__quick-grid > div {
  display: grid;
  gap: 4px;
}

.combobox__quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.combobox__hint,
.combobox__error {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.combobox__hint {
  color: var(--moto-muted);
}

.combobox__error {
  color: var(--moto-primary);
  font-weight: 800;
}

@media (max-width: 560px) {
  .combobox__quick-grid {
    grid-template-columns: 1fr;
  }
}

.combobox__option:hover,
.combobox__option:focus {
  border-color: rgba(215, 25, 32, 0.45);
  background: rgba(215, 25, 32, 0.06);
  outline: none;
}

.combobox__option strong {
  font-size: 18px;
}

.combobox__option span {
  color: var(--moto-muted);
  font-size: 14px;
}

/* Nel prodotto il selettore mostra solo il nome del fornitore: lista densa,
   senza card individuali, con la stessa ricerca immediata degli altri campi. */
.product-supplier-picker--compact .combobox__menu {
  display: block;
  max-height: min(240px, calc(100vh - 180px));
  padding: 4px;
}

.product-supplier-picker--compact .combobox__menu[hidden] {
  display: none;
}

.product-supplier-picker--compact .combobox__option {
  display: block;
  min-height: 32px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  line-height: 1.2;
}

.product-supplier-picker--compact .combobox__option strong {
  font-size: inherit;
  font-weight: 700;
}

.product-supplier-picker--compact .combobox__empty {
  padding: 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
}

/* Selettori anagrafica nei form ordine: lista densa, senza card per riga. */
.combobox[data-controller~="select-search"] .combobox__menu {
  display: block;
  gap: 0;
  padding: 4px;
}

.combobox[data-controller~="select-search"] .combobox__menu[hidden] {
  display: none;
}

.combobox[data-controller~="select-search"] .combobox__option[hidden],
.combobox[data-controller~="select-search"] .combobox__empty[hidden] {
  display: none;
}

.combobox[data-controller~="select-search"] .combobox__option {
  display: block;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  line-height: 1.25;
}

.combobox[data-controller~="select-search"] .combobox__option:hover,
.combobox[data-controller~="select-search"] .combobox__option:focus {
  border-color: transparent;
  background: rgba(215, 25, 32, 0.08);
}

.combobox[data-controller~="select-search"] .combobox__empty {
  padding: 8px 10px;
  border: 0;
  background: transparent;
  font-size: 13px;
}

.practice-option__customer,
.practice-option__practice {
  display: block;
  width: fit-content;
  padding: 1px 4px;
  border-radius: 4px;
}

.practice-option__category,
.practice-option__brand,
.practice-option__model,
.practice-option__identifier {
  color: inherit;
  font-size: inherit;
}

.practice-option__vehicle-details {
  display: block;
  width: fit-content;
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--moto-muted);
  font-size: 14px;
}

.practice-option__practice {
  color: var(--moto-brand-dark) !important;
  font-size: 12px !important;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.practice-option__field--match {
  background: #ffe4a3;
}

.practice-option__match {
  font-weight: 900;
}

.field--wide {
  grid-column: span 1;
}

.field--full {
  grid-column: 1 / -1;
}

.check-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 12px;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: #fafbfe;
}

.check-card input {
  width: 20px;
  height: 20px;
  accent-color: var(--moto-brand);
}

.check-card span {
  display: grid;
  gap: 2px;
}

.check-card small {
  color: var(--moto-muted);
}

.check-card--compact {
  min-height: 38px;
  padding: 8px 10px;
}

.vehicle-billing-card {
  padding: 18px;
  border: 1px solid var(--moto-line);
  border-radius: 16px;
  background: #fafbfe;
}

.vehicle-billing-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.2fr) minmax(240px, 1fr);
  gap: 14px;
  align-items: end;
}

.vehicle-billing-grid .check-card {
  min-height: 54px;
}

.vehicle-billing-choice {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.vehicle-billing-choice .moto-btn {
  justify-content: flex-start;
  width: 100%;
  min-height: 46px;
  white-space: normal;
  text-align: left;
}

@media (max-width: 900px) {
  .vehicle-billing-grid {
    grid-template-columns: 1fr;
  }
}

.role-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-lines {
  display: grid;
  gap: 10px;
  overflow: visible;
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-label-row__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label-row__actions--right {
  margin-left: auto;
}

.report-lines [data-nested-report-lines-target="rows"] {
  display: grid;
  gap: 10px;
}

.report-lines__head,
.report-lines__row {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) minmax(62px, 0.4fr) minmax(82px, 0.5fr) minmax(110px, 0.7fr) minmax(140px, 0.8fr) minmax(170px, 0.9fr) minmax(90px, 0.5fr);
  gap: 10px;
  align-items: center;
}

.report-lines--products .report-lines__head,
.report-lines--products .report-lines__row {
  grid-template-columns: 22px minmax(185px, 1fr) minmax(140px, 0.75fr) minmax(180px, 1.4fr) 42px 54px minmax(88px, 0.46fr) minmax(98px, 0.46fr) minmax(68px, 0.36fr) 160px 42px;
}

/* Nella scheda del rapportino le righe prodotto non hanno lente, codice
   fornitore, sconto o azioni: usano quindi una griglia distinta a 7 colonne.
   La regola generica qui sopra e' invece quella del form di modifica. */
.report-lines--readonly.report-lines--products .report-lines__head,
.report-lines--readonly.report-lines--products .report-lines__row {
  grid-template-columns: minmax(135px, 0.75fr) minmax(220px, 1.8fr) 48px 60px 86px 100px 90px;
  gap: 8px;
}

.report-lines--ddts .report-lines__head,
.report-lines--ddts .report-lines__row {
  grid-template-columns: 22px minmax(130px, 0.8fr) minmax(260px, 1.7fr) minmax(62px, 0.35fr) minmax(82px, 0.45fr) minmax(110px, 0.6fr) minmax(90px, 0.5fr);
}

/* La testata deve occupare la stessa area utile della riga: le righe hanno
   12px di padding interno, senza questo allineamento le label slittano a
   sinistra rispetto ai relativi campi. */
.report-lines--ddts .report-lines__head {
  box-sizing: border-box;
  padding-inline: 12px;
}

.report-lines--ddts-load .report-lines__head,
.report-lines--ddts-load .report-lines__row {
  grid-template-columns: 22px minmax(185px, 1fr) minmax(95px, 0.45fr) minmax(165px, 0.82fr) minmax(262px, 1.55fr) 42px 54px minmax(98px, 0.48fr) minmax(98px, 0.48fr) minmax(108px, 0.52fr) 42px;
  gap: 8px;
}

.report-lines--ddts-load input[name$='[um]'] {
  padding-inline: 4px;
  text-align: center;
}

.report-lines--ddts-load input[name$='[quantity]'],
.report-lines--ddts-load input[name$='[unit_amount]'],
.report-lines--ddts-load input[name$='[sale_unit_amount]'] {
  text-align: right;
}

.report-lines--ddts-load .report-lines__head > div:nth-child(6) {
  text-align: center;
}

.report-lines--ddts-load .report-lines__head > div:nth-child(7),
.report-lines--ddts-load .report-lines__head > div:nth-child(8),
.report-lines--ddts-load .report-lines__head > div:nth-child(9),
.report-lines--ddts-load .report-lines__head > div:nth-child(10) {
  text-align: right;
}

.report-lines--ddts-unload .report-lines__head,
.report-lines--ddts-unload .report-lines__row {
  grid-template-columns: 22px minmax(145px, 0.78fr) minmax(130px, 0.68fr) minmax(200px, 1.18fr) 42px 54px minmax(88px, 0.44fr) minmax(105px, 0.5fr) minmax(65px, 0.32fr) minmax(60px, 0.28fr) 42px;
}

.report-lines--ddts-unload .product-picker__control {
  grid-template-columns: minmax(0, 1fr);
}

.report-lines--ddts-unload input[name$='[um]'] {
  padding-inline: 4px;
  text-align: center;
}

.report-lines--ddts-unload input[name$='[quantity]'],
.report-lines--ddts-unload input[name$='[unit_amount]'],
.report-lines--ddts-unload input[name$='[discount_percentage]'] {
  text-align: right;
}

.report-lines--ddts-unload .report-lines__head > div:nth-child(5) {
  text-align: center;
}

.report-lines--ddts-unload .report-lines__head > div:nth-child(6),
.report-lines--ddts-unload .report-lines__head > div:nth-child(7),
.report-lines--ddts-unload .report-lines__head > div:nth-child(8),
.report-lines--ddts-unload .report-lines__head > div:nth-child(9),
.report-lines--ddts-unload .report-lines__head > div:nth-child(10) {
  text-align: right;
}

@media (max-width: 980px) {
  .form-grid--ddt-recipient,
  .form-grid--ddt-transport {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid--ddt-recipient .ddt-recipient-name,
  .form-grid--ddt-recipient .ddt-recipient-address,
  .form-grid--ddt-recipient .field:not(.ddt-recipient-name):not(.ddt-recipient-address) {
    grid-column: span 1;
  }
}

.report-lines--ddts-unload .ddt-unload-supplier-product-code {
  max-width: none;
}

.report-lines--orders-customer .report-lines__head,
.report-lines--orders-customer .report-lines__row {
  grid-template-columns: 22px minmax(250px, 1.1fr) minmax(150px, 0.66fr) minmax(220px, 1.15fr) 42px 54px minmax(96px, 0.45fr) minmax(78px, 0.34fr) 46px;
}

.report-lines--orders-customer .report-lines__head {
  box-sizing: border-box;
  padding-inline: 12px;
}

.report-lines--orders-customer input[name$='[um]'] {
  padding-inline: 4px;
  text-align: center;
}

.report-lines--orders-customer input[name$='[quantity]'] {
  text-align: right;
}

.report-lines--orders-customer .report-lines__head > div:nth-child(5) {
  text-align: center;
}

.report-lines--orders-customer .report-lines__head > div:nth-child(6),
.report-lines--orders-customer .report-lines__head > div:nth-child(7) {
  text-align: right;
}

.report-lines--orders-customer .report-lines__head > div:nth-child(8),
.report-lines--orders-customer .report-lines__action-head,
.report-lines--orders-customer .report-lines__actions {
  text-align: center;
  justify-content: center;
}

.report-lines--orders-customer .report-lines__actions .icon-button--close {
  width: 40px;
  height: 40px;
  min-height: 40px;
  color: #d71920;
  border-color: rgba(215, 25, 32, 0.22);
}

.report-lines--orders-customer input[name$='[unit_amount]'] {
  text-align: right;
}

.report-lines--orders-supplier .report-lines__head,
.report-lines--orders-supplier .report-lines__row {
  grid-template-columns: minmax(130px, 0.75fr) minmax(135px, 0.75fr) minmax(250px, 1.45fr) minmax(62px, 0.3fr) minmax(82px, 0.4fr) minmax(120px, 0.6fr) minmax(90px, 0.45fr);
}

.report-lines--ddts .report-lines__row {
  position: relative;
}

.ddt-components {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed rgba(215, 25, 32, 0.38);
  border-radius: 10px;
  background: #fff8f8;
}

.ddt-components__head,
.ddt-components__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.ddt-components__head {
  color: var(--moto-muted);
  font-size: 13px;
}

.ddt-components__head > div {
  display: grid;
  gap: 2px;
}

.ddt-components__head small {
  font-size: 12px;
  font-weight: 600;
}

.ddt-components__row {
  /* Il codice interno e' il punto di partenza della ricerca: gli riserviamo
     spazio sufficiente anche nelle righe dei componenti. */
  grid-template-columns: 22px minmax(215px, 280px) minmax(170px, 250px) minmax(220px, 1fr) minmax(78px, 96px) 42px;
  padding: 8px;
  border-left: 3px solid #d71920;
  border-radius: 8px;
  background: #ffffff;
}

.component-picker__new {
  min-width: 0;
  grid-template-columns: minmax(180px, 0.75fr) minmax(380px, 2.3fr) minmax(70px, 0.3fr) minmax(150px, 0.65fr) minmax(170px, 0.75fr) minmax(110px, 0.5fr);
}

.component-picker__new .component-picker__new-description {
  min-width: 230px;
}

.component-picker__new .product-picker__supplier-association {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 0.6fr) minmax(360px, 1.5fr) minmax(180px, 0.7fr);
  gap: 8px;
  align-items: end;
}

.ddt-components__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 42px;
}

.ddt-components__actions .icon-button--close {
  width: 38px;
  height: 38px;
  min-height: 38px;
  color: #d71920;
  border-color: rgba(215, 25, 32, 0.22);
}

.ddt-components__actions .icon-button--close:hover,
.ddt-components__actions .icon-button--close:focus-visible {
  background: #fff2f3;
  border-color: #d71920;
}

.ddt-components__row .component-picker__supplier-code select {
  width: 100%;
}

.ddt-components__row input[name$='[quantity]'] {
  min-width: 0;
  text-align: right;
}

.order-link-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed rgba(31, 78, 121, 0.35);
  border-radius: 10px;
  background: #f7fbff;
}

.order-link-panel--hidden {
  display: none !important;
}

.order-link-store[hidden] {
  display: none;
}

.row-order-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(31, 78, 121, 0.28);
  border-left: 4px solid #1f4e79;
  border-radius: 8px;
  background: #f2f7fc;
  color: #1f4e79;
  font-size: 13px;
  font-weight: 850;
}

.row-order-links[hidden] {
  display: none;
}

.row-order-links strong {
  color: #173a5b;
}

.row-order-links span {
  color: #1f4e79;
}

.row-order-links__chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-order-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 6px 4px 10px;
  border: 1px solid rgba(31, 78, 121, 0.24);
  border-radius: 999px;
  background: #ffffff;
  color: #1f4e79;
}

.row-order-link-chip button {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #dbeafa;
  color: #1f4e79;
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.row-order-link-chip button:hover {
  background: #1f4e79;
  color: #ffffff;
}

.row-order-link-chip button.is-saving,
.row-order-match .moto-btn.is-saving {
  opacity: 0.72;
  cursor: wait;
}

.row-order-match {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 2px solid rgba(214, 122, 0, 0.56);
  border-radius: 8px;
  background: #fff7e8;
  box-shadow: 0 0 0 0 rgba(214, 122, 0, 0.36);
  animation: workflow-row-warning-pulse 1.15s ease-in-out infinite;
}

.row-order-match[hidden] {
  display: none;
}

.row-order-match__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #d67a00;
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  padding-top: 8px;
  box-sizing: border-box;
}

.row-order-match strong,
.row-order-match span {
  display: block;
}

.row-order-match strong {
  color: #7a4300;
}

.row-order-match span {
  margin-top: 2px;
  color: #8a5b16;
  font-size: 13px;
  font-weight: 850;
}

.row-order-match__select {
  width: 100%;
  max-width: 460px;
  margin-top: 5px;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid rgba(214, 122, 0, 0.46);
  border-radius: 8px;
  background: #ffffff;
  color: #7a4300;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  padding: 7px 10px;
}

@keyframes workflow-row-warning-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(214, 122, 0, 0.36);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(214, 122, 0, 0);
  }
}

.order-link-panel__head,
.order-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.order-link-panel__head {
  color: var(--moto-muted);
  font-size: 13px;
}

.order-link-row {
  grid-template-columns: minmax(260px, 1fr) minmax(80px, 120px) minmax(90px, auto);
  padding: 8px;
  border-left: 3px solid #1f4e79;
  border-radius: 8px;
  background: #ffffff;
}

.component-picker {
  position: relative;
  min-width: 0;
}

.component-picker__code-control {
  grid-template-columns: minmax(0, 1fr) 46px;
}

.ddt-components__row input[readonly] {
  background: #f5f7fb;
  color: var(--moto-muted);
  cursor: default;
}

.component-picker__panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 25;
  display: grid;
  gap: 8px;
  width: min(420px, 78vw);
  max-height: min(330px, calc(100vh - 180px));
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(215, 25, 32, 0.28);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--moto-shadow);
}

/* La ricerca resta compatta; la card di creazione usa lo spazio necessario. */
.component-picker__panel:has(.component-picker__new:not([hidden])) {
  width: min(1160px, calc(100vw - 88px));
  max-height: none;
  overflow: visible;
}

.component-picker__panel[hidden],
.component-picker__empty[hidden] {
  display: none;
}

.component-picker__options {
  display: grid;
  gap: 6px;
  max-height: min(220px, calc(100vh - 270px));
  overflow: auto;
  overscroll-behavior: contain;
}

.component-picker__empty {
  padding: 9px 10px;
  border: 1px dashed var(--moto-line);
  border-radius: 10px;
  background: #fafbfe;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
}

.ddt-line-components {
  display: grid;
  gap: 2px;
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--moto-muted);
  font-size: 13px;
}

.report-lines__head {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-lines__row {
  padding: 12px;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: #fafbfe;
}

.report-lines__row textarea,
.report-lines__row input,
.report-lines__row select {
  box-sizing: border-box;
  height: 46px;
  min-height: 46px;
  border-radius: 10px;
  font-size: 15px;
  padding: 9px 10px;
}

.report-lines__row textarea {
  overflow: auto;
  line-height: 1.3;
  resize: vertical;
}

.month-end-report-lines--labor .month-end-labor-description {
  overflow: hidden;
}

/* In un nuovo ordine cliente i prodotti dipendono dal cliente selezionato. */
.report-lines--disabled {
  opacity: 0.52;
}

.report-lines--disabled::before {
  content: "Seleziona prima il cliente per inserire i prodotti.";
  display: block;
  margin: 0 0 10px;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
}

.product-picker {
  position: relative;
  min-width: 0;
}

.product-picker__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 6px;
}

.report-lines__row .product-picker__control .icon-button {
  width: 46px;
  height: 46px;
  min-height: 46px;
}

.product-picker__panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(420px, 78vw);
  max-height: min(360px, calc(100vh - 180px));
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--moto-shadow);
}

.report-lines--ddts .product-picker__panel {
  left: 12px;
  right: 12px;
  width: auto;
}

.report-lines--ddts .product-picker {
  position: static;
}

/* Nello scarico il codice prodotto e' la ricerca primaria: il menu resta
   ancorato al suo campo, come nelle altre maschere prodotto. */
.report-lines--ddts-unload .product-picker {
  position: relative;
}

.report-lines--ddts-unload .product-picker__panel {
  left: 0;
  right: auto;
  width: min(420px, 78vw);
}

/* Il menu resta compatto durante la ricerca, ma la card di creazione usa
   l'intera larghezza disponibile: altrimenti i suoi campi restano tagliati
   dalla sola colonna del codice prodotto. */
.report-lines--ddts-unload .product-picker:has(.product-picker__new:not([hidden])) .product-picker__panel {
  width: min(1280px, calc(100vw - 170px));
}

.report-lines--ddts-unload .product-picker__panel > input[type="search"] {
  display: none;
}

/* Nel DDT la creazione e' esposta dal link contestuale al codice fornitore
   non trovato: questo pulsante tecnico non deve tornare visibile. */
.report-lines--ddts-load .product-picker__create-toggle {
  display: none !important;
}

.report-lines--orders-customer .product-picker__panel,
.report-lines--products .product-picker__panel {
  left: 0;
  right: auto;
  width: min(1280px, calc(100vw - 170px));
  max-height: min(520px, calc(100vh - 120px));
  overflow: auto;
}

/* Il selettore prodotto dei rapportini fine mese usa la stessa card estesa
   degli ordini cliente: la card di creazione non deve restare vincolata alla
   sola colonna del codice prodotto. */
.month-end-report-lines--products .product-picker__panel {
  left: 0;
  right: auto;
  width: min(1280px, calc(100vw - 170px));
  max-height: min(520px, calc(100vh - 120px));
  overflow: auto;
}

.report-lines--orders-customer .product-picker,
.report-lines--products .product-picker {
  position: relative;
}

.report-lines--orders-customer .product-picker__control {
  /* Negli ordini cliente il campo e' gia la ricerca: non c'e' la lente
     separata, quindi non va riservata la prima colonna da 46px. */
  grid-template-columns: minmax(0, 1fr);
}

.report-lines--orders-customer .component-picker__code-control {
  /* Stessa logica per il componente: il suo codice prodotto deve occupare
     tutta la prima colonna, non soltanto lo spazio della vecchia lente. */
  grid-template-columns: minmax(0, 1fr);
}

.report-lines--products .product-picker__control {
  /* Nel rapportino il campo codice e' la ricerca diretta: niente lente e
     nessuna colonna sprecata, come nelle altre maschere prodotto. */
  grid-template-columns: minmax(0, 1fr);
}

.report-lines--products .component-picker__code-control {
  grid-template-columns: minmax(0, 1fr);
}

.report-lines--products .report-lines__action-head,
.report-lines--products .report-lines__actions {
  justify-content: center;
  text-align: center;
}

.report-lines--products .report-lines__actions .icon-button--close {
  width: 40px;
  height: 40px;
  min-height: 40px;
  color: #d71920;
  border-color: rgba(215, 25, 32, 0.22);
}

/* Nei DDT di scarico il codice componente e' direttamente il campo di ricerca,
   come nel rapportino fine mese: nessuna lente separata. */
.report-lines--ddts-unload .component-picker__code-control {
  grid-template-columns: minmax(0, 1fr);
}

.order-supplier-product-code {
  min-width: 0;
  max-width: 200px;
  position: relative;
}

.supplier-code-picker {
  position: relative;
  min-width: 0;
}

.supplier-code-picker__trigger {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fff;
  color: var(--moto-text);
  padding: 9px 30px 9px 10px;
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.supplier-code-picker__trigger::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 11px;
  transform: translateY(-56%);
  font-size: 20px;
  line-height: 1;
}

.supplier-code-picker__trigger--open {
  border-color: rgba(215, 25, 32, 0.55);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.10);
}

.supplier-code-picker__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  gap: 6px;
  width: min(440px, calc(100vw - 48px));
  max-height: min(280px, calc(100vh - 180px));
  box-sizing: border-box;
  overflow: auto;
  overflow-x: hidden;
  padding: 7px;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--moto-shadow);
}

.supplier-code-picker__panel[hidden] { display: none; }

.supplier-code-picker__options { display: grid; gap: 4px; }

.supplier-code-picker__option {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #fafbfe;
  color: var(--moto-text);
  padding: 7px 8px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.supplier-code-picker__option:hover { background: #f0f3f8; }

.supplier-code-picker__create-toggle {
  justify-self: start;
  margin-top: 2px;
  font-size: 12px;
}

.order-supplier-product-code__new {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: -265px;
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(170px, 0.75fr) minmax(270px, 1.25fr) minmax(185px, 0.8fr) auto auto;
  gap: 8px;
  align-items: end;
  width: min(1326px, calc(100vw - 114px));
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid rgba(215, 25, 32, 0.28);
  border-radius: 12px;
  background: #fff8f8;
  box-shadow: var(--moto-shadow);
}

.order-supplier-product-code__new[hidden] {
  display: none;
}

.order-supplier-product-code__new .check-card {
  height: 46px;
  min-height: 46px;
  box-sizing: border-box;
  white-space: nowrap;
}

.order-supplier-product-code__new .moto-btn {
  min-height: 46px;
  white-space: nowrap;
}

.order-supplier-product-code__error {
  grid-column: 1 / -1;
  color: var(--moto-brand);
  font-weight: 700;
}

@media (max-width: 980px) {
  .order-supplier-product-code__new {
    grid-template-columns: 1fr 1fr;
    width: min(620px, calc(100vw - 48px));
    left: 0;
  }
}

.report-lines--orders-customer .product-picker__new,
.report-lines--products .product-picker__new,
.month-end-report-lines--products .product-picker__new,
.report-lines--ddts .product-picker__new {
  grid-template-columns: minmax(180px, 0.75fr) minmax(380px, 2.3fr) minmax(70px, 0.3fr) minmax(150px, 0.65fr) minmax(170px, 0.75fr) minmax(110px, 0.5fr);
}

.report-lines--orders-customer .product-picker__supplier-association,
.report-lines--products .product-picker__supplier-association,
.month-end-report-lines--products .product-picker__supplier-association,
.report-lines--ddts .product-picker__supplier-association {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 0.6fr) minmax(360px, 1.5fr) minmax(180px, 0.7fr);
  gap: 8px;
  align-items: end;
}

@media (max-width: 980px) {
  .component-picker__new,
  .component-picker__new .product-picker__supplier-association {
    grid-template-columns: 1fr 1fr;
  }

  .component-picker__new .component-picker__new-description {
    grid-column: 1 / -1;
  }

  .report-lines--orders-customer .product-picker__supplier-association,
  .report-lines--products .product-picker__supplier-association,
  .month-end-report-lines--products .product-picker__supplier-association,
  .report-lines--ddts .product-picker__supplier-association {
    grid-template-columns: 1fr 1fr;
  }
}

.product-picker__panel[hidden] {
  display: none;
}

.product-picker__panel > input[hidden],
.product-picker__options[hidden],
.product-picker__create-toggle[hidden] {
  display: none;
}

.product-picker__options {
  display: grid;
  gap: 6px;
  max-height: min(230px, calc(100vh - 270px));
  overflow: auto;
  overscroll-behavior: contain;
}

.product-picker__option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fafbfe;
  color: var(--moto-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.product-picker__option[hidden] {
  display: none;
}

.product-picker__option:hover,
.product-picker__option:focus {
  border-color: rgba(215, 25, 32, 0.32);
  background: #fff4f5;
  outline: none;
}

.product-picker__option span {
  color: var(--moto-muted);
  font-size: 13px;
}

.product-picker__empty {
  padding: 9px 10px;
  border: 1px dashed var(--moto-line);
  border-radius: 10px;
  background: #fafbfe;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
}

.product-picker__empty[hidden],
.product-picker__new[hidden] {
  display: none;
}

.product-picker__create-toggle {
  justify-self: start;
}

.product-picker__new {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(320px, 2.2fr) minmax(70px, 0.35fr) minmax(130px, 0.7fr) minmax(110px, 0.55fr) minmax(88px, 0.45fr);
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(215, 25, 32, 0.24);
  border-radius: 10px;
  background: #fff4f5;
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.08);
}

.product-picker__new .field {
  gap: 4px;
}

.product-picker__new-title {
  grid-column: 1 / -1;
  color: var(--moto-brand-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-picker__new .field label {
  font-size: 11px;
}

.product-picker__new .moto-btn {
  min-height: 38px;
  padding: 8px 10px;
}

.product-picker__new .check-card--compact {
  box-sizing: border-box;
  min-height: 46px;
  height: 46px;
  padding: 8px 10px;
}

.product-picker__new-error {
  grid-column: 1 / -1;
  color: var(--moto-brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.report-lines__actions {
  display: flex;
  align-items: center;
  min-height: 46px;
}

.line-order-controls {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 22px;
  height: 46px;
  max-height: 46px;
  gap: 2px;
}

.line-order-button {
  display: inline-grid;
  width: 22px;
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  place-items: center;
  padding: 0;
  border: 1px solid #b7c7d9;
  border-radius: 6px;
  background: #f4f8fc;
  color: #315f8e;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.line-order-button:hover:not(:disabled),
.line-order-button:focus-visible {
  border-color: #315f8e;
  background: #e9f2fb;
  outline: none;
}

.line-order-button:disabled {
  color: #aeb7c2;
  border-color: #e0e4e9;
  background: #f7f8fa;
  cursor: default;
  opacity: 0.7;
}

.report-lines--ddts .report-lines__actions {
  justify-content: center;
}

.report-lines__footer {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}

/* Nel rapportino i comandi della sezione prodotti non devono risultare un
   unico pulsante, soprattutto quando "Ordini clienti" e' disabilitato. */
.report-lines--products .report-lines__footer {
  gap: 10px;
}

.workflow-modal[hidden] {
  display: none;
}

dialog.workflow-modal:not([open]) {
  display: none;
}

.workflow-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}

/* I dialog nativi non devono occupare tutta la finestra con il loro box.
   La pagina viene oscurata dal backdrop e resta visibile soltanto il pannello. */
dialog.workflow-modal {
  inset: 0;
  display: block;
  width: var(--workflow-modal-width, min(680px, calc(100vw - 32px)));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}

dialog.workflow-modal::backdrop {
  background: rgba(16, 24, 40, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

dialog.workflow-modal > .workflow-modal__panel {
  position: static;
  width: 100%;
  max-width: none;
  margin: 0;
}

[data-supplier-association-modal] {
  z-index: 1200;
}

.workflow-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.order-cancellation-blocked-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}

.order-cancellation-blocked-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.order-cancellation-blocked-modal__panel {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(230, 232, 239, 0.98);
  border-top: 4px solid var(--moto-brand);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(16, 24, 40, 0.32);
}

.order-cancellation-blocked-modal__eyebrow {
  margin: 0 0 6px;
  color: var(--moto-brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.order-cancellation-blocked-modal__panel h2 {
  margin: 0;
  color: var(--moto-text);
  font-size: 26px;
  line-height: 1.12;
}

.order-cancellation-blocked-modal__message {
  margin: 16px 0 0;
  color: var(--moto-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.order-cancellation-blocked-modal__issues {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.order-cancellation-blocked-modal__issue {
  padding: 14px 16px;
  border: 1px solid #dfe4ec;
  border-left: 4px solid var(--moto-brand);
  border-radius: 8px;
  background: #f8f9fc;
}

.order-cancellation-blocked-modal__issue--confirmable {
  border-left-color: #d89400;
  background: #fffaf0;
}

.order-cancellation-blocked-modal__issue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-cancellation-blocked-modal__issue h3 {
  margin: 0;
  color: var(--moto-text);
  font-size: 17px;
}

.order-cancellation-blocked-modal__issue-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffe5e7;
  color: var(--moto-brand);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-cancellation-blocked-modal__issue--confirmable .order-cancellation-blocked-modal__issue-badge {
  background: #fff0c8;
  color: #8a5a00;
}

.order-cancellation-blocked-modal__documents {
  margin: 4px 0 12px;
  color: var(--moto-text);
  font-weight: 900;
}

.order-cancellation-blocked-modal__proposals {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #d8e6dc;
  border-radius: 6px;
  background: #ffffff;
}

.order-cancellation-blocked-modal__proposals > p {
  margin: 0 0 7px;
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-cancellation-blocked-modal__proposals ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-cancellation-blocked-modal__proposals li {
  display: grid;
  grid-template-columns: minmax(88px, 0.9fr) minmax(0, 2fr) auto auto auto;
  gap: 8px;
  align-items: baseline;
  color: var(--moto-text);
  font-size: 12px;
}

.order-cancellation-blocked-modal__issue dl,
.order-cancellation-blocked-modal__issue dd {
  margin: 0;
}

.order-cancellation-blocked-modal__issue dl {
  display: grid;
  gap: 10px;
}

.order-cancellation-blocked-modal__issue dt {
  margin-bottom: 2px;
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-cancellation-blocked-modal__issue dd {
  color: var(--moto-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

.order-cancellation-blocked-modal__feasibility {
  padding: 9px 10px;
  border-radius: 6px;
  background: #ffe9eb;
}

.order-cancellation-blocked-modal__issue--confirmable .order-cancellation-blocked-modal__feasibility {
  background: #eaf8ef;
}

.order-cancellation-blocked-modal__issue--confirmable .order-cancellation-blocked-modal__feasibility dd {
  color: #176b39;
}

.order-cancellation-blocked-modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.order-cancellation-blocked-modal__actions form {
  margin: 0;
}

.workflow-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(230, 232, 239, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(16, 24, 40, 0.28);
}

.workflow-modal__panel--wide {
  width: min(920px, 100%);
}

.workflow-modal__panel--supplier-orders {
  width: min(1480px, calc(100vw - 48px));
}

.workflow-modal__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.workflow-modal__head span {
  display: block;
  margin-bottom: 4px;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workflow-modal__head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.workflow-modal__intro,
.workflow-modal__empty {
  margin: 0;
  color: var(--moto-muted);
  font-weight: 750;
}

.workflow-modal__list,
.workflow-order-list {
  display: grid;
  gap: 10px;
}

.workflow-order {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fafbfe;
}

.workflow-order[hidden] {
  display: none !important;
}

.workflow-order__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--moto-text);
  font-weight: 900;
}

.workflow-order__head span {
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
}

.workflow-order__details {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-order__vehicle {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 750;
}

.workflow-order__select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--moto-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.workflow-order__select-all input {
  inline-size: 17px;
  block-size: 17px;
  accent-color: var(--moto-red);
}

.workflow-order__lines {
  display: grid;
  gap: 8px;
}

.workflow-order-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.workflow-order-line[hidden] {
  display: none !important;
}

.workflow-order-line--warning {
  border-color: rgba(214, 122, 0, 0.42);
  background: #fff9ec;
  animation: workflow-row-warning-pulse 1.15s ease-in-out infinite;
}

.workflow-order-line--stock-replenishment {
  border-color: #f2c16a;
  background: #fff8e9;
}

.workflow-order-line input {
  width: 18px;
  height: 18px;
}

.workflow-order-line span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workflow-order-line small {
  color: var(--moto-muted);
  font-weight: 700;
  line-height: 1.35;
}

.workflow-order-line .workflow-order-line__internal-code {
  font-size: 11px;
  font-weight: 650;
  opacity: 0.82;
}

.workflow-order-line .workflow-order-line__stock-summary,
.workflow-order-line .workflow-order-line__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  margin-top: 4px;
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 750;
}

.workflow-order-line .workflow-order-line__stock-summary {
  color: #8a5400;
}

.workflow-order-line__stock-summary > span,
.workflow-order-line__summary > span {
  display: inline;
}

.workflow-order-line__stock-summary b,
.workflow-order-line__summary b {
  color: var(--moto-text);
}

.report-lines--ddts-waiting-party {
  opacity: 0.58;
}

.workflow-order-line em {
  color: var(--moto-muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}


.workflow-order-line .workflow-order-line__missing-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--moto-brand-dark);
}

.workflow-order-line .workflow-order-line__missing-price input {
  width: 112px;
  height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(219, 59, 59, 0.52);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font: inherit;
}

.workflow-order-line .workflow-order-line__missing-price input.field--invalid {
  border-color: var(--moto-brand);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
}

.order-price-sync-notice {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(215, 25, 32, 0.22);
  border-radius: 8px;
  background: #fff6f6;
  color: var(--moto-brand);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.workflow-order-line__quantity {
  align-items: end;
  text-align: right;
}

.workflow-order-line input[data-supplier-order-quantity],
.workflow-order-line input[data-report-order-quantity] {
  width: 92px;
  height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font: inherit;
  font-weight: 800;
  text-align: right;
}

.month-end-edit-order-line {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 42%);
  align-items: end;
}

.month-end-edit-order-line__selection {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
}

.month-end-edit-order-line__fields {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1.25fr .9fr;
  gap: 8px;
  min-width: 0;
}

.month-end-edit-order-line__fields label {
  display: grid;
  gap: 4px;
  color: var(--moto-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .035em;
  text-align: right;
  text-transform: uppercase;
}

.workflow-order-line .month-end-edit-order-line__fields input {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
  font-weight: 800;
  text-align: right;
}

.workflow-order-line .month-end-edit-order-line__fields input:focus {
  border-color: var(--moto-brand);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(215, 25, 32, .10);
}

@media (max-width: 760px) {
  .month-end-edit-order-line {
    grid-template-columns: 1fr;
    align-items: center;
  }

  .month-end-edit-order-line__fields {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.workflow-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.workflow-modal__panel--vehicle-reassignment {
  max-height: none;
  overflow: visible;
}

.acceptance-vehicle-reassignment__picker .combobox__menu {
  display: block;
  z-index: 120;
  max-height: 280px;
  padding: 4px;
  border-radius: 8px;
}

.acceptance-vehicle-reassignment__picker .combobox__menu[hidden] {
  display: none !important;
}

.acceptance-vehicle-reassignment__picker .combobox__option[hidden],
.acceptance-vehicle-reassignment__picker .combobox__empty[hidden] {
  display: none !important;
}

.acceptance-vehicle-reassignment__picker .combobox__option {
  display: block;
  min-height: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acceptance-vehicle-reassignment__picker .combobox__option + .combobox__option {
  border-top: 1px solid var(--moto-line);
}

.acceptance-vehicle-reassignment__picker .combobox__option strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.acceptance-vehicle-reassignment__actions {
  margin-top: 22px;
}

.workflow-mode-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workflow-mode-choice__item {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--moto-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workflow-mode-choice__item:hover {
  border-color: var(--moto-brand);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.10);
}

.workflow-mode-choice__item--active {
  border-color: #1f66ff;
  background: #f6f9ff;
  box-shadow: 0 0 0 2px rgba(31, 102, 255, 0.16);
}

.workflow-mode-choice__item strong {
  font-size: 16px;
  font-weight: 950;
}

.workflow-mode-choice__item span {
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.workflow-match-lines {
  display: grid;
  gap: 2px;
}

.supplier-order-workflow,
.supplier-order-workflow__list {
  display: grid;
  gap: 12px;
}

.supplier-order-workflow__columns-head {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(720px, 2fr);
  gap: 10px;
  padding: 0 12px;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.supplier-order-workflow__columns-head-fields {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(160px, 0.7fr) minmax(130px, 0.4fr) minmax(125px, 0.45fr);
  gap: 12px;
}

.supplier-order-workflow__item {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(720px, 2fr);
  gap: 10px;
  align-items: end;
}

.supplier-order-workflow__product {
  display: grid;
  min-width: 0;
}

.supplier-order-workflow__field-label {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workflow-order-line .supplier-order-workflow__product-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.supplier-order-workflow__product .workflow-order-line {
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 56px;
  box-sizing: border-box;
  padding: 8px 10px;
  cursor: default;
}

.supplier-order-workflow__stock-actions {
  display: flex;
  align-items: center;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  margin-top: -2px;
  padding: 7px 10px;
  border: 1px solid rgba(215, 25, 32, 0.20);
  border-radius: 8px;
  background: #fff5f5;
}

.supplier-order-workflow__stock-actions[hidden] {
  display: none;
}

.supplier-order-workflow__stock-actions .supplier-order-workflow__stock-feedback {
  flex: 0 1 auto;
  white-space: nowrap;
}

.supplier-order-workflow__reset-stock {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(215, 25, 32, 0.40);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}

.supplier-order-workflow__reset-stock[hidden] {
  display: none;
}

.supplier-order-workflow__group {
  display: grid;
  gap: 12px;
}

.supplier-order-workflow__group[data-supplier-order-split-group] {
  gap: 0;
  border-color: #8ba8c4;
  border: 1px solid #8ba8c4;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.supplier-order-workflow__group[data-supplier-order-split-group] .supplier-order-workflow__item {
  border: 0;
  border-radius: 0;
  padding: 12px 58px 12px 12px;
  box-shadow: none;
  background: transparent;
}

.supplier-order-workflow__group[data-supplier-order-split-group] .supplier-order-workflow__item + .supplier-order-workflow__item {
  border-top: 1px solid #c7d7e7;
}

.supplier-order-workflow__item[data-supplier-order-derived] {
  position: relative;
}

.supplier-order-workflow__merge-button {
  position: absolute;
  bottom: 12px;
  right: 12px;
}

.supplier-order-workflow__merge-button[hidden] {
  display: none;
}

.workflow-order-line .supplier-order-workflow__product-value small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-order-workflow__fields {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(160px, 0.7fr) minmax(130px, 0.4fr) minmax(125px, 0.45fr);
  gap: 12px;
}

.stock-adjustment-workflow {
  display: grid;
  gap: 10px;
}

.stock-adjustment-workflow__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.65fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid #f2c16a;
  border-radius: 9px;
  background: #fffaf0;
}

.stock-adjustment-workflow__product {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stock-adjustment-workflow__product small {
  color: var(--moto-muted);
}

.stock-adjustment-workflow__decision {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) minmax(125px, 0.45fr);
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.stock-adjustment-workflow__decision label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.stock-adjustment-workflow__decision .stock-adjustment-workflow__select {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  color: var(--moto-text);
  font-size: 12px;
  text-transform: none;
}

.stock-adjustment-workflow__decision select,
.stock-adjustment-workflow__decision input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 760px) {
  .stock-adjustment-workflow__item {
    grid-template-columns: minmax(0, 1fr);
  }
}

.supplier-order-workflow__fields .field select,
.supplier-order-workflow__fields .field input {
  min-height: 56px;
  height: 56px;
  box-sizing: border-box;
}

.replenishment-order__rows {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.replenishment-order__row {
  position: relative;
}

.replenishment-order__fields {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(145px, 0.55fr) minmax(280px, 1.4fr) minmax(110px, 0.4fr) 42px;
  gap: 12px;
}

.replenishment-order__remove {
  width: 42px;
  height: 42px;
}

.replenishment-order__new-product {
  margin-top: 12px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(260px, 1.8fr) minmax(70px, 0.35fr) minmax(130px, 0.65fr) minmax(120px, 0.6fr) minmax(88px, 0.45fr);
}

.replenishment-order__new-product .product-picker__supplier-association {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.6fr) minmax(260px, 1.1fr) minmax(175px, 0.7fr);
  gap: 8px;
  align-items: end;
}

.replenishment-order__new-product[hidden] {
  display: none;
}

.supplier-order-workflow__fields .field > label {
  white-space: nowrap;
}

.supplier-order-workflow__stock-feedback {
  display: block;
  margin: 0;
  color: var(--moto-brand);
  font-size: 12px;
  font-weight: 800;
}

.supplier-order-workflow__stock-feedback[hidden] {
  display: none;
}

.product-supplier-row__temporary-code {
  align-self: end;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  padding: 6px 10px;
}

.product-supplier-row__remove {
  display: grid;
  width: 38px;
  height: 42px;
  place-items: center;
  align-self: end;
  padding: 0;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff;
  color: var(--moto-brand);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.product-supplier-row__remove:hover {
  border-color: var(--moto-brand);
  background: #fff5f5;
}

.admin-operation-confirmation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.admin-operation-confirmation .field { min-width: 0; }
.admin-operation-confirmation .moto-btn { white-space: nowrap; }

.supplier-order-workflow__hint {
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 800;
}

.workflow-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.workflow-import-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #f8fafc;
}

.workflow-import-column__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.workflow-import-column__head h3 {
  margin: 0;
}

.workflow-import-column__head p {
  margin: 4px 0 0;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.workflow-import-column__head > span {
  min-width: 32px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.workflow-order-list--scroll {
  max-height: min(420px, 48vh);
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.workflow-import-grid h3 {
  margin: 0 0 10px;
  color: var(--moto-text);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price-sync-form {
  display: grid;
  gap: 10px;
}

.price-sync-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(215, 25, 32, 0.24);
  border-radius: 10px;
  background: #fff8f8;
}

.price-sync-form__row > div,
.price-sync-form__row label {
  display: grid;
  gap: 3px;
}

.price-sync-form__row small {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 700;
}

.price-sync-form__row label {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 850;
}

.price-sync-form__row input {
  text-align: right;
}

.row-order-match--modal {
  margin: 0;
}

.report-lines--readonly {
  margin-top: 18px;
}

.report-lines--readonly .report-lines__row {
  align-items: center;
}

.report-lines--readonly p {
  margin: 0;
}

.report-lines__total {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px;
  color: var(--moto-muted);
  font-weight: 900;
}

.report-lines__total strong {
  color: var(--moto-text);
}

.report-lines__subtotal {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin: 8px 0 22px;
  padding: 11px 12px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #f4f7fc;
  color: var(--moto-muted);
  font-weight: 800;
}

.report-lines__subtotal > span:first-child {
  margin-right: auto;
}

.report-lines__subtotal strong {
  color: var(--moto-text);
}

/* Rapportini fine mese */
.month-end-selection-row {
  grid-template-columns: 44px minmax(100px, .55fr) minmax(220px, 1.8fr) minmax(90px, .55fr) minmax(110px, .7fr) minmax(150px, .9fr);
  cursor: pointer;
}

.month-end-selection-row:hover {
  border-color: var(--moto-brand);
}

.month-end-selection-group + .month-end-selection-group {
  margin-top: 18px;
}

.month-end-selection-group { position: relative; }

.month-end-vehicle-section + .month-end-vehicle-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--moto-line);
}

.month-end-vehicle-section + .month-end-vehicle-section .month-end-selection-group__vehicle {
  margin-top: 0;
}

.month-end-generation-filter {
  margin-bottom: 18px;
}

.month-end-generation-filter__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.month-end-generation-filter__fields .moto-btn {
  min-height: 42px;
}

.month-end-order-alert {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  margin-right: 7px;
  padding: 0;
  border: 1px solid #c98b00;
  border-radius: 50%;
  background: #ffd34d;
  color: #5f4300;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.month-end-order-alert:hover,
.month-end-order-alert[aria-expanded="true"] { background: #f5bd20; border-color: #9e6800; }
.month-end-order-alert[hidden] { display: none; }

.month-end-order-card { margin-top: 12px; border: 1px solid #f1c06b; border-radius: 10px; overflow: hidden; }
.month-end-order-card[hidden] { display: none; }
.month-end-order-card--overlay {
  position: absolute;
  z-index: 5;
  top: 74px;
  right: 18px;
  left: 18px;
  margin-top: 0;
  box-shadow: 0 16px 34px rgba(30, 43, 65, 0.24);
}
.month-end-order-lines { border-top: 0; }
.month-end-order-lines__order { padding: 10px 12px; background: #fffaf1; border-bottom: 1px solid #f5e4c2; }
.month-end-order-lines__order-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #8a570d; font-size: 13px; }

.month-end-order-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 64px 130px 120px 88px minmax(180px, 0.65fr);
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--moto-line);
}

.month-end-order-line label { min-width: 0; cursor: pointer; }
.month-end-order-line label span { display: block; color: var(--moto-muted); font-size: 13px; }
.month-end-order-line__residual { font-size: 13px; white-space: nowrap; }
.month-end-order-line__quantity input,
.month-end-order-line__price input,
.month-end-order-line__discount input,
.month-end-order-line__vehicle select { min-height: 38px; }

.report-lines--month-end .report-lines__head,
.report-lines--month-end .report-lines__row {
  grid-template-columns: 44px minmax(100px, .55fr) minmax(220px, 1.8fr) minmax(90px, .55fr) minmax(110px, .7fr) minmax(150px, .9fr);
}

.month-end-order-line--applied {
  grid-template-columns: 34px minmax(0, 1fr) auto 64px 130px 120px 88px 120px 36px;
  padding: 10px 12px;
  background: #fffdf8;
}

.month-end-order-line--applied .month-end-order-line__vehicle {
  display: none;
}

.month-end-order-line--applied .month-end-order-line__price::after {
  content: "€";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--moto-muted);
  font-weight: 800;
}

.month-end-order-line__price { position: relative; }
.month-end-order-line--applied .month-end-order-line__price input { padding-right: 28px; text-align: right; }
.month-end-order-line__discount input { text-align: right; }
.month-end-order-line__total { color: var(--moto-text); font-weight: 900; text-align: right; white-space: nowrap; }

.month-end-order-line__detach {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--moto-line);
  border-radius: 9px;
  background: #fff;
  color: var(--moto-brand);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.month-end-order-line__detach:hover { border-color: var(--moto-brand); background: #fff2f3; }

.month-end-order-import__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 12px;
  background: #fffaf1;
}

.month-end-order-import__actions small {
  margin-right: auto;
  color: #b42318;
  font-weight: 800;
}

.month-end-applied-orders {
  margin-top: 12px;
  border: 1px solid #f1c06b;
  border-radius: 10px;
  overflow: hidden;
  background: #fffaf1;
}

.month-end-applied-orders__title {
  margin: 0;
  padding: 8px 12px;
  color: #8a570d;
  font-size: 13px;
  font-weight: 900;
}

.month-end-applied-orders__head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 100px 130px 88px 120px 36px;
  gap: 12px;
  padding: 0 12px 8px;
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.month-end-applied-orders__head span:nth-child(n + 3) { text-align: right; }

.month-end-selection-group__vehicle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
}

.month-end-selection-group__vehicle strong {
  color: var(--moto-brand-dark);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.month-end-selection-group__vehicle input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--moto-brand);
}

.month-end-vehicle-toggle {
  flex: 0 0 27px;
}

.month-end-billing-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 800;
}

.month-end-billing-choice select,
.month-end-billing-reassignment select {
  min-height: 34px;
  padding: 5px 30px 5px 9px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
}

.month-end-billing-reassignment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.report-lines--month-end[hidden] {
  display: none;
}

.form-grid--generation-month {
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 180px);
  max-width: 520px;
}

.month-end-editor {
  display: grid;
  gap: 10px;
}

.month-end-editor__row {
  align-items: center;
}

.month-end-report-lines--labor .report-lines__head,
.month-end-report-lines--labor .report-lines__row {
  grid-template-columns: minmax(260px, 1.8fr) 72px 100px 120px 125px 150px 96px;
}

.month-end-report-lines--products .report-lines__head,
.month-end-report-lines--products .report-lines__row {
  grid-template-columns: 22px minmax(98px, .45fr) minmax(130px, .55fr) minmax(178px, 1fr) 42px 54px 96px 108px 68px 70px 166px 126px 44px;
}

@media (min-width: 1181px) and (max-width: 1400px) {
  .month-end-report-lines--products .report-lines__head,
  .month-end-report-lines--products .report-lines__row {
    grid-template-columns: 22px minmax(90px, .54fr) minmax(108px, .65fr) minmax(155px, 1.2fr) 40px 52px 88px 102px 66px 70px 160px 114px 40px;
    gap: 8px;
  }

  .month-end-editor__print-visibility { padding-inline: 9px; gap: 6px; }
}

.month-end-report-lines--products select[name$='[vat_rate_id]'] { min-width: 0; padding-inline: 8px; }

.month-end-report-lines .field { min-width: 0; }
.month-end-report-lines .report-lines__row textarea { min-height: 46px; resize: none; }
.month-end-report-lines--products .report-lines__row > * { min-width: 0; max-width: 100%; }
.month-end-report-lines--products input[type="date"] {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.month-end-report-lines--products .product-picker__control { grid-template-columns: minmax(0, 1fr); }
.month-end-report-lines--products .component-picker__code-control { grid-template-columns: minmax(0, 1fr); }
.month-end-report-lines--products { margin-top: 10px; }
.month-end-report-lines--products .report-lines__row { margin-top: 4px; }
.month-end-report-lines--products .month-end-editor__print-visibility { margin: 0; }
.month-end-products__bottom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.month-end-report-lines--products + .month-end-products__bottom-actions { gap: 8px; }
.month-end-macro-section__content .section-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.month-end-macro-section--collapsible + .acceptance-card { margin-top: 20px; }
.month-end-report-lines .icon-button--search.icon-button--active {
  border-color: var(--moto-brand);
  background: #fff4f5;
  color: var(--moto-brand-dark);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, .10);
}

.month-end-report-lines .ddt-components { margin-top: 2px; }
.month-end-report-lines .component-picker { position: relative; min-width: 0; }
.month-end-report-lines .component-picker__panel { z-index: 40; }

.month-end-editor__actions {
  align-self: center;
  display: flex;
  justify-content: center;
}

.month-end-editor__remove {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--moto-line);
  border-radius: 9px;
  background: #fff;
  color: var(--moto-brand);
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.month-end-editor__remove:hover { border-color: var(--moto-brand); background: #fff2f3; color: var(--moto-brand); }

.month-end-editor__print-visibility {
  display: flex;
  align-items: center;
  min-height: 46px;
  height: 46px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fff;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 850;
}

.month-end-editor__print-visibility input { accent-color: var(--moto-brand); }

.month-end-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  padding: 4px 0 8px;
}

.month-end-source-links__empty {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--moto-muted);
  font-size: 13px;
}

.month-end-editor-section {
  margin-top: 24px;
}

.month-end-macro-section + .month-end-macro-section { margin-top: 24px; }
.month-end-macro-section__part + .month-end-macro-section__part { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--moto-line); }
.month-end-macro-section__part h3 { margin: 0 0 8px; font-size: 17px; }

.month-end-macro-section__details > summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--moto-text);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.month-end-macro-section__details > summary::-webkit-details-marker { display: none; }

.month-end-macro-section__toggle {
  width: 28px;
  height: 28px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  transition: transform .16s ease, border-color .16s ease;
}

.month-end-macro-section__toggle::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 7px auto 0;
  border-right: 2px solid var(--moto-text);
  border-bottom: 2px solid var(--moto-text);
  transform: rotate(45deg);
}

.month-end-macro-section__details[open] .month-end-macro-section__toggle { transform: rotate(180deg); border-color: var(--moto-brand); }
.month-end-macro-section__content { margin-top: 12px; }
.month-end-macro-section__subtitle { margin: 0 0 14px; color: var(--moto-muted); }

@media (max-width: 1180px) {
  .month-end-report-lines--labor .report-lines__head,
  .month-end-report-lines--products .report-lines__head { display: none; }

  .month-end-report-lines--labor .report-lines__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .month-end-report-lines--products .report-lines__row { grid-template-columns: 22px minmax(0, 1fr); }

  .month-end-report-lines--products .report-lines__row > .field,
  .month-end-report-lines--products .report-lines__row > .month-end-editor__actions,
  .month-end-report-lines--products .report-lines__row > .month-end-editor__print-visibility { grid-column: 2; }

  .month-end-report-lines--labor .report-lines__row > .field:first-of-type,
  .month-end-report-lines--products .report-lines__row > .field:nth-of-type(3) { grid-column: 1 / -1; }

  .month-end-editor__actions { text-align: left; }
}

.month-end-source-link-badge {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 460px);
  gap: 7px;
  padding: 7px 8px 7px 10px;
  border: 1px solid #bfcee4;
  border-radius: 999px;
  background: #edf4ff;
  color: #1c416e;
  font-size: 13px;
}

.month-end-source-link-badge > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-end-source-link-badge__remove {
  display: inline-grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #d8393b;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.month-end-source-link-badge__remove:hover {
  background: #ad1f25;
  color: #fff;
}

.month-end-document {
  padding: 32px;
  border: 1px solid var(--moto-line);
  background: #fff;
  box-shadow: var(--moto-shadow);
}

.month-end-document__head {
  display: grid;
  grid-template-columns: 1.2fr 1fr .6fr .9fr;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--moto-line);
}

.month-end-document__head p { margin: 5px 0 0; }

.month-end-document__invoice-form {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}

.month-end-document__invoice-form input { min-width: 0; }

.month-end-document__lines { margin-top: 22px; }

.month-end-document__line {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 105px 110px 75px 75px 120px;
  gap: 10px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--moto-line);
}

.month-end-document__line--head {
  background: #e8ebf0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.month-end-document__line p { margin: 0; }

.month-end-document__total {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 32px;
  margin-top: 18px;
  padding: 14px;
  background: #e8ebf0;
  font-size: 18px;
}

.month-end-document__total span { display: inline-flex; gap: 8px; align-items: baseline; }

.document-totals {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 18px;
  padding: 14px 18px;
  border-top: 1px solid var(--moto-line);
  background: #fafbfe;
}

.document-totals span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--moto-muted);
  font-weight: 800;
}

.document-totals strong {
  color: var(--moto-text);
  font-size: 17px;
}

/* Caricamento giornaliero manodopera */
.daily-load-form {
  display: grid;
  gap: 18px;
}

.daily-load-setup,
.daily-load-table-card {
  border: 1px solid var(--moto-line);
  border-radius: 18px;
  background: var(--moto-card);
  box-shadow: 0 8px 26px rgba(16, 24, 40, 0.05);
}

.daily-load-setup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
}

.daily-load-setup__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: var(--moto-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.daily-load-setup__label {
  display: block;
  margin-bottom: 9px;
  color: var(--moto-brand-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mechanic-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.mechanic-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 7px 13px 7px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 13px;
  background: #fafbfe;
  color: var(--moto-text);
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.mechanic-card:hover {
  border-color: rgba(215, 25, 32, 0.55);
  background: #fff4f5;
  transform: translateY(-1px);
}

.mechanic-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.15);
}

.mechanic-card--selected {
  border-color: var(--moto-brand);
  background: #fff4f5;
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
}

.mechanic-card__initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e9ebf1;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 950;
}

.mechanic-card--selected .mechanic-card__initials {
  background: var(--moto-brand);
  color: #fff;
}

.daily-load-setup p {
  margin: 18px 0 0;
  color: var(--moto-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.daily-load-summary {
  display: grid;
  align-self: start;
  gap: 3px;
  min-width: 130px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f5f6fa;
  color: var(--moto-muted);
  font-size: 13px;
  text-align: right;
}

.daily-load-summary strong {
  color: var(--moto-text);
  font-size: 16px;
}

.daily-load-summary b {
  color: var(--moto-brand-dark);
}

.daily-load-table-card {
  overflow: visible;
}

.daily-load-table-card__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #ffffff, #fafbfe);
}

.daily-load-table-card__head > div {
  display: flex;
  gap: 11px;
  align-items: center;
}

.daily-load-table-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.daily-load-table-card h2 {
  margin: 0;
  font-size: 19px;
}

.daily-load-table-card p {
  margin: 4px 0 0;
  color: var(--moto-muted);
  font-size: 14px;
  font-weight: 650;
}

.daily-load-lines {
  padding: 16px;
}

.daily-load-lines [data-daily-labor-load-target="rows"],
.daily-load-lines [data-daily-labor-load-target="productRows"] {
  display: grid;
  gap: 10px;
}

.daily-load-lines__section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--moto-brand-dark);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.daily-load-add-product {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: normal;
  text-transform: none;
}

.daily-load-lines__footer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--moto-line);
}

.daily-load-lines__head,
.daily-load-lines__row {
  grid-template-columns: minmax(280px, 1.85fr) minmax(250px, 1.65fr) minmax(68px, 0.35fr) minmax(88px, 0.46fr) minmax(140px, 0.72fr) minmax(70px, 0.38fr);
  gap: 10px;
  align-items: center;
}

.daily-load-lines__head {
  padding: 0 12px 3px;
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.daily-load-lines__practice-head {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 8px;
}

.daily-load-lines__row {
  position: relative;
  padding: 12px;
  border: 1px solid var(--moto-line);
  border-left: 4px solid rgba(215, 25, 32, 0.38);
  border-radius: 12px;
  background: #fafbfe;
}

.daily-load-lines__row:focus-within {
  z-index: 30;
}

.daily-load-lines__row[hidden],
.daily-load-lines__empty[hidden] {
  display: none;
}

.daily-load-lines__empty {
  margin: 10px 0 0;
  padding: 14px;
  border: 1px dashed var(--moto-line);
  border-radius: 10px;
  color: var(--moto-muted);
  font-size: 14px;
  font-weight: 750;
}

.daily-load-lines__row textarea,
.daily-load-lines__row input,
.daily-load-lines__row select {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
  padding: 9px 10px;
  outline: none;
}

.daily-load-lines__row textarea:focus,
.daily-load-lines__row input:focus,
.daily-load-lines__row select:focus {
  border-color: rgba(215, 25, 32, 0.55);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.1);
}

.daily-load-lines__row textarea {
  height: 46px;
  line-height: 1.3;
  resize: vertical;
}

.daily-load-practice-picker {
  flex: 1;
  min-width: 0;
}

.daily-load-target-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.daily-load-entry-toggles {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 4px;
}

.daily-load-absence-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.daily-load-absence-badge--illness {
  background: #fff0f0;
  color: #b42318;
}

.daily-load-absence-badge--vacation {
  background: #edf6ff;
  color: #1d5d96;
}

.daily-load-entry-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--moto-muted);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.daily-load-lines__row .daily-load-entry-toggle input[type="checkbox"] {
  position: relative;
  width: 32px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #b9c0ca;
  cursor: pointer;
}

.daily-load-lines__row .daily-load-entry-toggle input[type="checkbox"]::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 0.15s ease;
}

.daily-load-lines__row .daily-load-entry-toggle input[type="checkbox"]:checked {
  background: var(--moto-brand);
}

.daily-load-lines__row .daily-load-entry-toggle input[type="checkbox"]:checked::after {
  transform: translateX(14px);
}

.daily-load-lines__row input:disabled {
  border-color: #d7dce3;
  background: #eef1f4;
  color: #8d96a3;
  cursor: not-allowed;
}

.daily-load-lines__row input[readonly],
.daily-load-lines__row textarea[readonly] {
  border-color: #d7dce3;
  background: #eef1f4;
  color: #697585;
  cursor: default;
}

.daily-load-external-reference {
  flex: 1;
  min-width: 0;
}

.daily-load-external-reference input {
  width: 100%;
}

.daily-load-lines__actions {
  display: flex;
  justify-content: center;
}

.daily-load-empty {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed rgba(215, 25, 32, 0.35);
  border-radius: 12px;
  background: #fff4f5;
  color: var(--moto-brand-dark);
  font-weight: 750;
}

.form-actions {
  justify-content: flex-end;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--moto-line);
}

.form-errors {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(219, 59, 59, 0.25);
  border-radius: 12px;
  background: rgba(219, 59, 59, 0.08);
  color: #9f1f1f;
}

.form-errors ul {
  margin-bottom: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
}

.detail-grid--customer {
  grid-template-columns: 1fr;
}

.detail-grid--order {
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

.table-card--order-detail {
  overflow: hidden;
  margin-bottom: 16px;
}

.order-detail-total {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--moto-line);
  background: #fafbfe;
  color: var(--moto-muted);
  font-weight: 800;
}

.order-detail-total strong {
  color: var(--moto-text);
  font-size: 17px;
}

.detail-card {
  padding: 20px;
}

.detail-card--company-summary {
  padding: 16px 18px;
}

.detail-card--vehicles-section {
  position: relative;
  padding: 18px;
}

.vehicle-category-filter {
  width: auto;
  min-width: 160px;
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background-color: #fff;
  color: var(--moto-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.vehicle-category-filter:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, 0.12);
}

.vehicle-category-filter__empty {
  margin: 0;
  padding: 18px 0 4px;
  color: var(--moto-muted);
  text-align: center;
}

.related-item--vehicle[hidden],
.vehicle-category-filter__empty[hidden] {
  display: none;
}

.detail-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-card h2 {
  margin: 0;
  font-size: 20px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.detail-list--company-summary {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px 16px;
}

.detail-list div {
  min-width: 0;
}

.detail-list dt {
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.detail-list--company-summary dd {
  margin-top: 3px;
  font-size: 14px;
}

.note-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: #fafbfe;
}

.detail-card--company-summary .note-box {
  margin-top: 14px;
  padding: 12px;
}

.note-box p {
  margin-bottom: 0;
  color: var(--moto-muted);
}

.vehicle-report-history {
  margin-top: 18px;
}

.vehicle-report-history .detail-card__head > div {
  min-width: 0;
}

.vehicle-report-history .detail-card__head p {
  margin: 5px 0 0;
  color: var(--moto-muted);
  font-size: 14px;
}

.vehicle-report-history__list {
  display: grid;
  border-top: 1px solid var(--moto-line);
}

.vehicle-report-history__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--moto-line);
}

.vehicle-report-history__item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.vehicle-report-history__item span:not(.status-pill) {
  overflow-wrap: anywhere;
  color: var(--moto-muted);
  font-size: 13px;
}

.vehicle-report-history__actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}

.vehicle-report-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.vehicle-report-summary div {
  display: grid;
  gap: 4px;
}

.vehicle-report-summary div > span {
  color: var(--moto-muted);
  font-size: 14px;
  font-weight: 700;
}

.related-list {
  display: grid;
  gap: 10px;
}

.detail-card--vehicles-section .related-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.related-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

.related-item--vehicle {
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 10px 12px;
}

.related-item--vehicle > .row-actions {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.related-item--vehicle > .row-actions form {
  display: inline-flex;
  margin: 0;
}

.related-item--vehicle .moto-link,
.related-item--vehicle .link-button {
  line-height: 1;
}

.vehicle-card-grid {
  gap: 10px;
}

.vehicle-card__line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.vehicle-card__line span {
  display: grid;
  gap: 1px;
  min-width: 0;
  color: var(--moto-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.vehicle-card__line strong {
  color: var(--moto-muted);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.vehicle-card__title {
  display: block;
  color: inherit;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.18;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.vehicle-card__title:hover {
  text-decoration: underline;
}

.vehicle-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 0;
}

.vehicle-card__attachments {
  display: flex;
  min-width: 0;
}

.vehicle-card__footer .row-actions {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
}

.vehicle-card__footer .row-actions form {
  display: inline-flex;
  margin: 0;
}

.vehicle-card__footer .attachment-count-pill,
.vehicle-card__footer .status-pill {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

.vehicle-card__footer .moto-link,
.vehicle-card__footer .link-button {
  font-size: 13px;
}

.related-item__main {
  display: grid;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.related-item:hover {
  border-color: rgba(215, 25, 32, 0.40);
}

.related-item span {
  color: var(--moto-muted);
}

.attachment-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef1f7;
  color: var(--moto-text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.related-item .attachment-count-pill span {
  color: inherit;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 20px;
}

.danger-zone p {
  margin: 4px 0 0;
  color: var(--moto-muted);
}

.backup-restore {
  display: block;
}

.backup-restore-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.backup-restore-form__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
  gap: 14px;
}

.danger-zone--critical {
  border-color: #df777b;
  background: linear-gradient(135deg, #fff5f5, #fff0f1);
}

.danger-zone--critical strong {
  color: #b51f28;
  font-size: 17px;
}

.danger-zone--critical p {
  max-width: 860px;
  color: #76282d;
  font-weight: 650;
}

.database-restore-page {
  padding-top: 48px;
}

.database-restore-card {
  padding: 26px;
}

.database-restore-status {
  margin-bottom: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #eaf2fb;
  color: var(--moto-brand-dark);
  font-weight: 800;
}

.database-restore-card h2 {
  margin: 22px 0 10px;
  font-size: 17px;
}

.database-restore-checks,
.database-restore-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.database-restore-checks li {
  color: #17734d;
  font-weight: 700;
}

.database-restore-steps li {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fafbfd;
}

.database-restore-steps span {
  color: var(--moto-muted);
}

.database-restore-result {
  margin: 24px 0 0;
  font-weight: 800;
}

.database-restore-result .moto-btn {
  margin-left: 10px;
}

.acceptance-no-slot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--moto-muted);
  font-size: 13px;
  font-weight: 750;
}

.acceptance-no-slot input {
  width: 16px;
  height: 16px;
}

.daily-summary-filter {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--moto-line);
  border-radius: 14px;
  background: var(--moto-card);
  box-shadow: var(--moto-shadow);
}

.daily-summary-filter__navigation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.daily-summary-export-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.daily-summary-export-form label {
  display: grid;
  gap: 5px;
  color: var(--moto-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-summary-export-form select {
  min-height: 40px;
  border: 1px solid var(--moto-line);
  border-radius: 9px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
  padding: 0 10px;
}

.daily-summary-filter__month {
  appearance: none;
  min-width: 180px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: var(--moto-card);
  color: var(--moto-text);
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  text-align: center;
  text-transform: capitalize;
  cursor: pointer;
}

.daily-summary-filter__month:hover {
  border-color: var(--moto-brand);
}

.daily-summary-filter__picker {
  position: relative;
}

.daily-summary-filter__picker-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: end;
  gap: 8px;
  width: max-content;
  padding: 12px;
  transform: translateX(-50%);
  border: 1px solid var(--moto-line);
  border-radius: 12px;
  background: var(--moto-card);
  box-shadow: var(--moto-shadow);
}

.daily-summary-filter__picker-panel[hidden] {
  display: none;
}

.daily-summary-filter__picker-panel label {
  display: grid;
  gap: 4px;
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-summary-filter__picker-panel select {
  min-height: 34px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font: inherit;
  padding: 5px 8px;
}

.daily-summary-card {
  padding: 0;
  overflow: hidden;
}

.daily-summary-card__head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--moto-line);
}

.daily-summary-card__head h2 {
  margin: 0;
  font-size: 19px;
}

.daily-summary-card__head p {
  margin: 5px 0 0;
  color: var(--moto-muted);
}

.daily-summary__scroll {
  max-width: 100%;
  overflow: hidden;
}

.daily-summary-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.daily-summary-table th,
.daily-summary-table td {
  min-width: 0;
  padding: 8px 3px;
  border-right: 1px solid var(--moto-line);
  border-bottom: 1px solid var(--moto-line);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.daily-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f5f9;
  color: var(--moto-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.daily-summary-table thead th span,
.daily-summary-table thead th strong {
  display: block;
}

.daily-summary-table thead th strong {
  margin-top: 2px;
  color: var(--moto-text);
  font-size: 15px;
}

.daily-summary-table td {
  color: var(--moto-text);
  font-size: 13px;
  font-weight: 800;
}

.daily-summary-table__absence {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.daily-summary-table__absence--f {
  background: #dbeafe;
  color: #1d4ed8;
}

.daily-summary-table tbody tr:nth-child(even) td {
  background: #fafbfe;
}

.daily-summary-table__mechanic {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 160px;
  min-width: 0 !important;
  padding-left: 14px !important;
  background: var(--moto-card);
  text-align: left !important;
}

.daily-summary-table thead .daily-summary-table__mechanic {
  z-index: 3;
  background: #f2f5f9;
}

.daily-summary-table__day--weekend {
  background: #fff4f5 !important;
}

.daily-summary-table__empty-day {
  background: #f7f8fb !important;
}

.daily-summary-monthly {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--moto-line);
  border-radius: 14px;
  background: var(--moto-card);
  box-shadow: var(--moto-shadow);
}

.daily-summary-monthly h2 {
  margin: 0;
  font-size: 19px;
}

.daily-summary-monthly p {
  margin: 5px 0 0;
  color: var(--moto-muted);
}

.daily-summary-monthly__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.daily-summary-monthly__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fafbfe;
  color: var(--moto-text);
  text-decoration: none;
  cursor: pointer;
}

.daily-summary-monthly__item:hover {
  border-color: #8eacc8;
  background: #f2f7fc;
}

.daily-summary-monthly__item span {
  color: #315f8e;
  font-weight: 900;
  white-space: nowrap;
}

.daily-summary-monthly--detail {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.daily-summary-monthly__total {
  color: #315f8e;
  font-size: 24px;
}

.daily-summary-entries-card {
  margin-top: 18px;
  overflow: hidden;
}

.daily-summary-entries {
  overflow-x: auto;
}

.daily-summary-entries table {
  width: 100%;
  border-collapse: collapse;
}

.daily-summary-entries th,
.daily-summary-entries td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--moto-line);
  text-align: left;
}

.daily-summary-entries th {
  background: #f2f5f9;
  color: var(--moto-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.daily-summary-entries td:last-child,
.daily-summary-entries th:last-child {
  text-align: right;
}

.daily-summary-entries__empty {
  margin: 0;
  padding: 18px;
  color: var(--moto-muted);
}

@media (max-width: 1000px) {
  .daily-summary__scroll {
    overflow-x: auto;
  }

  .daily-summary-table {
    width: max-content;
    min-width: 1100px;
    table-layout: auto;
  }

  .daily-summary-table th,
  .daily-summary-table td {
    min-width: 36px;
  }

  .daily-summary-monthly--detail {
    grid-template-columns: 1fr;
  }
}

.quick-create {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--moto-line);
}

.quick-create[hidden] {
  display: none;
}

.quick-create--dropdown {
  position: absolute;
  top: 62px;
  left: 18px;
  right: 18px;
  z-index: 20;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(215, 25, 32, 0.28);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff1f1 0%, #ffe7e8 100%);
  box-shadow: 0 18px 44px rgba(215, 25, 32, 0.14);
}

.quick-create--dropdown .resource-form--compact {
  background: transparent;
}

.quick-create--dropdown .field input,
.quick-create--dropdown .field select,
.quick-create--dropdown .field textarea {
  background: rgba(255, 255, 255, 0.82);
}

.quick-create__head {
  margin-bottom: 10px;
}

.quick-create--dropdown .form-grid {
  gap: 10px;
}

.quick-create--dropdown .form-grid--vehicle {
  grid-template-columns:
    minmax(130px, 0.85fr)
    minmax(100px, 0.7fr)
    minmax(115px, 0.8fr)
    minmax(125px, 0.9fr)
    minmax(180px, 1.25fr)
    minmax(180px, 1.25fr);
}

.quick-create--dropdown .field {
  gap: 5px;
}

.quick-create--dropdown .field input,
.quick-create--dropdown .field select,
.quick-create--dropdown .field textarea {
  min-height: 38px;
  padding: 7px 10px;
}

.quick-create--dropdown .field textarea {
  height: 38px;
  resize: vertical;
}

.quick-create--dropdown .file-picker {
  min-height: 38px;
}

.quick-create--dropdown .file-picker__button {
  height: 28px;
}

.quick-create--dropdown .form-actions {
  margin-top: 10px;
}

.quick-create h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.quick-create__head h3 {
  margin-bottom: 0;
}

.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--moto-brand);
  font: inherit;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.link-button--danger {
  color: #db3b3b;
}

.reopen-report-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.report-reopen-action-group {
  display: flex;
  align-items: center;
}

.resource-head__actions > .report-reopen-action-group {
  order: 2;
  flex: 0 0 auto;
}

.report-reopen-action-group .reopen-report-form {
  flex-wrap: wrap;
}

.report-reopen-action-group .moto-btn {
  white-space: nowrap;
}

.reopen-report-form input[type="text"] {
  width: 150px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--moto-line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.daily-summary-filter__date-range label {
  display: grid;
  gap: 4px;
  color: var(--moto-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-summary-filter__date-range .date-picker {
  grid-template-columns: minmax(138px, 1fr) 34px;
  gap: 6px;
}

.daily-summary-filter__date-range .date-picker__display {
  height: 38px;
  min-width: 138px;
  padding: 0 10px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-ink);
  font: inherit;
}

.daily-summary-filter__date-range .date-picker__button {
  width: 34px;
  height: 38px;
  border-radius: 8px;
  color: var(--moto-muted);
}

.daily-summary-filter__date-range .date-picker__button::before {
  inset: 10px 8px 9px;
}

.daily-summary-filter__date-range .date-picker__button::after {
  left: 12px;
  right: 12px;
  top: 19px;
}

.daily-summary-filter__date-range .date-picker__native {
  min-height: 1px;
  padding: 0;
  border: 0;
}

.daily-summary-filter__date-range .date-picker__display:focus {
  outline: 2px solid rgba(214, 122, 0, 0.2);
  border-color: var(--moto-brand);
}

.daily-summary-filter__date-range .date-picker__button:hover {
  border-color: var(--moto-brand);
  color: var(--moto-brand);
}


@media (max-width: 1280px) {
  .moto-table--supplier-order-lines .moto-table__head {
    display: none;
  }

  .moto-table--supplier-order-lines .moto-table__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .moto-table--supplier-order-lines .moto-table__body {
    display: grid;
    gap: 12px;
  }

  .moto-table--supplier-order-lines .moto-table__row {
    grid-template-columns: 1fr;
    gap: 12px;
    border: 1px solid var(--moto-line);
    border-radius: 8px;
    background: #fff;
  }

  .moto-table--supplier-order-lines .moto-table__row:hover {
    background: #fff;
  }

  .supplier-line-actions {
    display: block;
  }

  .supplier-line-secondary-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .analysis-total-card {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .moto-table--ddts .moto-table__filters {
    grid-template-columns: 1fr;
  }

  .moto-table--products .moto-table__filters {
    grid-template-columns: 1fr;
  }

  .moto-table--acceptance-records .moto-table__filters {
    grid-template-columns: 1fr;
  }

  .moto-table--created-reports .moto-table__filters {
    grid-template-columns: 1fr;
  }

  .moto-table__filters--intervention-analysis {
    grid-template-columns: 1fr;
  }

  .moto-table__filters--month-end-report-analysis {
    grid-template-columns: 1fr;
  }

  .moto-table--acceptance-generation .moto-table__filters {
    grid-template-columns: 1fr;
  }

  .moto-table--customer-or-suppliers .moto-table__filters {
    grid-template-columns: 1fr;
  }

  .moto-table--customer-or-suppliers .moto-table__filters-actions {
    grid-column: auto;
    justify-content: flex-start;
  }

  .moto-table--vehicles .moto-table__filters {
    grid-template-columns: 1fr;
  }

  .moto-table--month-end-reports .moto-table__filters {
    grid-template-columns: 1fr;
  }

  .moto-table--month-end-reports .moto-table__filters-actions {
    grid-column: auto;
    justify-content: flex-start;
  }

  .moto-table--inventory .moto-table__filters {
    grid-template-columns: 1fr;
  }

  .inventory-adjustment-dialog__summary {
    grid-template-columns: 1fr;
  }

  .moto-table__filters--activity-logs {
    grid-template-columns: 1fr;
  }

  .moto-table__filters--daily-labor-analysis {
    grid-template-columns: 1fr;
  }

  .moto-table__filters--employee-performance {
    grid-template-columns: 1fr;
  }

  .employee-performance-insights {
    grid-template-columns: 1fr;
  }

  .employee-performance-chart__row {
    grid-template-columns: minmax(110px, .6fr) minmax(130px, 1fr);
  }

  .employee-performance-chart__values {
    grid-column: 2;
  }

  .daily-labor-export-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .replenishment-order__fields {
    grid-template-columns: 1fr;
  }

  .replenishment-order__new-product,
  .replenishment-order__new-product .product-picker__supplier-association {
    grid-template-columns: 1fr 1fr;
  }

  .replenishment-order__new-product .product-picker__supplier-association .field:first-child {
    grid-column: 1 / -1;
  }

  .supplier-line-actions-menu__panel {
    flex-wrap: wrap;
  }

  .supplier-line-actions-menu__panel .supplier-line-move-form {
    flex-basis: 100%;
  }

  .filters,
  .detail-grid,
  .vehicle-edit-layout {
    grid-template-columns: 1fr;
  }

  .vehicle-edit-layout__attachments {
    position: static;
  }

  .moto-table__head {
    display: none;
  }

  .moto-table__row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .moto-table__row > div::before {
    display: block;
    margin-bottom: 5px;
    color: var(--moto-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .moto-table__row > div:nth-child(1)::before { content: "Ragione sociale"; }
  .moto-table__row > div:nth-child(2)::before { content: "Tipo"; }
  .moto-table--customer-or-suppliers .moto-table__row > div:nth-child(3)::before { content: "Dati fiscali"; }
  .moto-table--customer-or-suppliers .moto-table__row > div:nth-child(4)::before { content: "Contatti"; }
  .moto-table--customer-or-suppliers .moto-table__row > div:nth-child(5)::before { content: "Località"; }
  .moto-table--customer-or-suppliers .moto-table__row > div:nth-child(6)::before { content: "Veicoli"; }
  .moto-table--customer-or-suppliers .moto-table__row > div:nth-child(7)::before { content: "Azioni"; }

  .moto-table--vehicles .moto-table__row {
    grid-template-columns: 1fr 1fr;
  }

  .moto-table--vehicles .moto-table__row > div:nth-child(1)::before { content: "Cliente/Fornitore"; }
  .moto-table--vehicles .moto-table__row > div:nth-child(2)::before { content: "Veicolo"; }
  .moto-table--vehicles .moto-table__row > div:nth-child(3)::before { content: "Identificativi"; }
  .moto-table--vehicles .moto-table__row > div:nth-child(4)::before { content: "Azioni"; }

  .moto-table--acceptances .moto-table__row > div:nth-child(1)::before { content: "Accettazione"; }
  .moto-table--acceptances .moto-table__row > div:nth-child(2)::before { content: "Cliente"; }
  .moto-table--acceptances .moto-table__row > div:nth-child(3)::before { content: "Veicolo"; }
  .moto-table--acceptances .moto-table__row > div:nth-child(4)::before { content: "Stato"; }
  .moto-table--acceptances .moto-table__row > div:nth-child(5)::before { content: "Azioni"; }

  .moto-table--acceptance-records .moto-table__row {
    grid-template-columns: 1fr 1fr;
  }

  .moto-table--acceptance-records .moto-table__row > div:nth-child(1)::before { content: "Accettazione"; }
  .moto-table--acceptance-records .moto-table__row > div:nth-child(2)::before { content: "Cliente"; }
  .moto-table--acceptance-records .moto-table__row > div:nth-child(3)::before { content: "Veicolo"; }
  .moto-table--acceptance-records .moto-table__row > div:nth-child(4)::before { content: "Segnaposto"; }
  .moto-table--acceptance-records .moto-table__row > div:nth-child(5)::before { content: "Stato"; }
  .moto-table--acceptance-records .moto-table__row > div:nth-child(6)::before { content: "Azioni"; }

  .moto-table--reports .moto-table__row {
    grid-template-columns: 1fr 1fr;
  }

  .moto-table--reports .moto-table__row > div:nth-child(1)::before { content: "Rapportino"; }
  .moto-table--reports .moto-table__row > div:nth-child(2)::before { content: "Cliente"; }
  .moto-table--reports .moto-table__row > div:nth-child(3)::before { content: "Veicolo"; }
  .moto-table--reports .moto-table__row > div:nth-child(4)::before { content: "Tipo"; }
  .moto-table--reports .moto-table__row > div:nth-child(5)::before { content: "Azioni"; }

  .moto-table--created-reports .moto-table__row > div:nth-child(1)::before { content: "Rapportino"; }
  .moto-table--created-reports .moto-table__row > div:nth-child(2)::before { content: "Cliente"; }
  .moto-table--created-reports .moto-table__row > div:nth-child(3)::before { content: "Veicolo"; }
  .moto-table--created-reports .moto-table__row > div:nth-child(4)::before { content: "Tipo e stato"; }
  .moto-table--created-reports .moto-table__row > div:nth-child(5)::before { content: "Azioni"; }

  .moto-table--vehicle-reports .moto-table__row > div:nth-child(1)::before { content: "Rapportino"; }
  .moto-table--vehicle-reports .moto-table__row > div:nth-child(2)::before { content: "Descrizione"; }
  .moto-table--vehicle-reports .moto-table__row > div:nth-child(3)::before { content: "Stato"; }
  .moto-table--vehicle-reports .moto-table__row > div:nth-child(4)::before { content: "Azioni"; }

  .moto-table--mechanics .moto-table__row {
    grid-template-columns: 1fr 1fr;
  }

  .moto-table--mechanics .moto-table__row > div:nth-child(1)::before { content: "Nome completo"; }
  .moto-table--mechanics .moto-table__row > div:nth-child(2)::before { content: "Costo manodopera"; }
  .moto-table--mechanics .moto-table__row > div:nth-child(3)::before { content: "Azioni"; }

  .moto-table--users .moto-table__row {
    grid-template-columns: 1fr 1fr;
  }

  .moto-table--users .moto-table__row > div:nth-child(1)::before { content: "Utente"; }
  .moto-table--users .moto-table__row > div:nth-child(2)::before { content: "Nome"; }
  .moto-table--users .moto-table__row > div:nth-child(3)::before { content: "Email"; }
  .moto-table--users .moto-table__row > div:nth-child(4)::before { content: "Ruolo"; }
  .moto-table--users .moto-table__row > div:nth-child(5)::before { content: "Azioni"; }

  .moto-table--products .moto-table__row > div:nth-child(1)::before { content: "Codice interno"; }
  .moto-table--products .moto-table__row > div:nth-child(2)::before { content: "Descrizione"; }
  .moto-table--products .moto-table__row > div:nth-child(3)::before { content: "UM"; }
  .moto-table--products .moto-table__row > div:nth-child(4)::before { content: "Magazzino"; }
  .moto-table--products .moto-table__row > div:nth-child(5)::before { content: "Prezzo storico"; }
  .moto-table--products .moto-table__row > div:nth-child(6)::before { content: "Fornitori"; }
  .moto-table--products .moto-table__row > div:nth-child(7)::before { content: "Ultimo acquisto"; }
  .moto-table--products .moto-table__row > div:nth-child(8)::before { content: "Azioni"; }

  .moto-table--inventory .moto-table__row {
    grid-template-columns: 1fr 1fr;
  }

  .moto-table--inventory .moto-table__row > div:nth-child(1)::before { content: "Codice interno"; }
  .moto-table--inventory .moto-table__row > div:nth-child(2)::before { content: "Codice fornitore"; }
  .moto-table--inventory .moto-table__row > div:nth-child(3)::before { content: "Descrizione"; }
  .moto-table--inventory .moto-table__row > div:nth-child(4)::before { content: "UM"; }
  .moto-table--inventory .moto-table__row > div:nth-child(5)::before { content: "Giacenza"; }
  .moto-table--inventory .moto-table__row > div:nth-child(6)::before { content: "Prossimi arrivi"; }
  .moto-table--inventory .moto-table__row > div:nth-child(7)::before { content: "Impegnati"; }
  .moto-table--inventory .moto-table__row > div:nth-child(8)::before { content: "Disponibile"; }
  .moto-table--inventory .moto-table__row > div:nth-child(9)::before { content: "Azioni"; }


  .moto-table--vehicle-categories .moto-table__row > div:nth-child(1)::before { content: "Categoria"; }
  .moto-table--vehicle-categories .moto-table__row > div:nth-child(2)::before { content: "Azioni"; }

  .moto-table--ddts .moto-table__row > div:nth-child(1)::before { content: "Numero"; }
  .moto-table--ddts .moto-table__row > div:nth-child(2)::before { content: "Data"; }
  .moto-table--ddts .moto-table__row > div:nth-child(3)::before { content: "Tipo"; }
  .moto-table--ddts .moto-table__row > div:nth-child(4)::before { content: "Anagrafica"; }
  .moto-table--ddts .moto-table__row > div:nth-child(5)::before { content: "Totale"; }
  .moto-table--ddts .moto-table__row > div:nth-child(6)::before { content: "Azioni"; }
  .moto-table--ddts-unload .moto-table__row > div:nth-child(6)::before { content: "Nr fattura"; }
  .moto-table--ddts-unload .moto-table__row > div:nth-child(7)::before { content: "Azioni"; }

  .moto-table--ddt-lines .moto-table__row > div:nth-child(1)::before { content: "Codice"; }
  .moto-table--ddt-lines .moto-table__row > div:nth-child(2)::before { content: "Descrizione"; }
  .moto-table--ddt-lines .moto-table__row > div:nth-child(3)::before { content: "UM"; }
  .moto-table--ddt-lines .moto-table__row > div:nth-child(4)::before { content: "Qta"; }
  .moto-table--ddt-lines .moto-table__row > div:nth-child(5)::before { content: "Prezzo"; }
  .moto-table--ddt-lines .moto-table__row > div:nth-child(6)::before { content: "Totale"; }

  .moto-table--ddt-lines-unload .moto-table__row > div:nth-child(6)::before { content: "Sconto"; }
  .moto-table--ddt-lines-unload .moto-table__row > div:nth-child(7)::before { content: "Totale"; }

  .moto-table--ddt-lines-load .moto-table__row > div:nth-child(2)::before { content: "Codice fornitore"; }
  .moto-table--ddt-lines-load .moto-table__row > div:nth-child(3)::before { content: "Marca"; }
  .moto-table--ddt-lines-load .moto-table__row > div:nth-child(4)::before { content: "Descrizione"; }
  .moto-table--ddt-lines-load .moto-table__row > div:nth-child(5)::before { content: "UM"; }
  .moto-table--ddt-lines-load .moto-table__row > div:nth-child(6)::before { content: "Qta"; }
  .moto-table--ddt-lines-load .moto-table__row > div:nth-child(7)::before { content: "Prezzo acquisto"; }
  .moto-table--ddt-lines-load .moto-table__row > div:nth-child(8)::before { content: "Prezzo vendita"; }
  .moto-table--ddt-lines-load .moto-table__row > div:nth-child(9)::before { content: "Totale"; }

  .moto-table--product-suppliers .moto-table__row > div:nth-child(1)::before { content: "Fornitore"; }
  .moto-table--product-suppliers .moto-table__row > div:nth-child(2)::before { content: "Codici fornitore"; }
  .moto-table--product-suppliers .moto-table__row > div:nth-child(3)::before { content: "Qta acquistata"; }
  .moto-table--product-suppliers .moto-table__row > div:nth-child(4)::before { content: "Prezzo medio"; }
  .moto-table--product-suppliers .moto-table__row > div:nth-child(5)::before { content: "Ultimo prezzo"; }
  .moto-table--product-suppliers .moto-table__row > div:nth-child(6)::before { content: "Nr DDT"; }
  .moto-table--product-suppliers .moto-table__row > div:nth-child(7)::before { content: "Ultimo acquisto"; }

  .moto-table--supplier-order-lines .moto-table__row {
    grid-template-columns: 1fr;
  }

  .moto-table--supplier-order-lines .moto-table__row > div:nth-child(1)::before { content: "Fornitore"; }
  .moto-table--supplier-order-lines .moto-table__row > div:nth-child(2)::before { content: "Data ordine"; }
  .moto-table--supplier-order-lines .moto-table__row > div:nth-child(3)::before { content: "Codice fornitore"; }
  .moto-table--supplier-order-lines .moto-table__row > div:nth-child(4)::before { content: "Descrizione"; }
  .moto-table--supplier-order-lines .moto-table__row > div:nth-child(5)::before { content: "Q.ta ordinata"; }
  .moto-table--supplier-order-lines .moto-table__row > div:nth-child(6)::before { content: "Q.ta arrivata"; }
  .moto-table--supplier-order-lines .moto-table__row > div:nth-child(7)::before { content: "Stato"; }
  .moto-table--supplier-order-lines .moto-table__row > div:nth-child(8)::before { content: "Azioni"; }

  .acceptance-summary {
    grid-template-columns: 1fr;
  }

  .page-shell--report-form .acceptance-summary {
    grid-template-columns: 1fr;
  }

  .report-identity-grid {
    grid-template-columns: 1fr;
  }

  .report-lines__head {
    display: none;
  }

  .report-lines__row {
    grid-template-columns: 1fr 1fr;
  }

  .report-lines__row[data-sortable-product-row],
  .ddt-components__row[data-sortable-product-row] {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .report-lines__row[data-sortable-product-row] > .field,
  .report-lines__row[data-sortable-product-row] > .report-lines__actions,
  .report-lines__row[data-sortable-product-row] > .month-end-editor__actions,
  .report-lines__row[data-sortable-product-row] > .month-end-editor__print-visibility,
  .ddt-components__row[data-sortable-product-row] > .field,
  .ddt-components__row[data-sortable-product-row] > .ddt-components__actions {
    grid-column: 2;
  }

  .section-label-row,
  .section-head__content,
  .workflow-order__head,
  .workflow-modal__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .section-label-row__actions {
    justify-content: flex-start;
  }

  .workflow-order-line {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .workflow-mode-choice,
  .workflow-import-grid {
    grid-template-columns: 1fr;
  }

  .workflow-order-list--scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .supplier-order-workflow__fields {
    grid-template-columns: 1fr;
  }

  .supplier-order-workflow__item {
    grid-template-columns: 1fr;
  }

  .row-order-match {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .row-order-match .moto-btn {
    grid-column: 1 / -1;
  }

  .workflow-order-line em {
    grid-column: 2;
    white-space: normal;
  }

  .report-lines__row > div:first-of-type {
    grid-column: 1 / -1;
  }

  .product-picker__new {
    grid-template-columns: 1fr 1fr;
  }

  .product-picker__new .field:nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 981px) and (max-width: 1220px) {
  .detail-list--company-summary {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .quick-create--dropdown .form-grid--vehicle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .resource-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .resource-head__actions {
    justify-content: flex-start;
  }

  .related-item--vehicle {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-card--vehicles-section .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-item--vehicle > .row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --moto-page-gutter: 12px;
  }

  .resource-head,
  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-head__actions,
  .form-actions,
  .section-head {
    justify-content: flex-start;
  }

  .import-card {
    grid-template-columns: 1fr;
  }

  .import-card--dropdown {
    position: static;
    width: 100%;
    order: 10;
  }

  .import-form {
    grid-template-columns: 1fr;
  }

  .acceptance-form--compact .acceptance-summary,
  .acceptance-form--compact .acceptance-grid {
    grid-template-columns: 1fr;
  }

  .quick-create--dropdown {
    position: static;
    margin-bottom: 16px;
  }

  .import-conflict-table__head {
    display: none;
  }

  .import-conflict-table__row {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-pagination,
  .table-pagination__summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-pagination__links {
    flex-wrap: wrap;
  }

  .vehicle-report-summary,
  .vehicle-report-history__item {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .vehicle-report-history__actions {
    justify-content: flex-start;
  }

  .compact-search,
  .compact-search__panel {
    width: 100%;
  }

  .compact-search {
    align-items: flex-start;
  }

  .resource-head__actions .compact-search {
    flex-basis: 100%;
    width: 100%;
  }

  .compact-search__panel {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
  }

  .compact-search__panel--with-select {
    grid-template-columns: 1fr;
  }

  .compact-search__panel--with-select .icon-button,
  .compact-search__panel--with-select .compact-search__reset {
    justify-self: start;
  }

  .moto-table__row,
  .form-grid,
  .form-grid--vehicle,
  .product-form__details,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .customer-or-supplier-form__company,
  .customer-or-supplier-form__roles,
  .customer-or-supplier-form__price-list,
  .customer-or-supplier-form__tax-code,
  .customer-or-supplier-form__vat-number,
  .customer-or-supplier-form__billing-code,
  .customer-or-supplier-form__default-vat-rate,
  .customer-or-supplier-form__address,
  .customer-or-supplier-form__cap,
  .customer-or-supplier-form__county,
  .customer-or-supplier-form__province,
  .customer-or-supplier-form__country,
  .customer-or-supplier-form__telephone,
  .customer-or-supplier-form__email {
    grid-column: 1 / -1;
  }

  .dashboard__stats {
    grid-template-columns: 1fr;
  }

  .dashboard__grid > .dashboard-card {
    flex-basis: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .related-item--vehicle {
    grid-template-columns: 1fr;
  }

  .detail-card--vehicles-section .related-list {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: 1 / -1;
  }

  .order-head__party,
  .order-head__vehicle {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .daily-load-setup {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .daily-load-setup p,
  .daily-load-summary {
    grid-column: 2;
  }

  .daily-load-summary {
    justify-self: start;
    text-align: left;
  }

  .daily-load-lines__head {
    display: none;
  }

  .daily-load-lines__row {
    grid-template-columns: 1fr 1fr;
  }

  .daily-load-lines__row > div:first-child,
  .daily-load-lines__row > div:nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .vehicle-card__line {
    grid-template-columns: 1fr;
  }

  .daily-load-table-card__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-load-lines__row {
    grid-template-columns: 1fr;
  }

  .daily-load-lines__row > div:first-child,
  .daily-load-lines__row > div:nth-child(2) {
    grid-column: auto;
  }

  .daily-load-lines__actions {
    justify-content: flex-start;
  }
}

/* Nel caricamento giornaliero ogni lavorazione resta sempre una singola riga.
   I menu si aprono in overlay verso il basso, sopra alle sezioni sottostanti. */
.daily-load-lines {
  position: relative;
  overflow: visible;
}

.daily-load-lines:focus-within {
  z-index: 60;
}

.daily-load-lines__head,
.daily-load-lines__row {
  display: grid;
  min-width: 1020px;
  grid-template-columns: minmax(280px, 1.85fr) minmax(250px, 1.65fr) minmax(68px, 0.35fr) minmax(88px, 0.46fr) minmax(140px, 0.72fr) minmax(70px, 0.38fr);
}

.daily-load-lines--products {
  overflow: visible;
  padding-top: 0;
}

.daily-load-lines--products .product-picker__control {
  display: block;
}

.daily-load-lines--products .component-picker__code-control {
  display: block;
}

/* Le righe componente del caricamento giornaliero non hanno le frecce di
   ordinamento. La griglia condivisa riserva invece una prima colonna da 22px:
   qui la eliminiamo, altrimenti il campo Codice prodotto viene schiacciato e
   resta visibile soltanto il successivo selettore Codice fornitore. */
.daily-load-lines--products .ddt-components__row {
  grid-template-columns: minmax(240px, 1.05fr) minmax(180px, 0.8fr) minmax(260px, 1.35fr) minmax(78px, 96px) 42px;
}

.daily-load-lines--products:focus-within {
  z-index: 70;
}

.daily-load-lines--products .daily-load-lines__head,
.daily-load-lines--products .daily-load-lines__row {
  min-width: 1300px;
  grid-template-columns: minmax(240px, 1.6fr) minmax(125px, 0.75fr) minmax(175px, 1.25fr) 42px 54px minmax(94px, 0.55fr) minmax(104px, 0.58fr) 164px minmax(70px, 0.35fr);
}

.daily-load-lines--products .product-picker__panel {
  z-index: 200;
  min-width: min(420px, calc(100vw - 56px));
}

/* La creazione contiene molti piu campi del menu di ricerca. Quando viene
   aperta la mostriamo come finestra nel viewport, cosi non viene ritagliata
   dalla riga o dal bordo inferiore della pagina. */
.daily-load-lines--products .product-picker:has(.product-picker__new:not([hidden])) .product-picker__panel {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 1000;
  width: min(1180px, calc(100vw - 32px));
  min-width: 0;
  max-height: calc(100vh - 32px);
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 100vmax rgba(16, 24, 40, 0.34), var(--moto-shadow);
}

.daily-load-lines--products .product-picker__new {
  grid-template-columns: minmax(160px, 0.8fr) minmax(300px, 1.8fr) 74px minmax(130px, 0.65fr) minmax(130px, 0.65fr) auto auto;
}

.daily-load-lines--products .product-picker__supplier-association {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 0.65fr) minmax(280px, 1.15fr) minmax(180px, 0.7fr);
  gap: 8px;
  align-items: end;
}

@media (max-width: 900px) {
  .daily-load-lines--products .product-picker__new,
  .daily-load-lines--products .product-picker__supplier-association {
    grid-template-columns: 1fr 1fr;
  }

  .daily-load-lines--products .product-picker__new-title,
  .daily-load-lines--products .product-picker__new-error {
    grid-column: 1 / -1;
  }
}

.daily-load-lines--products .combobox__menu {
  z-index: 200;
}

.daily-load-lines--products .ddt-components {
  grid-column: 1 / -1;
}

.daily-load-lines--products .component-picker__panel {
  z-index: 210;
}

.daily-load-lines__row > div:first-child,
.daily-load-lines__row > div:nth-child(2) {
  grid-column: auto;
}

.ddt-reconciliation-preview { padding: 12px; border: 1px solid #b7cde3; border-radius: 8px; background: #fff; }
.ddt-reconciliation-preview[hidden] { display: none; }
.ddt-reconciliation-preview p { margin: 8px 0; }
.ddt-reconciliation-preview .ddt-receipt-choice__actions { margin-top: 10px; }

.ddt-sale-price-conflict { padding: 12px 0; border-bottom: 1px solid var(--moto-line); }

.order-sale-proposal output {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 9px 5px;
  border-radius: 8px;
  background: #edf4fc;
  color: #175ea6;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: help;
}
@media (min-width: 1001px) {
  .page-shell .report-lines--with-sale-proposal .report-lines__head,
  .page-shell .report-lines--with-sale-proposal .report-lines__row {
    grid-template-columns: 22px minmax(150px, 1fr) minmax(130px, .7fr) minmax(190px, 1.4fr) 44px 64px 100px 108px 76px 46px;
  }
  .report-lines--with-sale-proposal .report-lines__head > div:nth-child(8) { text-align: right; }
  .report-lines--with-sale-proposal .report-lines__head > div:nth-child(9) { text-align: center; }
}

.moto-table--supplier-order-lines .supplier-order-row--closed,
.moto-table--supplier-order-lines .supplier-order-row--closed:hover {
  background: linear-gradient(90deg, #edf9f1 0%, #fbfffc 72%);
  box-shadow: inset 4px 0 0 #65ae7b;
}

.moto-table--supplier-order-lines .supplier-order-row--partial,
.moto-table--supplier-order-lines .supplier-order-row--partial:hover {
  background: linear-gradient(90deg, #fff7e8 0%, #fffdf8 72%);
  box-shadow: inset 4px 0 0 #e6a23c;
}

.moto-table--supplier-order-lines .supplier-order-row--open,
.moto-table--supplier-order-lines .supplier-order-row--open:hover {
  background: linear-gradient(90deg, #fff0f0 0%, #fffafa 72%);
  box-shadow: inset 4px 0 0 #dc6262;
}

.configurator-notice {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid #efcf87;
  border-radius: 12px;
  background: #fff8e8;
  color: #65490f;
}

.configurator-notice strong { white-space: nowrap; }

.configurator-card {
  padding: 22px;
  border: 1px solid var(--moto-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(27, 42, 70, .08);
}

.configurator-card__head,
.configurator-card__actions,
.configurator-components__head,
.configurator-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.configurator-card__head { margin-bottom: 18px; }
.configurator-card__head h2 { margin: 2px 0 0; }
.configurator-card__actions { justify-content: flex-end; }

.configurator-list__head,
.configurator-row__fields,
.configurator-component {
  display: grid;
  grid-template-columns: 22px minmax(145px, .78fr) minmax(130px, .68fr) minmax(200px, 1.18fr) 42px 54px minmax(88px, .44fr) minmax(105px, .5fr) minmax(65px, .32fr) 42px;
  gap: 8px;
  align-items: center;
}

.configurator-list__head {
  padding: 0 14px 8px;
  color: #5d6b86;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.configurator-list__head span:nth-child(5) { text-align: center; }
.configurator-list__head span:nth-child(n+6):nth-child(-n+9) { text-align: right; }
.configurator-list__head span:last-child { text-align: center; }

.configurator-row {
  margin-bottom: 14px;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  background: #fbfcff;
}

.configurator-row__fields { padding: 12px; }

.configurator-row input,
.configurator-row select,
.configurator-row textarea {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dbe2ed;
  border-radius: 9px;
  background: #fff;
  color: #14213d;
  font: inherit;
}

.configurator-row textarea {
  resize: none;
  line-height: 1.25;
}

.configurator-row input:read-only,
.configurator-row textarea:read-only,
.configurator-row select:disabled { background: #f3f6fa; color: #65718a; }
.configurator-row input[data-configurator-quantity],
.configurator-row input[data-configurator-price],
.configurator-row input[data-configurator-discount] { text-align: right; }
.configurator-row input[data-configurator-um] { text-align: center; }

.configurator-row output {
  color: #14213d;
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}

.configurator-row output.configurator-proposal {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 44px;
  padding: 9px 6px;
  border-radius: 8px;
  background: #edf4fc;
  color: #175ea6;
  font-size: 12px;
  cursor: help;
}

.configurator-picker { position: relative; min-width: 0; }

.configurator-picker__panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #ccd7e7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(26, 41, 68, .2);
}

.configurator-picker__panel[hidden] { display: none; }

.configurator-picker__option {
  display: flex;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #14213d;
  text-align: left;
  cursor: pointer;
}

.configurator-picker__option:hover { background: #edf4fc; }
.configurator-picker__option strong { flex: 0 0 112px; }
.configurator-picker__option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.configurator-picker__message { display: block; padding: 10px; color: #65718a; }

.configurator-remove {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid #e2e7ef;
  border-radius: 9px;
  background: #fff;
  color: #d5101d;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.configurator-components {
  margin: 0 12px 12px;
  padding: 10px;
  border: 1px dashed rgba(213, 16, 29, .35);
  border-radius: 11px;
  background: #fffafa;
}

.configurator-components__head { margin-bottom: 8px; }
.configurator-components__head > div { display: flex; gap: 8px; align-items: baseline; }
.configurator-components__head span { color: #65718a; font-size: 12px; }
.configurator-components__head strong,
.configurator-components__head .link-button { color: var(--moto-brand-dark); }
.configurator-component + .configurator-component { margin-top: 7px; }
.configurator-component { grid-template-columns: 22px minmax(145px, .78fr) minmax(130px, .68fr) minmax(200px, 1.18fr) 42px 54px minmax(88px, .44fr) minmax(105px, .5fr) minmax(65px, .32fr) 42px; }
.configurator-component__price-placeholder { color: #8994a8; text-align: center; }

.configurator-add-bottom {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0 18px;
}

.configurator-empty {
  margin-bottom: 14px;
  padding: 20px;
  border: 1px dashed #ccd7e7;
  border-radius: 12px;
  color: #65718a;
  text-align: center;
}

.configurator-total {
  justify-content: flex-end;
  padding: 16px 18px;
  border-radius: 12px;
  background: #15294b;
  color: #fff;
}

.configurator-total span { font-size: 16px; font-weight: 700; }
.configurator-total strong { min-width: 160px; text-align: right; font-size: 24px; }
.configurator-total > div { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.configurator-confirmation { border: 0; padding: 0; background: transparent; width: min(620px, calc(100vw - 32px)); }
.configurator-confirmation:not([open]) { display: none !important; }
.configurator-confirmation::backdrop { background: rgba(19, 30, 52, .58); }
.configurator-confirmation .workflow-modal__panel { position: static; width: 100%; max-width: none; margin: 0; }
.configurator-confirmation__description { display: grid; gap: 7px; margin-top: 18px; }
.configurator-confirmation__description span { color: #5d6880; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.configurator-confirmation__description input { width: 100%; }
.form-error { color: #c5121a; font-weight: 700; }

.moto-table--warehouse-movements .moto-table__head,
.moto-table--warehouse-movements .moto-table__row { grid-template-columns: 100px 122px 120px minmax(170px, .9fr) minmax(210px, 1.3fr) 78px 78px 110px; }
.moto-table--warehouse-movements .moto-table__filters {
  display: grid;
  grid-template-columns: 140px 170px minmax(260px, 1fr) 140px auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--moto-line);
  background: linear-gradient(90deg, #f4f8fd 0%, #fbfcff 100%);
}
.moto-table--warehouse-movements .moto-table__filters input:not([type="submit"]),
.moto-table--warehouse-movements .moto-table__filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--moto-line);
  border-radius: 8px;
  background: #fff;
  color: var(--moto-text);
  font-size: 12px;
}
.moto-table--warehouse-movements .moto-table__filters input:focus,
.moto-table--warehouse-movements .moto-table__filters select:focus {
  border-color: var(--moto-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 103, 156, .12);
}
.moto-table--warehouse-movements .moto-table__filters-actions { justify-content: flex-end; }
.moto-table--warehouse-movements .moto-table__row small { display: block; margin-top: 3px; color: #65718a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moto-table--warehouse-movements .number,
.moto-table--warehouse-movement-lines .number { text-align: right; }
.moto-table--warehouse-movement-lines .moto-table__head,
.moto-table--warehouse-movement-lines .moto-table__row { grid-template-columns: 130px minmax(220px, 1.2fr) minmax(180px, 1fr) 60px 90px 90px 100px; }
.warehouse-movement-summary { margin-bottom: 22px; }

@media (max-width: 1100px) {
  .moto-table--warehouse-movements .moto-table__filters { grid-template-columns: 1fr 1fr; }
  .moto-table--warehouse-movements .warehouse-movements-filter-query { grid-column: 1 / -1; }

  .configurator-list__head { display: none; }
  .configurator-row__fields,
  .configurator-component {
    grid-template-columns: 22px minmax(140px, 1fr) minmax(120px, .8fr) minmax(190px, 1.25fr) 42px 54px 88px 100px 65px 42px;
  }
  .configurator-card { padding: 16px; }
}

@media (max-width: 900px) {
  .configurator-row__fields,
  .configurator-component { grid-template-columns: 22px repeat(2, minmax(0, 1fr)); }
  .configurator-row__fields > .configurator-description,
  .configurator-component > .configurator-description { grid-column: 2 / -1; }
  .configurator-row__fields > .configurator-remove,
  .configurator-component > .configurator-remove { grid-column: 3; justify-self: end; }
  .configurator-row output { padding-right: 8px; }
}

@media (max-width: 640px) {
  .moto-table--warehouse-movements .moto-table__filters { grid-template-columns: 1fr; }
  .moto-table--warehouse-movements .warehouse-movements-filter-query { grid-column: auto; }
  .moto-table--warehouse-movements .moto-table__filters-actions { justify-content: flex-start; }

  .configurator-notice,
  .configurator-card__head,
  .configurator-card__actions,
  .configurator-components__head,
  .configurator-components__head > div { align-items: stretch; flex-direction: column; }
  .configurator-row__fields,
  .configurator-component { grid-template-columns: 1fr; }
  .configurator-row input[data-configurator-um],
  .configurator-row input[data-configurator-quantity],
  .configurator-row input[data-configurator-price] { text-align: left; }
  .configurator-row output { text-align: left; }
  .configurator-remove { justify-self: end; }
  .configurator-total strong { min-width: 0; }
}
