/* Area agenzia — modulo preventivo (stile dashboard) */

.agency-alert--error {
  background: #fdecea;
  color: #9b2c2c;
}

.agency-hub-cards--one {
  grid-template-columns: 1fr;
  max-width: 420px;
  margin: 0 auto;
}

.quote-form-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.quote-form-card {
  background: #f4f7f9;
  border: 1px solid #dde5eb;
  border-radius: 8px;
  padding: 1.15rem 1.1rem;
}

.quote-form-card--wide {
  grid-column: 1 / -1;
}

.quote-form-card__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--heading-blue, #0b5cab);
}

.quote-form-card__hint {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: #6b7c88;
}

.quote-form-card .agency-form__field {
  margin-bottom: 0.75rem;
}

.quote-form-card .agency-form__field:last-child {
  margin-bottom: 0;
}

.quote-island-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.quote-island-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.5rem;
  border: 1px solid #dde5eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--heading-blue, #0b5cab);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.quote-island-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
}

.quote-island-card:hover {
  border-color: var(--heading-orange, #f5b041);
  transform: translateY(-1px);
}

.quote-island-card.is-selected {
  border-color: var(--heading-orange, #f5b041);
  background: #fff8eb;
  box-shadow: 0 4px 14px rgba(0, 78, 119, 0.08);
}

.quote-island-card__emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.quote-form-card .briefing-options {
  margin-bottom: 0.85rem;
}

.quote-form-card__field-label {
  display: block;
  margin: 0.85rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--heading-blue, #0b5cab);
}

.quote-form-card .briefing-options--meal .briefing-option {
  font-size: 0.82rem;
  padding: 0.6rem 0.85rem;
}

.quote-form-card .briefing-option.is-selected {
  border-color: var(--heading-orange, #f5b041);
  background: #fff8eb;
  color: var(--heading-blue, #0b5cab);
  font-weight: 600;
}

.briefing-options--multi .briefing-option.is-selected {
  box-shadow: inset 0 0 0 1px var(--heading-orange, #f5b041);
}

.quote-other-field {
  margin-top: 0.75rem;
}

.quote-other-field[hidden] {
  display: none !important;
}

.quote-form__row--pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.quote-form__row--pair .agency-form__field {
  margin-bottom: 0;
}

.quote-form-card input[type="date"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  color: #1a1a1a;
  background: #fff;
}

.quote-submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid #dde5eb;
  border-radius: 8px;
  box-shadow: 0 -4px 20px rgba(0, 21, 36, 0.08);
}

.quote-submit-bar__consent {
  flex: 1 1 14rem;
  margin: 0;
  font-size: 0.82rem;
}

.quote-submit-bar .btn-primary {
  margin-left: auto;
}

[data-agency-panel="preventivo"].is-success-mode #quote-form {
  display: none;
}

.public-quote-page.is-success-mode #quote-form {
  display: none;
}

.public-quote-lead {
  margin: 0 0 0.5rem;
  color: #5a6d7a;
  line-height: 1.55;
}

.public-quote-note {
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
  color: #6b7c88;
}

.sender-type-options {
  margin-bottom: 14px;
}

.quote-form-card .sender-type-options .briefing-option {
  flex: 1 1 140px;
}

.agency-form__field--agency-name.is-dimmed {
  opacity: 0.45;
}

.agency-form__field--agency-name.is-dimmed input:disabled {
  cursor: not-allowed;
  background: #f0f3f6;
  color: #8a9aa6;
}

.public-quote-note a {
  color: var(--heading-blue);
  font-weight: 600;
}

@media (max-width: 720px) {
  .quote-form-cards {
    grid-template-columns: 1fr;
  }

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

/* Storico preventivi — riepilogo sola lettura */
.agency-preventivo-list {
  display: grid;
  gap: 16px;
}

.agency-preventivo-list.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.preventivo-item {
  border: 1px solid #e2e8ed;
  border-radius: 12px;
  padding: 18px;
  background: #fafbfc;
}

.preventivo-item__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.preventivo-item__meta {
  font-size: 0.88rem;
  color: #666;
}

.preventivo-item__meta strong {
  color: #0b5cab;
  font-size: 1rem;
}

.preventivo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.preventivo-grid div {
  font-size: 0.9rem;
}

.preventivo-grid dt {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
}

.preventivo-grid dd {
  margin: 2px 0 0;
  color: #1a1a1a;
  word-break: break-word;
}

.preventivo-grid .span-3 {
  grid-column: 1 / -1;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.status-dot--da_lavorare,
.status-dot--in_attesa {
  background: #f5b041;
}

.status-dot--approvato {
  background: #22a06b;
}

.status-dot--respinto {
  background: #d92d20;
}

.status-da_lavorare {
  background: #fff4d6;
  color: #8a6100;
}

.status-pending,
.status-in_attesa {
  background: #fff4d6;
  color: #8a6100;
}

.status-approved,
.status-approvato {
  background: #dff5e8;
  color: #1a7f4b;
}

.status-rejected,
.status-respinto {
  background: #fde8e6;
  color: #b42318;
}

.preventivo-attachment--readonly {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8ed;
}

.preventivo-attachment--readonly h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #0b5cab;
}

.preventivo-attachment__file {
  margin: 0;
  font-size: 0.9rem;
  color: #1a1a1a;
}

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

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