.quotes-dashboard {
  min-height: calc(100svh - 78px);
  padding: 34px 24px 80px;
  background:
    radial-gradient(circle at top right, rgba(255, 145, 77, 0.11), transparent 32rem),
    #07111c;
  color: #e5e7eb;
}

.quotes-panel {
  width: 100%;
  margin: 0 auto;
}

.quotes-table-wrap[hidden],
.quotes-empty-state[hidden],
.quotes-message[hidden] {
  display: none !important;
}

.quotes-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.quotes-topbar h1 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

.quotes-topbar p {
  margin: 0;
  color: rgba(203, 213, 225, 0.64);
  font-size: 15px;
  font-weight: 700;
}

.new-quote-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: rgba(255, 145, 77, 0.16);
  color: #FF914D;
  font-size: 14px;
  font-weight: 800;
}

.new-quote-button:hover {
  background: rgba(255, 145, 77, 0.26);
}

.quotes-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.quote-search {
  position: relative;
  display: block;
}

.quote-search span {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(148, 163, 184, 0.78);
  border-radius: 50%;
  transform: translateY(-50%);
}

.quote-search span::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.78);
  transform: rotate(45deg);
}

.quote-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px 0 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #081522;
  color: #f8fafc;
  font-size: 15px;
  outline: none;
}

.quote-search input::placeholder {
  color: rgba(148, 163, 184, 0.72);
  font-weight: 700;
}

.quote-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.quote-filters button {
  min-width: 0;
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: #0b1724;
  color: rgba(203, 213, 225, 0.76);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.quote-filters button.is-active {
  background: #FF914D;
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 145, 77, 0.18);
}

.quote-filters button:hover {
  background: rgba(255, 145, 77, 0.14);
  color: #ffb07c;
}

.quote-filter-description {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 145, 77, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 145, 77, 0.12), transparent 52%),
    rgba(11, 23, 36, 0.72);
  color: #FF914D;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 850;
}

.quotes-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 145, 77, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 145, 77, 0.06), transparent 34%),
    #0a1622;
}

.quotes-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.quotes-table th,
.quotes-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
  vertical-align: middle;
}

.quotes-table th:nth-child(3),
.quotes-table td:nth-child(3) {
  text-align: center;
}

.quotes-table td:nth-child(3) {
  display: table-cell;
  line-height: 1;
}

.quotes-table th {
  color: rgba(203, 213, 225, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.quotes-table td {
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 700;
}

.quotes-table td strong,
.quotes-table td span {
  display: block;
}

.quotes-table td strong {
  color: #f8fafc;
}

.quotes-table td > span {
  margin-top: 5px;
  color: rgba(148, 163, 184, 0.72);
  font-size: 12px;
}

.quotes-table td > .quote-status,
.quote-status {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 116px;
  margin-top: 0;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 151, 178, 0.14);
  color: #68e4f4;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.quotes-table td > .status-in-valutazione,
.status-in-valutazione {
  background: rgba(234, 179, 8, 0.13);
  color: #fde68a;
}

.quotes-table td > .status-in-lavorazione,
.status-in-lavorazione {
  background: rgba(0, 151, 178, 0.16);
  color: #68e4f4;
}

.quotes-table td > .status-spedita,
.status-spedita {
  background: rgba(255, 145, 77, 0.15);
  color: #FF914D;
}

.quotes-table td > .status-preventivo-disponibile,
.status-preventivo-disponibile {
  background: rgba(16, 185, 129, 0.13);
  color: #86efac;
}

.quotes-table td > .status-annullata,
.status-annullata {
  background: rgba(248, 113, 113, 0.13);
  color: #fca5a5;
}

.quote-detail-link {
  color: #FF914D;
  font-weight: 900;
}

.quote-detail-link:hover {
  color: #ffb07c;
}

.quote-detail-page {
  min-height: calc(100svh - 78px);
  padding: 24px 16px 72px;
  background:
    radial-gradient(circle at top right, rgba(255, 145, 77, 0.11), transparent 32rem),
    #07111c;
  color: #e5e7eb;
}

.quote-detail-shell {
  width: 100%;
  margin: 0 auto;
}

.quote-detail-view[hidden],
.quote-detail-error[hidden],
.quote-detail-loading[hidden] {
  display: none !important;
}

.quote-detail-loading,
.quote-detail-error {
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: #0a1622;
  color: rgba(203, 213, 225, 0.82);
  font-weight: 800;
  text-align: center;
}

.quote-detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(340px, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid rgba(255, 145, 77, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 145, 77, 0.08), transparent 42%),
    #101722;
}

.quote-back-link {
  display: inline-flex;
  margin-bottom: 12px;
  color: #FF914D;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-detail-heading h1 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
}

.quote-detail-heading h1 small {
  color: rgba(148, 163, 184, 0.78);
  font-size: 16px;
}

.quote-detail-heading p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #FF914D;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.quote-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quote-progress li {
  position: relative;
  min-width: 0;
}

.quote-progress li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.quote-progress li.is-active::before,
.quote-progress li.is-complete::before {
  background: #0097B2;
}

.quote-progress li[data-step="in_valutazione"].is-active::before {
  background: #fde68a;
}

.quote-progress li[data-step="in_lavorazione"].is-active::before,
.quote-progress li[data-step="in_lavorazione"].is-complete::before {
  background: #0097B2;
}

.quote-progress li[data-step="spedita"].is-active::before,
.quote-progress li[data-step="spedita"].is-complete::before {
  background: #FF914D;
}

.quote-progress li[data-step="preventivo_disponibile"].is-active::before,
.quote-progress li[data-step="preventivo_disponibile"].is-complete::before {
  background: #86efac;
}

.quote-progress li[data-step="annullata"].is-active::before {
  background: #fca5a5;
}

.quote-progress span {
  position: relative;
  display: block;
  height: 20px;
}

.quote-progress strong {
  display: block;
  margin-top: 4px;
  color: rgba(203, 213, 225, 0.6);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.quote-progress li.is-active strong,
.quote-progress li.is-complete strong {
  color: #bfdbfe;
}

.quote-progress li[data-step="in_valutazione"].is-active strong {
  color: #fde68a;
}

.quote-progress li[data-step="preventivo_disponibile"].is-active strong,
.quote-progress li[data-step="preventivo_disponibile"].is-complete strong {
  color: #86efac;
}

.quote-progress li[data-step="annullata"].is-active strong {
  color: #fca5a5;
}

.quote-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.quote-detail-main,
.quote-detail-side {
  display: grid;
  gap: 22px;
}

.quote-info-card,
.quote-spec-card,
.quote-notes-box,
.quote-side-card {
  border: 1px solid rgba(255, 145, 77, 0.14);
  border-radius: 8px;
  background: #101722;
}

.quote-project-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.quote-info-card span,
.quote-spec-card span,
.quote-notes-box span,
.quote-side-card h2,
.quote-note-form label {
  display: block;
  margin: 0 0 10px;
  color: rgba(255, 145, 77, 0.78);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-project-card h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 900;
}

.quote-project-card strong {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.quote-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.quote-spec-card {
  min-height: 88px;
  padding: 22px;
}

.quote-spec-card strong {
  display: block;
  color: #f8fafc;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 900;
}

.quote-spec-card-wide {
  grid-column: span 2;
}

.quote-spec-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
  margin: 0;
}

.quote-spec-card dl div {
  min-width: 0;
}

.quote-spec-card dt {
  margin-bottom: 5px;
  color: rgba(148, 163, 184, 0.72);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-spec-card dd {
  margin: 0;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
}

.quote-notes-box {
  padding: 24px;
  background: linear-gradient(180deg, rgba(16, 23, 34, 0.96), rgba(9, 20, 33, 0.96));
}

.quote-notes-box p {
  margin: 0;
  color: rgba(203, 213, 225, 0.74);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
}

.quote-side-card {
  padding: 24px;
}

.quote-files-list,
.quote-messages-list {
  display: grid;
  gap: 12px;
}

.quote-file-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.quote-file-item > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 145, 77, 0.17);
  color: #ffb07c;
  font-size: 10px;
  font-weight: 900;
}

.quote-file-item strong,
.quote-file-item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.quote-file-item strong {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 900;
}

.quote-file-item small {
  margin-top: 4px;
  color: rgba(148, 163, 184, 0.72);
  font-size: 11px;
  font-weight: 800;
}

.quote-document-download {
  min-height: 34px;
  margin-top: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #FF914D;
  color: #08111d;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.quote-document-download:disabled {
  cursor: progress;
  opacity: 0.66;
}

.quote-empty-inline {
  margin: 0;
  color: rgba(148, 163, 184, 0.72);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
}

.quote-messages-card {
  max-height: 620px;
}

.quote-messages-list {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.quote-message-bubble {
  justify-self: end;
  width: min(100%, 280px);
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.quote-message-bubble p {
  margin: 0;
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}

.quote-message-bubble time {
  display: block;
  margin-top: 10px;
  color: rgba(148, 163, 184, 0.72);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-note-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.quote-note-form textarea {
  width: 100%;
  min-height: 116px;
  resize: none;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.quote-note-form textarea::placeholder {
  color: rgba(148, 163, 184, 0.62);
}

.quote-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-note-actions span {
  color: rgba(203, 213, 225, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.quote-note-actions button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #FF914D;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.quote-note-actions button:disabled {
  cursor: progress;
  opacity: 0.64;
}

.quotes-empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 44px 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(10, 22, 34, 0.72);
  text-align: center;
}

.quotes-empty-state h2 {
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 800;
}

.quotes-empty-state p {
  max-width: 460px;
  margin: 0;
  color: rgba(203, 213, 225, 0.66);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.quotes-message {
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(10, 22, 34, 0.72);
  color: rgba(203, 213, 225, 0.78);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.company-data-modal-open {
  overflow: hidden;
}

.company-data-modal[hidden] {
  display: none !important;
}

.company-data-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 8, 15, 0.78);
  backdrop-filter: blur(12px);
}

.company-data-dialog {
  position: relative;
  width: min(100%, 620px);
  padding: 30px;
  border-radius: 10px;
  background:
    radial-gradient(circle at top right, rgba(255, 145, 77, 0.18), transparent 18rem),
    linear-gradient(180deg, rgba(255, 145, 77, 0.08), transparent 42%),
    #101722;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.company-data-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.company-data-close:hover {
  background: rgba(255, 145, 77, 0.18);
  color: #FF914D;
}

.company-data-kicker {
  margin: 0 0 8px;
  color: #FF914D;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.company-data-dialog h2 {
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
}

.company-data-copy {
  margin: 0 0 22px;
  color: rgba(203, 213, 225, 0.78);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 750;
}

.company-data-form {
  display: grid;
  gap: 16px;
}

.company-data-form label {
  display: grid;
  gap: 8px;
  color: #FF914D;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.company-data-form input,
.company-data-form textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

.company-data-form input {
  min-height: 48px;
  padding: 0 14px;
}

.company-data-form textarea {
  min-height: 96px;
  resize: none;
  padding: 14px;
}

.company-data-form input:focus,
.company-data-form textarea:focus {
  border-color: rgba(255, 145, 77, 0.76);
  box-shadow: 0 0 0 3px rgba(255, 145, 77, 0.13);
}

.company-data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.company-data-actions button,
.company-data-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
}

.company-data-save {
  background: #FF914D;
  color: #08111d;
  box-shadow: 0 14px 32px rgba(255, 145, 77, 0.2);
}

.company-data-save:disabled {
  cursor: progress;
  opacity: 0.66;
}

.company-data-cancel {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
}

.company-data-feedback {
  min-height: 18px;
  margin: 14px 0 0;
  color: rgba(255, 145, 77, 0.92);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.company-data-feedback[data-state="error"] {
  color: #fca5a5;
}

@media (max-width: 760px) {
  .quotes-dashboard {
    padding: 28px 18px 64px;
  }

  .quotes-topbar {
    display: grid;
  }

  .new-quote-button {
    justify-self: start;
  }

  .company-data-dialog {
    padding: 24px;
  }

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

  .quote-filters button {
    min-width: 0;
  }

  .quote-detail-page {
    padding: 18px 14px 58px;
  }

  .quote-detail-hero,
  .quote-detail-grid {
    grid-template-columns: 1fr;
  }

  .quote-detail-hero {
    gap: 20px;
    padding: 20px;
  }

  .quote-detail-heading h1 {
    font-size: 25px;
  }

  .quote-project-card {
    display: grid;
    padding: 22px;
  }

  .quote-spec-grid {
    grid-template-columns: 1fr;
  }

  .quote-spec-card-wide {
    grid-column: span 1;
  }

  .quote-detail-side {
    grid-row: auto;
  }
}

@media (max-width: 480px) {
  .quotes-dashboard {
    padding: 24px 14px 54px;
  }

  .quotes-topbar h1 {
    font-size: 28px;
  }

  .quote-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quotes-empty-state {
    min-height: 240px;
    padding: 34px 18px;
  }

  .quotes-empty-state h2 {
    font-size: 20px;
  }

  .quote-progress {
    gap: 8px;
  }

  .quote-progress strong {
    font-size: 9px;
  }

  .quote-spec-card dl {
    grid-template-columns: 1fr;
  }

  .quote-note-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-note-actions button {
    width: 100%;
  }
}
