/* Mixed buttons and text links must share the same visual baseline. */
.heading-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .page-heading {
    flex-wrap: wrap;
  }

  .heading-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Compact, task-led home dashboard. */
.home-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr);
  gap: 18px;
  margin-bottom: 22px;
}

.home-overview.single {
  grid-template-columns: minmax(0, 1fr);
}

.home-primary,
.home-attention,
.home-shortcuts {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.home-primary {
  position: relative;
  min-height: 228px;
  padding: 28px 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, #06285f 66%, #0d3f8b 100%);
  border-color: #0c326e;
}

.home-primary::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  bottom: -120px;
  border: 34px solid #2273ff;
  transform: rotate(18deg);
  opacity: .5;
}

.home-primary > * {
  position: relative;
  z-index: 1;
}

.home-kicker {
  display: block;
  color: #7f8b99;
  font-size: 9px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-primary .home-kicker {
  color: #9dbbe6;
}

.home-primary h2 {
  margin-top: 11px;
  color: #fff;
  font-size: clamp(25px, 2.4vw, 35px);
  line-height: 1.08;
  letter-spacing: -1.2px;
}

.home-primary p {
  max-width: 660px;
  margin-top: 10px;
  color: #b9cae3;
  font-size: 12px;
}

.home-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 9px;
  background: var(--blue);
  font-size: 11px;
  font-weight: 750;
}

.home-attention {
  padding: 25px;
}

.home-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.home-section-heading h2 {
  margin-top: 6px;
  color: var(--navy);
  font-size: 18px;
}

.attention-total {
  border-radius: 7px;
  padding: 5px 8px;
  background: #eef3fb;
  color: #6b7e99;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.home-queue-list {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.home-queue-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 11px;
  text-align: left;
  border-color: #e5eaf0;
  background: #f8fafc;
}

.home-queue-item .queue-count {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff0d4;
  color: #9b6505;
  font-size: 12px;
  font-weight: 800;
}

.home-queue-item strong,
.queue-clear strong {
  display: block;
  color: var(--navy);
  font-size: 11px;
}

.home-queue-item small,
.queue-clear small {
  display: block;
  margin-top: 2px;
  color: #7e8998;
  font-size: 9px;
}

.queue-clear {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin-top: 4px;
  padding: 13px 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #31a969;
  box-shadow: 0 0 0 4px #e7f7ee;
}

.home-shortcuts {
  padding: 24px 25px 25px;
}

.home-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 19px;
}

.home-shortcut {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 14px;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  background: #fafbfc;
  transition: border-color .15s, transform .15s, background .15s;
}

.home-shortcut:hover {
  border-color: #bcd2f7;
  background: #f4f8ff;
  transform: translateY(-1px);
}

.shortcut-index {
  color: #9aa6b6;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.home-shortcut strong {
  display: block;
  color: var(--navy);
  font-size: 11px;
}

.home-shortcut small {
  display: block;
  margin-top: 3px;
  color: #7e8998;
  font-size: 9px;
  line-height: 1.4;
}

.home-shortcut > span:last-child {
  color: var(--blue);
}

/* One compact line per group of estimate parameters. */
.compare-parameters .card-header {
  align-items: baseline;
}

.card-hint {
  max-width: 620px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.compare-parameters .primary-parameters {
  grid-template-columns: minmax(125px, 1fr) minmax(145px, 1.15fr) minmax(95px, .72fr) minmax(105px, .78fr) minmax(150px, 1.2fr) minmax(125px, .9fr);
  gap: 13px;
}

.advanced-parameters {
  margin-top: 15px;
  border-top: 1px solid #e9edf2;
  padding-top: 13px;
}

.advanced-parameters summary {
  width: fit-content;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

.advanced-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-top: 14px;
}

.compare-parameters .advanced-grid {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 13px;
}

.advanced-content .checks {
  display: flex;
  min-height: 42px;
  gap: 13px;
  align-items: center;
  white-space: nowrap;
}

.compare-parameters .form-bottom {
  justify-content: flex-end;
  margin-top: 16px;
}

.compare-parameters .form-actions {
  margin-left: auto;
}

/* Stable offer columns and an inline freight editor. */
.offers-wrap {
  overflow-x: auto;
}

.offers-table {
  min-width: 900px;
  table-layout: fixed;
}

.offers-table th:first-child { width: 20%; }
.offers-table th:nth-last-child(1) { width: 106px; }
.offers-table th:nth-last-child(2) { width: 19%; }
.offers-table th:nth-last-child(3) { width: 170px; }

.offers-table th,
.offers-table td {
  vertical-align: middle;
}

.offers-table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.freight-cell {
  text-align: right;
}

.freight-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

.freight-control .freight-input {
  width: 100%;
  min-height: 34px;
  margin: 0;
}

.freight-control .apply-freight {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  color: var(--blue);
}

.freight-cell > small {
  min-height: 14px;
  text-align: right;
}

.offer-action {
  text-align: right;
}

.offer-action button {
  width: 100%;
}

.add-another-line {
  width: 100%;
  margin: 13px 0 4px;
  border-style: dashed;
  border-color: #b8c8df;
  color: var(--blue);
  background: #f7faff;
}

.cart-line-type {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

@media (max-width: 1500px) {
  .compare-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-panel {
    position: static;
    max-width: none;
  }

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

  .quote-body .summary-row,
  .quote-body .inline-note,
  .quote-body form,
  .quote-body > button,
  .quote-body > p:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1320px) {
  .compare-parameters .primary-parameters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .advanced-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  .home-overview {
    grid-template-columns: 1fr;
  }

  .home-shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .home-primary {
    min-height: 220px;
    padding: 24px;
  }

  .home-attention,
  .home-shortcuts {
    padding: 20px;
  }

  .home-shortcut-grid,
  .quote-body {
    grid-template-columns: 1fr;
  }

  .compare-parameters .card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-hint {
    text-align: left;
  }

  .compare-parameters .primary-parameters,
  .compare-parameters .advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advanced-content .checks {
    align-items: flex-start;
    flex-direction: column;
  }

  .compare-parameters .form-actions {
    width: 100%;
  }

  .compare-parameters .form-actions button {
    flex: 1;
  }
}
