html, body {
  height: 100%;
  margin: 0;
}

[hidden] {
  display: none !important;
}

.d-none {
  display: none !important;
}

:root {
  --top-menu-height: 58px;
  --project-toolbar-height: 40px;
  --project-sticky-top: calc(var(--top-menu-height) + var(--project-toolbar-height) - 1px);
}

@font-face {
  font-family: "FontAwesome";
  src: url("../fonts/fontawesome-webfont.woff2") format("woff2"),
       url("../fonts/fontawesome-webfont.woff") format("woff"),
       url("../fonts/fontawesome-webfont.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

body {
  /* font-family: Arial, sans-serif; */
  font-family: "Segoe UI", sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

.page-login {
  min-height: 100%;
}

main {
  min-height: calc(100% - 90px);
  padding: calc(var(--top-menu-height) + 16px) 16px 16px;
}

.page-login main {
  min-height: 100%;
  padding: 24px;
}

.login-page {
  min-height: 100%;
  display: grid;
  place-items: center;
}

.login-card {
  box-sizing: border-box;
  width: min(560px, 100%);
  padding: 30px;
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.login-card__brand {
  display: grid;
  gap: 18px;
  margin-bottom: 26px;
}

.login-card__logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: 16px;
}

.login-card__heading {
  min-width: 0;
  text-align: center;
}

.login-card__title {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.login-card__subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: #64748b;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form__field {
  display: grid;
  gap: 6px;
}

.login-form__label {
  font-size: 13px;
  font-weight: 700;
}

.login-form__input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.login-form__input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.login-form__submit {
  margin-top: 2px;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.login-form__submit:hover {
  background: #f1f5f9;
}

.page-dashboard main,
.page-brand main {
  display: grid;
  justify-items: center;
  align-content: start;
}

.page-progetto main {
  padding-top: calc(var(--project-sticky-top) + 16px);
}

.top-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100vw;
  max-width: 100vw;
  height: var(--top-menu-height);
  padding: 12px 16px;
  box-sizing: border-box;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  overflow: visible;
}

.top-menu__toggle {
  display: none;
}

.top-menu__mobile-logout {
  display: none;
}

.top-menu__section--left {
  justify-self: start;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.top-menu__section--right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
  min-width: 0;
  white-space: nowrap;
}

.top-menu__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: visible;
}

.top-menu__title {
  min-width: 0;
  max-width: 100%;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  justify-self: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-menu__link {
  display: inline-block;
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.top-menu__link:hover {
  background: #f1f5f9;
}

.top-menu__link.is-active {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.top-menu__dropdown {
  position: relative;
}

.top-menu__dropdown--hidden {
  display: none !important;
}

.top-menu__details {
  position: relative;
}

.top-menu__dropdown-trigger {
  cursor: pointer;
  list-style: none;
}

.top-menu__dropdown-trigger::-webkit-details-marker {
  display: none;
}

.top-menu__dropdown-trigger::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.top-menu__submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 920;
  display: none;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
  list-style: none;
}

.top-menu__details[open] .top-menu__submenu {
  display: grid;
  gap: 4px;
}

.top-menu__submenu-link {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.top-menu__submenu-link:hover,
.top-menu__submenu-link:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.top-menu__submenu-link.is-active {
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
}

.top-menu__username {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

@media (min-width: 1101px) {
  .page-progetto .top-menu {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .page-progetto .top-menu__title {
    justify-self: stretch;
    text-align: center;
  }
}

.dashboard-panel {
  max-width: 720px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.dashboard-panel__intro {
  margin: 0 0 18px;
  color: #475569;
}

.dashboard-panel__form {
  display: grid;
  gap: 10px;
}

.dashboard-panel__field {
  display: grid;
  gap: 4px;
}

.dashboard-panel__field--project-name {
  margin-top: 10px;
}

.dashboard-panel__label {
  font-size: 14px;
  font-weight: 700;
}

.dashboard-panel__label--required::after {
  content: " *";
  color: #b91c1c;
}

.dashboard-panel__select {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
}

.dashboard-panel__input {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.password-field {
  position: relative;
}

.password-field__input {
  padding-right: 120px;
}

.password-field__actions {
  position: absolute;
  top: 50%;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateY(-50%);
}

.password-field__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.password-field__button:hover {
  background: #f8fafc;
}

.password-field__icon {
  display: block;
  width: 18px;
  font-family: "FontAwesome";
  font-size: 14px;
  font-style: normal;
  line-height: 1;
  text-align: center;
}

.dashboard-panel__textarea {
  width: 100%;
  min-height: 92px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  line-height: 1.35;
  resize: vertical;
}

.dashboard-panel__field.is-invalid .dashboard-panel__input,
.dashboard-panel__field.is-invalid .dashboard-panel__textarea,
.dashboard-panel__field.is-invalid .dashboard-panel__select,
.dashboard-panel__field.is-invalid .password-field__input,
.dashboard-panel__field.is-invalid .user-customer-picker,
.dashboard-panel__field.is-invalid .user-brand-picker {
  border-color: #dc2626;
}

.user-form__error {
  margin: 0;
  text-align: right;
}

.dashboard-panel__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.user-form__actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.user-form__active {
  margin-right: auto;
}

.dashboard-panel__button {
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  padding: 10px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  overflow-wrap: anywhere;
}

.dashboard-panel__button:hover {
  background: #e2e8f0;
}

.dpp-panel {
  display: grid;
  gap: 16px;
  width: min(640px, calc(100vw - 32px));
  margin: 0 auto;
}

.dpp-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.dpp-form__button {
  height: 38px;
  white-space: nowrap;
}

.dpp-result {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.dpp-result--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.dpp-result--error {
  border-color: #fecaca;
  background: #fef2f2;
}

.dpp-result__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 14px 0 0;
}

.dpp-result__grid div {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.dpp-result__grid dt {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.dpp-result__grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
}

.dpp-result__message {
  margin: 0;
  color: #334155;
}

.dpp-result__message--main {
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.test-access-panel {
  width: min(1100px, calc(100vw - 32px));
}

.test-access-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.test-access-toolbar code {
  overflow-wrap: anywhere;
  color: #334155;
}

.test-access-status {
  color: #334155;
}

.test-access-table-wrap {
  max-width: 100%;
  overflow: auto;
  border-bottom: 1px solid #e2e8f0;
}

.test-access-table {
  width: 100%;
  border-collapse: collapse;
  color: #334155;
  font-size: 13px;
}

.test-access-table th,
.test-access-table td {
  padding: 7px 9px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

.test-access-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-transform: uppercase;
}

.dpp-activation-panel {
  gap: 18px;
}

.dpp-activation-result {
  padding: 18px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.dpp-activation-result--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.dpp-activation-result--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.dpp-mobile-activation-panel {
  gap: 12px;
  width: min(820px, 100vw);
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.dpp-mobile-qr-reader {
  overflow: hidden;
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #0f172a;
}

.dpp-mobile-qr-reader > div {
  width: 100% !important;
  border: 0 !important;
}

.dpp-mobile-qr-reader #dpp-mobile-qr-reader__scan_region {
  min-height: 0 !important;
  margin-right: auto;
  margin-left: auto;
}

.dpp-mobile-qr-reader #dpp-mobile-qr-reader__dashboard_section {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px !important;
}

.dpp-mobile-qr-reader #dpp-mobile-qr-reader__dashboard_section_csr {
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  height: 36px;
  margin: 0 !important;
}

.dpp-mobile-qr-reader span:has(#html5-qrcode-select-camera) {
  display: inline-flex !important;
  align-items: center;
  height: 36px;
  margin: 0 6px 0 0 !important;
  font-size: 0;
  line-height: 0;
  vertical-align: middle;
}

.dpp-mobile-qr-reader video {
  width: 100% !important;
  height: auto !important;
  max-height: none;
  object-fit: contain;
}

.dpp-mobile-qr-reader #html5-qrcode-button-camera-permission,
.dpp-mobile-qr-reader #html5-qrcode-button-camera-start,
.dpp-mobile-qr-reader #html5-qrcode-button-camera-stop {
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: #2D72B5;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.dpp-mobile-qr-reader select {
  width: min(54vw, 260px);
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-size: 14px;
  line-height: 36px;
  vertical-align: middle;
}

.dpp-mobile-qr-reader #html5-qrcode-button-torch-on,
.dpp-mobile-qr-reader #html5-qrcode-button-torch-off {
  display: none !important;
}

@media (max-width: 640px) {
  .page-dpp_mobile_activations main {
    padding-right: 0;
    padding-left: 0;
  }

  .page-dpp_mobile_activations .dpp-panel {
    margin-right: 0;
    margin-left: 0;
  }

  .dpp-mobile-activation-panel {
    width: 100vw;
  }

  .dpp-mobile-qr-reader #dpp-mobile-qr-reader__scan_region {
    width: min(100%, 42vh) !important;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .dpp-mobile-qr-reader #dpp-mobile-qr-reader__scan_region {
    width: min(100%, 90vh) !important;
  }
}

.dpp-mobile-qr-reader img {
  display: none;
}

.dpp-mobile-qr-reader a {
  color: #2D72B5;
}

.page-qr-reading {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.page-qr-reading main {
  width: 100%;
  min-height: 100vh;
  padding: 0;
  box-sizing: border-box;
}

.qr-reading-page {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 24px;
}

.qr-reading-card {
  box-sizing: border-box;
  width: min(680px, 100%);
  padding: 32px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.qr-reading-card__title {
  margin: 0 0 24px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 700;
}

.qr-reading-card__label {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.qr-reading-card__code {
  margin: 0;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(24px, 7vw, 42px);
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.qr-reading-card__message {
  margin: 0;
  color: #b91c1c;
  font-size: 20px;
  font-weight: 700;
}

.qr-reading-card__status {
  margin: 18px 0 0;
  color: #64748b;
  font-size: 18px;
  font-weight: 700;
}

.qr-reading-card__status--success {
  color: #15803d;
}

.qr-reading-card__status--warning {
  color: #b45309;
}

.qr-reading-card__status--error {
  color: #b91c1c;
}

.qr-reading-product {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  text-align: left;
}

.qr-reading-product[hidden],
.qr-reading-product__image[hidden] {
  display: none;
}

.qr-reading-product__details {
  display: grid;
  gap: 9px;
  flex: 1;
  min-width: 0;
  margin: 0;
}

.qr-reading-product__details > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
}

.qr-reading-product__details dt {
  color: #64748b;
}

.qr-reading-product__details dd {
  min-width: 0;
  margin: 0;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.qr-reading-product__details dd[data-qr-product-style_name] {
  white-space: pre-wrap;
}

.qr-reading-product__image {
  width: min(210px, 38%);
  max-height: 230px;
  object-fit: contain;
}

@media (max-width: 520px) {
  .qr-reading-product {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .qr-reading-product__image {
    width: 100%;
    max-height: 180px;
  }
}

.management-panel.dpp-list-panel {
  display: flex;
  flex-direction: column;
  width: 95%;
  max-width: 95%;
  max-height: calc(100vh - var(--top-menu-height) - 16px);
  overflow: hidden;
  background: #ffffff;
}

.page-dpp_list main {
  overflow: hidden;
}

.dpp-list-filter {
  align-items: center;
  display: flex;
  margin-bottom: 14px;
}

.dpp-list-filter .dashboard-panel__field {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.dpp-list-filter .dashboard-panel__label {
  flex: 0 0 auto;
  margin: 0;
}

.dpp-list-filter .dashboard-panel__select {
  min-width: 260px;
}

.dpp-list-brand-name {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.dpp-list-table {
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: calc(100vh - var(--top-menu-height) - 128px);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.dpp-list-table .tabulator {
  border: 0;
  height: 100%;
}

.dpp-list-table .tabulator-tableholder {
  overflow-y: auto !important;
}

.dpp-list-categories {
  display: grid;
  gap: 4px;
  min-width: 0;
  white-space: normal;
}

.dpp-list-categories-cell {
  white-space: normal !important;
}

.dpp-list-categories__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 8px;
  min-width: 0;
}

.dpp-list-categories__item a {
  overflow-wrap: anywhere;
  color: #2d72b5;
  text-decoration: underline;
}

.dpp-list-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 42px;
  padding: 2px;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.dpp-list-image-button img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.dpp-list-image-modal {
  z-index: 1450;
}

.dpp-images-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.dpp-images-toolbar,
.dpp-images-search-row,
.dpp-images-model__header,
.dpp-images-model__assign {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dpp-images-toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
}

.dpp-images-toolbar__brand {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  min-width: min(300px, 100%);
}

.dpp-images-toolbar__brand .dashboard-panel__label {
  flex: 0 0 auto;
  margin: 0;
}

.dpp-images-toolbar__brand .dashboard-panel__select {
  min-width: 260px;
}

.dpp-images-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
}

.dpp-images-search-row .dashboard-panel__input {
  width: min(360px, 100%);
}

.dpp-images-search-row {
  flex-wrap: wrap;
}

.dpp-images-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.dpp-images-filters .management-checkbox {
  margin: 0;
  white-space: nowrap;
}

.dpp-images-count {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.dpp-images-models {
  display: grid;
  gap: 1px;
  max-height: calc(100vh - var(--top-menu-height) - 300px);
  min-height: 260px;
  overflow-y: auto;
}

.dpp-images-model {
  display: grid;
  grid-template-columns: minmax(190px, 0.75fr) minmax(260px, 1.4fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 2px 6px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.dpp-images-model__header {
  min-width: 0;
}

.dpp-images-model__identity {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 8px;
}

.dpp-images-model__identity strong,
.dpp-images-model__color {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dpp-images-model__identity strong {
  color: #0f172a;
  font-size: 14px;
}

.dpp-images-model__color,
.dpp-images-linked__empty {
  color: #64748b;
  font-size: 12px;
}

.dpp-images-linked {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
}

.dpp-images-linked__item {
  display: grid;
  grid-template-columns: 30px minmax(70px, 1fr) auto 26px;
  align-items: center;
  gap: 4px;
  min-width: 230px;
  padding: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.dpp-images-linked__item img {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
  background: #fff;
}

.dpp-images-linked__item span {
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dpp-images-linked__item .template-list-actions__button {
  width: 26px;
  height: 26px;
  cursor: pointer;
}

.dpp-images-linked__item .dpp-images-linked__zoom {
  width: 26px;
  min-width: 26px;
  padding: 0;
  font-size: 0;
}

.dpp-images-linked__zoom::before {
  content: "\f00e";
  font-family: "FontAwesome";
  font-size: 12px;
  line-height: 1;
}

.dpp-images-model__assign .dashboard-panel__button {
  height: 30px;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.dpp-image-picker-modal {
  z-index: 1400;
}

.dpp-image-gallery-modal {
  z-index: 1400;
}

.brand-modal__panel.dpp-image-gallery-modal__panel {
  display: flex;
  flex-direction: column;
  width: 70vw;
  height: calc(100vh - 32px);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  padding: 0;
}

.dpp-image-gallery-modal__panel .brand-modal__header-actions {
  flex: 0 0 auto;
}

.dpp-image-picker-grid.dpp-image-gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
}

.dpp-image-gallery__feedback {
  margin: 0;
  font-size: 13px;
}

.dpp-image-gallery__item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #fff;
}

.dpp-image-gallery__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f8fafc;
}

.dpp-image-gallery__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dpp-image-gallery__name {
  margin-top: 7px;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dpp-image-gallery__usage {
  margin: 7px 0;
  color: #475569;
  font-size: 12px;
}

.dpp-image-gallery__usage ul {
  max-height: 70px;
  margin: 4px 0 0;
  overflow-y: auto;
  padding-left: 0;
  list-style: none;
}

.dpp-image-gallery__usage li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 28px;
}

.dpp-image-gallery__usage li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dpp-image-gallery__actions .template-list-actions__button {
  flex: 0 0 auto;
  cursor: pointer;
}

.dpp-image-gallery__usage--free {
  color: #15803d;
}

.dpp-image-gallery__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.dpp-image-gallery__actions .dashboard-panel__button {
  flex: 1;
  min-height: 30px;
  padding: 3px 8px;
  font-size: 12px;
}

.dpp-image-model-modal {
  z-index: 1420;
}

.dpp-image-rename-modal {
  z-index: 1460;
}

.dpp-image-rename-modal__panel {
  width: min(460px, calc(100vw - 32px));
}

.dpp-image-rename-modal__name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dpp-image-rename-modal__name .dashboard-panel__input {
  flex: 1 1 auto;
  min-width: 0;
}

.dpp-image-rename-modal__name span {
  flex: 0 0 auto;
  color: #475569;
}

.dpp-image-rename-modal__error {
  min-height: 36px;
  margin: 8px 0;
}

.dpp-image-model-modal__panel {
  display: flex;
  flex-direction: column;
  width: min(620px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  padding: 0;
}

.dpp-image-model-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.dpp-image-model-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 5px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
}

.dpp-image-model-list__row > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dpp-image-model-list__row .dashboard-panel__button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 3px 10px;
  font-size: 12px;
}

.dpp-image-model-list__used {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
}

.dpp-image-picker-modal__panel {
  display: flex;
  flex-direction: column;
  width: min(820px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  padding: 0;
}

.dpp-image-picker-modal__header {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.dpp-image-picker-modal__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
  padding: 14px 18px;
}

.dpp-image-picker-modal__body .dashboard-panel__input {
  flex: 0 0 auto;
  width: 100%;
}

.dpp-image-picker-grid {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 2px;
}

.dpp-image-picker-grid__item {
  display: flex;
  align-self: start;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #334155;
}

.dpp-image-picker-grid__item.is-selected {
  box-shadow: none;
}

.dpp-image-picker-grid__select {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 0;
  padding: 6px;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
}

.dpp-image-picker-grid__item:hover .dpp-image-picker-grid__select,
.dpp-image-picker-grid__item.is-selected .dpp-image-picker-grid__select {
  border-color: #2d72b5;
  background: #eef6fd;
}

.dpp-image-picker-grid__item.is-selected .dpp-image-picker-grid__select {
  box-shadow: inset 0 0 0 1px #2d72b5;
}

.dpp-image-picker-grid__select img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 4px;
  object-fit: contain;
  background: #f8fafc;
}

.dpp-image-picker-grid__select span {
  margin-top: 6px;
  overflow: hidden;
  font-size: 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dpp-image-picker-grid__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 7px;
}

.dpp-image-picker-grid__actions .dashboard-panel__button {
  min-height: 30px;
  height: 30px;
  padding: 3px 6px;
  font-size: 11px;
}

.dpp-image-picker-grid__actions .dpp-image-picker-grid__delete {
  border-color: #dc2626;
  background: #fff;
  color: #b91c1c;
}

.dpp-image-picker-grid__actions .dpp-image-picker-grid__delete:hover {
  background: #fef2f2;
}

.dpp-image-zoom-modal {
  z-index: 1450;
}

.dpp-image-zoom-modal__panel {
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.dpp-image-zoom-modal__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(520px, calc(100vh - 170px));
  margin: 0 auto;
  object-fit: contain;
  background: #f8fafc;
}

.dpp-image-delete-modal {
  z-index: 1500;
}

.dpp-image-delete-modal__panel {
  width: min(520px, calc(100vw - 32px));
}

.dpp-image-delete-modal__message {
  margin: 0 0 16px;
  color: #334155;
  text-align: left;
}

.dpp-image-delete-modal__message p {
  margin: 0 0 9px;
}

.dpp-image-delete-modal__message ul {
  max-height: 160px;
  margin: 0 0 9px;
  overflow-y: auto;
  padding-left: 22px;
}

.dpp-image-delete-modal__actions {
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .dpp-images-panel {
    width: calc(100vw - 16px);
  }

  .dpp-images-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dpp-images-toolbar__brand {
    align-items: center;
    flex-direction: row;
  }

  .dpp-images-toolbar__brand,
  .dpp-images-toolbar__brand .dashboard-panel__select,
  .dpp-images-search-row .dashboard-panel__input {
    width: 100%;
    min-width: 0;
  }

  .dpp-images-models {
    max-height: none;
  }

  .dpp-images-model {
    grid-template-columns: 1fr;
  }

  .dpp-image-picker-modal__panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }

  .brand-modal__panel.dpp-image-gallery-modal__panel {
    width: 95vw;
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }

  .dpp-image-model-modal__panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }

  .dpp-image-picker-grid.dpp-image-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dpp-image-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dpp-status-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dpp-list-table .tabulator-col[tabulator-field="status"] .tabulator-col-content {
  position: relative;
}

.dpp-list-table .tabulator-col[tabulator-field="status"] .tabulator-col-title {
  padding-right: 28px;
}

.dpp-status-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  z-index: 2;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.dpp-status-filter-button:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.dpp-status-filter-button span {
  font-family: "FontAwesome";
  font-size: 12px;
  line-height: 1;
}

.dpp-status-filter-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.34);
}

.dpp-status-filter-modal.is-open {
  display: flex;
}

.dpp-status-filter-modal__panel {
  width: min(320px, 100%);
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.dpp-status-filter-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.dpp-status-filter-modal__title {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}

.dpp-status-filter-modal__close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dpp-status-filter-modal__close:hover {
  background: #f1f5f9;
}

.dpp-status-filter-modal__body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.dpp-status-filter-modal__option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 560px) {
  .dpp-form__row,
  .dpp-result__grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-projects-panel {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 95vw;
  max-width: 95vw;
  margin-top: 16px;
  height: calc(100vh - var(--top-menu-height) - 48px);
  height: calc(100dvh - var(--top-menu-height) - 48px);
  max-height: none;
  overflow: hidden;
}

.dashboard-projects-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.dashboard-projects-search .dashboard-panel__input {
  height: 38px;
  margin: 0;
}

.dashboard-projects-search .dashboard-panel__button {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
  line-height: 1;
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .dashboard-projects-search {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-projects-search .dashboard-panel__button {
    justify-self: stretch;
  }
}

.dashboard-projects-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.dashboard-projects-table {
  width: 100%;
  min-width: 1600px;
  border-collapse: collapse;
  table-layout: fixed;
}

.dashboard-projects-table th,
.dashboard-projects-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.dashboard-projects-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  background: #f8fafc;
}

.dashboard-projects-table th:nth-child(4),
.dashboard-projects-table td:nth-child(4) {
  width: 145px;
  white-space: nowrap;
}

.dashboard-projects-table th:nth-child(1) {
  width: 12%;
}

.dashboard-projects-table th:nth-child(2) {
  width: 11%;
}

.dashboard-projects-table th:nth-child(3) {
  width: 15%;
}

.dashboard-projects-table th:nth-child(5) {
  width: 112px;
}

.dashboard-projects-table th:nth-child(6) {
  width: 190px;
}

.dashboard-projects-table th:nth-child(5),
.dashboard-projects-table td:nth-child(5),
.dashboard-projects-table th:nth-child(6) {
  white-space: nowrap;
}

.dashboard-projects-table td:nth-child(5) {
  overflow: hidden;
  white-space: normal;
}

.dashboard-project-status__date {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
}

.dashboard-projects-table td:nth-child(6) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dashboard-projects-table th:nth-child(7) {
  width: 190px;
}

.dashboard-projects-table th:nth-child(8) {
  width: 150px;
}

.dashboard-projects-table th:nth-child(9) {
  width: 220px;
}

.dashboard-projects-table td:nth-child(7) {
  overflow: visible;
  white-space: normal;
}

.dashboard-projects-table td:nth-child(-n+3) {
  overflow-wrap: anywhere;
}

.dashboard-project-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.dashboard-project-order-number,
.dashboard-project-print-layout {
  flex-direction: column;
  align-items: flex-start;
}

.dashboard-project-order-number__value,
.dashboard-project-print-layout__value {
  display: block;
  width: 100%;
  min-width: 0;
}

.dashboard-print-layout-list {
  min-height: 160px;
  max-height: 320px;
  margin-top: 10px;
  overflow-y: auto;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

#dashboard-print-layout-box {
  align-items: center;
  overflow: hidden;
}

#dashboard-print-layout-box .project-note-box__panel {
  display: flex;
  flex-direction: column;
  height: min(520px, calc(100vh - 48px));
  margin-top: 0;
  overflow: hidden;
}

#dashboard-print-layout-box .project-note-box__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

#dashboard-print-layout-box .dashboard-print-layout-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.dashboard-print-layout-list__item {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  align-items: center;
  min-height: 34px;
  padding: 5px 4px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-print-layout-list__item:last-child {
  border-bottom: 0;
}

.dashboard-print-layout-list__item:hover {
  background: #f8fafc;
}

.dashboard-print-layout-list__item.is-selected,
.dashboard-print-layout-list__item.is-selected:hover {
  background: #e7f1fb;
  color: #174f86;
  font-weight: 700;
}

.dashboard-projects-table__button {
  flex: 0 0 auto;
  min-width: max-content;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.dashboard-project-status-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  min-width: 0;
}

.dashboard-project-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  line-height: 1.2;
  white-space: normal;
}

.dashboard-project-status > span:last-child {
  min-width: 0;
  overflow-wrap: break-word;
}

.dashboard-project-status__indicator {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 2px;
  background: #dc2626;
}

.dashboard-project-status--approved .dashboard-project-status__indicator {
  background: #16a34a;
}

.dashboard-project-status--not-approved .dashboard-project-status__indicator {
  background: #dc2626;
}

.dashboard-project-status--serials-generated .dashboard-project-status__indicator {
  background: #16a34a;
}

.dashboard-project-status--serials-not-generated .dashboard-project-status__indicator {
  background: #dc2626;
}

.dashboard-duplicate__option--rows {
  margin-top: 16px;
}

.dashboard-duplicate__option--layout {
  margin-top: 18px;
}

.dashboard-duplicate__quantity-field {
  margin-bottom: 4px;
}

.dashboard-duplicate__quantity-field .dashboard-panel__label {
  margin-bottom: 2px;
}

.brand-panel {
  width: 50vw;
  max-width: none;
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
}

.brand-panel__title {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
}

.brand-panel__meta-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 16px;
  color: #0f172a;
  line-height: 1.4;
}

.brand-panel__meta-label {
  color: #475569;
  font-weight: 700;
}

.brand-panel__meta-value {
  font-weight: 400;
}

.brand-panel__message,
.brand-panel__error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
}

.brand-panel__status {
  max-width: 980px;
}

.brand-panel__message {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.brand-panel__error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.brand-files {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.brand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-actions .dashboard-panel__button {
  font-size: 14px;
}

.brands-list-shell {
  --brands-scrollbar-width: 0px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.brands-list-shell__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px 0;
  padding-right: calc(12px + var(--brands-scrollbar-width));
  background: #fff;
}

.brands-search {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 38px;
}

.brands-list-shell__body {
  padding: 0;
  max-height: calc(100vh - var(--top-menu-height) - 168px);
  overflow: auto;
  scrollbar-gutter: stable;
}

.brands-list__columns {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 0.8fr);
  box-sizing: border-box;
  align-items: stretch;
  justify-items: start;
  gap: 0;
  margin: 0 -12px;
  padding: 10px 12px;
  min-height: 0;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brands-list__columns > span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-self: start;
}

.brands-list__row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 0.8fr);
  box-sizing: border-box;
  align-items: stretch;
  justify-items: start;
  gap: 0;
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.brands-list__row:hover,
.brands-list__row:focus-visible {
  background: #f8fafc;
  outline: none;
}

.brands-list__row:last-child {
  border-bottom: 0;
}

.brands-list__name,
.brands-list__client {
  display: block;
  width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-self: start;
}

.brand-detail-modal__panel {
  width: min(960px, calc(100vw - 48px));
}

@media (max-width: 700px) {
  .brand-panel {
    width: 95vw;
  }

  .brand-detail-modal__panel {
    width: min(95vw, 100%);
  }
}

.dashboard-panel__input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.brand-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.brand-file-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.brand-file-card.is-logo {
  border-color: #0f766e;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.18);
}

.management-panel {
  max-width: 1100px;
  margin-bottom: 16px;
}

.management-panel__title,
.management-panel__subtitle {
  margin: 0 0 16px;
  color: #0f172a;
  line-height: 1.2;
}

.management-panel__title {
  font-size: 24px;
}

.management-panel__subtitle {
  font-size: 18px;
}

.management-panel__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.management-form {
  max-width: 840px;
}

.management-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.management-search {
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto;
  align-items: end;
  gap: 8px;
}

.management-search__label {
  grid-column: 1 / -1;
  margin-bottom: -4px;
}

.management-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 600;
}

.customers-panel {
  display: grid;
  gap: 16px;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - var(--top-menu-height) - 32px);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.customers-list-shell {
  --customers-scrollbar-width: 0px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

body.page-customers {
  overflow: hidden;
}

body.page-customers main {
  display: grid;
  justify-items: center;
  align-items: start;
  min-height: calc(100vh - var(--top-menu-height) - 32px);
  overflow: hidden;
}

.customers-list-shell__header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px 0;
  padding-right: calc(12px + var(--customers-scrollbar-width));
  background: #fff;
}

.customers-search {
  width: 100%;
  max-width: none;
  height: 38px;
}

.customers-list__columns,
.customers-list__new,
.customers-list__row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 0.8fr);
  box-sizing: border-box;
  align-items: stretch;
  justify-items: start;
  gap: 0;
  min-height: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  text-align: left;
}

.customers-list__columns {
  position: sticky;
  top: 0;
  z-index: 1;
  grid-column: 1 / -1;
  margin: 0 -12px;
  padding: 10px 12px;
  min-height: 0;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  background: #f8fafc;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customers-list__columns > span,
.customers-list__row > span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  justify-self: start;
}

.customers-list__new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  justify-self: end;
  align-self: center;
}

.customers-list__row {
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.customers-list__new span {
  grid-column: auto;
}

.customers-list__new:hover,
.customers-list__new:focus-visible,
.customers-list__row:hover,
.customers-list__row:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.customers-list-shell__body {
  max-height: calc(100vh - var(--top-menu-height) - 168px);
  overflow: auto;
  scrollbar-gutter: stable;
}

.customers-list__row:last-child {
  border-bottom: 0;
}

.customers-list__code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  text-align: left;
}

.customers-list__name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

.customer-modal__panel {
  width: min(520px, 100%);
}

.customer-form__actions {
  justify-content: flex-end;
}

.dashboard-panel__button.customer-form__delete {
  margin-right: auto;
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.dashboard-panel__button.customer-form__delete:hover,
.dashboard-panel__button.customer-form__delete:focus-visible {
  border-color: #b91c1c;
  background: #b91c1c;
}

.customer-delete-modal {
  z-index: 1200;
}

.customer-delete-modal__panel {
  width: min(440px, 100%);
}

.customer-delete-modal__message {
  margin: 0;
  overflow-wrap: anywhere;
}

.customer-delete-modal__message p {
  margin: 0 0 8px;
}

.customer-delete-modal__message ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.users-panel {
  display: grid;
  gap: 16px;
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - var(--top-menu-height) - 32px);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

body.page-users {
  overflow: hidden;
}

body.page-users main {
  display: grid;
  justify-items: center;
  align-items: start;
  min-height: calc(100vh - var(--top-menu-height) - 32px);
  overflow: hidden;
}

.users-list-shell {
  --users-scrollbar-width: 0px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.users-list-shell__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px 0;
  padding-right: calc(12px + var(--users-scrollbar-width));
  background: #fff;
}

.users-search {
  width: 100%;
  max-width: none;
  height: 38px;
}

.users-list__new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  justify-self: end;
  align-self: center;
}

.users-list__new span {
  grid-column: auto;
}

.users-list__new:hover,
.users-list__new:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.users-list__columns,
.users-list__row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 0.8fr) minmax(180px, 1.4fr) minmax(80px, 0.5fr) 56px;
  box-sizing: border-box;
  align-items: stretch;
  justify-items: start;
  gap: 0;
  min-height: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  text-align: left;
}

.users-list__columns {
  position: sticky;
  top: 0;
  z-index: 1;
  grid-column: 1 / -1;
  margin: 0 -12px;
  padding: 10px 12px;
  min-height: 0;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  background: #f8fafc;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-list__columns > span,
.users-list__row > span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  justify-self: start;
}

.users-list__actions-column {
  text-align: center;
}

.users-list__row {
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.users-list__row:hover,
.users-list__row:focus-visible {
  background: #f8fafc;
  outline: none;
}

.users-list-shell__body {
  max-height: calc(100vh - var(--top-menu-height) - 168px);
  overflow: auto;
  scrollbar-gutter: stable;
}

.users-list__row:last-child {
  border-bottom: 0;
}

.users-list__username,
.users-list__cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: 400;
}

.users-list__username {
  font-weight: 400;
}

.users-list__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.user-modal__panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

#user-create-modal {
  align-items: flex-start;
  overflow-y: auto;
}

.user-customer-tools,
.user-brand-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.user-customer-tools__search,
.user-brand-tools__search {
  min-width: 0;
}

.user-customer-tools__toggle,
.user-brand-tools__toggle {
  justify-self: end;
  white-space: nowrap;
}

.user-customer-picker,
.user-brand-picker {
  display: block;
  height: 126px;
  min-height: 126px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.user-customer-picker__item,
.user-brand-picker__item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 4px 8px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
  line-height: 15px;
  font-weight: 600;
}

.user-brand-picker__select {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  font-weight: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.user-brand-picker__owner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: 2px;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.user-brand-picker__owner input {
  margin: 0;
}

.password-field__input.is-masked {
  -webkit-text-security: disc;
  text-security: disc;
}

.user-customer-picker__item:last-child,
.user-brand-picker__item:last-child {
  border-bottom: 0;
}

.user-customer-picker__item:hover,
.user-customer-picker__item:focus-visible,
.user-brand-picker__item:hover,
.user-brand-picker__item:focus-visible,
.user-brand-picker__select:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.user-customer-picker__item.is-selected,
.user-brand-picker__item.is-selected {
  background: #dbeafe;
  color: #1e3a8a;
  box-shadow: 3px 0 0 #2563eb inset;
}

.user-brand-picker__item.is-required {
  box-shadow: 3px 0 0 #0f172a inset;
}

@media (max-width: 760px) {
  .management-panel__header {
    align-items: stretch;
    flex-direction: column;
  }

  .user-customer-tools,
  .user-brand-tools,
  .management-form__grid,
  .management-search {
    grid-template-columns: 1fr;
  }

  .user-customer-tools__toggle,
  .user-brand-tools__toggle {
    justify-self: start;
    white-space: normal;
  }

  .user-form__actions {
    align-items: stretch;
  }

  .user-form__error {
    width: 100%;
    text-align: left;
    order: 2;
  }
}

.brand-file-card__preview {
  display: grid;
  place-items: center;
  height: 132px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.brand-file-card__preview-image,
.brand-file-card__preview-pdf {
  width: 100%;
  height: 100%;
}

.brand-file-card__preview-image {
  object-fit: contain;
}

.brand-file-card__preview-pdf {
  border: 0;
}

.brand-file-card__preview-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 46px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.brand-file-card__logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.brand-file-card__name {
  overflow-wrap: anywhere;
  color: #475569;
  font-size: 13px;
}

.brand-file-card__delete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #991b1b;
  font-size: 13px;
  font-weight: 600;
}

.notes-panel {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - var(--top-menu-height) - 32px);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.notes-position-fields__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 6px;
}

.notes-position-fields__choices label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.notes-list-shell {
  --notes-scrollbar-width: 0px;
  display: grid;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.notes-list-shell__header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px 0;
  padding-right: calc(12px + var(--notes-scrollbar-width));
  background: #fff;
}

.notes-search {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 38px;
}

.notes-list__columns {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(120px, 0.8fr) minmax(180px, 1.8fr) 92px;
  box-sizing: border-box;
  align-items: stretch;
  justify-items: start;
  gap: 0;
  margin: 0 -12px;
  padding: 10px 12px;
  min-height: 0;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  background: #f8fafc;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-list-shell__header,
.customers-list-shell__header,
.notes-list-shell__header,
.brands-list-shell__header {
  align-items: end;
  gap: 10px;
}

.users-list-shell__header .dashboard-panel__button,
.customers-list-shell__header .dashboard-panel__button,
.notes-list-shell__header .dashboard-panel__button,
.brands-list-shell__header .dashboard-panel__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: inherit;
  line-height: 1.2;
  white-space: nowrap;
  justify-self: end;
  align-self: end;
}

@media (max-width: 640px) {
  .users-list-shell__header,
  .customers-list-shell__header,
  .notes-list-shell__header,
  .brands-list-shell__header {
    grid-template-columns: minmax(0, 1fr);
  }

  .users-list-shell__header .dashboard-panel__button,
  .customers-list-shell__header .dashboard-panel__button,
  .notes-list-shell__header .dashboard-panel__button,
  .brands-list-shell__header .dashboard-panel__button {
    justify-self: stretch;
  }
}

.notes-list-shell__body {
  max-height: calc(100vh - var(--top-menu-height) - 168px);
  overflow: auto;
  scrollbar-gutter: stable;
}

.notes-list__row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(120px, 0.8fr) minmax(180px, 1.8fr) 92px;
  box-sizing: border-box;
  align-items: stretch;
  justify-items: start;
  gap: 0;
  min-height: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  text-align: left;
}

.notes-list__main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  justify-self: start;
}

.notes-list__columns > span,
.notes-list__cell,
.notes-list__cell > span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  justify-self: start;
}

.notes-list__row > .notes-list__cell:nth-child(3) {
  color: #334155;
}

.notes-list__row:hover {
  background: #f1f5f9;
  outline: none;
}

.notes-list__actions {
  align-self: center;
  justify-self: end;
  justify-content: flex-end;
  padding-right: 0;
}

.notes-form__error {
  margin: 0;
}

.label-types-panel {
  width: min(800px, calc(100vw - 32px));
  max-height: calc(100vh - var(--top-menu-height) - 32px);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.label-types-list-shell {
  display: grid;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.label-types-list-shell__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 10px 12px 0;
  background: #fff;
}

.label-types-search {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 38px;
}

.label-types-list-shell__header .dashboard-panel__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
  white-space: nowrap;
}

.label-types-list__columns,
.label-types-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  box-sizing: border-box;
  align-items: center;
}

.label-types-list__columns {
  grid-column: 1 / -1;
  margin: 0 -12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.label-types-list-shell__body {
  max-height: calc(100vh - var(--top-menu-height) - 168px);
  overflow: auto;
}

.label-types-list__row {
  min-height: 38px;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
}

.label-types-list__row:hover {
  background: #f1f5f9;
}

.label-types-list__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-types-list__actions {
  justify-self: end;
}

.brand-terms-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--top-menu-height) - 34px);
}

.brand-terms-panel .label-types-list-shell {
  min-height: 0;
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr);
}

.brand-terms-panel .label-types-list-shell__body {
  max-height: none;
}

.brand-terms-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.brand-terms-toolbar .dashboard-panel__select {
  min-width: 180px;
  max-width: 100%;
}

.brand-terms-projects {
  max-height: 240px;
  overflow: auto;
  margin: 0 16px 12px;
  padding-left: 20px;
}

.fibers-list__columns,
.fibers-list__row {
  grid-template-columns: minmax(90px, 0.35fr) minmax(0, 1fr) minmax(110px, 0.3fr) 52px;
}

.fibers-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--top-menu-height) - 34px);
}

.fibers-panel .label-types-list-shell {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.fibers-panel--custom .fibers-list__columns,
.fibers-panel--custom .fibers-list__row {
  grid-template-columns: minmax(90px, 0.35fr) minmax(0, 1fr) minmax(110px, 0.3fr) 80px;
}

.fibers-view-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.fibers-view-controls__modes {
  display: inline-flex;
  gap: 4px;
}

.fibers-view-controls__modes .dashboard-panel__button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.fibers-view-controls__modes .is-active {
  border-color: #2d72b5;
  background: #e9f2fa;
}

.fibers-view-controls .dashboard-panel__select {
  min-width: 180px;
  max-width: 100%;
}

.fibers-list__columns {
  padding-right: 28px;
}

.fibers-panel .label-types-list-shell__body {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.fibers-list__code {
  overflow: hidden;
  color: #475569;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fibers-list__eu-flag {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.fibers-list__columns > span:nth-child(3) {
  text-align: left;
}

.fibers-list__eu-flag input {
  margin: 0;
}

[data-fiber-delete-message] {
  white-space: pre-line;
}

.label-type-form__error {
  margin: 0;
}

.label-type-delete-modal {
  z-index: 1200;
}

.label-type-delete-modal__panel {
  width: min(540px, 100%);
}

.label-type-delete-modal__message p {
  margin: 0 0 8px;
}

.label-type-delete-modal__message ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 640px) {
  .label-types-panel {
    width: min(95vw, 100%);
  }

  .label-types-list-shell__header {
    grid-template-columns: 1fr;
  }

  .label-types-list-shell__header .dashboard-panel__button {
    justify-self: stretch;
  }
}

.size-grids-panel {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - var(--top-menu-height) - 32px);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.size-grids-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.size-grids-shell__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px 0;
}

.size-grids-shell__header > .dashboard-panel__input,
.size-grids-shell__header > .dashboard-panel__button {
  height: 38px;
  min-height: 38px;
}

.size-grids-shell__header > .dashboard-panel__button {
  padding: 0 16px;
  font-size: 14px;
  white-space: nowrap;
}

.size-grids-list__columns,
.size-grids-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
}

.size-grids-list__columns {
  grid-column: 1 / -1;
  margin: 0 -12px;
  /* Compensa lo spazio sempre riservato alla scrollbar dell'elenco righe. */
  padding: 10px 28px 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.size-grids-list {
  max-height: calc(100vh - var(--top-menu-height) - 168px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.size-grids-list__row {
  min-height: 38px;
  padding: 7px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  cursor: pointer;
  font-size: 13px;
}

.size-grids-list__row:hover,
.size-grids-list__row:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.size-grids-list__row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.size-grids-list__row .template-list-actions {
  justify-self: end;
}

.brand-modal__panel.size-grid-modal__panel {
  display: flex;
  flex-direction: column;
  width: 95vw;
  max-width: 95vw;
  height: min(820px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  padding: 0;
}

.size-grid-modal__header {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.size-grid-modal__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
  overflow: hidden;
  padding: 8px 12px 12px;
}

.size-grid-parent-description {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(520px, 100%);
  margin: 0;
}

.size-grid-parent-description .dashboard-panel__label {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.size-grid-parent-description .dashboard-panel__input {
  flex: 1 1 auto;
  min-width: 0;
}

.size-grid-parent-certified {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  white-space: nowrap;
}

.size-grid-modal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.size-grid-modal__top .dashboard-panel__button {
  flex: 0 0 auto;
  min-height: 38px;
  font-size: 14px;
}

.size-grid-modal__row-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.size-grid-modal__limit {
  color: #b91c1c;
  font-size: 12px;
}

.size-grid-modal__limit[hidden] {
  display: none;
}

.size-grid-matrix-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}

.size-grid-matrix {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.size-grid-matrix th,
.size-grid-matrix td {
  min-width: 0;
  height: 38px;
  padding: 4px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

.size-grid-matrix__size-column {
  width: calc((100% - 205px) / 16);
}

.size-grid-matrix__heading-column {
  width: 105px;
}

.size-grid-matrix__actions-column {
  width: 100px;
}

.size-grid-matrix th:last-child,
.size-grid-matrix td:last-child {
  border-right: 0;
}

.size-grid-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.size-grid-matrix input[type="text"] {
  width: 94%;
  height: 28px;
  min-height: 28px;
  min-width: 0;
  padding: 3px 2px;
  border: none;
  border-radius: 4px;
  background: #fff;
  color: #0f172a;
  font-size: 11px;
}

.size-grid-matrix__actions {
  white-space: nowrap;
}

.size-grid-matrix__action {
  width: 28px;
  height: 28px;
  margin: 0 2px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.size-grid-matrix__action:hover:not(:disabled) {
  border-color: #2d72b5;
  color: #2d72b5;
}

.size-grid-matrix__action:disabled {
  cursor: default;
  opacity: 0.35;
}

.size-grid-modal__error {
  margin: 0;
}

.size-grid-delete-modal {
  z-index: 1300;
}

.size-grid-delete-modal__panel {
  width: min(520px, calc(100vw - 32px));
}

.size-grid-delete-modal__message {
  max-height: min(50vh, 360px);
  overflow-y: auto;
}

.size-grid-delete-modal__message ul {
  margin: 6px 0 12px;
  padding-left: 22px;
}

.size-grid-delete-modal__actions {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .size-grids-panel {
    width: min(95vw, 100%);
  }

  .size-grids-shell__header {
    grid-template-columns: 1fr;
  }

  .size-grids-list__columns {
    display: none;
  }

  .brand-modal__panel.size-grid-modal__panel {
    width: 95vw;
    max-width: 95vw;
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }

  .size-grid-modal__top {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .notes-panel {
    width: min(95vw, 100%);
  }

  .notes-list__columns {
    display: none;
  }

  .notes-list__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .notes-list__actions {
    justify-content: flex-start;
    justify-self: start;
    padding: 4px 0 0;
  }
}

.brand-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
}

.brand-modal.is-open {
  display: flex;
}

.brand-modal__panel {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
}

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

/* Mantiene titolo, salvataggio e chiusura disponibili mentre scorre il contenuto della modale brand. */
.brand-modal__header--sticky {
  position: sticky;
  top: -20px;
  z-index: 3;
  margin: -20px -20px 16px;
  padding: 20px 20px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.brand-modal__header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.brand-modal__save {
  min-height: 34px;
  white-space: nowrap;
}

.brand-modal__title {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-modal__close {
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.brand-modal__close:hover {
  background: #f1f5f9;
}

.brand-lookup-block {
  gap: 8px;
}

.brand-lookup-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-lookup-block__add {
  min-height: 32px;
  height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

.brand-lookup-block__search {
  height: 36px;
}

.brand-lookup-block__list {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}

.brand-lookup-block__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 4px 7px 4px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.brand-lookup-block[data-lookup-selectable="1"] .brand-lookup-block__row {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  cursor: pointer;
}

.brand-lookup-block__row.is-selected {
  background: #f8fafc;
}

.brand-lookup-block__select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.brand-lookup-block__select input {
  margin: 0;
}

.brand-lookup-block__row:last-child {
  border-bottom: 0;
}

.brand-lookup-block__value {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-lookup-block__empty {
  margin: 0;
}

.brand-lookup-value-modal {
  z-index: 1100;
  align-items: flex-start;
}

.brand-lookup-value-modal__panel {
  width: min(460px, 100%);
}

.brand-lookup-value-modal__error {
  margin: 10px 0 0;
}

.brand-lookup-delete-modal {
  z-index: 1110;
  align-items: flex-start;
}

.brand-lookup-delete-modal__panel {
  width: min(460px, 100%);
}

.brand-lookup-delete-modal__message {
  margin: 0 0 18px;
  color: #334155;
  font-size: 14px;
}

.brand-lookup-delete-modal [data-brand-lookup-delete-confirm]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.brand-detail-form__actions {
  justify-content: flex-end;
}

.dashboard-panel__button.brand-detail-delete {
  margin-right: auto;
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.dashboard-panel__button.brand-detail-delete:hover,
.dashboard-panel__button.brand-detail-delete:focus-visible {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}

.brand-delete-modal {
  z-index: 1200;
}

.brand-delete-modal__panel {
  width: min(540px, 100%);
}

.brand-delete-modal__message p {
  margin: 0 0 8px;
}

.brand-delete-modal__message ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 1100px) {
  .top-menu {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 10px;
    height: var(--top-menu-height);
    padding: 10px 12px;
    overflow: visible;
  }

  .top-menu__toggle {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    cursor: pointer;
  }

  .top-menu__toggle-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .top-menu__section--left {
    position: absolute;
    top: calc(100% + 6px);
    left: 12px;
    display: none;
    width: min(280px, calc(100vw - 24px));
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
    overflow: visible;
  }

  .top-menu.is-open .top-menu__section--left {
    display: block;
  }

  .top-menu__section--right {
    display: none;
  }

  .top-menu__list {
    display: grid;
    gap: 6px;
    overflow: visible;
  }

  .top-menu__section--left .top-menu__link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
  }

  .top-menu__dropdown,
  .top-menu__details {
    width: 100%;
  }

  .top-menu__submenu {
    position: static;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    box-shadow: none;
  }

  .top-menu__section--right .top-menu__link {
    display: inline-flex;
    width: auto;
    align-items: center;
    justify-content: center;
    padding: 9px 10px;
  }

  .top-menu__mobile-logout {
    display: grid;
    gap: 5px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
  }

  .top-menu__mobile-logout .top-menu__username {
    max-width: 100%;
    padding: 0 10px;
  }

  .top-menu__title {
    justify-self: stretch;
    text-align: center;
    font-size: 13px;
    line-height: 1.2;
  }
}

#luckysheet {
  width: 100%;
  height: 500px;
}

.fiber-modal,
.lookup-modal,
.care-symbols-picker-modal,
.care-symbols-editor-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 6vh, 48px) 24px 24px;
  background: rgba(15, 23, 42, 0.48);
  z-index: 1000;
}

body.modal-open {
  overflow: hidden;
}

.fiber-modal.is-open,
.lookup-modal.is-open,
.care-symbols-picker-modal.is-open,
.care-symbols-editor-modal.is-open {
  display: flex;
}

.fiber-modal__panel,
.lookup-modal__panel,
.care-symbols-picker-modal__panel,
.care-symbols-editor-modal__panel {
  width: min(960px, 100%);
  max-height: 85vh;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.care-symbols-editor-modal__panel {
  width: min(1141px, 100%);
  max-height: 92vh;
  overflow: visible;
}

.fiber-modal__header,
.lookup-modal__header,
.care-symbols-picker-modal__header,
.care-symbols-editor-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
}

.fiber-modal__title,
.lookup-modal__title,
.care-symbols-picker-modal__title,
.care-symbols-editor-modal__title {
  margin: 0;
  font-size: 20px;
}

.fiber-modal__close,
.lookup-modal__close,
.care-symbols-picker-modal__close,
.care-symbols-editor-modal__close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.fiber-modal__body,
.lookup-modal__body,
.care-symbols-picker-modal__body,
.care-symbols-editor-modal__body {
  max-height: calc(85vh - 76px);
  overflow-y: auto;
  overflow-x: visible;
  padding: 18px 22px 34px;
}

.fiber-modal__search,
.lookup-modal__search,
.care-symbols-picker-modal__search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.fiber-modal__search-input,
.lookup-modal__search-input,
.care-symbols-picker-modal__search-input {
  flex: 1 1 auto;
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
}

.lookup-modal__search-input--textarea {
  height: auto;
  min-height: 78px;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.35;
  resize: vertical;
  white-space: pre-wrap;
}

.fiber-modal__search-action,
.lookup-modal__search-action,
.care-symbols-picker-modal__search-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
}

.fiber-modal__empty,
.lookup-modal__empty,
.care-symbols-picker-modal__empty {
  margin: 16px 0 0;
  color: #64748b;
}

.made-in-note-modal__panel {
  width: min(640px, 100%);
}

.made-in-note-form {
  display: grid;
  gap: 14px;
}

.made-in-note-form__grid {
  margin-top: 6px;
}

.note-scope-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
}

.part-note-position-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.part-note-position-list__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .part-note-position-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.care-symbols-strip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  vertical-align: middle;
}

.care-symbols-strip__image {
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
}

.care-symbols-strip--modal {
  min-height: 42px;
}

.care-symbols-strip--modal .care-symbols-strip__image {
  width: 42px;
  height: 42px;
}

.care-symbols-strip--cell {
  min-height: 39px;
}

.care-symbols-strip--cell .care-symbols-strip__image {
  width: 39px;
  height: 39px;
}

.care-symbols-modal__symbols-cell {
  white-space: nowrap;
}

.care-symbols-modal__code-heading,
.care-symbols-modal__code-cell {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
}

.care-symbols-modal__symbols-heading {
  padding-left: 4px;
  padding-right: 4px;
}

.care-symbols-picker-modal__body {
  padding-top: 0;
}

.care-symbols-picker-modal__search {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 -22px;
  padding: 18px 22px 12px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.care-symbols-builder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

.care-symbols-builder__panel {
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
}

.care-symbols-builder__panel:nth-of-type(2) {
  min-height: 160px;
}

.care-symbols-builder__slots {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.care-symbols-builder__slot {
  position: relative;
}

.care-symbols-builder__slot-label-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  grid-column: 1 / span 2;
}

.care-symbols-builder__dropdown-trigger {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 56px;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.care-symbols-builder__dropdown-trigger:hover,
.care-symbols-builder__slot.is-open .care-symbols-builder__dropdown-trigger {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.12);
}

.care-symbols-builder__slot-label {
  display: block;
  margin-bottom: 0;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.care-symbols-builder__required-indicator {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92), 0 0 0 2px rgba(220, 38, 38, 0.14);
  flex: 0 0 auto;
}

.care-symbols-builder__required-indicator.is-complete {
  background: #16a34a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92), 0 0 0 2px rgba(22, 163, 74, 0.16);
}

.care-symbols-builder__dropdown-value {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.care-symbols-builder__dropdown-placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.care-symbols-builder__dropdown-image {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
}

.care-symbols-builder__dropdown-chevron {
  color: #64748b;
  font-size: 12px;
}

.care-symbols-builder__dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(52px, 1fr));
  gap: 8px;
  min-width: 420px;
  width: max-content;
  max-width: 540px;
  max-height: none;
  overflow: visible;
  padding: 10px;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

.care-symbols-builder__option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.care-symbols-builder__option:hover:not(:disabled),
.care-symbols-builder__option.is-selected {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14);
}

.care-symbols-builder__option:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.care-symbols-builder__option img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
}

.care-symbols-builder__option--clear {
  grid-column: 1 / -1;
  min-height: 40px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.care-symbols-builder__selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
}

.care-symbols-builder__selection-item img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
}

.care-symbols-builder__summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  color: #475569;
  font-size: 13px;
}

.care-symbols-builder__label {
  display: block;
  margin-bottom: 6px;
  color: #475569;
  font-size: 13px;
}

.care-symbols-builder__text-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.care-symbols-builder__status {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
}

.care-symbols-builder__status.is-error {
  color: #dc2626;
}

.care-symbols-builder__status.is-success {
  color: #16a34a;
}

.care-symbols-builder__actions {
  display: flex;
  gap: 10px;
  margin-top: 0;
  margin-left: auto;
}


.composition-builder-modal__panel {
  width: min(860px, 100%);
}

.composition-builder {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.composition-builder__panel {
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #f8fafc;
  padding: 14px;
}

.composition-builder__label {
  display: block;
  margin-bottom: 6px;
  color: #475569;
  font-size: 13px;
}

.composition-builder__text-input,
.composition-builder__fiber-search,
.composition-builder__select,
.composition-builder__percent {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.composition-builder__fiber-picker {
  position: relative;
  min-width: 0;
}

.composition-builder__fiber-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 220px;
  overflow: auto;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.composition-builder__fiber-option {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.composition-builder__fiber-option:hover,
.composition-builder__fiber-option:focus {
  background: #e0f2fe;
  outline: none;
}

.composition-builder__fiber-option--custom {
  background: #fbfae7;
}

.composition-builder__fiber-option--custom:hover,
.composition-builder__fiber-option--custom:focus {
  background: #f7f1bd;
}

.custom-fiber-modal {
  z-index: 1300;
}

.custom-fiber-modal__panel {
  width: min(520px, 100%);
}

.custom-fiber-form .composition-builder__text-input {
  margin-bottom: 10px;
}

.composition-builder__fiber-empty {
  padding: 9px 10px;
  color: #64748b;
  font-size: 13px;
}

.composition-builder__text-input {
  margin-bottom: 12px;
}

.composition-builder__text-input--readonly {
  background: #f8fafc;
  color: #334155;
}

.composition-builder__table {
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  overflow: visible;
  background: #fff;
}

.composition-builder__table-head,
.composition-builder__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 88px;
  gap: 10px;
  align-items: center;
}

.composition-builder__table-head {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.composition-builder__fiber-heading {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.composition-builder__fiber-heading .composition-builder__new-fiber {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.composition-builder__rows {
  display: flex;
  flex-direction: column;
}

.composition-builder__row {
  padding: 10px 12px;
  border-top: 1px solid #f1f5f9;
}

.composition-builder__row:first-child {
  border-top: 0;
}

.composition-builder__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.composition-builder__total {
  margin-left: auto;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.composition-builder__total.is-valid {
  color: #16a34a;
}

.composition-builder__status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #64748b;
}

.composition-builder__status.is-error {
  color: #dc2626;
}

.composition-builder__status.is-success {
  color: #16a34a;
}

.project-eac-options {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-eac-box__panel {
  width: min(180px, 100%);
}

.project-eac-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.project-eac-option:hover,
.project-eac-option:focus-visible {
  border-color: #2563eb;
  outline: none;
}

.fiber-modal__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.fiber-modal__actions--remark-free-text {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.remark-free-text-error {
  margin: 0;
}

.remark-free-text-separator {
  border-top: 1px solid #e5e7eb;
  margin: 12px 0 6px;
}

@media (max-width: 720px) {
  .composition-builder__table-head,
  .composition-builder__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .composition-builder__toolbar {
    flex-wrap: wrap;
  }

  .composition-builder__total {
    margin-left: 0;
  }
}

@media (max-width: 960px) {
  .care-symbols-editor-modal__panel {
    width: min(1141px, 100%);
  }

  .care-symbols-builder__row--single,
  .care-symbols-builder__row--split {
    flex-wrap: wrap;
  }

  .care-symbols-builder__row-group--end {
    justify-content: flex-start;
  }
}

.project-table {
  position: relative;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  user-select: none;
  font-size: 14px;
  font-family: "Segoe UI", sans-serif;
}

.project-page {
  padding-top: 0;
  margin-top: -16px;
}

.project-toolbar {
  position: fixed;
  top: var(--top-menu-height);
  left: 0;
  right: 0;
  z-index: 850;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: var(--project-toolbar-height);
  padding: 8px 16px;
  box-sizing: border-box;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.project-toolbar__spacer {
  flex: 1 1 auto;
}

.project-toolbar__rows-count {
  flex: 0 0 auto;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.project-edit-lock-status {
  flex: 0 1 auto;
  max-width: 360px;
  overflow: hidden;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-edit-lock-status--waiting {
  color: #475569;
}

.project-edit-lock-status--locked {
  color: #b91c1c;
}

.excel-import-page {
  display: grid;
  gap: 18px;
  padding: 12px 16px 32px;
  margin-top: -8px;
}

.excel-import-card {
  padding: 18px;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.excel-import-card__title {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 700;
}

.excel-import-card__title--small {
  font-size: 18px;
}

.excel-import-card__subtitle {
  margin: 0 0 16px;
  color: #475569;
}

.excel-import-form {
  display: grid;
  gap: 12px;
}

.excel-import-form__file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.excel-import-form__label {
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}

.excel-import-form__file-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.excel-import-form__file-button {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
}

.excel-import-form__file-name {
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-import-form__submit {
  justify-self: start;
}

.excel-import-form__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
}

.excel-import-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
}

.excel-import-meta__item {
  min-width: 180px;
}

.excel-import-meta__label {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.excel-import-meta__value {
  color: #0f172a;
  font-size: 18px;
}

.excel-import-summary {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dcfce7;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
}

.excel-import-table-wrap {
  overflow: auto;
}

.excel-import-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.excel-import-table th,
.excel-import-table td {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

.excel-import-table th {
  background: #f8fafc;
  color: #334155;
}

.project-toolbar__field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.project-toolbar__select {
  height: 30px;
  padding: 4px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
}

.project-toolbar__field--palette {
  gap: 0;
  position: relative;
}

.project-toolbar__divider {
  width: 1px;
  height: 22px;
  background: #cbd5e1;
}

.project-toolbar__color-trigger {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.project-toolbar__color-trigger::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 4px;
  height: 5px;
  border-radius: 3px;
  background: currentColor;
}

.project-toolbar__color-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 22px;
  font-size: 13px;
  line-height: 1;
  color: #334155;
}

.project-toolbar__color-icon--fill {
  font-family: "FontAwesome";
  font-size: 14px;
  color: #111111;
}

.project-toolbar__color-icon--fill::before {
  content: "\f1fc";
}

.project-toolbar__color-icon--text {
  font-weight: 700;
  /* font-family: Georgia, serif; */
  font-family: "Segoe UI", sans-serif;
  font-size: 15px;
}

.project-toolbar__palette {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 880;
  display: none;
  grid-template-columns: repeat(4, 30px);
  gap: 8px;
  min-width: 152px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.project-toolbar__palette.is-open {
  display: grid;
}

.project-toolbar__palette-color {
  appearance: none;
  display: block;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
}

.project-toolbar__palette-color:hover,
.project-toolbar__palette-color:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.project-toolbar__button {
  display: inline-flex;
  box-sizing: border-box;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  white-space: nowrap;
}

.project-toolbar__button:hover:not(:disabled) {
  background: #f1f5f9;
}

#project-append-row-button.is-read-only {
  opacity: 0.55;
  cursor: not-allowed;
}

#dashboard-project-download-base:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.project-toolbar__button--icon {
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.project-toolbar__zoom {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: stretch;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.project-toolbar__zoom-button {
  width: 30px;
  min-width: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.project-toolbar__zoom-button:hover:not(:disabled) {
  background: #f1f5f9;
}

.project-toolbar__zoom-button:disabled {
  color: #94a3b8;
  cursor: default;
}

.project-toolbar__zoom-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 88px;
  padding: 0 8px;
  border-right: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.project-toolbar__zoom-label output {
  min-width: 34px;
  color: #0f172a;
  text-align: right;
}

.project-toolbar__icon {
  font-family: "FontAwesome";
  font-size: 15px;
  line-height: 1;
}

.project-note-box {
  position: fixed;
  inset: 0;
  z-index: 890;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.24);
}

.project-note-box.is-open {
  display: flex;
}

#dashboard-duplicate-box {
  align-items: flex-start;
}

#dashboard-duplicate-box .project-note-box__panel {
  margin-top: 12vh;
}

#made-in-delete-confirm-box,
#made-in-usage-box,
#part-delete-confirm-box,
#part-usage-box,
#remark-delete-confirm-box,
#remark-usage-box,
#lookup-note-edit-box,
#lookup-note-edit-confirm-box {
  z-index: 1100;
}

.project-note-box__panel {
  width: min(420px, 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.project-text-field-box__panel {
  width: min(560px, 100%);
}

.project-reference-lookup__panel {
  width: min(620px, 100%);
}

.project-restore-box__panel {
  width: min(620px, 100%);
}

.project-restore-confirm-box__panel {
  width: min(453px, 100%);
}

.dashboard-access-result {
  z-index: 1250;
}

.dashboard-access-result__panel {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  height: min(88vh, 800px);
  overflow: hidden;
}

.dashboard-access-result__panel .project-note-box__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.dashboard-access-result__content {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
}

.dashboard-access-result__loading {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 12px;
  color: #475569;
  text-align: center;
}

.dashboard-access-result__loading strong {
  color: #0f172a;
  font-size: 16px;
}

.dashboard-access-result__spinner {
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  border: 4px solid #dbeafe;
  border-top-color: #2d72b5;
  border-radius: 50%;
  animation: dashboard-access-spin 0.75s linear infinite;
}

@keyframes dashboard-access-spin {
  to {
    transform: rotate(360deg);
  }
}

.dashboard-access-result__status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid;
  border-radius: 8px;
}

.dashboard-access-result__status--success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.dashboard-access-result__status--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.dashboard-access-result__status-icon {
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 700;
  line-height: 1;
}

.dashboard-access-result__status > div > strong,
.dashboard-access-result__status > div > span {
  display: block;
}

.dashboard-access-result__status > div > span {
  margin-top: 3px;
}

.dashboard-access-result__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-access-result__summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
}

.dashboard-access-result__summary strong {
  color: #0f172a;
  font-size: 16px;
}

.dashboard-access-result__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dashboard-access-result__table th,
.dashboard-access-result__table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.dashboard-access-result__table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

.dashboard-access-result__table th:not(:first-child),
.dashboard-access-result__table td:not(:first-child) {
  width: 90px;
  text-align: right;
}

.dashboard-access-result__models {
  display: grid;
  gap: 8px;
}

.dashboard-access-result__model-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-access-result__model-list span {
  padding: 4px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
}

@media (max-width: 560px) {
  .dashboard-access-result__summary {
    grid-template-columns: 1fr;
  }
}

.project-download-box {
  z-index: 1200;
  background: rgba(15, 23, 42, 0.34);
}

.project-download-box__panel {
  width: min(280px, 100%);
}

.project-append-row-file-picker {
  margin-bottom: 12px;
}

#project-append-row-error {
  white-space: pre-line;
  max-height: 220px;
  overflow: auto;
}

.project-template-list-box__panel {
  width: min(80vw, calc(100vw - 32px));
  max-height: min(80vh, calc(100vh - 32px));
}

.project-template-list-table {
  min-height: min(560px, calc(80vh - 120px));
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.brand-select-table {
  min-height: 360px;
}

.project-template-list-table .tabulator,
.brand-select-table .tabulator {
  border: 0;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
}

.project-template-list-table .tabulator-header,
.brand-select-table .tabulator-header {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.project-template-list-table .tabulator-header .tabulator-col,
.brand-select-table .tabulator-header .tabulator-col {
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

.project-template-list-table .tabulator-header .tabulator-col:last-child,
.brand-select-table .tabulator-header .tabulator-col:last-child {
  border-right: 0;
}

.project-template-list-table .tabulator-col .tabulator-col-content,
.brand-select-table .tabulator-col .tabulator-col-content {
  padding: 7px 10px;
}

.project-template-list-table .tabulator-col .tabulator-col-title,
.brand-select-table .tabulator-col .tabulator-col-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-template-list-table .tabulator-header-filter input,
.brand-select-table .tabulator-header-filter input {
  min-height: 26px;
  padding: 4px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
}

.project-template-list-table .tabulator-tableholder,
.brand-select-table .tabulator-tableholder {
  background: #ffffff;
}

.project-template-list-table .tabulator-row,
.brand-select-table .tabulator-row {
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  color: #0f172a;
}

.project-template-list-table .tabulator-row.tabulator-row-even,
.brand-select-table .tabulator-row.tabulator-row-even {
  background: #ffffff;
}

.project-template-list-table .tabulator-row .tabulator-cell,
.brand-select-table .tabulator-row .tabulator-cell {
  padding: 6px 10px;
  border-right: 1px solid #e5e7eb;
  line-height: 1.35;
}

.project-template-list-table .tabulator-row .tabulator-cell:last-child,
.brand-select-table .tabulator-row .tabulator-cell:last-child {
  border-right: 0;
}

.project-template-delete-confirm-box {
  z-index: 910;
}

.project-template-list-table .tabulator-row,
.project-template-list-table .tabulator-row .tabulator-cell,
.brand-select-table .tabulator-row,
.brand-select-table .tabulator-row .tabulator-cell {
  cursor: default;
}

.project-template-list-table .tabulator-row.tabulator-selectable:hover,
.brand-select-table .tabulator-row.tabulator-selectable:hover {
  background: #f8fafc;
  cursor: default;
}

.project-template-list-table .tabulator-cell .care-symbols-strip,
.brand-select-table .tabulator-cell .care-symbols-strip {
  pointer-events: none;
}

.template-list-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.template-list-actions__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}

.template-list-actions__button:hover,
.template-list-actions__button:focus-visible {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.template-list-actions__icon {
  display: block;
  font-family: "FontAwesome";
  font-size: 13px;
  line-height: 1;
}

.project-template-tooltip {
  position: fixed;
  z-index: 1300;
  max-width: 180px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.2);
}

.lookup-table__actions-cell {
  width: 76px;
  text-align: right;
}

.lookup-row-actions {
  justify-content: flex-end;
}

.made-in-usage-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
}

.made-in-usage-list__title {
  margin: 6px 0 0;
  color: #334155;
  font-size: 13px;
}

.made-in-usage-list__items {
  margin: 0;
  padding-left: 18px;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.4;
}

.project-download-box__body {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px 20px;
}

.project-download-box__title {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.project-download-box__animation {
  position: relative;
  width: 72px;
  height: 72px;
}

.project-download-box__arrow {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 16px;
  height: 38px;
  transform: translateX(-50%);
  animation: project-download-arrow 0.9s ease-in-out infinite;
}

.project-download-box__arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 8px;
  height: 32px;
  border-radius: 999px;
  background: #2563eb;
  transform: translateX(-50%);
}

.project-download-box__arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-right: 8px solid #2563eb;
  border-bottom: 8px solid #2563eb;
  transform: translateX(-50%) rotate(45deg);
}

.project-download-box__tray {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 48px;
  height: 18px;
  border: 6px solid #0f172a;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  transform: translateX(-50%);
}

@keyframes project-download-arrow {
  0%,
  100% {
    opacity: 0.45;
    transform: translate(-50%, -8px);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, 10px);
  }
}

.project-note-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.project-note-box__title {
  margin: 0;
  font-size: 16px;
}

.project-note-box__close {
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.project-note-box__body {
  padding: 16px;
}

.project-note-box__textarea {
  width: 100%;
  min-height: 120px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  resize: vertical;
  font: inherit;
}

.project-insert-row-position {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.project-insert-row-position__option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #334155;
  font-size: 14px;
  cursor: pointer;
}

.project-insert-row-position__option input {
  margin: 0;
}

.project-note-box__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.project-restore-list {
  display: grid;
  gap: 8px;
  max-height: min(420px, 70vh);
  overflow: auto;
}

.project-restore-list__item {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.project-restore-list__item:hover,
.project-restore-list__item:focus-visible {
  border-color: #2563eb;
  outline: none;
  background: #f8fafc;
}

.project-restore-list__date {
  font-weight: 700;
  color: #0f172a;
}

.dashboard-excel-projects-list__title {
  margin: 12px 0 4px;
  font-weight: 700;
}

.dashboard-excel-projects-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.dashboard-excel-projects-list__item input {
  margin: 0;
}

.project-restore-list__file {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  word-break: break-all;
}

.project-restore-confirm__text {
  margin: 0;
  color: #334155;
  line-height: 1.45;
}

.project-note-preview {
  position: fixed;
  z-index: 895;
  max-width: min(420px, calc(100vw - 12px));
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid #000;
  border-radius: 6px;
  background: #fff;
  color: #111;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
}

.project-text-field-box__input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
}

.project-text-field-box__textarea {
  height: 128px;
  min-height: 96px;
  resize: vertical;
  white-space: pre-wrap;
}


.project-table td {
  border: 1px solid #ccc;
  padding: 10px;
  min-width: 90px;
  text-align: center;
  position: relative;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.project-table td .cell-value {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.project-table td .cell-value.editing {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.project-table td[data-column-key="6"],
.project-table td[data-column-key="37"] {
  padding-top: 0;
  padding-bottom: 0;
}

.project-table td[data-column-key="6"] .cell-value,
.project-table td[data-column-key="37"] .cell-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  line-height: 0;
  vertical-align: top;
}

.project-table td {
  position: relative;
}

.project-table td.selected,
.project-table td.active-cell {
  background: transparent;
  color: inherit;
  z-index: 2;
  box-shadow: 0 0 0 2px #2196f3;
}

.project-table td:not(.project-table__locked):not([data-column-key="0"]):not([data-column-key="1"]):not([data-column-key="43"]).selected::after,
.project-table td:not(.project-table__locked):not([data-column-key="0"]):not([data-column-key="1"]):not([data-column-key="43"]).active-cell::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  background: #1d4ed8;
  border: 1px solid #ffffff;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 21;
}

/* Sizes, Barcode e Style Code non supportano il trascinamento: nasconde sempre la relativa handle. */
.project-table td[data-column-key="0"].selected::after,
.project-table td[data-column-key="0"].active-cell::after,
.project-table td[data-column-key="1"].selected::after,
.project-table td[data-column-key="1"].active-cell::after,
.project-table td[data-column-key="43"].selected::after,
.project-table td[data-column-key="43"].active-cell::after {
  content: none !important;
  display: none !important;
}

.project-table td:not(.project-table__locked):not([data-column-key="0"]):not([data-column-key="1"]):not([data-column-key="43"]):hover::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  background: #2563eb;
  border: 1px solid #ffffff;
  box-sizing: border-box;
  opacity: 0.9;
  z-index: 11;
}

.project-table td.project-table__fill-handle-hover {
  cursor: crosshair;
}

.cell-note-indicator {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 4;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cell-note-indicator::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  height: 0;
  border-top: 12px solid #f59e0b;
  border-left: 12px solid transparent;
}

.cell-note-indicator:hover::before,
.cell-note-indicator:focus-visible::before {
  border-top-color: #d97706;
}

.project-table td.editing {
  background: #fff;
  color: #000;
  outline: 2px solid orange;
}

.project-table td.project-table__locked {
  background: #f5f5f5;
  color: #666;
}

.project-table td.project-table__locked .fill-handle {
  display: none;
}

.project-table thead tr:first-child th {
  cursor: default;
  position: relative;
  padding: 6px 8px 8px 8px;
}

.project-table thead tr:first-child th::after {
  content: "⇅";
  position: absolute;
  right: 10px;
  top: 35px;
  opacity: 0.5;
}

.project-table thead tr:first-child th.asc::after {
  content: "↑";
  opacity: 1;
}

.project-table thead tr:first-child th.desc::after {
  content: "↓";
  opacity: 1;
}

.project-table thead input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 3px;
  display: block;
  margin-left: 0;
}

.project-table__symbol-filter {
  position: relative;
  margin-top: 4px;
}

.project-table__symbol-filter-button {
  width: 100%;
  height: 24px;
  min-height: 24px;
  padding: 1px 3px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.project-table__symbol-filter-placeholder {
  color: #64748b;
  font-size: 12px;
}

.project-table__symbol-filter-panel {
  position: fixed;
  z-index: 910;
  box-sizing: border-box;
  width: min(542px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.project-table__symbol-filter-panel--eac {
  width: min(190px, calc(100vw - 16px));
  grid-template-columns: 1fr;
}

@media (max-width: 420px) {
  .project-table__symbol-filter-panel:not(.project-table__symbol-filter-panel--eac) {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.project-table__symbol-filter-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 47px;
  height: 47px;
  min-width: 47px;
  min-height: 47px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  cursor: pointer;
}

.project-table__symbol-filter-option--wide {
  grid-column: 1 / -1;
  width: 100%;
}

.project-table__symbol-filter-option:hover,
.project-table__symbol-filter-option:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb inset;
  outline: none;
}

.project-table__symbol-filter-button:hover,
.project-table__symbol-filter-button:focus-visible {
  border-color: #2563eb;
  outline: none;
}

.project-table__symbol-filter-option--clear {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
  min-height: 34px;
  font-size: 12px;
  color: #334155;
}

.project-table__symbol-filter-image {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: cover;
}

.project-table__symbol-filter-option .project-table__symbol-filter-image {
  width: 39px;
  height: 39px;
  object-fit: contain;
}

.project-table .fill-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  right: 0;
  bottom: 0;
  background: #2196f3;
  cursor: crosshair;
  opacity: 0;
  z-index: 10;
}

.project-table td:hover .fill-handle,
.project-table td.force-hover .fill-handle {
  opacity: 1;
}

.project-table thead {
  position: sticky;
  top: var(--project-sticky-top);
  z-index: 60;
  background: #f9f9f9;
}

.project-page--no-scroll-needed .project-table thead {
  position: static;
}

.page-progetto.project-page-no-scroll-needed {
  overflow-y: hidden;
}

.project-table thead tr {
  background: #f9f9f9;
}

.project-table thead th {
  position: relative;
  vertical-align: bottom;
  border: 1px solid #ccc;
  background: #f9f9f9;
  background-clip: padding-box;
  min-width: 90px;
  padding: 8px 16px 12px;
  overflow: hidden;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  box-shadow: inset 0 -1px 0 #cbd5e1;
}

.project-table__header-detail {
  display: block;
  /* margin-top: 2px; */
  font-size: 11px;
  /* font-weight: 400; */
  line-height: 0.7;
}

.project-table thead th.selected {
  box-shadow: inset 0 0 0 2px #2196f3;
  background: transparent;
}

.project-table__header-title {
  margin-bottom: 6px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.project-table__header-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
  min-height: 24px;
}

.project-table__sort-button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.project-table__sort-button:hover {
  color: #0f172a;
}

.project-table__sort-icon {
  display: block;
  width: 100%;
  height: 100%;
  font-family: "FontAwesome";
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

.project-table__sort-icon::before {
  content: "\f0dc";
}

.project-table thead tr:first-child th::after,
.project-table thead tr:first-child th.asc::after,
.project-table thead tr:first-child th.desc::after {
  content: none !important;
}

.project-table thead tr:first-child th.asc .project-table__sort-icon::before {
  content: "\f0de";
}

.project-table thead tr:first-child th.desc .project-table__sort-icon::before {
  content: "\f0dd";
}

.project-table__hide-column {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-table__hide-column:hover {
  background: #cbd5e1;
}

.project-table__hide-icon {
  display: block;
  width: 15px;
  height: 15px;
}

.project-table__hide-icon svg {
  display: block;
  width: 15px;
  height: 15px;
  stroke: #334155;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.project-table__move-column {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-table__move-column:active {
  cursor: grabbing;
}

.project-table__move-icon {
  display: block;
  width: 16px;
  height: 16px;
}

.project-table__move-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: #64748b;
}

.project-table__column-drop-target {
  box-shadow: inset 0 0 0 2px #60a5fa;
}

.project-table__column-dragging {
  opacity: 0.7;
}

.project-table__resize-handle {
  position: absolute;
  top: 0;
  right: -3px;
  bottom: 0;
  width: 8px;
  cursor: col-resize;
  z-index: 3;
}

.project-table__resize-handle::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 3px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}

.project-table__resize-handle:hover::after,
.project-table--resizing .project-table__resize-handle::after {
  background: #94a3b8;
}

.project-status {
  margin: 12px 0;
  color: #475569;
}

.project-status--error {
  color: #b91c1c;
}

.app-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 6000;
  width: min(420px, calc(100vw - 32px));
  padding: 11px 14px;
  border: 1px solid #86efac;
  border-radius: 8px;
  background: #dcfce7;
  color: #166534;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.app-toast--error {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.lookup-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.lookup-table th,
.lookup-table td {
  padding: 6px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.lookup-table td:first-child {
  white-space: pre-line;
}

.lookup-table thead th {
  position: sticky;
  top: var(--lookup-sticky-offset, 68px);
  z-index: 4;
  background: #fff;
  box-shadow: 0 1px 0 #e5e7eb;
}

.lookup-table tbody tr {
  cursor: pointer;
}

.lookup-table tbody tr.lookup-table__custom-row {
  background: #fbfae7;
}

.lookup-table tbody tr:hover,
.lookup-table tbody tr.is-selected {
  background: #d9fbe8;
}

.lookup-table tbody tr.lookup-table__custom-row:hover {
  background: #f5f0c8;
}

.lookup-table tbody tr.is-selected {
  background: #b7f7d0;
}

.project-table thead tr:first-child th::after {
  content: none;
}

.lookup-modal__search {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -22px;
  padding: 18px 22px 12px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: none;
}

.lookup-modal__body {
  padding-top: 0;
  padding-bottom: 34px;
  background: #fff;
}

.project-context-menu {
  position: absolute;
  min-width: 140px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  padding: 6px;
  z-index: 800;
}

.project-context-menu .menu-group {
  display: flex;
  flex-direction: column;
}

.project-context-menu__item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #0f172a;
}

.project-context-menu__icon {
  display: inline-block;
  width: 14px;
  min-width: 14px;
  text-align: center;
  color: #475569;
  font-family: "FontAwesome";
  font-size: 13px;
  line-height: 1;
}

.project-context-menu__item:hover {
  background: #f1f5f9;
}

.project-context-menu__divider {
  height: 1px;
  margin: 8px 0;
  background: linear-gradient(to right, transparent, #ddd, transparent);
}

.project-note-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.project-note-field-header .dashboard-panel__label {
  margin-bottom: 0;
}

.project-note-field-header__toggle {
  flex-shrink: 0;
  font-size: 12px;
}
.project-table__variants-cell,
.project-table__barcodes-cell {
  cursor: pointer;
  font-weight: 600;
  color: #2d72b5;
  white-space: nowrap;
}

.project-table td.project-table__barcodes-cell {
  background-color: #fff;
}

.project-table td.project-table__barcodes-cell--missing {
  background-color: #fce8e8;
}

.project-table td.project-table__barcodes-cell--complete {
  background-color: #dff3e5;
}

.project-variants-box {
  align-items: flex-start;
  box-sizing: border-box;
  padding: calc(var(--project-sticky-top) + 12px) 24px 16px;
  overflow: hidden;
}

.project-variants-box__panel {
  display: flex;
  flex-direction: column;
  width: 95vw;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - var(--project-sticky-top) - 28px);
  overflow: hidden;
}

.project-variants-box__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.project-variants-box__size-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.project-variants-box__size-name select {
  width: min(360px, 100%);
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-weight: 400;
}

.project-variants-box__size-name input {
  width: min(360px, 100%);
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 8px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-weight: 400;
  cursor: default;
}

.project-variants-box__hint {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.project-size-grid-picker {
  z-index: 1200;
  align-items: flex-start;
  padding-top: calc(var(--project-sticky-top) + 12px);
}

.project-size-grid-picker__panel {
  display: flex;
  flex-direction: column;
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - var(--project-sticky-top) - 28px);
  overflow: hidden;
}

.project-size-grid-picker__body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.project-size-grid-picker__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 10px;
}

.project-size-grid-picker__list {
  min-height: 160px;
  overflow-y: auto;
  border-top: 1px solid #e2e8f0;
}

.project-size-grid-picker__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 80px;
  align-items: center;
  min-height: 38px;
  padding: 5px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  cursor: pointer;
  font-size: 13px;
}

.project-size-grid-picker__row:hover,
.project-size-grid-picker__row:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.project-size-grid-picker__row.is-custom {
  background: #fbfae7;
}

.project-size-grid-picker__row.is-custom:hover,
.project-size-grid-picker__row.is-custom:focus-visible {
  background: #f7f3cf;
}

.project-size-grid-picker__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-size-grid-picker__type {
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
}

.project-size-grid-picker__actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.project-size-grid-picker__actions button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #2d72b5;
  cursor: pointer;
  font-family: "FontAwesome";
}

.project-custom-size-modal {
  z-index: 1300;
}

.project-custom-size-matrix .size-grid-matrix__size-column {
  width: calc((100% - 205px) / 16);
}

.project-variants-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - var(--project-sticky-top) - 220px);
  overflow: auto;
  border-bottom: 1px solid #d9e2ec;
}

.project-variants-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.project-variants-table th,
.project-variants-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #e5eaf0;
  text-align: left;
}

.project-variants-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.project-variants-table th:last-child,
.project-variants-table td:last-child {
  width: 42px;
  text-align: center;
}

.project-variants-table th:first-child,
.project-variants-table td:first-child {
  width: 180px;
  min-width: 180px;
}

.project-variants-table th:not(:first-child):not(:last-child),
.project-variants-table td:not(:first-child):not(:last-child) {
  width: 82px;
  min-width: 82px;
  text-align: center;
}

.project-variants-table__input {
  width: 100%;
  height: 30px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 13px;
}

.project-variants-table__quantity {
  text-align: right;
}

.project-barcodes-table th:last-child,
.project-barcodes-table td:last-child {
  width: 56px;
  min-width: 56px;
  text-align: center;
}

.project-barcodes-box__toolbar {
  flex-wrap: wrap;
}

.project-barcodes-box__width {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.project-barcodes-box__width select {
  width: auto;
  min-width: 130px;
}

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

.project-barcodes-table th,
.project-barcodes-table td {
  padding: 3px 2px;
}

.project-barcodes-table th:first-child,
.project-barcodes-table td:first-child {
  width: 110px;
  min-width: 110px;
  padding-left: 5px;
}

.project-variants-table.project-barcodes-table th:not(:first-child),
.project-variants-table.project-barcodes-table td:not(:first-child) {
  width: calc(var(--barcode-input-width, 4cm) + 4px);
  min-width: calc(var(--barcode-input-width, 4cm) + 4px);
  text-align: center;
}

.project-barcodes-table__input {
  display: block;
  width: var(--barcode-input-width, 4cm);
  min-width: var(--barcode-input-width, 4cm);
  max-width: var(--barcode-input-width, 4cm);
  height: 27px;
  margin-inline: auto;
  padding: 2px 3px;
  text-align: left;
}

.project-variants-table th.project-variants-table__inactive,
.project-variants-table td.project-variants-table__inactive {
  background: #eef1f4;
  color: #8a94a3;
}

.project-variants-table__inactive .project-variants-table__input {
  border-color: #d8dee6;
  background: #e7ebef;
  color: #7b8491;
  cursor: not-allowed;
}

.project-variants-table__remove {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #b42318;
  cursor: pointer;
  font-family: "Font Awesome 5 Free", "FontAwesome";
  font-weight: 900;
}

.project-variants-box__add {
  align-self: flex-start;
  margin-top: 10px;
}

@media (max-width: 700px) {
  .project-variants-box {
    padding: calc(var(--project-sticky-top) + 8px) 12px 12px;
  }

  .project-variants-box__panel {
    width: 95vw;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - var(--project-sticky-top) - 20px);
  }

  .project-variants-table {
    min-width: max-content;
  }
}
.dpp-documents-panel {
  width: min(95%, 1500px);
  margin-inline: auto;
}

.dpp-documents-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.dpp-documents-toolbar .dashboard-panel__select {
  width: min(360px, 100%);
}

.dpp-documents-upload {
  padding-block: 12px;
  border-block: 1px solid #e2e8f0;
}

.dpp-documents-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
}

.dpp-documents-section {
  min-width: 0;
}

.dpp-documents-section > h2 {
  margin: 0 0 10px;
  color: #2d72b5;
  font-size: 15px;
}

.dpp-category-form {
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.dpp-category-form__main {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(170px, 0.8fr));
  gap: 10px;
}

.dpp-categories-panel {
  width: min(100%, 980px);
}

.dpp-category-scope {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.dpp-category-scope label {
  display: grid;
  min-width: 220px;
  gap: 4px;
  color: #475569;
  font-size: 13px;
}

.dpp-model-categories-panel {
  display: flex;
  flex-direction: column;
  width: 95%;
  max-width: none;
  max-height: calc(100vh - var(--top-menu-height) - 24px);
  overflow: hidden;
}

.dpp-model-categories-panel .dpp-category-scope {
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.dpp-model-categories-panel .dpp-category-scope label {
  min-width: min(220px, 100%);
}

.dpp-association-filters {
  flex: 0 0 auto;
  min-width: 0;
}

.dpp-model-categories-panel .dpp-category-rule-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dpp-association-filter {
  min-width: 0;
}

.dpp-association-filter__button {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 36px;
  gap: 10px;
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.dpp-association-filter__button strong {
  flex: 0 0 auto;
  color: #475569;
}

.dpp-association-filter__button span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dpp-association-filter__button:hover:not(:disabled) {
  border-color: #2d72b5;
}

.dpp-association-filter__button:disabled {
  cursor: default;
  opacity: 0.65;
}

.dpp-association-picker__panel {
  display: flex;
  flex-direction: column;
  width: min(470px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.dpp-association-picker__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.dpp-association-picker__tools[hidden] {
  display: none;
}

.dpp-association-picker__tools input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
}

.dpp-association-picker__tools label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 13px;
}

.dpp-association-picker__more {
  align-self: center;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #2d72b5;
  cursor: pointer;
}

.dpp-association-picker__more[hidden] {
  display: none;
}

.dpp-association-picker__choices {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 100px;
  max-height: min(55vh, 440px);
  overflow-y: auto;
}

.dpp-association-picker__choices label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: #334155;
  font-size: 13px;
  cursor: pointer;
}

.dpp-association-picker__choices input {
  flex: 0 0 auto;
  margin: 0;
}

.dpp-association-picker__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 14px;
}

.dpp-association-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 12px 0;
}

.dpp-association-actions .project-status {
  margin-right: auto;
}

.dpp-association-models {
  display: flex;
  flex: 1 1 auto;
  min-height: 100px;
  flex-direction: column;
  overflow: hidden;
  border-top: 1px solid #e2e8f0;
}

.dpp-association-models__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: #475569;
  font-size: 13px;
}

.dpp-association-models__list {
  min-height: 0;
  overflow: auto;
}

.dpp-association-models__list table {
  width: 100%;
  border-collapse: collapse;
  color: #334155;
  font-size: 13px;
}

.dpp-association-models__list th,
.dpp-association-models__list td {
  padding: 7px 9px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.dpp-association-models__list th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .dpp-model-categories-panel .dpp-category-rule-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dpp-model-categories-panel {
    overflow-y: auto;
  }

  .dpp-association-models {
    flex: 0 0 260px;
  }
}

@media (min-width: 701px) and (max-width: 1050px) {
  .dpp-model-categories-panel .dpp-category-rule-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dpp-category-list__title {
  margin: 14px 0 4px;
  color: #2d72b5;
  font-size: 15px;
}

.dpp-category-new {
  flex: 0 0 auto;
}

.dpp-category-editor-modal__panel {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

#dpp-category-editor-modal.is-open {
  align-items: flex-start;
}

.dpp-category-editor-modal__panel .brand-modal__header--sticky {
  top: -20px;
}

.dpp-category-editor-modal__panel .dpp-category-form {
  padding: 14px 16px 16px;
  border-bottom: 0;
}

.dpp-category-editor-modal__panel .dpp-category-form__main {
  grid-template-columns: minmax(220px, 1fr) minmax(100px, 120px) minmax(90px, 120px);
}

.dpp-category-form__main label {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 13px;
}

.dpp-category-form__main .dpp-category-active {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 35px;
  gap: 7px;
}

.dpp-category-active input {
  margin: 0;
}

.dpp-category-option {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: #475569;
  font-size: 13px;
}

.dpp-category-choices {
  min-width: 0;
  max-height: 150px;
  margin: 10px 0 0;
  padding: 7px 8px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
}

.dpp-category-choices legend {
  padding-inline: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.dpp-category-choices label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  color: #475569;
  font-size: 12px;
}

.dpp-category-choices [data-dpp-upload-groups] {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
}

.dpp-category-rule-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.dpp-category-rule-filters .dpp-category-choices {
  margin: 0;
}

.dpp-category-files {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.dpp-category-cover,
.dpp-category-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.dpp-category-cover > strong,
.dpp-category-links > strong {
  color: #2d72b5;
  font-size: 13px;
}

.dpp-category-cover > img {
  display: block;
  box-sizing: border-box;
  width: min(240px, 100%);
  height: 160px;
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  object-position: left center;
  justify-self: start;
}

.dpp-category-cover > img[hidden] { display: none; }
.dpp-category-cover > label { justify-self: start; }

.dpp-category-links__input-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 2fr) auto;
  gap: 8px;
  align-items: center;
}

.dpp-category-links__list { max-height: 150px; overflow-y: auto; }

.dpp-category-files__header {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #475569;
  font-size: 12px;
}

.dpp-category-files__header strong {
  margin-right: auto;
  color: #2d72b5;
  font-size: 13px;
}

.dpp-category-files__header .dashboard-panel__button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dpp-category-files__list {
  display: grid;
  max-height: min(320px, 42vh);
  margin-top: 7px;
  overflow-y: auto;
  border-top: 1px solid #e2e8f0;
}

.dpp-category-files__row {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.dpp-category-files__row a {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  padding: 3px 5px;
  color: #2d72b5;
  font-size: 12px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.dpp-category-files__row a:hover {
  background: #f8fafc;
  text-decoration: underline;
}

.dpp-category-files__pending-name {
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px 5px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.dpp-category-files__title {
  flex: 0 1 230px;
  min-width: 110px;
  font-size: 12px;
}

.dpp-category-files__row button {
  flex: 0 0 auto;
  margin-right: 4px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .dpp-category-files__row { flex-wrap: wrap; }
  .dpp-category-files__title { flex: 1 1 150px; }
  .dpp-category-editor-modal__panel .dpp-category-form__main { grid-template-columns: minmax(0, 1fr); }
  .dpp-category-links__input-row { grid-template-columns: 1fr; }
  .dpp-category-rule-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .dpp-category-files__header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.dpp-category-form__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.dpp-category-field-error {
  margin: 4px 0 0;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.4;
}

.dpp-category-field-error[hidden] {
  display: none;
}

.dpp-category-field-error--general {
  margin: 0 auto 0 0;
}

.dpp-category-rule-filters > .dpp-category-field-error {
  grid-column: 1 / -1;
}

.dpp-category-form [aria-invalid="true"] {
  border-color: #b91c1c;
}

.dpp-category-list {
  max-height: min(58vh, 480px);
  margin-top: 8px;
  overflow-y: auto;
}

.dpp-category-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.6fr) minmax(0, 1.4fr) auto;
  align-items: start;
  gap: 8px 12px;
  min-height: 38px;
  padding: 4px 6px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
}

.dpp-category-row strong,
.dpp-category-row small {
  display: block;
}

.dpp-category-row__name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dpp-category-row__files {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 4px 12px;
}

.dpp-category-row__files a {
  color: #2d72b5;
  overflow-wrap: anywhere;
  text-decoration: underline;
}

.dpp-category-row small {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}

.dpp-category-row__actions {
  display: flex;
  gap: 4px;
}

@media (max-width: 650px) {
  .dpp-category-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dpp-category-row__files {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .dpp-category-row__actions {
    grid-column: 2;
    grid-row: 1;
  }
}

.dpp-category-edit-icon {
  font-family: "FontAwesome";
  font-size: 14px;
  font-style: normal;
  line-height: 1;
}

.dpp-documents-upload__fields {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 2fr);
  gap: 10px;
}

.dpp-documents-upload__fields label {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 13px;
}

.dpp-documents-upload__actions,
.dpp-documents-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.dpp-documents-search-row .dashboard-panel__input {
  flex: 1 1 auto;
}

.dpp-documents-list-shell {
  margin-top: 8px;
  border-top: 1px solid #cbd5e1;
}

.dpp-documents-list {
  max-height: min(58vh, 620px);
  overflow-y: auto;
}

.dpp-document-row {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(90px, 0.6fr) 34px;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
}

.dpp-document-row__name {
  overflow: hidden;
  color: #2d72b5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dpp-document-row--header {
  min-height: 34px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.dpp-document-delete-modal__panel {
  width: min(440px, calc(100% - 24px));
}

.dpp-model-categories {
  margin-top: 18px;
}

.dpp-model-categories > h2 {
  margin: 0 0 8px;
  color: #2d72b5;
  font-size: 15px;
}

.dpp-model-categories__list {
  max-height: min(35vh, 390px);
  overflow-y: auto;
}

.dpp-model-category-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(260px, 2fr);
  gap: 10px;
  align-items: center;
  min-height: 35px;
  padding: 4px 8px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
}

.dpp-model-category-row--header {
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.qr-reading-documents {
  display: grid;
  gap: 14px;
  width: 100%;
  margin-top: 18px;
  padding: 10px 4px 0 0;
  border-top: 1px solid #e2e8f0;
  text-align: left;
}

.qr-reading-documents__category {
  display: grid;
  grid-template-columns: minmax(100px, 200px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.qr-reading-documents__category--no-cover {
  grid-template-columns: minmax(0, 1fr);
}

.qr-reading-documents__content { min-width: 0; }

.qr-reading-documents__title {
  margin: 0 0 8px;
  color: #334155;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.qr-reading-documents[hidden] {
  display: none;
}

.qr-reading-documents__link {
  display: block;
  padding-block: 5px;
  color: #2d72b5;
  overflow-wrap: anywhere;
}

.qr-reading-documents__cover {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
}

@media (max-width: 480px) {
  .qr-reading-documents__category {
    grid-template-columns: minmax(90px, 34%) minmax(0, 1fr);
    gap: 10px;
  }

  .qr-reading-documents__category--no-cover { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1050px) {
  .dpp-documents-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 850px) {
  .dpp-documents-upload__fields {
    grid-template-columns: 1fr 1fr;
  }

  .dpp-document-row {
    grid-template-columns: minmax(160px, 2fr) repeat(2, minmax(90px, 1fr)) 34px;
  }
}

@media (max-width: 560px) {
  .dpp-documents-upload__fields {
    grid-template-columns: 1fr;
  }

  .dpp-documents-upload__actions,
  .dpp-documents-search-row,
  .dpp-documents-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dpp-category-form__main {
    grid-template-columns: 1fr;
  }

  .dpp-category-scope {
    align-items: stretch;
    flex-direction: column;
  }

  .dpp-document-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .dpp-document-row span {
    display: none;
  }

  .dpp-document-row--header {
    display: none;
  }

  .dpp-model-category-row {
    grid-template-columns: minmax(90px, 0.7fr) minmax(100px, 0.8fr) minmax(180px, 1.5fr);
  }
}

/* Keep page containers within the viewport without shrinking data columns. */
main,
.dashboard-panel,
.management-panel,
.brand-modal,
.brand-modal__panel,
.project-note-box,
.project-note-box__panel {
  box-sizing: border-box;
  min-width: 0;
}

.brand-modal__panel,
.project-note-box__panel {
  max-width: 100%;
}

@media (max-width: 1600px) {
  .project-toolbar {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
  }

  .project-toolbar > :not(.project-toolbar__spacer) {
    flex-shrink: 0;
  }

  .project-toolbar__spacer {
    min-width: 0;
  }

  .project-toolbar__palette {
    position: fixed;
    top: calc(var(--top-menu-height) + var(--project-toolbar-height) + 4px);
    left: 12px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 760px) {
  .dpp-category-editor-modal__panel .dpp-category-form__main {
    grid-template-columns: minmax(0, 1fr);
  }

  .dpp-model-category-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .dpp-model-category-row--header {
    display: none;
  }
}

@media (max-width: 640px) {
  main {
    padding-right: 8px;
    padding-left: 8px;
  }

  .dashboard-projects-panel,
  .management-panel,
  .users-panel,
  .customers-panel,
  .brands-panel,
  .notes-panel {
    width: 100%;
    max-width: 100%;
  }

  .dashboard-projects-panel {
    height: calc(100dvh - var(--top-menu-height) - 28px);
    padding: 12px;
  }

  .dashboard-projects-search .dashboard-panel__button,
  .users-list-shell__header .dashboard-panel__button,
  .customers-list-shell__header .dashboard-panel__button,
  .notes-list-shell__header .dashboard-panel__button,
  .brands-list-shell__header .dashboard-panel__button {
    height: auto;
    min-height: 38px;
    padding: 8px 12px;
    white-space: normal;
  }

  .brand-modal,
  .project-note-box {
    padding: 8px;
  }

  .brand-modal__panel,
  .project-note-box__panel {
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
  }

  .brand-modal__panel {
    padding: 16px;
  }

  .brand-modal__header--sticky {
    top: -16px;
    margin: -16px -16px 16px;
    padding: 16px;
  }

  .users-list-shell {
    max-height: calc(100dvh - var(--top-menu-height) - 52px);
    overflow: hidden;
  }

  .users-list-shell__body {
    max-height: calc(100dvh - var(--top-menu-height) - 150px);
    overflow-y: auto;
  }

  .users-list-shell__header {
    padding-right: 12px;
  }

  .users-list__columns {
    display: none;
  }

  .users-list__row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
  }

  .users-list__row > :nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-weight: 600;
  }

  .users-list__row > :nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .users-list__row > :nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 3;
    white-space: normal;
  }

  .users-list__row > :nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }

  .users-list__actions {
    grid-column: 2;
    grid-row: 1;
  }

  .project-toolbar {
    gap: 6px;
    padding-right: 8px;
    padding-left: 8px;
  }
}

@media (max-width: 360px) {
  .qr-reading-documents__category {
    grid-template-columns: minmax(0, 1fr);
  }

  .qr-reading-documents__cover {
    max-width: 200px;
  }
}
