* {
  box-sizing: border-box;
}

/* Compact create quote form */
.site-main.create-quote-page {
  max-width: 960px;
  margin-top: 24px;
}

.container.compact-quote-container {
  padding: 22px;
}

.compact-quote-container .page-title {
  margin-top: 0;
  font-size: 28px;
}

.compact-quote-container .page-subtitle {
  margin-bottom: 20px;
}

.compact-quote-form .card {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 11px;
}

.compact-quote-form .card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.compact-quote-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.compact-quote-form input,
.compact-quote-form textarea,
.compact-quote-form select,
.compact-quote-form button {
  margin: 0;
  padding: 9px 10px;
  min-height: 40px;
  font-size: 14px;
  border-radius: 7px;
}

.compact-quote-form textarea {
  min-height: 70px;
  resize: vertical;
}

.compact-quote-form .full-width-field {
  grid-column: 1 / -1;
}

.compact-quote-form .quote-row {
  grid-template-columns: minmax(220px, 1fr) 72px 110px 120px auto;
  gap: 8px;
  margin-bottom: 8px;
}

.compact-quote-form .quote-row-header {
  margin: 4px 0 6px;
  padding: 0 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-quote-form .quote-row-header span {
  min-width: 0;
}

.compact-quote-form .quote-row button,
.compact-quote-form .card > button {
  width: auto;
  white-space: nowrap;
}

.compact-quote-form .total-box {
  max-width: 420px;
  margin: 14px 0 0 auto;
  padding: 14px 16px;
  border-radius: 10px;
}

.compact-quote-form .total-line {
  margin-bottom: 6px;
}

.compact-quote-form .grand-total {
  font-size: 20px;
  padding-top: 10px;
}

.compact-quote-form .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.compact-quote-form .form-actions button {
  width: auto;
  min-width: 140px;
  padding-inline: 20px;
}

.quote-stage-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0 12px;
  padding: 12px;
  border: 1px solid #d8eef8;
  border-radius: 10px;
  background: #f8fcfe;
}

.quote-stage-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
}

.quote-stage-heading span {
  color: #0f3d56;
  font-weight: 800;
}

.quote-stage-heading small {
  text-align: right;
}

.quote-stage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quote-stage-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #b8d9e7;
  border-radius: 999px;
  background: #fff;
  color: #0f3d56;
  font-size: 12px;
  font-weight: 800;
}

.quote-stage-add {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
}

.quote-stage-groups {
  display: grid;
  gap: 13px;
}

.quote-stage-group {
  border: 1px solid #d8eef8;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.quote-stage-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fcfe;
  border-bottom: 1px solid #d8eef8;
}

.quote-stage-group-heading h3 {
  margin: 0;
  color: #0f3d56;
  font-size: 14px;
}

.quote-stage-group-total {
  color: #0f3d56;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.quote-stage-items {
  padding: 10px 10px 2px;
}

.quote-stage-add-item {
  margin: 0 10px 10px;
}

.quote-stage-heading-row th {
  padding: 9px 12px;
  background: #eef9fd;
  color: #0f3d56;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.payment-terms-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.payment-term-option {
  position: relative;
  display: block;
  min-height: 78px;
  padding: 14px 42px 14px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.payment-term-option:hover {
  border-color: #76b9d6;
  background: #f8fcfe;
  box-shadow: 0 10px 20px rgba(15, 61, 86, 0.08);
  transform: translateY(-1px);
}

.payment-term-option.is-selected {
  border-color: #0f3d56;
  background: #eef9fd;
  box-shadow: 0 0 0 3px rgba(47, 128, 167, 0.14);
}

.payment-term-option input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.payment-term-option input[type="radio"]:focus-visible + span {
  outline: 3px solid rgba(14, 165, 233, 0.35);
  outline-offset: 5px;
  border-radius: 6px;
}

.payment-term-option > span::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
}

.payment-term-option.is-selected > span::after {
  content: "✓";
  display: grid;
  place-items: center;
  border-color: #0f3d56;
  background: #0f3d56;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.payment-term-option strong {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #0f3d56;
  font-size: 14px;
  line-height: 1.4;
}

.payment-term-option input[type="number"] {
  width: 76px;
  min-height: 34px;
  padding: 6px 8px;
  text-align: right;
}

.payment-term-option input[type="number"]:disabled {
  background: #e2e8f0;
  color: #64748b;
}

.payment-terms-preview {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 4px solid #2f80a7;
  border-radius: 7px;
  background: #eef9fd;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.staged-payment-builder {
  margin-top: 12px;
  border: 1px solid #d8eef8;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.staged-payment-heading,
.staged-payment-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  background: #f8fcfe;
}

.staged-payment-heading span,
.staged-payment-total span {
  color: #0f3d56;
  font-size: 13px;
  font-weight: 900;
}

.staged-payment-heading small {
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

.staged-payment-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px 116px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  color: #334155;
  font-size: 13px;
}

.staged-payment-row > span:first-child {
  color: #0f3d56;
  font-weight: 800;
}

.staged-payment-row > span:nth-child(2) {
  color: #64748b;
  font-weight: 700;
  text-align: right;
}

.staged-payment-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #64748b;
  font-weight: 800;
}

.staged-payment-row input {
  width: 78px;
  min-height: 34px;
  padding: 6px 8px;
  text-align: right;
}

.staged-payment-total {
  border-top: 1px solid #d8eef8;
}

.staged-payment-total strong {
  font-size: 13px;
}

.staged-payment-total strong.is-balanced {
  color: #15803d;
}

.staged-payment-total strong.is-unbalanced {
  color: #b91c1c;
}

@media (max-width: 700px) {
  .site-main.create-quote-page {
    margin-top: 18px;
  }

  .container.compact-quote-container {
    padding: 16px;
  }

  .compact-quote-form .form-grid,
  .compact-quote-form .quote-row {
    grid-template-columns: 1fr;
  }

  .compact-quote-form .quote-row-header {
    display: none;
  }

  .compact-quote-form .quote-row button,
  .compact-quote-form .card > button,
  .compact-quote-form .form-actions button {
    width: 100%;
  }

  .compact-quote-form .total-box {
    max-width: none;
  }

  .payment-terms-options {
    grid-template-columns: 1fr;
  }

  .quote-stage-heading,
  .staged-payment-heading,
  .staged-payment-total {
    display: grid;
  }

  .quote-stage-heading small,
  .staged-payment-heading small {
    text-align: left;
  }

  .quote-stage-add,
  .staged-payment-row {
    grid-template-columns: 1fr;
  }

  .staged-payment-row > span:nth-child(2) {
    text-align: left;
  }

  .payment-term-option strong {
    display: block;
  }

  .payment-term-option input[type="number"] {
    width: 92px;
    margin: 2px 4px 2px 0;
  }
}

/* Quote detail page */
.site-main.quote-view-page {
  max-width: 1180px;
  margin-top: 26px;
}

.quote-view-container {
  padding: 24px;
}

.quote-view-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.quote-view-heading .page-title {
  margin: 0 0 6px;
  font-size: 28px;
}

.quote-view-heading .page-subtitle {
  margin-bottom: 0;
}

.quote-view-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 4px;
}

.quote-view-page .status-pill {
  padding: 5px 9px;
  font-size: 12px;
}

.quote-view-page .archived-pill {
  background: #e5e7eb;
  color: #374151;
}

.quote-primary-actions,
.quote-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quote-primary-actions {
  margin: 18px 0;
  padding: 11px;
  background: #f8fcfe;
  border: 1px solid #d8eef8;
  border-radius: 10px;
}

.quote-view-page .action-bar button,
.quote-view-page .action-bar .button-link {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}

.quote-view-page .danger-button {
  width: auto;
  background: transparent;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.quote-view-page .danger-button:hover {
  background: #fee2e2;
}

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

.quote-view-card {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 11px;
}

.quote-view-card h2 {
  margin: 0 0 12px;
  color: #0f3d56;
  font-size: 17px;
}

.quote-field-label {
  display: block;
  margin-bottom: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.quote-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.quote-share-row input,
.quote-share-row button,
.quote-status-controls select,
.quote-status-controls button {
  height: 38px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
}

.quote-share-row button,
.quote-status-controls button {
  width: auto;
  white-space: nowrap;
}

.quote-share-actions {
  margin-top: 8px;
}

.quote-tracking-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.quote-tracking-grid > div {
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.quote-tracking-grid span,
.quote-detail-list span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.quote-tracking-grid strong {
  display: block;
  overflow: hidden;
  color: #1f2937;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-status-card > p {
  margin: -3px 0 12px;
  color: #64748b;
  font-size: 13px;
}

.quote-status-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.quote-view-card.builder-response-card {
  border-color: #76b9d6;
  background: #f5fbfe;
}

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

.builder-response-heading h2 {
  margin-bottom: 12px;
}

.builder-response-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #2f80a7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.builder-response-date {
  color: #64748b;
  font-size: 12px;
}

.builder-response-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.4fr) minmax(0, 1fr);
  gap: 10px;
}

.builder-response-grid > div {
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #d8eef8;
  border-radius: 8px;
}

.builder-response-grid span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.builder-response-grid strong {
  display: block;
  overflow-wrap: anywhere;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.builder-response-guidance {
  margin: 10px 0 0;
  padding: 9px 11px;
  background: #fff7ed;
  border-left: 3px solid #f59e0b;
  color: #92400e;
  font-size: 12px;
  line-height: 1.45;
}

.builder-response-guidance.accepted {
  background: #f0fdf4;
  border-left-color: #22c55e;
  color: #166534;
}

.builder-response-history .table-wrapper {
  margin: 0 -16px -16px;
  border-top: 1px solid #d8eef8;
}

.builder-response-history .data-table {
  min-width: 760px;
  margin-top: 0;
  border-radius: 0;
}

.builder-response-history th,
.builder-response-history td {
  padding: 10px 12px;
  font-size: 12px;
  vertical-align: top;
}

.quote-view-card.book-works-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  background: #f0fdf4;
  border-color: #86efac;
}

.book-works-card h2 {
  margin-bottom: 5px;
}

.book-works-card p {
  margin: 0;
  color: #4b6354;
  font-size: 13px;
}

.book-works-controls {
  display: grid;
  grid-template-columns: 155px auto;
  gap: 7px;
}

.book-works-controls input,
.book-works-controls button {
  height: 38px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
}

.book-works-controls button {
  width: auto;
  white-space: nowrap;
}

.quote-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
}

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

.quote-detail-list > div {
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid #e5e7eb;
}

.quote-detail-list strong {
  display: block;
  overflow-wrap: anywhere;
  color: #1f2937;
  font-size: 13px;
}

.quote-long-text {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.quote-items-card .table-wrapper,
.quote-activity-card .table-wrapper {
  margin: 0 -16px -16px;
  border-top: 1px solid #d8eef8;
  border-radius: 0 0 11px 11px;
}

.quote-items-table,
.quote-activity-table {
  min-width: 680px;
  margin-top: 0;
  table-layout: fixed;
  border-radius: 0;
}

.quote-items-table th,
.quote-items-table td,
.quote-activity-table th,
.quote-activity-table td {
  padding: 10px 12px;
  font-size: 13px;
  vertical-align: top;
}

.quote-items-table th {
  font-size: 12px;
  white-space: nowrap;
}

.quote-items-table th:first-child { width: 55%; }
.quote-items-table th:nth-child(2) { width: 12%; }
.quote-items-table th:nth-child(3) { width: 16.5%; }
.quote-items-table th:nth-child(4) { width: 16.5%; }

.quote-items-table .number-cell,
.quote-items-table .money-cell {
  white-space: nowrap;
}

.quote-items-table .money-cell {
  font-weight: 700;
  color: #0f3d56;
}

.quote-view-total {
  width: min(100%, 390px);
  margin: 0 0 14px auto;
  padding: 15px 17px;
  border-radius: 10px;
}

.quote-view-total .total-line {
  margin-bottom: 7px;
  font-size: 13px;
}

.quote-view-total .grand-total {
  margin-bottom: 0;
  padding-top: 10px;
  font-size: 20px;
}

.quote-activity-table th:first-child { width: 20%; }
.quote-activity-table th:nth-child(2) { width: 20%; }
.quote-activity-table th:nth-child(3) { width: 60%; }

@media (max-width: 850px) {
  .quote-management-grid,
  .quote-details-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .site-main.quote-view-page {
    margin-top: 18px;
    padding: 0 12px;
  }

  .quote-view-container {
    padding: 16px;
  }

  .quote-view-heading {
    flex-direction: column;
    gap: 8px;
  }

  .quote-view-badges {
    justify-content: flex-start;
  }

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

  .quote-view-page .quote-primary-actions button,
  .quote-view-page .quote-primary-actions .button-link {
    width: 100%;
  }

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

  .quote-share-row,
  .quote-status-controls {
    grid-template-columns: 1fr;
  }

  .quote-share-row button,
  .quote-status-controls button {
    width: 100%;
  }

  .builder-response-grid {
    grid-template-columns: 1fr;
  }

  .quote-view-card.book-works-card,
  .book-works-controls {
    grid-template-columns: 1fr;
  }

  .book-works-controls button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .quote-primary-actions,
  .quote-tracking-grid {
    grid-template-columns: 1fr;
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eef7fb;
  color: #1f2937;
}

.site-header {
  background: #d8eef8;
  border-bottom: 1px solid #b9dceb;
  padding: 18px 32px;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 22px;
  font-weight: bold;
  color: #0f3d56;
  text-decoration: none;
}

.nav-links a {
  margin-left: 18px;
  color: #0f3d56;
  text-decoration: none;
  font-weight: bold;
}

.site-main {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 20px;
}

.site-footer {
  margin-top: 50px;
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.container {
  background: #ffffff;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 61, 86, 0.08);
}

.page-title {
  color: #0f3d56;
  margin-bottom: 8px;
}

.page-subtitle {
  color: #64748b;
  margin-top: 0;
  margin-bottom: 28px;
}

.auth-status-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 220px);
}

.auth-status-card {
  background: #ffffff;
  border: 1px solid #d7e2e8;
  border-radius: 16px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  max-width: 520px;
  padding: 36px;
  text-align: center;
  width: 100%;
}

.auth-status-mark {
  align-items: center;
  background: #25313a;
  border-radius: 14px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  letter-spacing: 0;
  margin-bottom: 20px;
  width: 58px;
}

.auth-status-eyebrow {
  color: #537082;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.auth-status-card h1 {
  color: #17242d;
  font-size: 32px;
  line-height: 1.15;
  margin: 0 0 12px;
}

.auth-status-copy {
  color: #5b6b76;
  line-height: 1.6;
  margin: 0 auto 24px;
  max-width: 420px;
}

.auth-status-message {
  align-items: center;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: center;
  line-height: 1.5;
  margin: 0 auto;
  padding: 14px 16px;
}

.auth-status-message.is-loading {
  background: #eef7fb;
  border: 1px solid #bfdae6;
  color: #244657;
}

.auth-status-message.is-success {
  background: #e7f7ed;
  border: 1px solid #8bd0a3;
  color: #14532d;
}

.auth-status-message.is-error {
  background: #fff1f2;
  border: 1px solid #f0a4ae;
  color: #9f1239;
}

.auth-status-message:not(.is-loading) .auth-status-spinner {
  display: none;
}

.auth-status-spinner {
  animation: authStatusSpin 0.8s linear infinite;
  border: 2px solid rgba(36, 70, 87, 0.24);
  border-radius: 999px;
  border-top-color: #244657;
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.auth-status-form {
  display: grid;
  gap: 16px;
  margin: 26px 0 0;
  text-align: left;
}

.auth-status-form label {
  color: #31444f;
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}

.auth-status-form input {
  background: #f8fbfc;
  border: 1px solid #cbdce4;
  border-radius: 10px;
  color: #17242d;
  font-size: 15px;
  padding: 12px 13px;
}

.auth-status-form input:focus {
  border-color: #4f8ca8;
  box-shadow: 0 0 0 3px rgba(79, 140, 168, 0.16);
  outline: none;
}

.auth-status-form button {
  margin-top: 4px;
  width: 100%;
}

.auth-status-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 24px;
}

.auth-status-footnote {
  border-top: 1px solid #e1ebef;
  color: #5b6b76;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 22px;
  padding-top: 18px;
  text-align: center;
}

.auth-status-footnote p {
  margin: 0 0 8px;
}

.auth-status-footnote p:last-child {
  margin-bottom: 0;
}

.auth-status-footnote a {
  color: #375a6e;
  font-weight: 800;
  text-decoration: none;
}

.auth-status-footnote a:hover {
  color: #17242d;
  text-decoration: underline;
}

.secondary-link {
  color: #375a6e;
  font-weight: 700;
  text-decoration: none;
}

.secondary-link:hover {
  color: #17242d;
  text-decoration: underline;
}

@keyframes authStatusSpin {
  to {
    transform: rotate(360deg);
  }
}

.card {
  background: #f8fcfe;
  border: 1px solid #d8eef8;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

input,
textarea,
select,
button {
  width: 100%;
  padding: 12px;
  margin: 8px 0 16px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  font-size: 16px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #76b9d6;
  box-shadow: 0 0 0 3px rgba(118, 185, 214, 0.2);
}

button,
.button-link {
  background: #2f80a7;
  color: white;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  border-radius: 9px;
  padding: 12px 16px;
  font-weight: bold;
}

button:hover,
.button-link:hover {
  background: #256b8d;
}

.secondary-button {
  background: #e0f2fe;
  color: #0f3d56;
}

.secondary-button:hover {
  background: #bae6fd;
}

.logout-button {
  width: auto;
  background: #0f3d56;
  padding: 10px 16px;
  margin: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 24px 0;
}

.summary-box {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 20px;
  border-radius: 14px;
}

.summary-label {
  color: #64748b;
  font-size: 14px;
}

.summary-value {
  color: #0f3d56;
  font-size: 26px;
  font-weight: bold;
  margin-top: 6px;
}

.quote-visibility-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: #f0f9ff;
  color: #0f3d56;
  cursor: pointer;
}

.quote-visibility-option input {
  width: auto;
  margin: 3px 0 0;
}

.quote-visibility-option strong,
.quote-visibility-option small {
  display: block;
}

.quote-visibility-option strong {
  font-size: 14px;
}

.quote-visibility-option small {
  margin-top: 3px;
  color: #526273;
  font-size: 12px;
  line-height: 1.4;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.data-table th {
  background: #d8eef8;
  color: #0f3d56;
  text-align: left;
  padding: 14px;
  font-size: 14px;
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
  background: #f8fcfe;
}

.status-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0f3d56;
  font-size: 13px;
  font-weight: bold;
}

.quote-row {
  display: grid;
  grid-template-columns: 1fr 90px 120px 130px 100px;
  gap: 10px;
  align-items: center;
}

.total-box {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 20px;
  border-radius: 14px;
  margin-top: 20px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.grand-total {
  font-size: 24px;
  font-weight: bold;
  color: #0f3d56;
  border-top: 1px solid #bae6fd;
  padding-top: 14px;
}

.error {
  color: #b91c1c;
}

.success {
  color: #15803d;
}

@media (max-width: 700px) {
  .header-inner {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }

  .nav-links a {
    margin-left: 0;
    margin-right: 14px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

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

  .container {
    padding: 20px;
  }

  .auth-status-card {
    padding: 28px 20px;
  }

  .auth-status-card h1 {
    font-size: 26px;
  }

  .auth-status-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
  }
  
  .action-bar button,
  .action-bar .button-link {
    width: auto;
  }
  
  .action-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .small-action-button {
    width: auto;
    padding: 9px 12px;
    font-size: 14px;
  }
  
  .danger-button {
    width: auto;
    background: #dc2626;
    padding: 9px 12px;
    font-size: 14px;
  }
  
  .danger-button:hover {
    background: #b91c1c;
  }
  
  @media (max-width: 700px) {
    .action-bar {
      flex-direction: column;
    }
  
    .action-bar button,
    .action-bar .button-link,
    .danger-button,
    .small-action-button {
      width: 100%;
    }
  
    .action-cell {
      flex-direction: column;
    }
  }
  .archived-pill {
    background: #e5e7eb;
    color: #374151;
  }
  
  .nav-links button {
    margin-left: 18px;
  }
  
  @media (max-width: 700px) {
    .nav-links button {
      margin-left: 0;
      margin-top: 10px;
    }
  }
  .warning-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 16px;
    border-radius: 12px;
    margin: 20px 0;
  }
  
  .success-box {
    background: #dcfce7;
    border: 1px solid #22c55e;
    color: #166534;
    padding: 16px;
    border-radius: 12px;
    margin: 20px 0;
  }
  
  .customer-response-box {
    background: #e0f2fe;
    border: 1px solid #76b9d6;
    padding: 24px;
    border-radius: 14px;
    margin-top: 24px;
  }
}

/* Dashboard */
.site-main.dashboard-page {
  max-width: 1280px;
  margin-top: 26px;
}

.dashboard-container {
  padding: 24px;
}

.dashboard-container .page-title {
  margin-top: 0;
  font-size: 28px;
}

.dashboard-container .page-subtitle {
  margin-bottom: 0;
}

.dashboard-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
}

.dashboard-title-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-create-quote-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f3d56;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(15, 61, 86, 0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dashboard-secondary-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #b8d9e7;
  border-radius: 999px;
  background: #fff;
  color: #0f3d56;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 61, 86, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.dashboard-create-quote-button:hover {
  background: #0b2f43;
  box-shadow: 0 12px 24px rgba(15, 61, 86, 0.18);
  transform: translateY(-1px);
}

.dashboard-secondary-action-button:hover {
  background: #f1f9fc;
  border-color: #76b9d6;
  box-shadow: 0 10px 22px rgba(15, 61, 86, 0.12);
  transform: translateY(-1px);
}

.dashboard-create-quote-button:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.35);
  outline-offset: 3px;
}

.dashboard-secondary-action-button:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.35);
  outline-offset: 3px;
}

.dashboard-container .summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.dashboard-container .archived-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-container .summary-box {
  padding: 14px 16px;
  border-radius: 10px;
}

.dashboard-container .summary-value {
  font-size: 22px;
  margin-top: 4px;
}

.dashboard-focus-card {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 11px;
  margin-bottom: 16px;
}

.dashboard-focus-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  background: #f8fcfe;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.dashboard-focus-heading::-webkit-details-marker {
  display: none;
}

.dashboard-focus-card[open] > .dashboard-focus-heading {
  border-bottom: 1px solid #d8eef8;
}

.dashboard-focus-heading:hover {
  background: #f1f9fc;
}

.dashboard-focus-heading:focus-visible {
  outline: 3px solid rgba(118, 185, 214, 0.35);
  outline-offset: -3px;
}

.dashboard-focus-heading h2 {
  margin: 2px 0 0;
  color: #0f3d56;
  font-size: 17px;
}

.dashboard-focus-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-focus-toggle {
  width: 10px;
  height: 10px;
  margin-right: 3px;
  border-right: 2px solid #0f3d56;
  border-bottom: 2px solid #0f3d56;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.dashboard-focus-card[open] > .dashboard-focus-heading .dashboard-focus-toggle {
  transform: rotate(225deg) translate(-2px, -2px);
}

.dashboard-focus-content {
  background: #fff;
}

.dashboard-action-eyebrow {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-action-count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  background: #0f3d56;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.dashboard-action-table-wrapper {
  overflow-x: auto;
}

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

.dashboard-action-table th {
  padding: 13px 16px;
  background: #f8fcfe;
  border-bottom: 1px solid #d8eef8;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.dashboard-action-table th:nth-child(1) { width: 23%; }
.dashboard-action-table th:nth-child(2) { width: 20%; }
.dashboard-action-table th:nth-child(3) { width: 32%; }
.dashboard-action-table th:nth-child(4) { width: 15%; }
.dashboard-action-table th:nth-child(5) { width: 10%; }

.dashboard-action-table td {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
  vertical-align: top;
}

.dashboard-action-table tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-action-table tbody tr:hover {
  background: #f8fcfe;
}

.dashboard-action-table tbody tr[data-href] {
  cursor: pointer;
}

.dashboard-action-table tbody tr[data-href]:focus-visible {
  outline: 3px solid rgba(118, 185, 214, 0.35);
  outline-offset: -3px;
}

.dashboard-action-main {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.dashboard-action-marker {
  width: 8px;
  height: 42px;
  border-radius: 999px;
  background: #2f80a7;
}

.dashboard-action-table tr.action-question .dashboard-action-marker {
  background: #d97706;
}

.dashboard-action-table tr.action-accepted .dashboard-action-marker {
  background: #16a34a;
}

.dashboard-action-table tr.action-expired .dashboard-action-marker {
  background: #dc2626;
}

.dashboard-action-main strong,
.dashboard-action-customer strong {
  color: #0f3d56;
  font-size: 15px;
  line-height: 1.3;
}

.dashboard-action-customer span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-action-detail {
  color: #64748b;
  overflow-wrap: anywhere;
}

.dashboard-action-date {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0f3d56;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-action-date.is-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.dashboard-action-empty {
  margin: 0;
  padding: 16px;
  color: #64748b;
  font-size: 13px;
}

.dashboard-action-open {
  text-align: right;
}

.dashboard-action-open a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #0f3d56;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-action-open a:hover {
  background: #0b2f43;
}

.dashboard-filter-panel {
  padding: 16px;
  background: #f8fcfe;
  border-bottom: 1px solid #d8eef8;
}

.dashboard-filter-panel h3 {
  margin: 0 0 12px;
  color: #0f3d56;
  font-size: 14px;
}

.dashboard-filter-card,
.dashboard-list-card {
  padding: 16px;
  border-radius: 11px;
  margin-bottom: 16px;
}

.dashboard-filter-card h2,
.dashboard-list-card h2 {
  margin: 0 0 12px;
  color: #0f3d56;
  font-size: 17px;
}

.dashboard-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 440px) 170px auto;
  gap: 12px;
  align-items: end;
  max-width: 760px;
}

.archived-filter-bar {
  grid-template-columns: minmax(260px, 440px) auto;
  max-width: 580px;
}

.customer-filter-bar {
  grid-template-columns: minmax(260px, 440px) auto;
  max-width: 580px;
}

.dashboard-filter-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-filter-field input,
.dashboard-filter-field select {
  height: 38px;
  min-width: 0;
  margin: 0;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 14px;
  background: #fff;
}

.dashboard-filter-button {
  width: auto;
  height: 38px;
  margin: 0;
  padding: 7px 15px;
  border-radius: 7px;
  font-size: 13px;
  white-space: nowrap;
}

.dashboard-list-card .table-wrapper {
  margin: 0 -16px -16px;
  border-top: 1px solid #d8eef8;
  border-radius: 0 0 11px 11px;
}

.dashboard-focus-card #quotes > p {
  margin: 0;
  padding: 16px;
  color: #64748b;
  font-size: 13px;
}

.dashboard-focus-card #approvedJobs > p {
  margin: 0;
  padding: 16px;
  color: #64748b;
  font-size: 13px;
}

.dashboard-focus-card #customers > p {
  margin: 0;
  padding: 16px;
  color: #64748b;
  font-size: 13px;
}

.dashboard-focus-card #quotes .table-wrapper {
  margin: 0;
  border-radius: 0 0 11px 11px;
}

.dashboard-focus-card #approvedJobs .table-wrapper {
  margin: 0;
  border-radius: 0 0 11px 11px;
}

.dashboard-focus-card #customers .table-wrapper {
  margin: 0;
  border-radius: 0 0 11px 11px;
}

.dashboard-quote-table {
  min-width: 960px;
  margin-top: 0;
  table-layout: fixed;
  border-radius: 0;
}

.dashboard-quote-table th,
.dashboard-quote-table td {
  padding: 11px 10px;
  font-size: 13px;
  vertical-align: middle;
}

.dashboard-quote-table th {
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.dashboard-quote-table th:nth-child(1) { width: 10%; }
.dashboard-quote-table th:nth-child(2) { width: 17%; }
.dashboard-quote-table th:nth-child(3) { width: 10%; }
.dashboard-quote-table th:nth-child(4) { width: 12%; }
.dashboard-quote-table th:nth-child(5) { width: 11%; }
.dashboard-quote-table th:nth-child(6) { width: 12%; }
.dashboard-quote-table th:nth-child(7) { width: 28%; }

.archived-quote-table th:nth-child(1) { width: 12%; }
.archived-quote-table th:nth-child(2) { width: 19%; }
.archived-quote-table th:nth-child(3) { width: 11%; }
.archived-quote-table th:nth-child(4) { width: 13%; }
.archived-quote-table th:nth-child(5) { width: 15%; }
.archived-quote-table th:nth-child(6) { width: 30%; }

.dashboard-quote-table .quote-number-cell,
.dashboard-quote-table .money-cell,
.dashboard-quote-table .date-cell {
  white-space: nowrap;
}

.dashboard-quote-table .quote-number-link {
  color: #0f5f87;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(15, 95, 135, 0.35);
  text-underline-offset: 3px;
}

.dashboard-quote-table .quote-number-link:hover {
  color: #0f3d56;
  text-decoration-color: currentColor;
}

.dashboard-quote-table .quote-number-link:focus-visible {
  outline: 2px solid #2f80a7;
  outline-offset: 3px;
  border-radius: 2px;
}

.dashboard-quote-table .money-cell {
  font-weight: 700;
  color: #0f3d56;
}

.dashboard-quote-table .customer-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.dashboard-quote-table .response-cell {
  line-height: 1.25;
}

.dashboard-quote-table .response-label,
.dashboard-quote-table .response-date {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-quote-table .response-label {
  font-weight: 700;
}

.dashboard-quote-table .response-date {
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
}

.dashboard-quote-table tbody tr {
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-quote-table tbody tr.quote-row-accepted {
  background: #f0fdf4;
  box-shadow: inset 4px 0 #22c55e;
}

.dashboard-quote-table tbody tr.quote-row-declined {
  background: #fff1f2;
  box-shadow: inset 4px 0 #ef4444;
}

.dashboard-quote-table tbody tr.quote-row-clarification {
  background: #fffbeb;
  box-shadow: inset 4px 0 #f59e0b;
}

.dashboard-quote-table tbody tr.quote-row-awaiting {
  background: #eff6ff;
  box-shadow: inset 4px 0 #3b82f6;
}

.dashboard-quote-table tbody tr.quote-row-pending {
  background: #f8fafc;
  box-shadow: inset 4px 0 #94a3b8;
}

.dashboard-quote-table tbody tr.quote-row-expired {
  background: #fff1f2;
  box-shadow: inset 4px 0 #dc2626;
}

.dashboard-quote-table .expiry-label {
  display: block;
  margin-top: 3px;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 800;
}

.dashboard-quote-table tbody tr:hover {
  filter: brightness(0.985);
}

.dashboard-quote-table .status-pill {
  padding: 4px 8px;
  font-size: 11px;
}

.dashboard-quote-table .action-cell {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.dashboard-quote-table .action-cell button,
.dashboard-quote-table .action-cell .button-link {
  width: auto;
  min-height: 30px;
  margin: 0;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
}

.dashboard-quote-table .small-action-button {
  background: #2f80a7;
}

.dashboard-quote-table .danger-button {
  background: transparent;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.dashboard-quote-table .danger-button:hover {
  background: #fee2e2;
}

.dashboard-approved-table {
  width: 100%;
  min-width: 860px;
  margin-top: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.dashboard-approved-table th,
.dashboard-approved-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  vertical-align: middle;
}

.dashboard-approved-table th {
  background: #f8fcfe;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-approved-table th:nth-child(1) { width: 18%; }
.dashboard-approved-table th:nth-child(2) { width: 24%; }
.dashboard-approved-table th:nth-child(3) { width: 12%; }
.dashboard-approved-table th:nth-child(4) { width: 15%; }
.dashboard-approved-table th:nth-child(5) { width: 13%; }
.dashboard-approved-table th:nth-child(6) { width: 18%; }

.dashboard-approved-table tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-approved-table tbody tr[data-href] {
  cursor: pointer;
}

.dashboard-approved-table tbody tr:hover {
  background: #f8fcfe;
}

.dashboard-approved-table tbody tr[data-href]:focus-visible {
  outline: 3px solid rgba(118, 185, 214, 0.35);
  outline-offset: -3px;
}

.dashboard-approved-table .dashboard-approved-customer {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-approved-table .money-cell,
.dashboard-approved-table .date-cell {
  color: #0f3d56;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-customer-table {
  min-width: 900px;
  margin-top: 0;
  table-layout: fixed;
  border-radius: 0;
}

.dashboard-customer-table th,
.dashboard-customer-table td {
  padding: 11px 12px;
  font-size: 12px;
  vertical-align: middle;
}

.dashboard-customer-table th {
  white-space: nowrap;
  font-size: 11px;
}

.dashboard-customer-table th:nth-child(1) { width: 18%; }
.dashboard-customer-table th:nth-child(2) { width: 23%; }
.dashboard-customer-table th:nth-child(3) { width: 22%; }
.dashboard-customer-table th:nth-child(4) { width: 8%; }
.dashboard-customer-table th:nth-child(5) { width: 14%; }
.dashboard-customer-table th:nth-child(6) { width: 15%; }

.dashboard-customer-table .customer-name-cell strong {
  color: #0f3d56;
  font-size: 13px;
}

.dashboard-customer-table .customer-contact-cell {
  display: grid;
  gap: 3px;
}

.dashboard-customer-table .customer-contact-cell a {
  overflow: hidden;
  color: #0f5f87;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-customer-table .customer-contact-cell a:hover {
  text-decoration: underline;
}

.dashboard-customer-table .customer-contact-cell span {
  color: #94a3b8;
}

.dashboard-customer-table .customer-address-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-customer-table .customer-quote-count {
  color: #0f3d56;
  font-weight: 800;
  text-align: center;
}

.dashboard-customer-table .money-cell {
  color: #0f3d56;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-customer-table .date-cell {
  white-space: nowrap;
}

.dashboard-customer-table .customer-latest-quote {
  color: #0f5f87;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(15, 95, 135, 0.35);
  text-underline-offset: 3px;
}

.dashboard-customer-modal {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
}

.dashboard-customer-modal-body {
  display: grid;
  min-height: 0;
}

.dashboard-customer-modal .dashboard-filter-panel {
  margin: 0;
  border-bottom-color: #e5e7eb;
}

.dashboard-customer-modal-count {
  padding: 11px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-customer-modal-count span {
  color: #0f3d56;
}

.dashboard-customer-modal #customers {
  overflow: auto;
}

.dashboard-customer-modal #customers > p {
  margin: 0;
  padding: 16px;
  color: #64748b;
  font-size: 13px;
}

.dashboard-customer-modal #customers .table-wrapper {
  margin: 0;
  border-radius: 0 0 11px 11px;
}

.quote-view-card.expired-quote-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  background: #fff1f2;
  border-color: #fecaca;
}

.quote-view-card.expiry-reminder-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  background: #fffbeb;
  border-color: #fcd34d;
}

.expiry-reminder-card h2 {
  margin-bottom: 5px;
  color: #92400e;
}

.expiry-reminder-card p {
  margin: 0;
  color: #78350f;
  font-size: 13px;
}

.expiry-reminder-card > button {
  width: auto;
  height: 38px;
  margin: 0;
  padding: 7px 12px;
  white-space: nowrap;
}

.expired-quote-card h2 {
  margin-bottom: 5px;
  color: #991b1b;
}

.expired-quote-card p {
  margin: 0;
  color: #7f1d1d;
  font-size: 13px;
}

.expired-quote-controls {
  display: grid;
  grid-template-columns: 160px auto auto;
  gap: 7px;
}

.expired-quote-controls input,
.expired-quote-controls button {
  height: 38px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
}

.expired-quote-controls button {
  width: auto;
  white-space: nowrap;
}

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

  .dashboard-filter-bar {
    grid-template-columns: minmax(220px, 1fr) 160px auto;
    max-width: none;
  }

  .archived-filter-bar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .customer-filter-bar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }
}

@media (max-width: 700px) {
  .site-main.dashboard-page {
    margin-top: 18px;
    padding: 0 12px;
  }

  .dashboard-container {
    padding: 16px;
  }

  .dashboard-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-title-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-create-quote-button,
  .dashboard-secondary-action-button {
    width: 100%;
  }

  .dashboard-container .summary-grid {
    gap: 8px;
  }

  .dashboard-container .summary-box {
    padding: 12px;
  }

  .dashboard-container .summary-value {
    font-size: 19px;
  }

  .dashboard-filter-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-filter-button {
    width: 100%;
  }

  .dashboard-action-table {
    min-width: 0;
  }

  .dashboard-approved-table {
    min-width: 760px;
  }

  .dashboard-action-table thead {
    display: none;
  }

  .dashboard-action-table,
  .dashboard-action-table tbody,
  .dashboard-action-table tr,
  .dashboard-action-table td {
    display: block;
    width: 100%;
  }

  .dashboard-action-table tr {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
  }

  .dashboard-action-table tbody tr:last-child {
    border-bottom: 0;
  }

  .dashboard-action-table td {
    padding: 6px 0;
    border-bottom: 0;
  }

  .dashboard-action-main {
    margin-bottom: 4px;
  }

  .dashboard-action-open {
    text-align: left;
  }

  .dashboard-focus-heading {
    padding: 13px 14px;
  }

  .dashboard-filter-panel {
    padding: 14px;
  }

  .dashboard-quote-table .action-cell {
    flex-direction: row;
  }

  .dashboard-quote-table .action-cell button,
  .dashboard-quote-table .action-cell .button-link {
    width: auto;
  }

  .quote-view-card.expired-quote-card,
  .quote-view-card.expiry-reminder-card,
  .expired-quote-controls {
    grid-template-columns: 1fr;
  }

  .expired-quote-controls button,
  .expiry-reminder-card > button {
    width: 100%;
  }
}

/* Ensure quote-page sizing takes precedence over legacy global component rules. */
.quote-view-container {
  padding: 24px;
}

.quote-view-card {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 11px;
}

.quote-items-table,
.quote-activity-table {
  margin-top: 0;
  border-radius: 0;
}

.quote-items-table th,
.quote-items-table td,
.quote-activity-table th,
.quote-activity-table td {
  padding: 10px 12px;
  font-size: 13px;
}

.quote-view-total {
  width: min(100%, 390px);
  margin: 0 0 14px auto;
  padding: 15px 17px;
  border-radius: 10px;
}

@media (max-width: 700px) {
  .quote-view-container {
    padding: 16px;
  }

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

  .quote-share-actions {
    display: flex;
    flex-direction: row;
    gap: 7px;
    margin: 8px 0 0;
  }

  .quote-view-page .quote-primary-actions button,
  .quote-view-page .quote-primary-actions .button-link {
    width: 100%;
  }

  .quote-view-page .quote-share-actions button {
    width: auto;
  }
}

@media (max-width: 430px) {
  .quote-primary-actions {
    grid-template-columns: 1fr;
  }
}

.printable-quote {
  display: none;
}

@media print {
  @page {
    size: A4;
    margin: 12mm 13mm 14mm;
  }

  html,
  body {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #172033;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9.5pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .site-header,
  .site-footer,
  .quote-view-heading,
  .quote-primary-actions,
  .quote-management-grid,
  .quote-details-grid,
  .quote-items-card,
  .quote-view-total,
  .quote-view-card {
    display: none !important;
  }

  .site-main.quote-view-page,
  .quote-view-container,
  #quote {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .printable-quote {
    display: block !important;
  }

  .print-quote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20mm;
  }

  .print-company-brand {
    display: flex;
    align-items: center;
    gap: 4mm;
  }

  .print-company-mark {
    display: grid;
    width: 15mm;
    height: 15mm;
    place-items: center;
    flex: 0 0 15mm;
    border-radius: 3mm;
    background: #0f3d56;
    color: #fff;
    font-size: 20pt;
    font-weight: 700;
  }

  .print-company-name {
    color: #0f3d56;
    font-size: 17pt;
    font-weight: 700;
    line-height: 1.15;
  }

  .print-company-contact {
    margin-top: 1mm;
    color: #526273;
    font-size: 8.5pt;
  }

  .print-document-title {
    min-width: 48mm;
    text-align: right;
  }

  .print-document-title h1 {
    margin: 0;
    color: #0f3d56;
    font-size: 23pt;
    letter-spacing: 0.08em;
  }

  .print-document-title p {
    margin: 2mm 0 0;
    color: #526273;
    font-size: 10pt;
    font-weight: 700;
  }

  .print-accent-line {
    height: 1.5mm;
    margin: 7mm 0;
    background: linear-gradient(90deg, #0f3d56 0 68%, #76b9d6 68% 100%);
  }

  .print-quote-parties {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72mm;
    gap: 14mm;
    margin-bottom: 7mm;
  }

  .print-quote-parties h2,
  .print-section h2,
  .print-acceptance h2 {
    margin: 0 0 2.5mm;
    color: #0f3d56;
    font-size: 10pt;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .print-quote-parties strong {
    display: block;
    margin-bottom: 1.5mm;
    font-size: 11pt;
  }

  .print-quote-parties p {
    margin: 0 0 1mm;
    color: #39485a;
    line-height: 1.4;
    white-space: pre-line;
  }

  .print-quote-meta {
    margin: 0;
    border-top: 0.3mm solid #c9d5df;
  }

  .print-quote-meta div {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 4mm;
    padding: 2mm 0;
    border-bottom: 0.3mm solid #dbe3ea;
  }

  .print-quote-meta dt {
    color: #64748b;
    font-weight: 700;
  }

  .print-quote-meta dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
  }

  .print-section {
    margin-top: 6mm;
  }

  .print-section > p {
    margin: 0;
    color: #334155;
    line-height: 1.55;
    white-space: pre-wrap;
  }

  .print-items-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .print-items-table thead {
    display: table-header-group;
  }

  .print-items-table th {
    padding: 2.7mm 2.5mm;
    background: #0f3d56 !important;
    color: #fff !important;
    text-align: left;
    font-size: 8.5pt;
    text-transform: uppercase;
    letter-spacing: 0.035em;
  }

  .print-items-table th:first-child {
    width: 55%;
  }

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

  .print-items-table th:nth-child(3),
  .print-items-table th:nth-child(4) {
    width: 17%;
  }

  .print-items-table th:nth-child(n + 2),
  .print-items-table td:nth-child(n + 2) {
    text-align: right;
    white-space: nowrap;
  }

  .print-items-table td {
    padding: 2.8mm 2.5mm;
    border-bottom: 0.3mm solid #dce4ea;
    vertical-align: top;
    line-height: 1.35;
  }

  .print-items-table tbody tr {
    break-inside: avoid;
  }

  .print-totals {
    width: 72mm;
    margin: 4mm 0 0 auto;
  }

  .print-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 8mm;
    padding: 1.8mm 2.5mm;
  }

  .print-grand-total {
    margin-top: 1mm;
    border-top: 0.6mm solid #0f3d56;
    background: #e8f4f9 !important;
    color: #0f3d56;
    font-size: 12pt;
  }

  .print-notes {
    padding: 4mm;
    border-left: 1.2mm solid #76b9d6;
    background: #f4f9fb !important;
    break-inside: avoid;
  }

  .print-terms {
    break-before: auto;
  }

  .print-terms ol {
    columns: 2;
    column-gap: 9mm;
    margin: 0;
    padding-left: 5mm;
    color: #3d4b5c;
    font-size: 7.8pt;
    line-height: 1.45;
  }

  .print-terms li {
    margin: 0 0 2mm;
    padding-left: 1mm;
    break-inside: avoid;
  }

  .print-acceptance {
    margin-top: 7mm;
    padding-top: 4mm;
    border-top: 0.4mm solid #b8c6d1;
    break-inside: avoid;
  }

  .print-acceptance > p {
    margin: 0 0 6mm;
    color: #475569;
  }

  .print-signature-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr 0.8fr;
    gap: 8mm;
  }

  .print-signature-grid div {
    height: 11mm;
    border-bottom: 0.3mm solid #64748b;
  }

  .print-signature-grid span {
    color: #64748b;
    font-size: 8pt;
  }

  .print-quote-footer {
    display: flex;
    justify-content: space-between;
    gap: 5mm;
    margin-top: 9mm;
    padding-top: 3mm;
    border-top: 0.5mm solid #0f3d56;
    color: #64748b;
    font-size: 7.5pt;
  }

  .print-quote-footer strong {
    color: #0f3d56;
  }
}

/* Public customer quote */
.site-main.public-quote-page {
  max-width: 1180px;
  margin-top: 26px;
}

.public-quote-container {
  padding: 24px;
}

.public-quote-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
}

.public-quote-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #2f80a7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.public-quote-heading .page-title {
  margin: 0 0 5px;
  font-size: 29px;
}

.public-quote-heading .page-subtitle {
  margin: 0;
}

.public-quote-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}

.public-quote-meta > div {
  padding: 10px 12px;
  background: #f8fcfe;
  border: 1px solid #d8eef8;
  border-radius: 9px;
}

.public-quote-meta span,
.public-detail-list span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-quote-meta strong,
.public-detail-list strong {
  color: #1f2937;
  font-size: 13px;
}

.public-notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 13px;
}

.public-notice span,
.public-notice p {
  display: block;
  margin: 5px 0 0;
}

.public-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.public-quote-card {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 11px;
}

.public-quote-card h2,
.public-response-card h2 {
  margin: 0 0 12px;
  color: #0f3d56;
  font-size: 17px;
}

.public-detail-list {
  display: grid;
  gap: 0;
}

.public-detail-list > div {
  padding: 9px 0;
  border-bottom: 1px solid #e5e7eb;
}

.public-detail-list strong {
  display: block;
  overflow-wrap: anywhere;
}

.public-long-text {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.public-items-card .table-wrapper {
  margin: 0 -16px -16px;
  border-top: 1px solid #d8eef8;
  border-radius: 0 0 11px 11px;
}

.public-items-table {
  min-width: 680px;
  margin-top: 0;
  table-layout: fixed;
  border-radius: 0;
}

.public-items-table th,
.public-items-table td {
  padding: 10px 12px;
  font-size: 13px;
}

.public-items-table th {
  font-size: 12px;
  white-space: nowrap;
}

.public-items-table th:first-child { width: 55%; }
.public-items-table th:nth-child(2) { width: 12%; }
.public-items-table th:nth-child(3) { width: 16.5%; }
.public-items-table th:nth-child(4) { width: 16.5%; }

.public-items-table td:nth-child(n + 2) {
  color: #0f3d56;
  font-weight: 700;
  white-space: nowrap;
}

.public-total-row {
  display: flex;
  justify-content: flex-end;
}

.public-quote-total {
  width: min(100%, 390px);
  margin: 0 0 14px;
  padding: 15px 17px;
  border-radius: 10px;
}

.public-quote-total .total-line {
  margin-bottom: 7px;
  font-size: 13px;
}

.public-quote-total .grand-total {
  margin-bottom: 0;
  padding-top: 10px;
  font-size: 20px;
}

.public-response-card {
  margin-top: 18px;
  padding: 20px;
  background: #f5fbfe;
  border: 1px solid #76b9d6;
  border-radius: 12px;
}

.public-response-heading p {
  max-width: 680px;
  margin: -4px 0 16px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.public-response-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.public-response-options .response-option {
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 12px;
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  text-align: left;
}

.public-response-options .response-option:hover {
  background: #f0f9ff;
  border-color: #76b9d6;
}

.public-response-options .response-option.selected {
  background: #e0f2fe;
  color: #0f3d56;
  border: 2px solid #2f80a7;
  box-shadow: 0 0 0 2px rgba(47, 128, 167, 0.08);
}

.response-option strong,
.response-option span {
  display: block;
}

.response-option strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.response-option span {
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
}

.public-response-form {
  display: grid;
  grid-template-columns: minmax(200px, 0.45fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 15px;
}

.public-response-form label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.public-response-form label span {
  min-height: 16px;
}

.public-response-form small {
  color: #64748b;
  font-weight: 400;
}

.public-response-form input,
.public-response-form textarea {
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
}

.public-response-form input {
  height: 40px;
}

.public-response-form textarea {
  min-height: 92px;
  resize: vertical;
}

.public-form-message {
  min-height: 18px;
  align-self: center;
  color: #64748b;
  font-size: 12px;
}

.public-submit-response {
  justify-self: end;
  width: auto;
  min-width: 160px;
  height: 40px;
  margin: 0;
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
}

.public-submit-response:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 760px) {
  .public-quote-heading {
    flex-direction: column;
  }

  .public-overview-grid {
    grid-template-columns: 1fr;
  }

  .public-response-options {
    grid-template-columns: 1fr;
  }

  .public-response-form {
    grid-template-columns: 1fr;
  }

  .public-submit-response {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .site-main.public-quote-page {
    margin-top: 18px;
    padding: 0 12px;
  }

  .public-quote-container {
    padding: 16px;
  }

  .public-quote-meta {
    width: 100%;
  }

  .public-response-card {
    padding: 16px;
  }
}

@media (max-width: 430px) {
  .public-quote-meta {
    grid-template-columns: 1fr;
  }
}

/* Public quotation document */
.public-quote-body > .site-header {
  display: none;
}

.site-main.public-quote-page {
  max-width: 1040px;
  margin-top: 32px;
}

.public-quote-container {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.public-quote-document {
  padding: 40px 44px 34px;
  color: #172033;
}

.public-document-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}

.public-document-company {
  display: flex;
  align-items: center;
  gap: 16px;
}

.public-document-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  flex: 0 0 58px;
  border-radius: 12px;
  background: #0f3d56;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
}

.public-document-company-name {
  color: #0f3d56;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
}

.public-document-contact {
  margin-top: 4px;
  color: #526273;
  font-size: 13px;
}

.public-document-title {
  min-width: 190px;
  text-align: right;
}

.public-document-title h1 {
  margin: 0;
  color: #0f3d56;
  font-size: 31px;
  letter-spacing: 0.08em;
}

.public-document-title p {
  margin: 7px 0 0;
  color: #526273;
  font-size: 14px;
  font-weight: 800;
}

.public-document-accent {
  height: 6px;
  margin: 28px 0;
  background: linear-gradient(90deg, #0f3d56 0 68%, #76b9d6 68% 100%);
}

.public-response-position {
  margin-bottom: 28px;
}

.public-response-position .public-notice {
  margin: 0;
}

.public-response-card.public-response-card-top {
  margin: 0;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(15, 61, 86, 0.06);
}

.public-document-parties {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 56px;
  margin-bottom: 30px;
}

.public-document-parties h2,
.public-document-section h2 {
  margin: 0 0 10px;
  color: #0f3d56;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.public-document-parties strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.public-document-parties p {
  margin: 0 0 4px;
  color: #39485a;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
}

.public-document-meta {
  margin: 0;
  border-top: 1px solid #c9d5df;
}

.public-document-meta div {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #dbe3ea;
}

.public-document-meta dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.public-document-meta dd {
  margin: 0;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
}

.public-document-section {
  margin-top: 28px;
}

.public-document-section > p {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.public-document-items {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.public-document-items th {
  padding: 11px 10px;
  background: #0f3d56;
  color: #fff;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.public-document-items th:first-child {
  width: 55%;
}

.public-document-items th:nth-child(2) {
  width: 11%;
}

.public-document-items th:nth-child(3),
.public-document-items th:nth-child(4) {
  width: 17%;
}

.public-document-items th:nth-child(n + 2),
.public-document-items td:nth-child(n + 2) {
  text-align: right;
  white-space: nowrap;
}

.public-document-items td {
  padding: 11px 10px;
  border-bottom: 1px solid #dce4ea;
  color: #263548;
  font-size: 13px;
  line-height: 1.4;
  vertical-align: top;
}

.fixed-price-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #f8fcfe;
  border: 1px solid #d8eef8;
  border-radius: 12px;
  color: #0f3d56;
}

.fixed-price-summary span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fixed-price-summary strong {
  color: #0f3d56;
  font-size: 20px;
}

.print-fixed-price-summary {
  margin-bottom: 10px;
}

.public-document-totals {
  width: min(100%, 310px);
  margin: 16px 0 0 auto;
}

.public-document-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 7px 10px;
  font-size: 13px;
}

.public-document-grand-total {
  margin-top: 4px;
  border-top: 2px solid #0f3d56;
  background: #e8f4f9;
  color: #0f3d56;
  font-size: 17px !important;
}

.public-document-notes {
  padding: 16px;
  border-left: 5px solid #76b9d6;
  background: #f4f9fb;
}

.public-document-terms ol {
  columns: 2;
  column-gap: 38px;
  margin: 0;
  padding-left: 20px;
  color: #3d4b5c;
  font-size: 12px;
  line-height: 1.5;
}

.public-document-terms li {
  margin-bottom: 8px;
  padding-left: 3px;
  break-inside: avoid;
}

.public-document-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 12px;
  border-top: 2px solid #0f3d56;
  color: #64748b;
  font-size: 11px;
}

.public-document-footer strong {
  color: #0f3d56;
}

@media (max-width: 760px) {
  .public-quote-document {
    padding: 26px 22px;
  }

  .public-document-header,
  .public-document-parties {
    grid-template-columns: 1fr;
    flex-direction: column;
    gap: 22px;
  }

  .public-document-title {
    min-width: 0;
    text-align: left;
  }

  .public-document-parties {
    display: grid;
  }

  .public-document-meta {
    width: 100%;
  }

  .public-document-terms ol {
    columns: 1;
  }
}

@media (max-width: 520px) {
  .public-quote-document {
    padding: 20px 16px;
  }

  .public-document-company {
    align-items: flex-start;
  }

  .public-document-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 22px;
  }

  .public-document-company-name {
    font-size: 19px;
  }

  .public-document-title h1 {
    font-size: 25px;
  }

  .public-document-accent {
    margin: 20px 0;
  }

  .public-response-card.public-response-card-top {
    padding: 15px;
  }

  .public-document-footer {
    flex-direction: column;
    gap: 5px;
  }
}

/* Quote management workspace */
.site-main.quote-view-page {
  max-width: 1440px;
  padding: 0 24px;
}

.quote-view-container {
  padding: 24px;
  background: transparent;
  box-shadow: none;
}

.quote-workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}

.quote-back-link {
  color: #2f80a7;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.quote-back-link:hover {
  color: #0f3d56;
  text-decoration: underline;
}

.quote-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.quote-action-panel,
.quote-response-panel {
  min-width: 0;
  height: 100%;
  padding: 18px;
  background: #fff;
  border: 1px solid #d8eef8;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 61, 86, 0.07);
}

.profit-positive {
  color: #166534 !important;
}

.profit-negative {
  color: #b91c1c !important;
}

.quote-action-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.quote-action-panel-heading h2,
.quote-response-panel h2 {
  margin: 3px 0 0;
  color: #0f3d56;
  font-size: 18px;
}

.quote-action-buttons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-action-buttons > button,
.quote-action-buttons > .button-link,
.quote-more-actions > summary {
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 8px 13px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 20px;
}

.quote-action-buttons .secondary-action-button {
  background: #e0f2fe;
  color: #0f3d56;
}

.quote-action-buttons .secondary-action-button:hover {
  background: #bae6fd;
}

.quote-more-actions {
  position: relative;
}

.quote-more-actions > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid #76b9d6;
  color: #0f3d56;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.quote-more-actions > summary::-webkit-details-marker {
  display: none;
}

.quote-more-actions > summary::after {
  content: "▾";
  font-size: 10px;
}

.quote-more-actions[open] > summary {
  background: #f0f9ff;
}

.quote-more-actions > div {
  position: absolute;
  z-index: 10;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  gap: 6px;
  width: 205px;
  padding: 8px;
  background: #fff;
  border: 1px solid #d8eef8;
  border-radius: 9px;
  box-shadow: 0 12px 28px rgba(15, 61, 86, 0.16);
}

.quote-more-actions button {
  width: 100%;
  min-height: 35px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11px;
}

.quote-more-actions .danger-button {
  background: transparent;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.quote-more-actions .danger-button:hover {
  background: #fee2e2;
}

.quote-action-tracking {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.quote-action-tracking > div {
  min-width: 0;
  padding: 0 16px;
  border-right: 1px solid #e2e8f0;
}

.quote-action-tracking > div:first-child {
  padding-left: 0;
}

.quote-action-tracking > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.quote-action-tracking dt,
.quote-action-tracking dd {
  margin: 0;
}

.quote-action-tracking dt {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quote-action-tracking dd {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #1f2937;
  font-size: 12px;
  font-weight: 800;
}

.quote-profit-summary {
  position: relative;
  cursor: help;
}

.quote-profit-summary:focus-visible {
  outline: 3px solid rgba(47, 128, 167, 0.24);
  outline-offset: 4px;
  border-radius: 6px;
}

.quote-profit-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 12px);
  right: 0;
  width: min(310px, 78vw);
  padding: 12px;
  border: 1px solid #b9dceb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 61, 86, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.quote-profit-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid #b9dceb;
  border-left: 1px solid #b9dceb;
  transform: rotate(45deg);
}

.quote-profit-summary:hover .quote-profit-popover,
.quote-profit-summary:focus .quote-profit-popover,
.quote-profit-summary:focus-within .quote-profit-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.quote-profit-popover-title {
  display: block;
  margin-bottom: 8px;
  color: #0f3d56;
  font-size: 12px;
  font-weight: 900;
}

.quote-profit-popover table {
  width: 100%;
  border-collapse: collapse;
}

.quote-profit-popover th,
.quote-profit-popover td {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  color: #1f2937;
  font-size: 12px;
  line-height: 1.25;
}

.quote-profit-popover th {
  padding-right: 14px;
  text-align: left;
  font-weight: 700;
}

.quote-profit-popover td {
  text-align: right;
  font-weight: 900;
  white-space: nowrap;
}

.quote-profit-popover tr:last-child th,
.quote-profit-popover tr:last-child td {
  border-bottom: 0;
}

.quote-profit-popover .quote-profit-total th,
.quote-profit-popover .quote-profit-total td {
  border-top: 2px solid #cbd5e1;
}

.quote-response-panel {
  display: flex;
  flex-direction: column;
  border-color: #b9ddec;
  background: #f8fcfe;
}

.quote-response-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.response-status-pill {
  max-width: 150px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.response-status-pill.response-accepted {
  background: #dcfce7;
  color: #166534;
}

.response-status-pill.response-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.response-status-pill.response-clarification-requested {
  background: #fef3c7;
  color: #92400e;
}

.quote-response-panel-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 14px;
}

.quote-response-panel-body p {
  margin: 0;
}

.quote-response-date {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.quote-progress-message {
  margin-top: 9px !important;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.quote-progress-message.needs-reply {
  background: #dcfce7;
  color: #166534;
}

.quote-progress-message.pending-reply {
  background: #fef3c7;
  color: #92400e;
}

.quote-response-comment {
  width: 100%;
  margin-top: 12px !important;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #334155;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.quote-response-detail {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin-top: 12px !important;
  color: #526273;
  font-size: 11px;
}

.quote-response-detail span {
  color: #1f2937;
  font-weight: 800;
  text-align: right;
}

.quote-response-action {
  width: 100%;
  margin-top: auto;
  padding: 8px 12px;
  font-size: 12px;
}

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

.quote-control-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 18px;
}

.quote-control-card {
  margin: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid #d8eef8;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(15, 61, 86, 0.05);
}

.quote-control-card h2 {
  margin: 0 0 10px;
  color: #0f3d56;
  font-size: 15px;
}

.quote-control-card p {
  margin: 7px 0;
  color: #526273;
  font-size: 12px;
  line-height: 1.45;
}

.quote-control-card > button {
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 20px;
}

.quote-control-card > input {
  height: 36px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12px;
}

.quote-control-card > input {
  width: 100%;
  margin-bottom: 7px;
}

.quote-sidebar-alert.warning {
  background: #fffbeb;
  border-color: #fcd34d;
}

.quote-sidebar-alert.expired {
  background: #fff1f2;
  border-color: #fecaca;
}

.quote-sidebar-booking {
  background: #f0fdf4;
  border-color: #86efac;
}

.quote-sidebar-activity {
  padding: 0;
  overflow: hidden;
}

.quote-sidebar-activity summary {
  padding: 13px 14px;
  color: #0f3d56;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.quote-sidebar-activity > div {
  padding: 0 14px 10px;
  border-top: 1px solid #e2e8f0;
}

.quote-sidebar-activity p {
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
}

.quote-sidebar-activity p:last-child {
  border-bottom: 0;
}

.quote-sidebar-activity strong,
.quote-sidebar-activity span {
  display: block;
}

.quote-sidebar-activity span {
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
}

.quote-document-preview {
  min-width: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 61, 86, 0.09);
}

@media (max-width: 1050px) {
  .quote-workspace {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 16px;
  }

  .quote-document-preview {
    padding: 28px 24px;
  }

  .quote-document-preview .public-document-parties {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 30px;
  }
}

@media (max-width: 820px) {
  .site-main.quote-view-page {
    padding: 0 12px;
  }

  .quote-view-container {
    padding: 8px 0 16px;
  }

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

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

  .quote-control-sidebar {
    position: static;
    grid-template-columns: 1fr;
  }

  .quote-document-preview {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  .quote-workspace-heading {
    gap: 12px;
  }

  .quote-action-panel,
  .quote-response-panel {
    padding: 15px;
  }

  .quote-action-panel-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .quote-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quote-action-buttons > button,
  .quote-action-buttons > .button-link,
  .quote-more-actions,
  .quote-more-actions > summary {
    width: 100%;
  }

  .quote-more-actions > summary {
    justify-content: center;
  }

  .quote-more-actions > div {
    right: auto;
    left: 0;
    width: min(205px, calc(200% + 8px));
  }

  .quote-action-tracking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 0;
  }

  .quote-action-tracking > div {
    padding: 0 10px;
  }

  .quote-action-tracking > div:nth-child(odd) {
    padding-left: 0;
  }

  .quote-action-tracking > div:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .quote-profit-popover {
    right: auto;
    left: 0;
  }

  .quote-profit-popover::before {
    right: auto;
    left: 22px;
  }

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

  .quote-document-preview {
    padding: 20px 16px;
  }

  .quote-document-preview .public-document-parties {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media print {
  .quote-workspace-heading,
  .quote-overview-grid,
  .quote-workspace {
    display: none !important;
  }
}

/* Quote conversations */
.quote-message-card {
  padding: 0;
  overflow: hidden;
}

.quote-message-card.needs-reply {
  background: #f0fdf4;
  border-color: #86efac;
  box-shadow: 0 10px 24px rgba(22, 101, 52, 0.1);
}

.quote-message-card.needs-reply .quote-message-thread {
  background: #f7fef9;
  border-color: #bbf7d0;
}

.quote-message-heading,
.public-conversation-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.quote-message-heading {
  padding: 14px 14px 10px;
}

.quote-message-heading h2,
.public-conversation-heading h2 {
  margin: 2px 0 0;
}

.conversation-state {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-state.open {
  background: #fef3c7;
  color: #92400e;
}

.conversation-state.needs-reply {
  background: #dcfce7;
  color: #166534;
}

.conversation-state.resolved {
  background: #dcfce7;
  color: #166534;
}

.quote-message-thread,
.public-message-thread {
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.quote-message-thread {
  max-height: 310px;
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.quote-message,
.public-message {
  max-width: 90%;
  padding: 9px 10px;
  border-radius: 9px;
}

.quote-message.from-customer,
.public-message.from-builder {
  justify-self: start;
  background: #fff;
  border: 1px solid #dbe3ea;
}

.quote-message.from-builder,
.public-message.from-customer {
  justify-self: end;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.quote-message strong,
.public-message strong {
  display: block;
  color: #0f3d56;
  font-size: 10px;
}

.quote-message p,
.public-message p {
  margin: 4px 0;
  color: #263548;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.quote-message span,
.public-message span {
  display: block;
  color: #64748b;
  font-size: 9px;
}

.quote-message-card > textarea {
  width: calc(100% - 28px);
  min-height: 74px;
  margin: 12px 14px 7px;
  padding: 8px;
  resize: vertical;
  border-radius: 7px;
  font-size: 12px;
}

.quote-message-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 14px 14px;
}

.quote-message-actions button {
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 11px;
}

.quote-message-actions .secondary-action-button {
  background: #e0f2fe;
  color: #0f3d56;
}

.quote-message-status {
  min-height: 15px;
  padding: 0 14px 7px;
  font-size: 10px;
}

.quote-message-empty,
.quote-message-readonly {
  margin: 0 !important;
  color: #64748b !important;
  font-size: 11px !important;
}

.quote-message-empty {
  padding: 8px 0;
}

.quote-message-readonly {
  padding: 10px 14px !important;
}

.public-conversation-card {
  margin-top: 14px;
  padding: 18px;
  background: #f8fcfe;
  border: 1px solid #d8eef8;
  border-radius: 9px;
}

.public-conversation-heading {
  margin-bottom: 12px;
}

.public-conversation-heading h2 {
  color: #0f3d56;
  font-size: 17px;
}

.public-message-thread {
  max-height: 360px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.public-message {
  padding: 10px 12px;
}

.public-message p {
  font-size: 13px;
  line-height: 1.45;
}

.public-message-empty {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.public-message-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.public-message-compose textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 9px 10px;
  resize: vertical;
  border-radius: 7px;
  font-size: 13px;
}

.public-message-compose button {
  grid-column: 2;
  width: auto;
  min-width: 120px;
  height: 38px;
  margin: 0;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
}

.public-message-compose .public-form-message {
  align-self: center;
}

@media (max-width: 520px) {
  .public-message-compose,
  .quote-message-actions {
    grid-template-columns: 1fr;
  }

  .public-message-compose button {
    grid-column: 1;
    width: 100%;
  }
}

/* Public customer workspace */
.site-main.public-quote-page {
  max-width: 1440px;
  padding: 0 24px;
}

.public-quote-container {
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.public-customer-workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.public-interaction-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 18px;
}

.public-interaction-heading {
  padding: 18px;
  background: #fff;
  border: 1px solid #d8eef8;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(15, 61, 86, 0.05);
}

.public-interaction-heading h1 {
  margin: 3px 0 6px;
  color: #0f3d56;
  font-size: 21px;
}

.public-interaction-heading p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.public-interaction-sidebar .public-response-position {
  display: grid;
  gap: 14px;
  margin: 0;
}

.public-interaction-sidebar .public-response-card,
.public-interaction-sidebar .public-conversation-card {
  margin: 0;
  padding: 16px;
  box-shadow: 0 6px 16px rgba(15, 61, 86, 0.05);
}

.public-interaction-sidebar .public-response-heading p {
  margin-bottom: 12px;
}

.public-interaction-sidebar .public-response-options {
  grid-template-columns: 1fr;
}

.public-interaction-sidebar .public-response-options .response-option {
  min-height: 60px;
}

.public-interaction-sidebar .public-response-form {
  grid-template-columns: 1fr;
  gap: 10px;
}

.public-interaction-sidebar .public-submit-response {
  justify-self: stretch;
  width: 100%;
}

.public-interaction-sidebar .public-message-thread {
  max-height: 300px;
}

.public-interaction-sidebar .public-message-compose {
  grid-template-columns: 1fr;
}

.public-interaction-sidebar .public-message-compose button {
  grid-column: 1;
  width: 100%;
}

.public-document-preview {
  min-width: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 61, 86, 0.09);
}

@media (max-width: 1000px) {
  .public-customer-workspace {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 16px;
  }

  .public-document-preview {
    padding: 28px 24px;
  }

  .public-document-preview .public-document-parties {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 30px;
  }
}

@media (max-width: 800px) {
  .site-main.public-quote-page {
    padding: 0 12px;
  }

  .public-customer-workspace {
    grid-template-columns: 1fr;
  }

  .public-interaction-sidebar {
    position: static;
  }

  .public-document-preview {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  .public-document-preview {
    padding: 20px 16px;
  }

  .public-document-preview .public-document-parties {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* Landing page */
.landing-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 9% 12%, rgba(118, 185, 214, 0.22), transparent 28%),
    linear-gradient(180deg, #f7fcfe 0%, #eef7fb 62%, #e8f3f8 100%);
}

.landing-header {
  padding: 18px 28px;
  background: rgba(247, 252, 254, 0.88);
  border-bottom: 1px solid rgba(185, 220, 235, 0.85);
  backdrop-filter: blur(10px);
}

.landing-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f3d56;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.landing-brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  background: #0f3d56;
  color: #fff;
  font-size: 17px;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.landing-nav a {
  color: #365569;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.landing-nav a:hover {
  color: #0f3d56;
}

.landing-nav .landing-register-link {
  padding: 9px 13px;
  border: 1px solid #76b9d6;
  border-radius: 7px;
  color: #0f3d56;
}

.landing-nav .landing-register-link:hover {
  background: #e0f2fe;
}

.landing-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 72px;
  align-items: center;
  min-height: 620px;
  padding: 72px 0;
}

.landing-hero-copy {
  max-width: 680px;
}

.landing-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #2f80a7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.landing-hero h1 {
  max-width: 670px;
  margin: 0;
  color: #0f3d56;
  font-size: clamp(42px, 5.2vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.landing-lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: #526b79;
  font-size: 18px;
  line-height: 1.65;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

.landing-primary-link {
  padding: 13px 18px;
  border-radius: 8px;
  border: 0;
  background: #0f3d56;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 61, 86, 0.17);
  cursor: pointer;
}

.landing-primary-link:hover {
  background: #195878;
}

.landing-text-link {
  color: #0f5f87;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.landing-text-link:hover {
  text-decoration: underline;
}

.landing-trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 32px;
  color: #587181;
  font-size: 12px;
  font-weight: 700;
}

.landing-trust-points span::before {
  content: "✓";
  margin-right: 6px;
  color: #15803d;
  font-weight: 900;
}

.beta-access-hero {
  min-height: calc(100vh - 142px);
}

.beta-access-copy h1 {
  max-width: 620px;
}

.landing-login-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d8eef8;
  border-radius: 16px;
  box-shadow: 0 22px 54px rgba(15, 61, 86, 0.13);
}

.landing-login-heading h2 {
  margin: 0 0 7px;
  color: #0f3d56;
  font-size: 25px;
}

.landing-login-heading p {
  margin: 0 0 21px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

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

.landing-login-form label {
  display: grid;
  gap: 6px;
  color: #3f5665;
  font-size: 12px;
  font-weight: 800;
}

.landing-login-form input {
  width: 100%;
  height: 43px;
  margin: 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
}

.landing-login-form button {
  height: 43px;
  margin: 4px 0 0;
  padding: 9px 14px;
  border-radius: 7px;
  background: #2f80a7;
  font-size: 13px;
}

.landing-login-form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.landing-login-message {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 12px;
}

.landing-register-prompt {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.landing-register-prompt a {
  color: #0f5f87;
  font-weight: 800;
}

.landing-process {
  padding: 82px 0 94px;
  border-top: 1px solid rgba(185, 220, 235, 0.95);
}

.landing-section-heading {
  max-width: 610px;
}

.landing-section-heading h2 {
  margin: 0;
  color: #0f3d56;
  font-size: 34px;
  letter-spacing: -0.025em;
}

.landing-section-heading > p {
  margin: 14px 0 0;
  color: #607787;
  font-size: 15px;
  line-height: 1.65;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.landing-feature {
  padding: 24px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid #d8eef8;
  border-radius: 12px;
}

.landing-feature-number {
  color: #76b9d6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.landing-feature h3 {
  margin: 16px 0 8px;
  color: #0f3d56;
  font-size: 17px;
}

.landing-feature p {
  margin: 0;
  color: #607787;
  font-size: 13px;
  line-height: 1.6;
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px max(28px, calc((100% - 1180px) / 2));
  border-top: 1px solid #cfe5ef;
  color: #64748b;
  font-size: 12px;
}

.landing-footer span:first-child {
  color: #0f3d56;
  font-weight: 800;
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 58px 0 70px;
  }

  .landing-login-card {
    width: min(100%, 520px);
  }
}

@media (max-width: 700px) {
  .landing-header {
    padding: 14px 18px;
  }

  .landing-header-inner {
    align-items: center;
    flex-direction: row;
  }

  .landing-brand {
    font-size: 15px;
  }

  .landing-brand-mark {
    width: 32px;
    height: 32px;
  }

  .landing-nav a:not(.landing-register-link) {
    display: none;
  }

  .landing-main {
    width: min(100% - 28px, 1180px);
  }

  .landing-hero {
    min-height: auto;
    padding-top: 48px;
  }

  .landing-hero h1 {
    font-size: clamp(38px, 12vw, 52px);
  }

  .landing-lead {
    font-size: 16px;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-process {
    padding: 62px 0 70px;
  }

  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 18px;
  }
}

@media (max-width: 420px) {
  .landing-brand > span:last-child {
    display: none;
  }

  .landing-login-card {
    padding: 22px 18px;
  }

  .landing-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .landing-primary-link {
    text-align: center;
  }
}

/* Account setup */
.site-main.account-setup-page {
  max-width: 1160px;
  margin-top: 28px;
}

.account-setup-container {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.account-setup-heading {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #d7e2e8;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.account-setup-heading::before {
  background: #25313a;
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 6px;
}

.account-setup-heading .page-title {
  color: #17242d;
  font-size: 31px;
  line-height: 1.15;
  margin: 0 0 9px;
}

.account-setup-heading .page-subtitle {
  color: #5b6b76;
  line-height: 1.55;
  margin: 0;
  max-width: 680px;
}

.account-setup-step {
  background: #edf3f5;
  border: 1px solid #d7e2e8;
  border-radius: 999px;
  color: #25313a;
  font-size: 11px;
  font-weight: 800;
  padding: 8px 11px;
  white-space: nowrap;
}

.account-profile-hero {
  background: #25313a;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  color: #ffffff;
  margin-bottom: 18px;
  padding: 22px;
}

.account-profile-card,
.account-setup-card {
  background: #ffffff;
  border: 1px solid #d7e2e8;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  padding: 22px;
}

.account-profile-logo {
  align-items: center;
  display: flex;
  gap: 22px;
}

.account-logo-preview {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  color: #25313a;
  display: grid;
  flex: 0 0 104px;
  font-size: 34px;
  font-weight: 800;
  height: 104px;
  overflow: hidden;
  place-items: center;
  width: 104px;
}

.account-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.account-profile-logo h2,
.account-setup-card h2 {
  color: #17242d;
  font-size: 18px;
  margin: 0 0 8px;
}

.account-profile-logo h2 {
  color: #ffffff;
  font-size: 22px;
}

.account-profile-kicker {
  color: #a8c2ce;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.account-profile-logo p {
  color: #d8e5eb;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 14px;
  max-width: 520px;
}

.account-profile-logo small {
  color: #a8c2ce;
  display: block;
  font-size: 12px;
  margin-top: 10px;
}

.account-logo-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-logo-upload {
  background: #ffffff;
  border-radius: 8px;
  color: #25313a;
  cursor: pointer;
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
}

.account-logo-upload input {
  display: none;
}

.account-remove-logo {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #ffffff;
  font-size: 13px;
  margin: 0 0 0 6px;
  padding: 9px 12px;
  width: auto;
}

.account-remove-logo:hover {
  background: rgba(255, 255, 255, 0.1);
}

.account-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-form-grid label {
  color: #31444f;
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
}

.account-form-grid input,
.account-form-grid textarea {
  width: 100%;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #cbdce4;
  border-radius: 9px;
  background: #f8fbfc;
  color: #17242d;
  font-size: 13px;
}

.account-form-grid input {
  height: 42px;
}

.account-form-grid input:focus,
.account-form-grid textarea:focus {
  border-color: #4f8ca8;
  box-shadow: 0 0 0 3px rgba(79, 140, 168, 0.16);
  outline: none;
}

.account-form-grid textarea {
  resize: vertical;
}

.account-form-grid small {
  color: #64748b;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
}

.account-full-field {
  grid-column: 1 / -1;
}

.account-setup-actions {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7e2e8;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
}

.account-setup-actions p {
  margin: 0;
  font-size: 12px;
}

.account-setup-actions button {
  width: auto;
  min-width: 180px;
  margin: 0;
}

.company-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.public-document-mark.has-logo,
.print-company-mark.has-logo {
  overflow: hidden;
  padding: 4px;
  background: #fff;
  border: 1px solid #d8eef8;
}

.public-company-terms {
  margin: 0 0 12px !important;
  padding: 10px 12px;
  background: #f8fafc;
  border-left: 3px solid #76b9d6;
}

/* Platform notifications and confirmation dialogs */
.app-toast-region {
  position: fixed;
  z-index: 1100;
  top: 20px;
  right: 20px;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  border: 1px solid #b9dceb;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(15, 61, 86, 0.18);
  color: #1f2937;
  font-size: 14px;
  line-height: 1.45;
  pointer-events: auto;
  animation: app-toast-in 180ms ease-out;
}

.app-toast.is-leaving {
  animation: app-toast-out 180ms ease-in forwards;
}

.app-toast-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0f3d56;
  font-weight: 800;
}

.app-toast-error {
  border-color: #fecaca;
}

.app-toast-error .app-toast-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.app-toast-close {
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.app-toast-close:hover {
  background: #eef7fb;
  color: #0f3d56;
}

.app-dialog-overlay {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(15, 61, 86, 0.48);
  opacity: 0;
  backdrop-filter: blur(3px);
  transition: opacity 160ms ease;
}

.app-dialog-overlay.is-visible {
  opacity: 1;
}

.app-dialog-overlay.is-leaving {
  opacity: 0;
}

.app-dialog {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0 14px;
  width: min(450px, 100%);
  padding: 22px;
  border: 1px solid #d8eef8;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 61, 86, 0.26);
  transform: translateY(8px) scale(0.985);
  transition: transform 160ms ease;
}

.app-dialog-overlay.is-visible .app-dialog {
  transform: translateY(0) scale(1);
}

.app-dialog-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: #e0f2fe;
  color: #0f3d56;
  font-size: 20px;
  font-weight: 800;
}

.app-dialog-icon.is-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.app-dialog-content h2 {
  margin: 1px 0 7px;
  color: #0f3d56;
  font-size: 19px;
}

.app-dialog-content p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.app-dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.app-dialog-actions button {
  width: auto;
  min-width: 105px;
  margin: 0;
  padding: 10px 15px;
  font-size: 14px;
}

.app-dialog-cancel {
  background: #e0f2fe;
  color: #0f3d56;
}

.app-dialog-cancel:hover {
  background: #bae6fd;
}

.app-dialog-confirm.is-danger {
  background: #b91c1c;
}

.app-dialog-confirm.is-danger:hover {
  background: #991b1b;
}

.style-variant-control {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d8eef8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 36px rgba(15, 61, 86, 0.18);
  backdrop-filter: blur(8px);
}

.style-variant-label {
  color: #0f3d56;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.style-variant-switch {
  display: inline-flex;
  width: auto;
  margin: 0;
}

.style-variant-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.style-variant-track {
  position: relative;
  display: block;
  width: 44px;
  height: 24px;
  border: 1px solid #9ccfe4;
  border-radius: 999px;
  background: #e0f2fe;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.style-variant-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2f80a7;
  box-shadow: 0 2px 5px rgba(15, 61, 86, 0.24);
  transition: transform 0.16s ease, background 0.16s ease;
}

.style-variant-switch input:checked + .style-variant-track {
  border-color: #475569;
  background: #1f2937;
}

.style-variant-switch input:checked + .style-variant-track .style-variant-thumb {
  background: #f8fafc;
  transform: translateX(20px);
}

.style-variant-switch input:focus-visible + .style-variant-track {
  outline: 3px solid rgba(118, 185, 214, 0.35);
  outline-offset: 2px;
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes app-toast-out {
  to {
    opacity: 0;
    transform: translateX(12px);
  }
}

@media (max-width: 520px) {
  .app-toast-region {
    top: 12px;
    right: 16px;
  }

  .app-dialog {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 18px;
  }

  .app-dialog-icon {
    width: 36px;
    height: 36px;
  }

  .app-dialog-actions {
    flex-direction: column-reverse;
  }

  .app-dialog-actions button {
    width: 100%;
  }

  .style-variant-control {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 780px) {
  .account-setup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-main.account-setup-page {
    padding: 0 12px;
  }

  .account-setup-container {
    padding: 18px;
  }

  .account-setup-heading {
    flex-direction: column;
    padding: 22px;
  }

  .account-profile-logo {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-profile-hero {
    padding: 18px;
  }

  .account-logo-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-logo-upload,
  .account-remove-logo {
    margin: 0;
    text-align: center;
    width: 100%;
  }

  .account-form-grid {
    grid-template-columns: 1fr;
  }

  .account-full-field {
    grid-column: auto;
  }

  .account-setup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-setup-actions button {
    width: 100%;
  }
}

/* Admin dashboard */
.admin-message {
  min-height: 22px;
  margin-bottom: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.admin-message.error {
  color: #b91c1c;
}

.admin-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.admin-metric-card small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

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

.admin-insight-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-insight-card {
  min-width: 0;
  padding: 18px;
}

.admin-insight-card h2 {
  margin: 2px 0 14px;
  color: #0f3d56;
  font-size: 18px;
}

.admin-insight-card p {
  margin: 12px 0 0;
  color: #526273;
  font-size: 13px;
  font-weight: 700;
}

.admin-funnel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-funnel div {
  padding: 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
}

.admin-funnel span,
.admin-funnel strong {
  display: block;
}

.admin-funnel span {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-funnel strong {
  margin-top: 5px;
  color: #0f3d56;
  font-size: 20px;
}

.admin-bar-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 160px;
  padding-top: 8px;
}

.admin-bar-column {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  height: 100%;
  min-width: 0;
}

.admin-bar-column span {
  align-self: end;
  min-height: 8px;
  background: linear-gradient(180deg, #76b9d6, #0f3d56);
  border-radius: 999px 999px 3px 3px;
}

.admin-bar-column small {
  overflow: hidden;
  color: #64748b;
  font-size: 9px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-status-mix {
  display: grid;
  gap: 9px;
}

.admin-status-mix div {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-status-mix span {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.admin-status-mix strong {
  color: #0f3d56;
  font-size: 12px;
}

.admin-status-mix meter {
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
}

.admin-ranked-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.admin-ranked-list li {
  color: #334155;
  font-size: 13px;
}

.admin-ranked-list li::marker {
  color: #76b9d6;
  font-weight: 900;
}

.admin-ranked-list span,
.admin-ranked-list strong {
  display: inline-block;
}

.admin-ranked-list span {
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.admin-ranked-list strong {
  float: right;
  color: #0f3d56;
}

.admin-users-card {
  padding: 0;
  overflow: hidden;
}

.admin-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid #e2e8f0;
}

.admin-card-heading h2 {
  margin: 2px 0 0;
  color: #0f3d56;
  font-size: 19px;
}

.admin-card-heading > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-user-table th:nth-child(1) { width: 23%; }
.admin-user-table th:nth-child(2) { width: 10%; }
.admin-user-table th:nth-child(3) { width: 8%; }
.admin-user-table th:nth-child(4) { width: 8%; }
.admin-user-table th:nth-child(5) { width: 14%; }
.admin-user-table th:nth-child(6) { width: 13%; }
.admin-user-table th:nth-child(7) { width: 10%; }
.admin-user-table th:nth-child(8) { width: 14%; }

.admin-user-table td {
  vertical-align: top;
}

.admin-user-table td strong,
.admin-user-table td span,
.admin-user-table td em {
  display: block;
}

.admin-user-table td strong {
  color: #0f3d56;
}

.admin-user-table td span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.admin-user-table td em {
  width: max-content;
  margin-top: 5px;
  padding: 3px 7px;
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-market-research-card {
  padding: 0;
  overflow: hidden;
}

.admin-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-card-actions > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-card-actions button {
  width: auto;
  margin: 0;
  padding: 9px 12px;
  font-size: 12px;
}

.admin-title-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-title-actions button {
  width: auto;
  margin: 0;
}

.admin-modal-overlay {
  position: fixed;
  z-index: 1150;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(15, 61, 86, 0.48);
  backdrop-filter: blur(3px);
}

.admin-modal {
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  max-height: min(900px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #d8eef8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 61, 86, 0.28);
}

.admin-modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #d8eef8;
}

.admin-modal-heading h2 {
  margin: 2px 0 0;
  color: #0f3d56;
  font-size: 21px;
}

.admin-modal-close {
  width: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
}

.admin-modal-close:hover {
  background: #eef7fb;
  color: #0f3d56;
}

.potential-customer-modal-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}

.potential-customer-list-panel,
.potential-customer-detail-panel {
  min-width: 0;
  min-height: 0;
}

.potential-customer-list-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.potential-customer-detail-panel {
  overflow: auto;
  padding: 16px;
  border: 1px solid #d8eef8;
  border-radius: 12px;
  background: #f8fcfe;
}

.potential-customer-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.potential-customer-detail-heading h3 {
  margin: 2px 0 0;
  color: #0f3d56;
  font-size: 18px;
}

.potential-customer-detail-heading button {
  width: auto;
  margin: 0;
  padding: 8px 11px;
  font-size: 12px;
}

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

.potential-customer-form-section {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #d8eef8;
  border-radius: 10px;
  background: #fff;
}

.potential-customer-form-section legend {
  padding: 0 6px;
  color: #0f3d56;
  font-size: 12px;
  font-weight: 900;
}

.potential-customer-form-section > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.potential-customer-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.potential-customer-field span {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.potential-customer-field input,
.potential-customer-field select,
.potential-customer-field textarea {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 9px 10px;
  font-size: 13px;
}

.potential-customer-field textarea {
  resize: vertical;
}

.potential-customer-wide-field {
  grid-column: 1 / -1;
}

.potential-customer-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.potential-customer-form-actions button {
  width: auto;
  min-width: 120px;
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
}

.potential-customer-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.potential-customer-list-heading span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.potential-customer-list-heading button {
  width: auto;
  margin: 0;
  padding: 8px 11px;
  font-size: 12px;
}

.potential-customer-search {
  width: 100%;
  margin: 0;
  min-height: 40px;
  padding: 9px 10px;
  font-size: 13px;
}

.potential-customer-empty {
  margin: 0;
  padding: 18px;
  background: #f8fcfe;
  border: 1px solid #d8eef8;
  border-radius: 10px;
  color: #64748b;
  font-weight: 700;
}

.potential-customer-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.potential-customer-list-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8eef8;
  border-radius: 10px;
  background: #fff;
}

.potential-customer-list-item.is-selected {
  border-color: #76b9d6;
  box-shadow: 0 0 0 3px rgba(118, 185, 214, 0.18);
}

.potential-customer-list-item > button:first-child {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #334155;
  text-align: left;
  box-shadow: none;
}

.potential-customer-list-item > button:first-child:hover {
  background: transparent;
}

.potential-customer-list-title {
  color: #0f3d56 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.potential-customer-list-item span {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.potential-customer-list-delete {
  width: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: transparent;
  color: #b91c1c;
  font-size: 18px;
  line-height: 1;
  box-shadow: none;
}

.potential-customer-list-delete:hover {
  background: #fee2e2;
}

.project-manager-modal {
  width: min(1320px, 100%);
}

.project-manager-layout {
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}

.admin-task-board {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
}

.admin-task-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-task-board-toolbar span {
  margin-right: auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-task-board-toolbar button {
  width: auto;
  margin: 0;
  padding: 8px 11px;
  font-size: 12px;
}

.admin-task-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(260px, 1.35fr) 150px 132px 132px minmax(240px, 0.9fr);
  overflow: auto;
  border: 1px solid #d8eef8;
  border-radius: 12px;
  background: #fff;
}

.admin-task-grid-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  background: #d8eef8;
  border-bottom: 1px solid #b9dceb;
  color: #0f3d56;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-task-grid-row {
  display: contents;
}

.admin-task-cell {
  min-width: 0;
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.admin-task-grid-row-main .admin-task-cell {
  background: #f8fcfe;
}

.admin-task-grid-row-subtask .admin-task-cell {
  background: #fff;
}

.admin-task-title-cell {
  position: relative;
}

.admin-task-grid-row-main .admin-task-title-cell {
  border-left: 4px solid #2f80a7;
}

.admin-task-grid-row-subtask .admin-task-title-cell {
  border-left: 4px solid #f59e0b;
  padding-left: 24px;
}

.admin-task-grid-row-subtask .admin-task-title-cell::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  border-top: 2px solid #f59e0b;
}

.admin-task-cell input,
.admin-task-cell select,
.admin-task-cell textarea {
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.admin-task-cell textarea {
  resize: vertical;
}

.admin-task-muted-cell {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 34px;
}

.admin-task-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-task-row-actions button {
  width: auto;
  min-height: 30px;
  margin: 0;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 11px;
}

.admin-task-row-actions .danger-button {
  background: transparent;
  color: #b91c1c;
  border: 1px solid #fecaca;
  box-shadow: none;
}

.admin-task-row-actions .danger-button:hover {
  background: #fee2e2;
}

.admin-task-empty {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #d8eef8;
  border-radius: 12px;
  background: #f8fcfe;
  color: #64748b;
  font-weight: 700;
}

.market-research-filter {
  width: auto;
  min-width: 170px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.market-research-layout {
  display: grid;
  gap: 20px;
  padding: 18px;
}

.market-research-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px 14px;
}

.market-research-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.market-research-field span,
.market-research-support-field legend {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.market-research-field input,
.market-research-field select,
.market-research-field textarea {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 9px 10px;
  font-size: 13px;
}

.market-research-field textarea {
  resize: vertical;
}

.market-research-wide-field {
  grid-column: span 3;
}

.market-research-support-field {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #d8eef8;
  border-radius: 10px;
  background: #f8fcfe;
}

.market-research-select-all {
  width: auto;
  min-height: 30px;
  margin: 8px 0 0;
  padding: 6px 10px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0f3d56;
  font-size: 11px;
}

.market-research-select-all:hover {
  background: #bae6fd;
}

.market-research-support-field > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 8px;
}

.market-research-support-field label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.market-research-support-field input {
  width: auto;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
}

.market-research-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.market-research-form-actions button {
  width: auto;
  min-width: 130px;
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
}

.market-research-empty {
  margin: 0;
  padding: 18px;
  color: #64748b;
  font-weight: 700;
}

.market-research-table {
  min-width: 1260px;
  table-layout: fixed;
}

.market-research-table th:nth-child(1) { width: 7%; }
.market-research-table th:nth-child(2) { width: 9%; }
.market-research-table th:nth-child(3) { width: 10%; }
.market-research-table th:nth-child(4) { width: 8%; }
.market-research-table th:nth-child(5) { width: 8%; }
.market-research-table th:nth-child(6) { width: 7%; }
.market-research-table th:nth-child(7) { width: 14%; }
.market-research-table th:nth-child(8) { width: 11%; }
.market-research-table th:nth-child(9) { width: 12%; }
.market-research-table th:nth-child(10) { width: 14%; }
.market-research-table th:nth-child(11) { width: 8%; }

.market-research-table td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

.market-research-table td span {
  display: block;
}

.market-research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.market-research-actions button {
  width: auto;
  min-height: 30px;
  margin: 0;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 11px;
}

.market-research-actions .danger-button {
  background: transparent;
  color: #b91c1c;
  border: 1px solid #fecaca;
  box-shadow: none;
}

.market-research-actions .danger-button:hover {
  background: #fee2e2;
}

@media (max-width: 980px) {
  .admin-summary-grid,
  .admin-insight-grid,
  .admin-insight-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .admin-insight-grid > .admin-insight-card:first-child {
    grid-column: 1 / -1;
  }

  .potential-customer-modal-layout {
    grid-template-columns: 1fr;
  }

  .market-research-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-research-wide-field {
    grid-column: span 2;
  }

  .market-research-support-field > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .admin-summary-grid,
  .admin-insight-grid,
  .admin-insight-grid.two-column {
    grid-template-columns: 1fr !important;
  }

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

  .admin-card-heading {
    flex-direction: column;
  }

  .admin-title-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .admin-title-actions button {
    width: 100%;
  }

  .admin-modal-overlay {
    padding: 12px;
  }

  .admin-modal {
    max-height: calc(100vh - 24px);
  }

  .potential-customer-modal-layout {
    padding: 14px;
  }

  .project-manager-layout {
    padding: 14px;
  }

  .potential-customer-form-section > div {
    grid-template-columns: 1fr;
  }

  .admin-task-board-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-task-board-toolbar span {
    margin-right: 0;
  }

  .admin-task-board-toolbar button {
    width: 100%;
  }

  .potential-customer-wide-field {
    grid-column: auto;
  }

  .potential-customer-form-actions,
  .potential-customer-list-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .potential-customer-form-actions button,
  .potential-customer-list-heading button {
    width: 100%;
  }

  .admin-card-actions {
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
  }

  .admin-card-actions button {
    width: 100%;
  }

  .market-research-form,
  .market-research-support-field > div {
    grid-template-columns: 1fr;
  }

  .market-research-wide-field {
    grid-column: auto;
  }

  .market-research-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .market-research-form-actions button {
    width: 100%;
  }
}
