/* QuoteSuite agent portal final polish — v146 */
:root {
  --qs-brand-purple: #6558f5;
}

.qs-product-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #0b1537;
  text-decoration: none;
}

.qs-product-mark {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  display: grid !important;
  place-items: center !important;
  position: relative !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #685df8, #58b3ff 52%, #ef63b3) !important;
  box-shadow: 0 8px 20px rgba(93, 87, 227, .28) !important;
}

.qs-product-mark i {
  position: absolute;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #fff;
  opacity: .95;
  transform: rotate(-18deg);
}

.qs-product-mark b {
  position: relative;
  z-index: 1;
  color: var(--qs-brand-purple);
  font: 800 17px/1 Inter, sans-serif;
}

.qs-product-word {
  color: #0b1537;
  font: 760 25px/1 Inter, sans-serif !important;
  letter-spacing: -1px;
  white-space: nowrap;
}

.qs-product-word > span { color: var(--qs-brand-purple); }
.qs-product-brand--inverse .qs-product-word { color: #fff; }

.qs-v3-sidebar-brand.qs-product-brand {
  padding: 0 4px 22px !important;
}

.qs-v3-login-brand.qs-product-brand .qs-product-word {
  font-size: clamp(24px, 2.2vw, 31px) !important;
}

.qs-builder-v2-page .qs-v2-brand.qs-product-brand {
  gap: 10px !important;
}

.qs-builder-v2-page .qs-v2-brand.qs-product-brand > .qs-product-mark {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
}

.qs-builder-v2-page .qs-v2-brand.qs-product-brand > .qs-product-word {
  display: inline !important;
  color: #fff !important;
  font-size: 23px !important;
}

.qs-builder-v2-page .qs-v2-brand.qs-product-brand > .qs-product-word > span {
  color: #8c82ff !important;
}

/* The two AI workspaces share the same vertical rhythm. */
.qs-builder-v2-page .ai-reference-layout { align-items: stretch !important; }
.qs-builder-v2-page .ai-import-stack-card,
.qs-builder-v2-page .ai-tour-planner-card {
  display: flex !important;
  flex-direction: column !important;
}

.qs-builder-v2-page .ai-reference-card-title {
  min-height: 34px !important;
  margin-bottom: 10px !important;
}

.qs-builder-v2-page .ai-paste-textarea,
.qs-builder-v2-page .ai-tour-prompt {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 210px !important;
  min-height: 210px !important;
  max-height: 210px !important;
  flex: 0 0 210px !important;
  resize: vertical;
}

.qs-builder-v2-page .ai-reference-counter {
  min-height: 28px !important;
  display: flex;
  align-items: center;
}

.qs-builder-v2-page .ai-import-action-row,
.qs-builder-v2-page .ai-planner-action-stack {
  height: 168px !important;
  min-height: 168px !important;
  margin-top: 0 !important;
  align-self: stretch !important;
}

.qs-builder-v2-page .ai-planner-action-stack {
  display: grid !important;
  grid-template-rows: 32px 42px 32px !important;
  align-content: space-between !important;
  gap: 8px !important;
}

body.qs-builder-v2-page .qs-support-launch {
  right: 24px !important;
  bottom: 92px !important;
  z-index: 170 !important;
}

/* Dashboard status shortcuts. */
.qs-v3-dashboard .qs-v3-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.qs-v146-action-stat {
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.qs-v146-action-stat:hover,
.qs-v146-action-stat:focus-visible {
  transform: translateY(-2px);
  border-color: #aebeff;
  box-shadow: 0 14px 28px rgba(30, 70, 150, .10);
  outline: none;
}

.tint-success { color: #07835d !important; background: #dcf8ed !important; }
.tint-orange { color: #b85b10 !important; background: #fff0df !important; }

/* Quote date filters. */
.qs-v3-quotes-toolbar { align-items: center !important; }
.qs-v146-datefield { min-width: 190px; }
.qs-v146-custom-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 100%;
  padding-top: 2px;
}
.qs-v146-custom-dates[hidden] { display: none !important; }
.qs-v146-custom-dates input {
  min-width: 170px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d5ddec;
  border-radius: 10px;
  background: #fff;
  color: #16213d;
  font: inherit;
}
.qs-v146-date-separator { color: #6d7891; font-size: 14px; }

@media (max-width: 980px) {
  .qs-v3-dashboard .qs-v3-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .qs-builder-v2-page .ai-paste-textarea,
  .qs-builder-v2-page .ai-tour-prompt {
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    flex-basis: 190px !important;
  }
}

@media (max-width: 640px) {
  .qs-v3-dashboard .qs-v3-stat-grid { grid-template-columns: 1fr !important; }
  .qs-v146-custom-dates { flex-wrap: wrap; }
  .qs-v146-custom-dates input { flex: 1 1 145px; min-width: 0; }
  body.qs-builder-v2-page .qs-support-launch { right: 12px !important; bottom: 84px !important; }
}
