:root {
  --brand-action: #051094;
  --brand-action-hover: #030a6c;
  --topbar-orange: #e98224;
  --topbar-orange-dark: #c96812;
  --chart-light-blue: #75c9ff;
  --section-title: #173a67;
  --section-subtitle: #5d6f82;
  --section-title-font: Georgia, "Times New Roman", serif;
  --section-subtitle-font: "Trebuchet MS", "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --section-title: #bdd7ff;
  --section-subtitle: #aebdce;
  --chart-light-blue: #72c7ff;
}

/* Primary ERP actions use the requested Eximious blue. */
.btn-primary {
  background: var(--brand-action);
  border-color: var(--brand-action);
  color: #fff;
  box-shadow: 0 7px 16px rgba(5, 16, 148, 0.18);
}

.btn-primary:hover {
  background: var(--brand-action-hover);
  border-color: var(--brand-action-hover);
}

.btn-outline {
  border-color: color-mix(in srgb, var(--brand-action) 48%, var(--line));
  color: var(--brand-action);
}

.btn-outline:hover,
.btn-ghost:hover {
  border-color: var(--brand-action);
  color: var(--brand-action);
  background: color-mix(in srgb, var(--brand-action) 7%, var(--surface));
}

.head-actions .btn-outline {
  background: var(--brand-action);
  border-color: var(--brand-action);
  color: #fff;
  box-shadow: 0 7px 16px rgba(5, 16, 148, 0.14);
}

.head-actions .btn-outline:hover {
  background: var(--brand-action-hover);
  border-color: var(--brand-action-hover);
  color: #fff;
}

.btn-ghost,
.quick-action {
  color: var(--brand-action);
}

.quick-action:hover {
  border-color: var(--brand-action);
  background: color-mix(in srgb, var(--brand-action) 7%, var(--surface));
}

/* Orange upper navigation bar. */
.topbar {
  background: linear-gradient(105deg, var(--topbar-orange), var(--topbar-orange-dark));
  border-bottom-color: rgba(112, 52, 5, 0.42);
  box-shadow: 0 7px 22px rgba(113, 55, 8, 0.16);
}

.topbar .global-search input {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.62);
  color: #141414;
  box-shadow: 0 3px 10px rgba(82, 37, 4, 0.11);
}

.topbar .global-search input::placeholder {
  color: #756b62;
}

.topbar .icon-btn {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.72);
  color: #16243b;
}

.topbar .avatar {
  background: var(--brand-action);
}

/* Light-blue sales chart bars. */
.bar {
  background: linear-gradient(180deg, #a9ddff, var(--chart-light-blue));
  box-shadow: 0 6px 13px rgba(58, 164, 228, 0.2);
}

/* Separate typography and colours for section titles and subtitles. */
.page-head h1,
.card-head h2,
.card-head h3,
.modal-head h2,
.kanban-card h4 {
  font-family: var(--section-title-font);
  color: var(--section-title);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-head p,
.card-head p,
.metric-note,
.cell-sub,
.field small,
.quote-helper {
  font-family: var(--section-subtitle-font);
  color: var(--section-subtitle);
}

.page-head p,
.card-head p {
  font-style: italic;
  letter-spacing: 0.01em;
}

.metric-label {
  font-family: var(--section-subtitle-font);
  color: #385470;
  font-weight: 800;
}

.metric-card.accent .metric-label,
.metric-card.accent .metric-note {
  color: #dce8f3;
}

/* Quotation-detail enhancements. */
.quote-guidance {
  grid-column: 1 / -1;
  border: 1px solid color-mix(in srgb, var(--brand-action) 24%, var(--line));
  border-left: 4px solid var(--brand-action);
  border-radius: 12px;
  padding: 13px 15px;
  background: color-mix(in srgb, var(--brand-action) 5%, var(--surface));
}

.quote-guidance strong {
  display: block;
  color: var(--section-title);
  font-family: var(--section-title-font);
  font-size: 15px;
  margin-bottom: 4px;
}

.quote-guidance p {
  margin: 0;
  color: var(--section-subtitle);
  font-family: var(--section-subtitle-font);
  font-size: 12px;
}

.quote-items-field > label {
  color: var(--section-title);
  font-family: var(--section-title-font);
  font-size: 15px;
}

.line-item.quote-line-item {
  grid-template-columns: minmax(230px, 2fr) minmax(155px, 1fr) 76px 122px 112px 88px 105px 42px;
  gap: 9px;
  align-items: end;
  border: 1px solid color-mix(in srgb, var(--brand-action) 14%, var(--line));
}

.quote-line-item .quote-service-select,
.quote-line-item .quote-discount,
.quote-line-item .quote-tax {
  min-width: 0;
}

.quote-line-item select,
.quote-line-item input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 9px;
}

.quote-line-item label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-family: var(--section-subtitle-font);
  color: var(--section-subtitle);
  font-weight: 800;
}

.quote-line-total {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-weight: 850;
  color: var(--brand-action);
  white-space: nowrap;
}

.quote-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--chart-light-blue) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--chart-light-blue) 40%, var(--line));
}

.quote-summary div {
  display: grid;
  gap: 2px;
}

.quote-summary span {
  color: var(--section-subtitle);
  font-family: var(--section-subtitle-font);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.quote-summary strong {
  color: var(--section-title);
  font-size: 14px;
}

.quote-summary .quote-grand-total strong {
  color: var(--brand-action);
  font-size: 17px;
}

.quote-helper {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 1220px) {
  .line-item.quote-line-item {
    grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) 72px 110px;
  }

  .quote-line-item .quote-discount,
  .quote-line-item .quote-tax,
  .quote-line-item .quote-line-total {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding-inline: 14px;
  }

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

  .quote-line-item > div:first-child,
  .quote-line-item .quote-service-select {
    grid-column: 1 / -1;
  }

  .quote-line-item > .icon-btn {
    grid-column: 2;
    justify-self: end;
  }

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