
/*
 * 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-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(1520px, calc(100% - 48px));
  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(1520px, calc(100% - 48px));
  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(1440px, calc(100% - 48px));
  max-width: calc(100% - 48px);
  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;
}

.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-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(100% - 32px, 1520px);
    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(1520px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.page-shell--narrow {
  width: min(1280px, calc(100% - 48px));
}

.page-shell--report-form {
  width: min(1420px, calc(100% - 48px));
}

.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;
}

.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--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;
}

.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(0, 0.85fr) 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;
}

.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: 28px minmax(70px, 0.55fr) minmax(0, 1.05fr) minmax(0, 1fr) minmax(85px, 0.55fr) minmax(70px, 0.45fr) minmax(75px, 0.45fr) minmax(180px, 0.8fr);
}

.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: 7 / -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--vat-rates .moto-table__head,
.moto-table--vat-rates .moto-table__row {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.4fr) 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-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  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: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.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; }

.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(150px, 0.4fr);
}

.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.65fr) minmax(0, 1.25fr) minmax(48px, 0.25fr) minmax(74px, 0.35fr) minmax(0, 0.85fr) minmax(82px, 0.42fr) minmax(104px, 0.5fr);
}

.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: wrap;
}

.moto-table--inventory .moto-table__head,
.moto-table--inventory .moto-table__row,
.moto-table--inventory .moto-table__filters {
  grid-template-columns: minmax(0, .56fr) minmax(0, .72fr) minmax(0, 1.12fr) minmax(40px, .16fr) minmax(76px, .26fr) minmax(86px, .31fr) minmax(78px, .3fr) minmax(148px, .58fr);
}

.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-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--product {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.6fr);
}

.product-detail-column {
  display: grid;
  gap: 18px;
}

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

.supplier-associations-list {
  display: grid;
  gap: 8px;
}

.supplier-associations-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--moto-line);
  border-radius: 9px;
  background: #fff;
}

.supplier-associations-list__row span {
  color: var(--moto-muted);
}

.supplier-associations-list__row code {
  color: var(--moto-navy);
  font-size: 0.95rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.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(190px, 0.9fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--moto-line);
  border-radius: 10px;
  background: #fff;
}

[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-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);
}

.product-picker__supplier-context {
  margin: 0 0 12px;
  color: var(--moto-muted);
  font-size: 13px;
}

.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(130px, 0.7fr) minmax(120px, 0.6fr) minmax(100px, 0.5fr) minmax(240px, 1.3fr) minmax(120px, 0.6fr) minmax(150px, 0.6fr);
}

.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(145px, 0.72fr) minmax(100px, 0.45fr) minmax(260px, 1.45fr) minmax(84px, 0.38fr) minmax(105px, 0.45fr) minmax(125px, 0.55fr);
}

.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 {
  gap: 8px;
  justify-content: flex-start;
}

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

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

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

.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--covered {
  background: linear-gradient(90deg, #edf9f1 0%, #fbfffc 72%);
  box-shadow: inset 4px 0 0 #65ae7b;
}

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

.order-index-decisions--uncovered {
  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--covered:hover,
.moto-table--orders .order-index-row--covered:has(+ .order-index-decisions:hover),
.moto-table--orders .order-index-row--covered:has(~ .order-index-details--covered:hover),
.moto-table--orders .order-index-row--covered:hover + .order-index-decisions--covered,
.moto-table--orders .order-index-row--covered:hover ~ .order-index-details--covered,
.order-index-decisions--covered:hover,
.order-index-decisions--covered:has(+ .order-index-details--covered:hover),
.order-index-decisions--covered:hover + .order-index-details--covered,
.order-index-details--covered:hover {
  background: linear-gradient(90deg, #e1f5e7 0%, #f7fff9 72%);
}

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

.moto-table--orders .order-index-row--uncovered:hover,
.moto-table--orders .order-index-row--uncovered:has(+ .order-index-decisions:hover),
.moto-table--orders .order-index-row--uncovered:has(~ .order-index-details--uncovered:hover),
.moto-table--orders .order-index-row--uncovered:hover + .order-index-decisions--uncovered,
.moto-table--orders .order-index-row--uncovered:hover ~ .order-index-details--uncovered,
.order-index-decisions--uncovered:hover,
.order-index-decisions--uncovered:has(+ .order-index-details--uncovered:hover),
.order-index-decisions--uncovered:hover + .order-index-details--uncovered,
.order-index-details--uncovered: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--covered {
  background: linear-gradient(90deg, #edf9f1 0%, #fbfffc 72%);
  box-shadow: inset 4px 0 0 #65ae7b;
}

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

.order-index-details--uncovered {
  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--covered .order-index-details__line { border-top-color: #c7e6d0; }
.order-index-details--pending .order-index-details__line { border-top-color: #f1d39a; }
.order-index-details--uncovered .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(150px, .8fr) minmax(110px, .55fr) minmax(220px, 1.25fr) minmax(45px, .2fr) minmax(80px, .35fr) minmax(110px, .45fr) minmax(110px, .45fr);
  gap: 12px;
  align-items: center;
}

.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);
}

.moto-table--activity-logs .moto-table__head,
.moto-table--activity-logs .moto-table__row {
  grid-template-columns: minmax(105px, 0.62fr) minmax(110px, 0.7fr) minmax(95px, 0.62fr) minmax(0, 1.45fr) minmax(72px, 0.38fr);
  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;
  grid-template-columns: minmax(180px, 1fr) minmax(170px, 0.85fr) minmax(180px, 0.9fr) minmax(135px, 0.65fr) minmax(135px, 0.65fr) 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--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);
}

.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--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(210px, 1.2fr) minmax(160px, 0.9fr) minmax(110px, 0.55fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr) minmax(130px, 0.65fr);
}

.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;
}

.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--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__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));
}

.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;
}

.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;
}

.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;
}

/* 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__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;
}

.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: minmax(160px, 0.8fr) minmax(140px, 0.65fr) minmax(230px, 1.35fr) minmax(44px, 0.18fr) minmax(64px, 0.28fr) minmax(96px, 0.45fr) minmax(76px, 0.34fr) minmax(112px, 0.5fr) minmax(64px, 0.3fr);
}

/* 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: minmax(130px, 0.8fr) minmax(260px, 1.7fr) minmax(62px, 0.35fr) minmax(82px, 0.45fr) minmax(110px, 0.6fr) minmax(90px, 0.5fr);
}

.report-lines--ddts-load .report-lines__head,
.report-lines--ddts-load .report-lines__row {
  grid-template-columns: minmax(190px, 0.95fr) minmax(110px, 0.48fr) minmax(175px, 0.82fr) minmax(270px, 1.55fr) minmax(48px, 0.22fr) minmax(76px, 0.36fr) minmax(112px, 0.54fr) minmax(72px, 0.34fr);
  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]'] {
  text-align: right;
}

.report-lines--ddts-load .report-lines__head > div:nth-child(5) {
  text-align: center;
}

.report-lines--ddts-load .report-lines__head > div:nth-child(6),
.report-lines--ddts-load .report-lines__head > div:nth-child(7) {
  text-align: right;
}

.report-lines--ddts-unload .report-lines__head,
.report-lines--ddts-unload .report-lines__row {
  grid-template-columns: minmax(130px, 0.76fr) minmax(240px, 1.45fr) minmax(54px, 0.26fr) minmax(72px, 0.34fr) minmax(100px, 0.48fr) minmax(72px, 0.32fr) minmax(72px, 0.3fr);
}

.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(3) {
  text-align: center;
}

.report-lines--ddts-unload .report-lines__head > div:nth-child(4),
.report-lines--ddts-unload .report-lines__head > div:nth-child(5),
.report-lines--ddts-unload .report-lines__head > div:nth-child(6) {
  text-align: right;
}

.report-lines--orders-customer .report-lines__head,
.report-lines--orders-customer .report-lines__row {
  grid-template-columns: minmax(165px, 0.82fr) minmax(145px, 0.66fr) minmax(230px, 1.35fr) minmax(44px, 0.18fr) minmax(64px, 0.28fr) minmax(96px, 0.45fr) minmax(76px, 0.34fr) minmax(64px, 0.3fr);
}

.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(4) {
  text-align: center;
}

.report-lines--orders-customer .report-lines__head > div:nth-child(5),
.report-lines--orders-customer .report-lines__head > div:nth-child(6) {
  text-align: right;
}

.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 {
  grid-template-columns: minmax(150px, 190px) minmax(220px, 1fr) minmax(80px, 120px) minmax(90px, auto);
  padding: 8px;
  border-left: 3px solid #d71920;
  border-radius: 8px;
  background: #ffffff;
}

.ddt-components__actions {
  display: flex;
  justify-content: flex-end;
}

.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);
}

.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;
}

.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;
}

.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;
}

.report-lines--orders-customer .product-picker,
.report-lines--products .product-picker {
  position: relative;
}

.report-lines--orders-customer .product-picker__control {
  grid-template-columns: 46px minmax(0, 1fr);
}

.report-lines--products .product-picker__control {
  grid-template-columns: 46px 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 {
  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 {
  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) {
  .report-lines--orders-customer .product-picker__supplier-association,
  .report-lines--products .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;
}

.report-lines__footer {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}

.workflow-modal[hidden] {
  display: none;
}

.workflow-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}

.workflow-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.48);
}

.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-supplier {
  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;
}

.workflow-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.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(210px, 1fr) minmax(170px, 0.65fr) minmax(150px, 0.4fr);
  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(210px, 1fr) minmax(170px, 0.65fr) minmax(150px, 0.4fr);
  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;
  padding-right: 58px;
}

.replenishment-order__fields {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(145px, 0.55fr) minmax(280px, 1.4fr) minmax(110px, 0.4fr);
  gap: 12px;
}

.replenishment-order__remove {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.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;
  min-height: 42px;
}

.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: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--moto-line);
}

.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 100px 130px 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 100px 130px 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;
}

.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);
}

.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: minmax(150px, .68fr) minmax(130px, .55fr) minmax(190px, 1fr) 56px 78px 98px 72px 72px 120px 102px 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: minmax(125px, .8fr) minmax(112px, .68fr) minmax(170px, 1.25fr) 52px 74px 88px 72px 76px 125px 102px 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: 46px 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-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,
  .month-end-report-lines--products .report-lines__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .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;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--moto-line);
}

.month-end-document__head p { margin: 5px 0 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;
  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; }

/* 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-lines__section-title .moto-btn {
  flex: 0 0 auto;
  text-transform: none;
}

.daily-load-lines__head,
.daily-load-lines__row {
  grid-template-columns: minmax(255px, 1.7fr) minmax(220px, 1.45fr) minmax(82px, 0.45fr) minmax(112px, 0.58fr) 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__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-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-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;
}

.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 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(120px, 0.85fr)
    minmax(80px, 0.55fr)
    minmax(90px, 0.55fr)
    minmax(90px, 0.55fr)
    minmax(90px, 0.65fr)
    minmax(220px, 1.65fr);
}

.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) {
  .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--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;
  }

  .moto-table__filters--activity-logs {
    grid-template-columns: 1fr;
  }

  .replenishment-order__fields {
    grid-template-columns: 1fr;
  }

  .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: "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: "Fornitori"; }
  .moto-table--products .moto-table__row > div:nth-child(6)::before { content: "Ultimo acquisto"; }
  .moto-table--products .moto-table__row > div:nth-child(7)::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: "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--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: "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: "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;
  }

  .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) {
  .dashboard,
  .page-shell,
  .page-shell--narrow {
    width: calc(100% - 24px);
  }

  .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;
  }

  .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(255px, 1.7fr) minmax(220px, 1.45fr) minmax(82px, 0.45fr) minmax(112px, 0.58fr) minmax(140px, 0.72fr) minmax(70px, 0.38fr);
}

.daily-load-lines--products {
  overflow: visible;
  padding-top: 0;
}

.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: 1360px;
  grid-template-columns: minmax(255px, 1.6fr) minmax(140px, 0.75fr) minmax(220px, 1.25fr) minmax(70px, 0.35fr) minmax(82px, 0.42fr) minmax(112px, 0.55fr) minmax(82px, 0.4fr) minmax(140px, 0.65fr) minmax(70px, 0.35fr);
}

.daily-load-lines--products .product-picker__panel {
  z-index: 200;
  min-width: min(420px, calc(100vw - 56px));
}

.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;
}
