:root {
  --da-navy: #00143b;
  --da-navy-elevated: #061b4a;
  --da-blue: #007fce;
  --da-brand-sky: #01aaf2;
  --da-cyan: #00c8fd;
  --da-steel: #707783;
  --da-muted: #8b93a1;
  --da-white: #ffffff;
  --da-surface: #ffffff;
  --da-surface-muted: #f5f7fa;
  --da-border: #e6eaf0;
  --da-panel-bg: var(--da-surface);
  --da-table-header-bg: var(--da-surface-muted);
  --da-table-header-color: var(--da-steel);
  --da-table-row-border: var(--da-border);
  --da-table-hover-bg: var(--da-surface-muted);
  --da-text-muted: var(--da-steel);
  --da-focus-ring: rgba(0, 127, 206, 0.12);
  --da-shadow: 0 8px 24px rgba(0, 20, 59, 0.06);
  --da-app-content-max-width: 1440px;
  --da-app-content-padding-x: clamp(1rem, 1.6vw, 1.75rem);
}

.main {
  background: var(--da-surface-muted);
}

.main-content {
  width: 100%;
  max-width: var(--da-app-content-max-width);
  margin-inline: auto;
  padding-inline: var(--da-app-content-padding-x);
  background: var(--da-surface-muted);
}

@media (min-width: 1200px) {
  .main-content {
    transition: max-width var(--transition-base);
  }

  body.sidebar-collapsed .main-content {
    max-width: calc(
      var(--da-app-content-max-width)
      + var(--sidebar-width)
      - var(--sidebar-collapsed-width)
    );
  }
}

.main-content .page-header {
  margin-bottom: 1.25rem;
}

.main-content .page-title {
  color: var(--da-navy);
  font-weight: 750;
}

.main-content .breadcrumb {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.main-content .section + .section {
  margin-top: 1.25rem;
}

.main-content .card {
  border: 1px solid var(--da-border) !important;
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.main-content .card-header {
  padding: 1rem 1.25rem;
  background: var(--da-panel-bg);
  border-bottom: 1px solid var(--da-border);
}

.main-content .card-title,
.main-content .section-title {
  color: var(--da-navy);
  font-weight: 700;
}

.main-content .card-body {
  padding: 1.25rem;
}

.main-content .table-responsive {
  border: 1px solid var(--da-border);
  border-radius: 8px;
}

.main-content .table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.main-content .table thead th {
  padding: 0.8rem 0.9rem;
  background: var(--da-table-header-bg);
  color: var(--da-table-header-color);
  border-bottom: 1px solid var(--da-border);
  font-size: 0.76rem;
  font-weight: 700;
  vertical-align: middle;
}

.main-content .table tbody td {
  padding: 0.9rem;
  border-color: var(--da-table-row-border);
  vertical-align: middle;
}

.main-content .table tbody tr {
  transition: background-color 0.15s ease;
}

.main-content .table tbody tr:hover {
  background: var(--da-table-hover-bg);
}

.main-content .btn {
  border-radius: 6px;
  font-weight: 600;
}

.main-content .btn-light {
  color: #46556c;
  background: #f4f6f9;
  border-color: #e4e8ee;
}

.main-content .btn-light:hover {
  color: var(--da-navy);
  background: #eaf0f5;
  border-color: #d7dfe8;
}

.main-content .badge {
  padding: 0.42rem 0.62rem;
  border-radius: 999px;
  font-weight: 650;
}

.main-content .form-control,
.main-content .form-select {
  min-height: 42px;
  border-color: var(--da-border);
  border-radius: 6px;
}

.main-content textarea.form-control {
  min-height: auto;
}

.main-content .form-control:focus,
.main-content .form-select:focus {
  border-color: var(--da-blue);
  box-shadow: 0 0 0 0.2rem var(--da-focus-ring);
}

.main-content fieldset {
  padding: 1.1rem;
  background: var(--da-panel-bg);
  border: 1px solid var(--da-border);
  border-radius: 8px;
}

.main-content fieldset legend {
  width: auto;
  padding: 0 0.35rem;
  color: var(--da-navy);
  font-size: 0.98rem;
  font-weight: 700;
}

.main-content .empty-state {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem !important;
}

.main-content .empty-state-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  background: var(--da-surface-muted);
  color: var(--da-blue);
}

.main-content .empty-state-title {
  color: var(--da-navy);
}

.main-content .alert {
  border-radius: 8px;
  border-width: 1px;
}

.app-toast-container {
  position: fixed;
  top: calc(var(--header-height) + 1rem);
  right: 1rem;
  z-index: 1090;
  width: min(23.75rem, calc(100vw - 2rem));
  pointer-events: none;
}

.app-toast-container .app-toast {
  width: 100%;
  color: var(--da-navy);
  background: var(--da-surface);
  border: 1px solid var(--da-border);
  box-shadow: var(--da-shadow);
  pointer-events: auto;
}

.app-htmx-indicator {
  display: none;
}

.htmx-request .app-htmx-indicator,
.htmx-request.app-htmx-indicator {
  display: inline-block;
}

.app-anchor-target {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

@media (max-width: 575.98px) {
  .app-toast-container {
    top: calc(var(--header-height) + 0.75rem);
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-toast-container .app-toast {
    transition: none;
  }
}

.main-content .pagination {
  margin-bottom: 0;
}

.main-content .page-link {
  color: var(--da-blue);
  border-color: var(--da-border);
}

.sidebar-footer-profile {
  cursor: default;
}

@media (max-width: 767.98px) {
  .main-content .card-header,
  .main-content .card-body {
    padding: 1rem;
  }

  .main-content .table thead th,
  .main-content .table tbody td {
    white-space: nowrap;
  }

  .main-content fieldset {
    padding: 0.9rem;
  }
}

/* Dark mode refinements: ModernAdmin sets data-theme="dark" on <html>. */
[data-theme="dark"] {
  --background-color: #101820;
  --default-color: #dce4eb;
  --heading-color: #f3f6f9;
  --accent-color: #4da3dc;
  --surface-color: #19242f;
  --muted-color: #9eacb9;
  --light-color: #71808e;
  --border-color: #30404d;
  --border-color-light: #24333f;
  --border-color-dark: #3b4d5b;
  --header-bg: #17222c;
  --header-border: #2a3945;
  --sidebar-bg: #151f29;
  --sidebar-border: #2a3945;
  --sidebar-hover-bg: #21303c;
  --sidebar-active-bg: rgba(77, 163, 220, 0.14);
  --sidebar-active-text: #72b9e8;
  --card-bg: #1b2733;
  --card-border: #30404d;
  --table-header-bg: #202e3a;
  --table-hover-bg: #22323f;
  --table-stripe-bg: #1d2a35;
  --input-bg: #15212b;
  --input-border: #354653;
  --input-focus-border: #4da3dc;
  --input-focus-ring: rgba(77, 163, 220, 0.2);
  --da-surface: #1b2733;
  --da-surface-muted: #101820;
  --da-border: #30404d;
  --da-navy: #f3f6f9;
  --da-blue: #66b2e3;
  --da-cyan: #52c1dc;
  --da-panel-bg: var(--da-surface);
  --da-table-header-bg: var(--table-header-bg);
  --da-table-header-color: #b9c5cf;
  --da-table-row-border: #2b3a46;
  --da-table-hover-bg: var(--table-hover-bg);
  --da-text-muted: var(--muted-color);
  --da-focus-ring: var(--input-focus-ring);
  --da-shadow: 0 10px 28px rgba(2, 8, 14, 0.2);
}

[data-theme="dark"] body,
[data-theme="dark"] .main,
[data-theme="dark"] .main-content {
  background: #101820;
  color: #dce4eb;
}

[data-theme="dark"] .main-content .page-title,
[data-theme="dark"] .main-content .card-title,
[data-theme="dark"] .main-content .section-title,
[data-theme="dark"] .main-content fieldset legend {
  color: #f3f6f9;
}

[data-theme="dark"] .main-content .text-muted,
[data-theme="dark"] .main-content .form-text,
[data-theme="dark"] .main-content .breadcrumb,
[data-theme="dark"] .main-content .breadcrumb-item,
[data-theme="dark"] .main-content .small.text-muted {
  color: #9eacb9 !important;
}

[data-theme="dark"] .main-content .card,
[data-theme="dark"] .main-content .modal-content,
[data-theme="dark"] .main-content .invoice-document {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d !important;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.2);
}

[data-theme="dark"] .main-content .card-header,
[data-theme="dark"] .main-content .modal-header,
[data-theme="dark"] .main-content .modal-footer {
  background: #1d2a36;
  border-color: #30404d;
}

[data-theme="dark"] .main-content .table-responsive {
  background: #19242f;
  border-color: #30404d;
}

[data-theme="dark"] .main-content .table {
  --bs-table-color: #dce4eb;
  --bs-table-bg: transparent;
  --bs-table-border-color: #2b3a46;
  color: #dce4eb;
}

[data-theme="dark"] .main-content .table thead th {
  color: #b9c5cf;
  background: #202e3a;
  border-bottom-color: #3a4b58;
}

[data-theme="dark"] .main-content .table tbody td {
  color: #dce4eb;
  border-color: #2b3a46;
}

[data-theme="dark"] .main-content .table tbody tr:hover,
[data-theme="dark"] .main-content .table tbody tr:hover > * {
  background: #22323f;
  color: #f3f6f9;
}

[data-theme="dark"] .main-content .form-control,
[data-theme="dark"] .main-content .form-select {
  color: #e6edf3;
  background-color: #15212b;
  border-color: #354653;
}

[data-theme="dark"] .main-content .form-control::placeholder {
  color: #7f8e9b;
  opacity: 1;
}

[data-theme="dark"] .main-content .form-control:focus,
[data-theme="dark"] .main-content .form-select:focus {
  color: #f3f6f9;
  background-color: #182630;
  border-color: #4da3dc;
  box-shadow: 0 0 0 0.2rem rgba(77, 163, 220, 0.16);
}

[data-theme="dark"] .main-content .form-control:disabled,
[data-theme="dark"] .main-content .form-select:disabled {
  color: #8493a0;
  background-color: #202b34;
  border-color: #2d3b46;
  opacity: 0.85;
}

[data-theme="dark"] .main-content .form-select option {
  color: #e6edf3;
  background: #182630;
}

[data-theme="dark"] .main-content fieldset,
[data-theme="dark"] .main-content .bg-light {
  color: #dce4eb !important;
  background: #18242e !important;
  border-color: #30404d !important;
}

[data-theme="dark"] .main-content .btn-light {
  color: #cbd5de;
  background: #253440;
  border-color: #394b59;
}

[data-theme="dark"] .main-content .btn-light:hover {
  color: #ffffff;
  background: #30424f;
  border-color: #4a5d6b;
}

[data-theme="dark"] .main-content .btn-outline-secondary {
  color: #b8c4ce;
  border-color: #4a5b68;
}

[data-theme="dark"] .main-content .btn-outline-secondary:hover {
  color: #ffffff;
  background: #354653;
  border-color: #5b6d7a;
}

[data-theme="dark"] .main-content .btn-primary {
  color: #ffffff;
  background: #287fb8;
  border-color: #287fb8;
}

[data-theme="dark"] .main-content .btn-primary:hover {
  background: #3391cd;
  border-color: #3391cd;
}

/* --- Status badge contrast — light mode (WCAG AA) --- */
.main-content .badge.bg-success-light,
.main-content .badge.bg-success {
  color: #157347 !important;
  background: #dcfce7 !important;
}

.main-content .badge.bg-warning-light,
.main-content .badge.bg-warning {
  color: #8a5a00 !important;
  background: #fef3c7 !important;
}

.main-content .badge.bg-danger-light,
.main-content .badge.bg-danger {
  color: #b02a37 !important;
  background: #fee2e2 !important;
}

.main-content .badge.bg-info-light,
.main-content .badge.bg-info {
  color: #087990 !important;
  background: #cffafe !important;
}

.main-content .badge.bg-primary-light {
  color: #006bb0 !important;
  background: #dbeafe !important;
}

[data-theme="dark"] .main-content .badge.bg-success,
[data-theme="dark"] .main-content .badge.bg-success-light {
  color: #83d9a0 !important;
  background: rgba(67, 167, 105, 0.18) !important;
}

[data-theme="dark"] .main-content .badge.bg-warning,
[data-theme="dark"] .main-content .badge.bg-warning-light {
  color: #f2cb78 !important;
  background: rgba(202, 146, 45, 0.18) !important;
}

[data-theme="dark"] .main-content .badge.bg-danger,
[data-theme="dark"] .main-content .badge.bg-danger-light {
  color: #f1a0a0 !important;
  background: rgba(194, 76, 76, 0.18) !important;
}

[data-theme="dark"] .main-content .badge.bg-info,
[data-theme="dark"] .main-content .badge.bg-info-light,
[data-theme="dark"] .main-content .badge.bg-primary-light {
  color: #83c7ed !important;
  background: rgba(61, 143, 194, 0.18) !important;
}

[data-theme="dark"] .main-content .badge.bg-secondary,
[data-theme="dark"] .main-content .badge.bg-light {
  color: #c1ccd5 !important;
  background: #2b3a46 !important;
  border-color: #3a4b58 !important;
}

[data-theme="dark"] .main-content .empty-state-icon {
  color: #72b9e8;
  background: rgba(77, 163, 220, 0.13);
  border: 1px solid rgba(102, 178, 227, 0.16);
}

[data-theme="dark"] .main-content .empty-state-title {
  color: #f3f6f9;
}

[data-theme="dark"] .main-content .page-link {
  color: #83c7ed;
  background: #1b2733;
  border-color: #30404d;
}

[data-theme="dark"] .main-content .page-link:hover,
[data-theme="dark"] .main-content .page-item.active .page-link {
  color: #ffffff;
  background: #287fb8;
  border-color: #287fb8;
}

[data-theme="dark"] .dash-kpi-card,
[data-theme="dark"] .dash-panel {
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.18);
}

[data-theme="dark"] .dash-section-title,
[data-theme="dark"] .dash-kpi-value {
  color: #f3f6f9;
}

[data-theme="dark"] .dash-section-subtitle,
[data-theme="dark"] .dash-kpi-label,
[data-theme="dark"] .dash-kpi-help {
  color: #9eacb9;
}

[data-theme="dark"] .dash-kpi-icon,
[data-theme="dark"] .dash-muted-badge {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.13);
  border-color: rgba(102, 178, 227, 0.18);
}

[data-theme="dark"] .dash-list-link {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
}

[data-theme="dark"] .dash-list-link:hover {
  color: #ffffff;
  background: #22323f;
}

/* Quote detail workflow */
.quote-flow-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: #ffffff;
  border: 1px solid #e4e9ee;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(18, 38, 63, 0.06);
}

.quote-flow-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 16rem;
}

.quote-flow-summary .badge {
  flex: 0 0 auto;
}

.quote-flow-summary h2 {
  margin: 0 0 0.15rem;
  color: #152238;
  font-size: 0.95rem;
  font-weight: 700;
}

.quote-flow-summary p {
  margin: 0;
  color: #687684;
  font-size: 0.8rem;
}

.quote-flow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quote-flow-actions form {
  margin: 0;
}

@media (max-width: 991.98px) {
  .quote-flow-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-flow-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .quote-flow-summary {
    align-items: flex-start;
    flex-direction: column;
    min-width: 0;
  }

  .quote-flow-actions,
  .quote-flow-actions .btn,
  .quote-flow-actions form {
    width: 100%;
  }
}

[data-theme="dark"] .quote-flow-panel {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.18);
}

[data-theme="dark"] .quote-flow-summary h2 {
  color: #f3f6f9;
}

[data-theme="dark"] .quote-flow-summary p {
  color: #9eacb9;
}

.quote-document.invoice-document {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #dfe6eb;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(22, 47, 67, 0.08);
}

.quote-document-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.72fr);
  align-items: start;
  gap: 1.25rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #e6ebef;
}

.quote-document-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding-top: 0.2rem;
}

.quote-document .invoice-doc-brand {
  flex: 0 0 auto;
}

.quote-document-brand-copy {
  display: grid;
  min-width: 0;
}

.quote-document-brand-copy strong {
  color: var(--da-navy);
  font-size: 1.05rem;
  font-weight: 700;
}

.quote-document-brand-copy > span {
  margin-top: 0.1rem;
  color: #667986;
  font-size: 0.72rem;
  font-weight: 600;
}

.quote-document-brand-copy small {
  max-width: 30rem;
  margin-top: 0.3rem;
  color: #82909b;
  font-size: 0.68rem;
  line-height: 1.45;
}

.quote-document-identity {
  padding: 0.8rem 0.9rem;
  background: #fafbfc;
  border: 1px solid #e7ebef;
  border-left: 2px solid #66acd3;
}

.quote-document-legend {
  display: block;
  color: #748291;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-document-identity h1 {
  margin: 0.2rem 0 0;
  color: var(--da-navy);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0;
}

.quote-document-number {
  margin-top: 0.15rem;
  color: var(--da-blue);
  font-size: 0.92rem;
  font-weight: 750;
}

.quote-document-number-label {
  display: block;
  margin-top: 0.45rem;
  color: #748291;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.quote-document-meta {
  display: grid;
  gap: 0;
  margin: 0.55rem 0 0;
}

.quote-document-meta > div {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: 0.22rem 0;
  border-bottom: 1px solid #edf0f3;
}

.quote-document-meta > div:last-child {
  border-bottom: 0;
}

.quote-document-meta dt,
.quote-document-meta dd {
  margin: 0;
  font-size: 0.68rem;
}

.quote-document-meta dt {
  color: #687888;
  font-weight: 650;
}

.quote-document-meta dd {
  color: #243a4d;
  font-weight: 650;
}

.quote-document-meta dd small {
  display: block;
  margin-top: 0.1rem;
  color: #748291;
  font-size: 0.65rem;
  font-weight: 500;
}

.quote-document-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  padding: 0.42rem 0.6rem;
  color: #516777;
  background: #f5f8fa;
  border-left: 1px solid #8bbbd5;
  font-size: 0.7rem;
}

.quote-document-notice i {
  flex: 0 0 auto;
  color: var(--da-blue);
}

.quote-document-notice.is-draft {
  color: #645d4a;
  background: #faf8f1;
  border-left-color: #b9aa7b;
}

.quote-document-notice.is-draft i {
  color: #947d3d;
}

.quote-document .invoice-doc-brand-logo,
.quote-document .invoice-doc-brand-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 38px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce5eb;
  border-radius: 7px;
}

.quote-document .invoice-doc-brand-logo img {
  display: block;
  max-width: 42px;
  max-height: 29px;
  object-fit: contain;
}

.quote-document .invoice-doc-brand-fallback {
  color: #fff;
  background: var(--da-blue);
  border-color: var(--da-blue);
  font-weight: 750;
}

.quote-document .invoice-doc-header,
.quote-document .invoice-doc-parties,
.quote-document .invoice-doc-items,
.quote-document .invoice-doc-totals,
.quote-document .invoice-doc-notes,
.quote-document .invoice-doc-footer {
  margin-bottom: 1rem;
}

.quote-document .invoice-doc-title h1 {
  font-size: 1.25rem;
}

.quote-document .invoice-doc-parties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  margin-bottom: 1.25rem;
  overflow: hidden;
  background: var(--da-surface-muted);
  border: 0;
  border-radius: 7px;
}

.quote-document .invoice-doc-party {
  padding: 0.9rem 0.75rem;
  background: transparent;
}

.quote-document .invoice-doc-party + .invoice-doc-party {
  border-left: 1px solid #edf0f2;
}

.quote-document .invoice-doc-party h6 {
  margin-bottom: 0.55rem;
  color: #778692;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-document .invoice-doc-party-name {
  margin-bottom: 0.45rem;
  color: var(--da-navy);
  font-size: 0.86rem;
  font-weight: 650;
}

.quote-document .invoice-doc-party p,
.quote-document .invoice-doc-notes p,
.quote-document .invoice-item-desc {
  font-size: 0.8rem;
  line-height: 1.45;
}

.quote-document .invoice-doc-date {
  padding: 0.65rem 0.75rem;
}

.quote-document .invoice-doc-items table th,
.quote-document .invoice-doc-items table td {
  padding: 0.55rem 0.6rem;
}

.quote-document .invoice-doc-items {
  overflow: hidden;
  border: 1px solid #dfe6eb;
  border-radius: 7px;
}

.quote-document .invoice-doc-items table th {
  color: #dfeaf2;
  background: #294b61;
  border-color: #3d6075;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-document .invoice-doc-items table td {
  border-color: #e7ecef;
  font-size: 0.74rem;
}

.quote-document .invoice-doc-items table tbody tr:nth-child(even) td {
  background: #fafcfd;
}

.quote-document .invoice-doc-totals {
  width: 100%;
  max-width: 18rem;
  min-width: 0;
  box-sizing: border-box;
  margin-left: auto;
  padding: 0.2rem;
  background: var(--da-surface);
  border: 1px solid var(--da-border);
  border-radius: 7px;
}

.quote-document .invoice-doc-totals-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 1rem;
  min-width: 0;
  padding: 0.48rem 0.75rem;
  border-bottom: 1px solid #e3e9ed;
  font-size: 0.76rem;
}

.quote-document .invoice-doc-totals-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quote-document .invoice-doc-totals-row span:last-child {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.quote-document .invoice-doc-totals-row:last-child {
  border-bottom: 0;
}

.quote-document .invoice-doc-totals-row.total {
  color: var(--da-navy);
  background: #f4f8fa;
  border-top: 1px solid #d6e2e9;
  font-size: 0.92rem;
}

.quote-document .invoice-doc-notes {
  padding: 0;
  background: transparent;
  border: 0;
}

.quote-document .invoice-doc-notes h6 {
  margin-bottom: 0.6rem;
  color: var(--da-navy);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-document-conditions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #dfe6eb;
}

.quote-document-conditions > div {
  padding: 0.65rem 0.75rem 0.65rem 0;
  border-bottom: 1px solid #e7ecef;
}

.quote-document-conditions > div:nth-child(even) {
  padding-right: 0;
  padding-left: 0.75rem;
  border-left: 1px solid #e7ecef;
}

.quote-document-conditions span {
  display: block;
  margin-bottom: 0.15rem;
  color: #6f7f8e;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.quote-document-conditions p {
  margin: 0;
  color: #344a5b;
}

.quote-document-payment {
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: #f8fafb;
  border-top: 1px solid #cddde7;
  border-bottom: 1px solid #e1e8ec;
}

.quote-document-payment-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.quote-document-payment-heading > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--da-blue);
  background: #e8f3f9;
  border-radius: 6px;
}

.quote-document-payment-heading h6,
.quote-document-payment-heading p {
  margin: 0;
}

.quote-document-payment-heading h6 {
  color: var(--da-navy);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.quote-document-payment-heading p {
  margin-top: 0.15rem;
  color: #748291;
  font-size: 0.68rem;
}

.quote-document-payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
}

.quote-document-payment-grid > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid #e5eaee;
}

.quote-document-payment-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.quote-document-payment-grid > div:nth-child(even) {
  padding-left: 0.75rem;
  border-left: 1px solid #e5eaee;
}

.quote-document-payment-grid > .is-wide {
  grid-column: 1 / -1;
  padding-left: 0;
  border-left: 0;
}

.quote-document-payment-grid dt,
.quote-document-payment-grid dd {
  margin: 0;
  font-size: 0.68rem;
}

.quote-document-payment-grid dt {
  color: #71818d;
  font-weight: 650;
}

.quote-document-payment-grid dd {
  color: #2e4657;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.quote-document .invoice-doc-footer {
  justify-content: center;
  gap: 1rem;
  padding-top: 0.75rem;
  color: #6f7e8c;
  border-top: 1px solid #dfe6eb;
  font-size: 0.7rem;
}

.quote-document .alert {
  margin-bottom: 1rem !important;
  padding: 0.65rem 0.8rem;
}

.quote-detail-sidebar {
  display: grid;
  align-content: start;
  gap: 1.5rem;
  min-width: 0;
}

.quote-detail-sidebar > .card {
  width: 100%;
  margin-bottom: 0 !important;
}

.quote-detail-lower-sections {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
}

.quote-detail-full-width-card {
  width: 100%;
  min-width: 0;
  margin: 0;
}

@media (max-width: 767.98px) {
  .quote-document.invoice-document {
    padding: 1rem;
  }

  .quote-document-header {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .quote-document .invoice-doc-parties {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quote-document .invoice-doc-party + .invoice-doc-party {
    border-top: 1px solid #e0e7ec;
    border-left: 0;
  }

  .quote-document .invoice-doc-items {
    overflow-x: auto;
  }

  .quote-document .invoice-doc-items table {
    min-width: 720px;
  }

  .quote-document .invoice-doc-totals {
    width: 100%;
    max-width: 18rem;
    margin-left: auto;
  }

  .quote-document .invoice-doc-totals-row {
    gap: 0.5rem;
    padding: 0.42rem 0.65rem;
  }

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

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

  .quote-document-payment-grid > div,
  .quote-document-payment-grid > div:nth-child(even) {
    padding-left: 0;
    border-bottom: 1px solid #e5eaee;
    border-left: 0;
  }

  .quote-document-payment-grid > div:last-child {
    border-bottom: 0;
  }

  .quote-document-conditions > div:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }
}

[data-theme="dark"] .quote-document.invoice-document {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
}

[data-theme="dark"] .quote-document .invoice-doc-parties {
  color: #dce4eb;
  background: #18242e;
}

[data-theme="dark"] .quote-document .invoice-doc-party {
  background: transparent;
}

[data-theme="dark"] .quote-document-header,
[data-theme="dark"] .quote-document .invoice-doc-party + .invoice-doc-party,
[data-theme="dark"] .quote-document .invoice-doc-items,
[data-theme="dark"] .quote-document .invoice-doc-totals,
[data-theme="dark"] .quote-document-conditions,
[data-theme="dark"] .quote-document-conditions > div,
[data-theme="dark"] .quote-document-conditions > div:nth-child(even),
[data-theme="dark"] .quote-document-payment,
[data-theme="dark"] .quote-document-payment-grid > div,
[data-theme="dark"] .quote-document-payment-grid > div:nth-child(even),
[data-theme="dark"] .quote-document .invoice-doc-footer {
  border-color: #30404d;
}

[data-theme="dark"] .quote-document-brand-copy strong,
[data-theme="dark"] .quote-document-identity h1,
[data-theme="dark"] .quote-document-meta dd,
[data-theme="dark"] .quote-document .invoice-doc-party-name,
[data-theme="dark"] .quote-document .invoice-doc-notes h6,
[data-theme="dark"] .quote-document-payment-heading h6,
[data-theme="dark"] .quote-document .invoice-doc-totals-row.total,
[data-theme="dark"] .quote-document-conditions p {
  color: #f3f6f9;
}

[data-theme="dark"] .quote-document-brand-copy > span,
[data-theme="dark"] .quote-document-brand-copy small,
[data-theme="dark"] .quote-document-legend,
[data-theme="dark"] .quote-document-number-label,
[data-theme="dark"] .quote-document-meta dt,
[data-theme="dark"] .quote-document-meta dd small,
[data-theme="dark"] .quote-document .invoice-doc-party h6,
[data-theme="dark"] .quote-document-payment-heading p,
[data-theme="dark"] .quote-document-payment-grid dt,
[data-theme="dark"] .quote-document-conditions span {
  color: #9eacb9;
}

[data-theme="dark"] .quote-document-identity,
[data-theme="dark"] .quote-document-payment,
[data-theme="dark"] .quote-document .invoice-doc-totals {
  background: #18242e;
}

[data-theme="dark"] .quote-document-meta > div,
[data-theme="dark"] .quote-document .invoice-doc-items table td,
[data-theme="dark"] .quote-document .invoice-doc-totals-row {
  border-color: #30404d;
}

[data-theme="dark"] .quote-document .invoice-doc-items table th {
  color: #edf4f8;
  background: #183b51;
  border-color: #35576a;
}

[data-theme="dark"] .quote-document .invoice-doc-items table td {
  color: #dce4eb;
  background: #1b2733;
}

[data-theme="dark"] .quote-document .invoice-doc-items table tbody tr:nth-child(even) td {
  background: #1e2c38;
}

[data-theme="dark"] .quote-document .invoice-doc-totals-row.total {
  background: #203541;
  border-color: #3a5668;
}

[data-theme="dark"] .quote-document-payment-heading > span {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.13);
}

[data-theme="dark"] .quote-document-payment-grid dd {
  color: #e6edf2;
}

[data-theme="dark"] .quote-document-notice {
  color: #c5d2da;
  background: #20313d;
  border-left-color: #4fa6d8;
}

[data-theme="dark"] .quote-document-notice.is-draft {
  color: #ded1a8;
  background: #302d24;
  border-left-color: #9c874a;
}

.quote-draft-builder {
  margin-bottom: 1.25rem;
}

.quote-items-builder-anchor {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.quote-draft-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  background: #ffffff;
  border: 1px solid var(--da-border);
  border-left: 3px solid var(--da-blue);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.quote-draft-summary h2,
.quote-document-preview-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1rem;
  font-weight: 700;
}

.quote-draft-summary h2 {
  line-height: 1.35;
}

.quote-draft-summary-main {
  min-width: 0;
}

.quote-draft-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-top: 0.65rem;
}

.quote-draft-summary-meta > span {
  display: flex;
  flex-direction: column;
}

.quote-draft-summary-meta small {
  color: #768394;
  font-size: 0.68rem;
}

.quote-draft-summary-meta strong {
  color: #2b3a50;
  font-size: 0.8rem;
  font-weight: 700;
}

.quote-draft-summary p,
.quote-document-preview-heading p {
  margin: 0.2rem 0 0;
  color: #768394;
  font-size: 0.78rem;
}

.quote-draft-summary-total {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
}

.quote-draft-summary-total span,
.quote-draft-summary-total small {
  color: #768394;
  font-size: 0.72rem;
}

.quote-draft-summary-total strong {
  color: var(--da-blue);
  font-size: 1.15rem;
}

.quote-draft-details > div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.3fr) 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #edf0f4;
}

.quote-draft-details > div:last-child {
  border-bottom: 0;
}

.quote-draft-details dt {
  color: #657286;
  font-size: 0.78rem;
  font-weight: 600;
}

.quote-draft-details dd {
  margin: 0;
  color: #2b3a50;
  font-size: 0.82rem;
}

.quote-draft-totals {
  position: static;
  height: 100%;
}

.quote-draft-conditions {
  height: 100%;
  overflow: hidden;
}

.quote-document-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 0.75rem;
  padding-top: 0;
  border-top: 0;
}

.quote-preview-details > summary {
  list-style: none;
}

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

.quote-preview-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding: 0.6rem 0.9rem;
  background: #f7f9fb;
  border: 1px solid var(--da-border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--da-navy);
  user-select: none;
}

.quote-preview-summary:hover {
  background: #eef1f5;
}

[data-theme="dark"] .quote-preview-summary {
  color: #dce4eb;
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .quote-preview-summary:hover {
  background: #1f2c38;
}

.quote-preview-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.quote-preview-details[open] .quote-preview-chevron {
  transform: rotate(180deg);
}

/* Quotes workspace */
.quote-page-description {
  max-width: 46rem;
  margin: 0;
  color: #687684;
  font-size: 0.86rem;
}

.quote-primary-action {
  min-height: 38px;
  padding-inline: 1rem;
}

.quote-list-panel,
.quote-editor-shell,
.quote-totals-panel {
  background: #ffffff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.quote-toolbar {
  padding: 0.25rem 0;
}

.quote-toolbar .row {
  --bs-gutter-y: 0.75rem;
}

.quote-toolbar .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

.quote-toolbar .form-control,
.quote-toolbar .form-select,
.quote-toolbar .input-group-text,
.quote-toolbar .btn {
  min-height: 38px;
}

.quote-toolbar-actions {
  align-items: center;
}

.quote-toolbar .input-group-text {
  color: #738094;
  background: #f7f9fb;
  border-color: #dce2e9;
}

.quote-filter-tabs {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.2rem 0.2rem 0.3rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.quote-filter-tab {
  position: relative;
  flex: 0 0 auto;
  padding: 0.55rem 0 0.65rem;
  color: #687684;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.quote-filter-tab::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.quote-filter-tab:hover,
.quote-filter-tab.active {
  color: var(--da-blue);
}

.quote-filter-tab.active::after {
  background: var(--da-blue);
}

.quote-list-panel {
  overflow: hidden;
}

.quote-list-heading,
.quote-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--da-border);
}

.quote-list-heading h2,
.quote-editor-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 0.95rem;
  font-weight: 700;
}

.quote-list-heading p,
.quote-editor-heading p {
  margin: 0.2rem 0 0;
  color: #7b8796;
  font-size: 0.76rem;
}

.quote-list-panel .table-responsive {
  border: 0;
  border-radius: 0;
}

.quote-list-table {
  min-width: 960px;
}

.quote-list-table > :not(caption) > * > * {
  padding: 0.6rem 0.75rem;
}

.quote-document-link {
  color: var(--da-navy);
  font-weight: 700;
  text-decoration: none;
}

.quote-document-link:hover {
  color: var(--da-blue);
}

.quote-client-name {
  color: #24344c;
  font-weight: 600;
}

.quote-cell-meta {
  margin-top: 0.15rem;
  color: #84909e;
  font-size: 0.72rem;
}

.quote-status-badge {
  padding: 0.2rem 0.55rem !important;
  font-size: 0.75rem;
  text-align: center;
}

.quote-currency-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.2rem 0.45rem;
  color: #1f5f89;
  background: #eaf5fc;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
}

.quote-total-value {
  color: var(--da-navy);
  font-weight: 700;
  white-space: nowrap;
}

.quote-row-actions {
  display: inline-flex;
  gap: 0.4rem;
}

.quote-row-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
}

.quote-list-pagination {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--da-border);
}

.quote-empty-state,
.quote-items-empty {
  text-align: center;
}

.quote-empty-state p,
.quote-items-empty p {
  margin: 0 auto 1rem;
  color: #768394;
}

.quote-editor-heading {
  background: #fbfcfe;
}

.quote-editor-eyebrow,
.quote-totals-heading > span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--da-blue);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quote-editor-heading-icon,
.quote-form-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--da-blue);
  background: #eaf5fc;
}

.quote-editor-heading-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 1.05rem;
}

.quote-editor-body {
  padding: 1rem;
}

.quote-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 1rem -1rem -1rem;
  padding: 0.85rem 1rem;
  background: #fbfcfe;
  border-top: 1px solid var(--da-border);
  border-radius: 0 0 8px 8px;
}

.quote-quick-start {
  max-width: 980px;
}

.quote-quick-start .quote-editor-body {
  padding-top: 0.85rem;
}

.quote-quick-start .quote-form-section:first-child {
  margin-bottom: 0;
  padding-bottom: 0.25rem;
  border-bottom: 0;
}

.quote-client-search {
  position: relative;
  z-index: 4;
}

.quote-client-search [hidden] {
  display: none !important;
}

.quote-client-search-control {
  flex-wrap: nowrap;
}

.quote-client-search-control .input-group-text {
  width: 2.75rem;
  justify-content: center;
  color: #768394;
  background: #ffffff;
  border-color: #dce2e9;
  border-right: 0;
}

.quote-client-search-control .form-control {
  min-height: 46px;
  padding-left: 0.75rem;
  border-left: 0;
}

.quote-client-search-results {
  position: absolute;
  top: calc(100% - 1.15rem);
  right: 0;
  left: 0;
  z-index: 10;
  max-height: 20rem;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--da-border);
  border-radius: 7px;
  box-shadow: 0 14px 34px rgba(20, 38, 58, 0.16);
}

.quote-client-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  color: #2b3a50;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf0f4;
}

.quote-client-search-result:hover,
.quote-client-search-result:focus {
  background: #f1f7fb;
  outline: 0;
}

.quote-client-result-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.quote-client-result-main strong {
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-client-result-main small,
.quote-client-result-meta {
  color: #768394;
  font-size: 0.72rem;
}

.quote-client-result-meta {
  flex: 0 0 auto;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-client-search-empty {
  padding: 1rem;
  color: #768394;
  font-size: 0.8rem;
  text-align: center;
}

.quote-client-selected {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.6rem 0.75rem;
  background: #f1f8fc;
  border: 1px solid #cfe3ef;
  border-radius: 7px;
}

.quote-client-selected > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.quote-client-selected small,
.quote-client-selected span span {
  color: #687684;
  font-size: 0.7rem;
}

.quote-client-selected strong {
  color: var(--da-navy);
  font-size: 0.86rem;
}

.quote-client-selected-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  color: var(--da-blue);
  background: #ffffff;
  border-radius: 50%;
}

.quote-client-select-fallback {
  margin-top: 0.65rem;
}

.quote-client-select-fallback summary {
  display: inline-flex;
  align-items: center;
  color: #768394;
  cursor: pointer;
  font-size: 0.72rem;
}

.quote-client-select-fallback summary:hover {
  color: var(--da-blue);
}

.quote-optional-fields {
  margin-top: 0.85rem;
  border: 1px solid var(--da-border);
  border-radius: 7px;
}

.quote-optional-fields summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  color: var(--da-navy);
  background: #f8fafc;
  border-radius: 7px;
  cursor: pointer;
  list-style: none;
}

.quote-optional-fields summary::-webkit-details-marker {
  display: none;
}

.quote-optional-fields summary span {
  display: flex;
  flex-direction: column;
}

.quote-optional-fields summary strong {
  font-size: 0.86rem;
}

.quote-optional-fields summary small {
  margin-top: 0.15rem;
  color: #768394;
  font-size: 0.73rem;
}

.quote-optional-fields summary i {
  color: var(--da-blue);
  transition: transform 0.2s ease;
}

.quote-optional-fields[open] summary i {
  transform: rotate(180deg);
}

.quote-optional-fields-body {
  padding: 0.85rem 0.85rem 0;
}

.quote-optional-fields-body .quote-form-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
}

.quote-form-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9edf2;
}

.quote-form-section-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.quote-form-section-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.quote-form-section-header h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 0.9rem;
  font-weight: 700;
}

.quote-form-section-header p {
  margin: 0.2rem 0 0;
  color: #768394;
  font-size: 0.76rem;
}

.quote-readonly-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 42px;
  padding: 0.35rem 0.75rem;
  background: #f3f6f9;
  border: 1px solid #e1e6ec;
  border-radius: 6px;
}

.quote-readonly-field span {
  color: var(--da-navy);
  font-weight: 700;
}

.quote-readonly-field small {
  color: #84909e;
  font-size: 0.68rem;
}

.quote-item-builder .quote-editor-body {
  padding-top: 0.85rem;
}

.quote-catalog-search {
  position: relative;
  z-index: 5;
  margin-bottom: 1.25rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--da-border);
  border-radius: 7px;
}

.quote-catalog-search [hidden] {
  display: none !important;
}

.quote-catalog-search-control {
  position: relative;
}

.quote-catalog-search-control > i {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  z-index: 2;
  color: #768394;
  transform: translateY(-50%);
  pointer-events: none;
}

.quote-catalog-search-control .form-control {
  min-height: 44px;
  padding-left: 2.45rem;
  background: #ffffff;
}

.quote-catalog-search-results {
  position: absolute;
  top: calc(100% - 0.3rem);
  right: 0.85rem;
  left: 0.85rem;
  z-index: 12;
  max-height: 21rem;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--da-border);
  border-radius: 7px;
  box-shadow: 0 14px 34px rgba(20, 38, 58, 0.16);
}

.quote-catalog-search-result {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  padding: 0.58rem 0.75rem;
  color: #2b3a50;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf0f4;
}

.quote-catalog-search-result:hover,
.quote-catalog-search-result:focus {
  background: #f1f7fb;
  outline: 0;
}

.quote-catalog-result-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.quote-catalog-result-main > span:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.quote-catalog-result-main strong {
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-catalog-result-main small,
.quote-catalog-result-meta {
  color: #768394;
  font-size: 0.72rem;
}

.quote-catalog-result-price {
  flex: 0 0 auto;
  color: var(--da-blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.quote-catalog-search-empty {
  padding: 1rem;
  color: #768394;
  font-size: 0.8rem;
  text-align: center;
}

.quote-catalog-search-feedback {
  margin-top: 0.35rem;
  color: #b42318;
  font-size: 0.75rem;
  font-weight: 600;
}

.quote-catalog-selected {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 58px;
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: #eef7fc;
  border: 1px solid #cfe3ef;
  border-radius: 7px;
}

.quote-catalog-selected-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  color: var(--da-blue);
  background: #ffffff;
  border-radius: 50%;
}

.quote-catalog-selected-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.quote-catalog-selected-content small,
.quote-catalog-selected-content span {
  color: #687684;
  font-size: 0.7rem;
}

.quote-catalog-selected-content strong {
  color: var(--da-navy);
  font-size: 0.86rem;
}

.quote-catalog-select-fallback summary {
  display: inline-flex;
  align-items: center;
  color: #768394;
  cursor: pointer;
  font-size: 0.72rem;
}

.quote-catalog-select-fallback summary:hover {
  color: var(--da-blue);
}

.quote-items-panel .table-responsive {
  border: 0;
  border-radius: 0 0 8px 8px;
}

.quote-items-table {
  min-width: 1040px;
}

.quote-items-table > :not(caption) > * > * {
  padding: 0.65rem 0.75rem;
}

.quote-items-table tbody tr:last-child td {
  border-bottom: 0;
}

.quote-item-cell {
  min-width: 280px;
}

.quote-item-row-actions {
  display: inline-flex;
  gap: 0.4rem;
  white-space: nowrap;
}

.quote-item-editor-container > td {
  padding: 0 !important;
  background: #f8fafc;
  border-bottom: 1px solid var(--da-border);
}

.quote-item-edit-form {
  padding: 1rem;
}

.quote-item-edit-heading,
.quote-item-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.quote-item-edit-heading {
  margin-bottom: 0.8rem;
}

.quote-item-edit-heading h3 {
  margin: 0;
  color: var(--da-navy);
  font-size: 0.9rem;
  font-weight: 700;
}

.quote-item-edit-actions {
  justify-content: flex-end;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid #e3e9ef;
}

.quote-items-empty {
  padding-block: 2rem !important;
}

.quote-items-empty .empty-state-icon {
  width: 52px;
  height: 52px;
  margin-inline: auto;
}

.quote-totals-panel {
  position: sticky;
  top: 1rem;
  overflow: hidden;
}

.quote-totals-heading {
  padding: 0.85rem 1rem;
  background: var(--da-navy);
}

.quote-totals-heading > span {
  color: #7dc8f0;
}

.quote-totals-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
}

.quote-totals-body {
  padding: 0.65rem 1rem 0.85rem;
}

.quote-total-row {
  padding: 0.5rem 0;
  color: #657286;
  border-bottom: 1px solid #edf0f4;
  font-size: 0.85rem;
}

.quote-total-row strong {
  color: #2b3a50;
}

.quote-total-final {
  align-items: baseline;
  padding-top: 0.75rem;
  color: var(--da-navy);
  font-size: 1rem;
  font-weight: 700;
}

.quote-total-final strong {
  color: var(--da-blue);
  font-size: 1.15rem;
}

@media (max-width: 991.98px) {
  .quote-totals-panel {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .quote-client-search-result {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .quote-client-result-meta {
    max-width: 100%;
  }

  .quote-draft-summary,
  .quote-document-preview-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-draft-summary-total {
    align-items: flex-start;
  }

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

  .quote-item-edit-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-draft-details > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .quote-primary-action,
  .quote-editor-actions .btn {
    width: 100%;
  }

  .quote-editor-body {
    padding: 1rem;
  }

  .quote-toolbar {
    padding: 0;
  }

  .quote-editor-actions {
    flex-direction: column-reverse;
    margin: 1rem -1rem -1rem;
    padding: 1rem;
  }

  .quote-list-heading,
  .quote-editor-heading {
    align-items: flex-start;
    padding: 1rem;
  }

  .quote-filter-tabs {
    gap: 1rem;
  }
}

[data-theme="dark"] .quote-page-description,
[data-theme="dark"] .quote-list-heading p,
[data-theme="dark"] .quote-editor-heading p,
[data-theme="dark"] .quote-form-section-header p,
[data-theme="dark"] .quote-cell-meta,
[data-theme="dark"] .quote-empty-state p,
[data-theme="dark"] .quote-items-empty p {
  color: #9eacb9;
}

[data-theme="dark"] .quote-list-panel,
[data-theme="dark"] .quote-editor-shell,
[data-theme="dark"] .quote-totals-panel {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.18);
}

[data-theme="dark"] .quote-toolbar .input-group-text,
[data-theme="dark"] .quote-editor-heading,
[data-theme="dark"] .quote-editor-actions,
[data-theme="dark"] .quote-optional-fields summary,
[data-theme="dark"] .quote-readonly-field {
  color: #c7d2dc;
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .quote-list-heading,
[data-theme="dark"] .quote-editor-heading,
[data-theme="dark"] .quote-editor-actions,
[data-theme="dark"] .quote-list-pagination,
[data-theme="dark"] .quote-optional-fields,
[data-theme="dark"] .quote-form-section {
  border-color: #30404d;
}

[data-theme="dark"] .quote-list-heading h2,
[data-theme="dark"] .quote-editor-heading h2,
[data-theme="dark"] .quote-form-section-header h2,
[data-theme="dark"] .quote-optional-fields summary,
[data-theme="dark"] .quote-document-link,
[data-theme="dark"] .quote-client-name,
[data-theme="dark"] .quote-total-value,
[data-theme="dark"] .quote-readonly-field span,
[data-theme="dark"] .quote-total-final {
  color: #f3f6f9;
}

[data-theme="dark"] .quote-filter-tab {
  color: #9eacb9;
}

[data-theme="dark"] .quote-optional-fields summary small {
  color: #9eacb9;
}

[data-theme="dark"] .quote-filter-tab:hover,
[data-theme="dark"] .quote-filter-tab.active,
[data-theme="dark"] .quote-total-final strong {
  color: #83c7ed;
}

[data-theme="dark"] .quote-currency-chip {
  color: #9bd7f3;
  background: rgba(77, 163, 220, 0.13);
}

[data-theme="dark"] .quote-editor-heading-icon,
[data-theme="dark"] .quote-form-section-icon {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.13);
}

[data-theme="dark"] .quote-total-row {
  color: #aab6c1;
  border-color: #30404d;
}

[data-theme="dark"] .quote-total-row strong {
  color: #dce4eb;
}

[data-theme="dark"] .quote-totals-heading {
  background: #142230;
}

[data-theme="dark"] .quote-catalog-search {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .quote-catalog-search-control .form-control,
[data-theme="dark"] .quote-catalog-search-results {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
}

[data-theme="dark"] .quote-catalog-search-results {
  box-shadow: 0 14px 34px rgba(2, 8, 14, 0.28);
}

[data-theme="dark"] .quote-catalog-search-result {
  color: #dce4eb;
  border-color: #30404d;
}

[data-theme="dark"] .quote-catalog-search-result:hover,
[data-theme="dark"] .quote-catalog-search-result:focus {
  background: #223543;
}

[data-theme="dark"] .quote-catalog-result-main small,
[data-theme="dark"] .quote-catalog-result-meta,
[data-theme="dark"] .quote-catalog-search-empty,
[data-theme="dark"] .quote-catalog-select-fallback summary {
  color: #9eacb9;
}

[data-theme="dark"] .quote-catalog-search-feedback {
  color: #f1a0a0;
}

[data-theme="dark"] .quote-catalog-result-price {
  color: #83c7ed;
}

[data-theme="dark"] .quote-catalog-selected {
  background: #1c303d;
  border-color: #31566b;
}

[data-theme="dark"] .quote-catalog-selected-icon {
  color: #83c7ed;
  background: #142430;
}

[data-theme="dark"] .quote-catalog-selected-content strong {
  color: #f3f6f9;
}

[data-theme="dark"] .quote-catalog-selected-content small,
[data-theme="dark"] .quote-catalog-selected-content span {
  color: #aab6c1;
}

[data-theme="dark"] .quote-client-search-results {
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 14px 34px rgba(2, 8, 14, 0.28);
}

[data-theme="dark"] .quote-client-search-control .input-group-text {
  color: #9eacb9;
  background: #1b2733;
  border-color: #30404d;
}

[data-theme="dark"] .quote-client-search-result {
  color: #dce4eb;
  border-color: #30404d;
}

[data-theme="dark"] .quote-client-search-result:hover,
[data-theme="dark"] .quote-client-search-result:focus {
  background: #223543;
}

[data-theme="dark"] .quote-client-result-main small,
[data-theme="dark"] .quote-client-result-meta,
[data-theme="dark"] .quote-client-search-empty,
[data-theme="dark"] .quote-client-select-fallback summary {
  color: #9eacb9;
}

[data-theme="dark"] .quote-client-selected {
  background: #1c303d;
  border-color: #31566b;
}

[data-theme="dark"] .quote-client-selected strong {
  color: #f3f6f9;
}

[data-theme="dark"] .quote-client-selected small,
[data-theme="dark"] .quote-client-selected span span {
  color: #aab6c1;
}

[data-theme="dark"] .quote-client-selected-icon {
  color: #83c7ed;
  background: #142430;
}

[data-theme="dark"] .quote-draft-summary {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  border-left-color: #4da3dc;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.18);
}

[data-theme="dark"] .quote-draft-summary h2,
[data-theme="dark"] .quote-document-preview-heading h2,
[data-theme="dark"] .quote-draft-details dd,
[data-theme="dark"] .quote-draft-summary-meta strong,
[data-theme="dark"] .quote-item-edit-heading h3 {
  color: #f3f6f9;
}

[data-theme="dark"] .quote-draft-summary p,
[data-theme="dark"] .quote-draft-summary-total span,
[data-theme="dark"] .quote-draft-summary-total small,
[data-theme="dark"] .quote-draft-summary-meta small,
[data-theme="dark"] .quote-document-preview-heading p,
[data-theme="dark"] .quote-draft-details dt {
  color: #9eacb9;
}

[data-theme="dark"] .quote-draft-summary-total strong {
  color: #83c7ed;
}

[data-theme="dark"] .quote-draft-details > div,
[data-theme="dark"] .quote-document-preview-heading,
[data-theme="dark"] .quote-item-edit-actions {
  border-color: #30404d;
}

[data-theme="dark"] .quote-item-editor-container > td {
  background: #17232d;
  border-color: #30404d;
}

/* Clients workspace */
.client-page-description {
  max-width: 48rem;
  margin: 0;
  color: #687684;
  font-size: 0.9rem;
}

.client-primary-action {
  min-height: 42px;
  padding-inline: 1rem;
}

.client-list-panel,
.client-editor-shell,
.client-profile-panel,
.client-detail-panel {
  background: #ffffff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.client-list-panel,
.client-editor-shell,
.client-profile-panel {
  overflow: hidden;
}

.client-panel-heading,
.client-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border-bottom: 1px solid var(--da-border);
}

.client-panel-heading h2,
.client-editor-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1rem;
  font-weight: 700;
}

.client-panel-heading p,
.client-editor-heading p {
  margin: 0.2rem 0 0;
  color: #7b8796;
  font-size: 0.8rem;
}

.client-panel-eyebrow {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--da-blue);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-panel-icon,
.client-editor-heading-icon,
.client-form-section-icon,
.client-profile-icon,
.client-detail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--da-blue);
  background: #eaf5fc;
}

.client-panel-icon,
.client-editor-heading-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1.05rem;
}

.client-list-panel > .table-responsive {
  border: 0;
  border-radius: 0;
}

.client-list-table {
  min-width: 900px;
}

.client-name-link {
  color: var(--da-navy);
  font-weight: 700;
  text-decoration: none;
}

.client-name-link:hover {
  color: var(--da-blue);
}

.client-cell-value {
  color: #2b3a50;
  font-weight: 600;
}

.client-cell-meta {
  margin-top: 0.15rem;
  color: #84909e;
  font-size: 0.75rem;
}

.client-type-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #516076;
  font-size: 0.84rem;
  white-space: nowrap;
}

.client-type-label i {
  color: var(--da-blue);
}

.client-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 4.7rem;
}

.client-status-dot {
  width: 0.38rem;
  height: 0.38rem;
  background: currentColor;
  border-radius: 50%;
}

.client-row-actions {
  display: inline-flex;
  gap: 0.4rem;
}

.client-row-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.client-list-pagination {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--da-border);
}

.client-empty-state,
.client-assets-empty {
  text-align: center;
}

.client-empty-state p,
.client-assets-empty p {
  margin-inline: auto;
  color: #768394;
}

.client-editor-body {
  padding: 1.25rem;
}

.client-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 1.25rem -1.25rem -1.25rem;
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border-top: 1px solid var(--da-border);
}

.client-form-section {
  margin-bottom: 1rem;
  padding: 1.15rem;
  background: #fbfcfe;
  border: 1px solid #e3e9ef;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(19, 43, 68, 0.035);
}

.client-form-section-last {
  margin-bottom: 0;
}

.client-form-section-header,
.client-detail-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.client-form-section-header {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e6ebf0;
}

.client-form-section-header > div {
  min-width: 0;
}

.client-form-section-icon,
.client-detail-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.client-form-section-header h2,
.client-detail-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 0.95rem;
  font-weight: 700;
}

.client-form-section-header p,
.client-detail-heading p {
  margin: 0.2rem 0 0;
  color: #768394;
  font-size: 0.8rem;
}

.client-privacy-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.65rem;
  color: #687684;
  font-size: 0.78rem;
}

.client-privacy-hint i {
  color: #17815f;
}

.formal-quote-required-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a5a00;
  background: #fef3c7;
  vertical-align: middle;
}

.is-formal-required-missing {
  border-color: #f2c14e !important;
  background-color: #fffaf0;
}

[data-theme="dark"] .formal-quote-required-badge {
  color: #f2cb78;
  background: rgba(202, 146, 45, 0.18);
}

[data-theme="dark"] .is-formal-required-missing {
  border-color: rgba(202, 146, 45, 0.55) !important;
  background-color: rgba(202, 146, 45, 0.08);
}

.client-page-actions,
.client-assets-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.client-profile-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
}

.client-profile-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  background: #fbfcfe;
  border-right: 1px solid var(--da-border);
}

.client-profile-icon {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  font-size: 1.35rem;
}

.client-profile-main h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1.15rem;
  font-weight: 750;
}

.client-profile-main p {
  margin: 0.2rem 0 0;
  color: #738094;
  font-size: 0.85rem;
}

.client-profile-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.client-profile-fact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
  padding: 1rem;
  border-right: 1px solid var(--da-border);
}

.client-profile-fact:last-child {
  border-right: 0;
}

.client-profile-label,
.client-contact-label {
  color: #84909e;
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
}

.client-profile-value {
  overflow-wrap: anywhere;
  color: #2b3a50;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
}

.client-detail-panel {
  padding: 1.25rem;
}

.client-data-list,
.client-trace-list {
  margin: 0;
}

.client-data-list > div,
.client-trace-list > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.42fr) minmax(0, 0.58fr);
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #edf0f4;
}

.client-data-list > div:last-child,
.client-trace-list > div:last-child {
  border-bottom: 0;
}

.client-data-list dt,
.client-trace-list dt {
  color: #738094;
  font-size: 0.8rem;
  font-weight: 600;
}

.client-data-list dd,
.client-trace-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #2b3a50;
  font-size: 0.85rem;
  font-weight: 500;
}

.client-contact-list {
  display: grid;
  gap: 0.65rem;
}

.client-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  background: #f7f9fb;
  border-radius: 6px;
}

.client-contact-item > i {
  color: var(--da-blue);
  font-size: 1rem;
}

.client-contact-item > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.client-contact-value {
  overflow-wrap: anywhere;
  color: #2b3a50;
  font-size: 0.84rem;
  font-weight: 500;
  text-transform: none;
}

.client-address-value {
  color: #2b3a50;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.65;
}

.client-assets-panel {
  padding: 0;
  overflow: hidden;
}

.client-assets-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--da-border);
}

.client-assets-table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
}

.client-assets-table {
  min-width: 760px;
}

.client-history-section + .client-history-section {
  margin-top: 0.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--da-border);
}

.client-history-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
}

.client-history-section-header h3 {
  margin: 0;
  color: var(--da-navy);
  font-size: 0.8rem;
  font-weight: 700;
}

.client-history-section-body {
  padding: 0.85rem 1.25rem 1.25rem;
}

.client-history-empty {
  margin: 0;
  color: #768394;
  font-size: 0.8rem;
}

.quote-client-summary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: var(--da-surface-muted);
  border: 1px solid var(--da-border);
  border-radius: 6px;
}

.quote-client-summary-name {
  color: var(--da-navy);
  font-weight: 700;
}

.quote-client-summary-identifier,
.quote-client-summary-label {
  display: block;
  color: #768394;
  font-size: 0.7rem;
  font-weight: 600;
}

.quote-client-summary-label {
  margin-bottom: 0.15rem;
  text-transform: uppercase;
}

.quote-client-summary-value {
  display: block;
  overflow-wrap: anywhere;
  color: #2b3a50;
  font-size: 0.85rem;
  font-weight: 500;
}

.client-assets-empty {
  padding-block: 2rem !important;
}

@media (max-width: 1199.98px) {
  .client-profile-panel {
    grid-template-columns: 1fr;
  }

  .client-profile-main {
    border-right: 0;
    border-bottom: 1px solid var(--da-border);
  }
}

@media (max-width: 767.98px) {
  .client-profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-profile-fact:nth-child(2) {
    border-right: 0;
  }

  .client-profile-fact:nth-child(-n + 2) {
    border-bottom: 1px solid var(--da-border);
  }

  .client-assets-heading,
  .client-page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .client-history-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .client-history-section-header .btn {
    align-self: flex-start;
  }

  .client-page-actions .btn,
  .client-page-actions form,
  .client-page-actions form .btn,
  .client-assets-actions .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .client-primary-action,
  .client-editor-actions .btn {
    width: 100%;
  }

  .client-panel-heading,
  .client-editor-heading,
  .client-profile-main,
  .client-detail-panel,
  .client-assets-heading,
  .client-editor-body {
    padding: 1rem;
  }

  .client-panel-heading,
  .client-editor-heading {
    align-items: flex-start;
  }

  .client-editor-actions {
    align-items: stretch;
    flex-direction: column-reverse;
    margin: 1rem -1rem -1rem;
    padding: 1rem;
  }

  .client-profile-facts {
    grid-template-columns: 1fr;
  }

  .client-profile-fact,
  .client-profile-fact:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--da-border);
  }

  .client-profile-fact:last-child {
    border-bottom: 0;
  }

  .client-history-section-header,
  .client-history-section-body {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .client-data-list > div,
  .client-trace-list > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .client-assets-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
}

[data-theme="dark"] .client-page-description,
[data-theme="dark"] .client-panel-heading p,
[data-theme="dark"] .client-editor-heading p,
[data-theme="dark"] .client-form-section-header p,
[data-theme="dark"] .client-detail-heading p,
[data-theme="dark"] .client-cell-meta,
[data-theme="dark"] .client-profile-main p,
[data-theme="dark"] .client-empty-state p,
[data-theme="dark"] .client-assets-empty p,
[data-theme="dark"] .client-privacy-hint {
  color: #9eacb9;
}

[data-theme="dark"] .client-list-panel,
[data-theme="dark"] .client-editor-shell,
[data-theme="dark"] .client-profile-panel,
[data-theme="dark"] .client-detail-panel {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.18);
}

[data-theme="dark"] .client-panel-heading,
[data-theme="dark"] .client-editor-heading,
[data-theme="dark"] .client-editor-actions,
[data-theme="dark"] .client-profile-main {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .client-panel-heading h2,
[data-theme="dark"] .client-editor-heading h2,
[data-theme="dark"] .client-form-section-header h2,
[data-theme="dark"] .client-detail-heading h2,
[data-theme="dark"] .client-name-link,
[data-theme="dark"] .client-profile-main h2,
[data-theme="dark"] .client-cell-value,
[data-theme="dark"] .client-profile-value,
[data-theme="dark"] .client-data-list dd,
[data-theme="dark"] .client-trace-list dd,
[data-theme="dark"] .client-contact-value,
[data-theme="dark"] .client-address-value {
  color: #f3f6f9;
}

[data-theme="dark"] .client-type-label,
[data-theme="dark"] .client-data-list dt,
[data-theme="dark"] .client-trace-list dt {
  color: #aab6c1;
}

[data-theme="dark"] .client-panel-icon,
[data-theme="dark"] .client-editor-heading-icon,
[data-theme="dark"] .client-form-section-icon,
[data-theme="dark"] .client-profile-icon,
[data-theme="dark"] .client-detail-icon {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.13);
}

[data-theme="dark"] .client-panel-heading,
[data-theme="dark"] .client-editor-heading,
[data-theme="dark"] .client-editor-actions,
[data-theme="dark"] .client-list-pagination,
[data-theme="dark"] .client-form-section,
[data-theme="dark"] .client-profile-main,
[data-theme="dark"] .client-profile-fact,
[data-theme="dark"] .client-assets-heading,
[data-theme="dark"] .client-data-list > div,
[data-theme="dark"] .client-trace-list > div {
  border-color: #30404d;
}

[data-theme="dark"] .client-contact-item {
  background: #18242e;
}

[data-theme="dark"] .client-history-section + .client-history-section {
  border-color: #30404d;
}

[data-theme="dark"] .client-history-section-header h3,
[data-theme="dark"] .quote-client-summary-name,
[data-theme="dark"] .quote-client-summary-value {
  color: #f3f6f9;
}

[data-theme="dark"] .client-history-empty,
[data-theme="dark"] .quote-client-summary-identifier,
[data-theme="dark"] .quote-client-summary-label {
  color: #9eacb9;
}

[data-theme="dark"] .quote-client-summary-header {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .client-form-section {
  background: #18242e;
}

/* IT inventory workspace */
.inventory-page-description {
  max-width: 50rem;
  margin: 0;
  color: #687684;
  font-size: 0.9rem;
}

.inventory-primary-action {
  min-height: 42px;
  padding-inline: 1rem;
}

.inventory-filter-panel,
.inventory-list-panel,
.inventory-editor-shell,
.inventory-profile-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.inventory-filter-heading,
.inventory-panel-heading,
.inventory-editor-heading,
.inventory-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.inventory-filter-heading,
.inventory-panel-heading,
.inventory-editor-heading {
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border-bottom: 1px solid var(--da-border);
}

.inventory-filter-heading h2,
.inventory-panel-heading h2,
.inventory-editor-heading h2,
.inventory-history-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1rem;
  font-weight: 700;
}

.inventory-panel-heading p,
.inventory-editor-heading p,
.inventory-history-heading p {
  margin: 0.2rem 0 0;
  color: #7b8796;
  font-size: 0.8rem;
}

.inventory-eyebrow {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--da-blue);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.inventory-panel-icon,
.inventory-form-icon,
.inventory-profile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--da-blue);
  background: #eaf5fc;
}

.inventory-panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1.05rem;
}

.inventory-filter-heading > i {
  color: var(--da-blue);
  font-size: 1.1rem;
}

.inventory-filter-body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.inventory-filter-body .input-group-text {
  color: #738094;
  background: #f7f9fb;
  border-color: #dce2e9;
}

.inventory-filter-actions,
.inventory-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.inventory-list-panel > .table-responsive {
  border: 0;
  border-radius: 0;
}

.inventory-list-table {
  min-width: 1040px;
}

.inventory-asset-link {
  color: var(--da-navy);
  font-weight: 700;
  text-decoration: none;
}

.inventory-asset-link:hover {
  color: var(--da-blue);
}

.inventory-cell-value {
  color: #2b3a50;
  font-weight: 600;
}

.inventory-cell-meta {
  margin-top: 0.15rem;
  color: #84909e;
  font-size: 0.75rem;
}

.inventory-type-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #516076;
  white-space: nowrap;
}

.inventory-type-label i {
  color: var(--da-blue);
}

.inventory-operation-badge,
.inventory-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 5rem;
}

.inventory-operation-badge {
  color: #526176;
  background: #eef2f6;
}

.inventory-status-in_use {
  color: #087654;
  background: #def5eb;
}

.inventory-status-maintenance {
  color: #9a6400;
  background: #fff0cc;
}

.inventory-status-retired {
  color: #6f7782;
  background: #e9edf1;
}

.inventory-status-dot {
  width: 0.38rem;
  height: 0.38rem;
  background: currentColor;
  border-radius: 50%;
}

.inventory-row-actions {
  display: inline-flex;
  gap: 0.4rem;
}

.inventory-row-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.inventory-list-pagination {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--da-border);
}

.inventory-empty-state,
.inventory-history-empty {
  text-align: center;
}

.inventory-empty-state p,
.inventory-history-empty p {
  margin-inline: auto;
  color: #768394;
}

.inventory-editor-heading {
  position: relative;
  z-index: 1;
  min-width: 0;
  justify-content: flex-start;
}

.inventory-editor-heading > div {
  min-width: 0;
}

.inventory-editor-heading > .inventory-active-badge {
  margin-left: auto;
}

.inventory-editor-body {
  padding: 1.5rem 1.25rem 1.25rem;
}

.inventory-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 1.25rem -1.25rem -1.25rem;
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border-top: 1px solid var(--da-border);
}

.inventory-form-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e6ebf0;
}

.inventory-form-section {
  margin-bottom: 1rem;
  padding: 1.15rem;
  background: #fbfcfe;
  border: 1px solid #e3e9ef;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(19, 43, 68, 0.035);
}

.inventory-form-section-last {
  margin-bottom: 0;
}

.inventory-form-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.inventory-form-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 0.95rem;
  font-weight: 700;
}

.inventory-form-heading p {
  margin: 0.2rem 0 0;
  color: #768394;
  font-size: 0.8rem;
}

.inventory-form-heading > div {
  min-width: 0;
}

.inventory-privacy-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.65rem;
  color: #687684;
  font-size: 0.78rem;
}

.inventory-privacy-hint i {
  color: #17815f;
}

.inventory-profile-panel {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(0, 1.2fr);
}

.inventory-profile-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  background: #fbfcfe;
  border-right: 1px solid var(--da-border);
}

.inventory-profile-icon {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  font-size: 1.35rem;
}

.inventory-profile-main h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1.15rem;
  font-weight: 750;
}

.inventory-profile-main p {
  margin: 0.2rem 0 0;
  color: #738094;
  font-size: 0.85rem;
}

.inventory-profile-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-profile-facts > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
  padding: 1rem;
  border-right: 1px solid var(--da-border);
}

.inventory-profile-facts > div:last-child {
  border-right: 0;
}

.inventory-profile-facts span {
  color: #84909e;
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
}

.inventory-profile-facts strong {
  overflow-wrap: anywhere;
  color: #2b3a50;
  font-size: 0.84rem;
}

.inventory-detail-panel {
  height: 100%;
}

.inventory-history-panel .card-body {
  padding: 0;
}

.inventory-history-heading {
  padding: 1.25rem;
  border-bottom: 1px solid var(--da-border);
}

.inventory-event-form {
  margin: 1.25rem;
  padding: 1.1rem;
  background: #f7f9fb;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
}

.inventory-event-item {
  position: relative;
  margin: 0 1.25rem;
  padding: 1.15rem 0 1.15rem 1.5rem;
  border-top: 1px solid #edf0f4;
}

.inventory-event-item::before {
  position: absolute;
  top: 1.45rem;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--da-blue);
  border: 2px solid #d9eef9;
  border-radius: 50%;
  content: "";
}

.inventory-history-empty {
  padding-block: 2rem !important;
}

@media (max-width: 1199.98px) {
  .inventory-profile-panel {
    grid-template-columns: 1fr;
  }

  .inventory-profile-main {
    border-right: 0;
    border-bottom: 1px solid var(--da-border);
  }
}

@media (max-width: 767.98px) {
  .inventory-filter-actions,
  .inventory-page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-filter-actions .btn,
  .inventory-page-actions .btn,
  .inventory-page-actions form,
  .inventory-page-actions form .btn {
    width: 100%;
  }

  .inventory-profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-profile-facts > div:nth-child(2) {
    border-right: 0;
  }

  .inventory-profile-facts > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--da-border);
  }
}

@media (max-width: 575.98px) {
  .inventory-primary-action,
  .inventory-editor-actions .btn {
    width: 100%;
  }

  .inventory-filter-heading,
  .inventory-panel-heading,
  .inventory-editor-heading,
  .inventory-filter-body,
  .inventory-editor-body,
  .inventory-profile-main,
  .inventory-history-heading {
    padding: 1rem;
  }

  .inventory-editor-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .inventory-editor-actions {
    flex-direction: column-reverse;
    margin: 1rem -1rem -1rem;
    padding: 1rem;
  }

  .inventory-profile-facts {
    grid-template-columns: 1fr;
  }

  .inventory-profile-facts > div,
  .inventory-profile-facts > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--da-border);
  }

  .inventory-profile-facts > div:last-child {
    border-bottom: 0;
  }

  .inventory-event-form,
  .inventory-event-item {
    margin-inline: 1rem;
  }
}

[data-theme="dark"] .inventory-page-description,
[data-theme="dark"] .inventory-panel-heading p,
[data-theme="dark"] .inventory-editor-heading p,
[data-theme="dark"] .inventory-history-heading p,
[data-theme="dark"] .inventory-form-heading p,
[data-theme="dark"] .inventory-cell-meta,
[data-theme="dark"] .inventory-profile-main p,
[data-theme="dark"] .inventory-privacy-hint,
[data-theme="dark"] .inventory-empty-state p,
[data-theme="dark"] .inventory-history-empty p {
  color: #9eacb9;
}

[data-theme="dark"] .inventory-filter-panel,
[data-theme="dark"] .inventory-list-panel,
[data-theme="dark"] .inventory-editor-shell,
[data-theme="dark"] .inventory-profile-panel {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.18);
}

[data-theme="dark"] .inventory-filter-heading,
[data-theme="dark"] .inventory-panel-heading,
[data-theme="dark"] .inventory-editor-heading,
[data-theme="dark"] .inventory-editor-actions,
[data-theme="dark"] .inventory-profile-main,
[data-theme="dark"] .inventory-event-form {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .inventory-filter-body .input-group-text {
  color: #aab6c1;
  background: #15212b;
  border-color: #30404d;
}

[data-theme="dark"] .inventory-filter-heading h2,
[data-theme="dark"] .inventory-panel-heading h2,
[data-theme="dark"] .inventory-editor-heading h2,
[data-theme="dark"] .inventory-history-heading h2,
[data-theme="dark"] .inventory-form-heading h2,
[data-theme="dark"] .inventory-asset-link,
[data-theme="dark"] .inventory-cell-value,
[data-theme="dark"] .inventory-profile-main h2,
[data-theme="dark"] .inventory-profile-facts strong {
  color: #f3f6f9;
}

[data-theme="dark"] .inventory-type-label {
  color: #aab6c1;
}

[data-theme="dark"] .inventory-panel-icon,
[data-theme="dark"] .inventory-form-icon,
[data-theme="dark"] .inventory-profile-icon {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.13);
}

[data-theme="dark"] .inventory-filter-heading,
[data-theme="dark"] .inventory-panel-heading,
[data-theme="dark"] .inventory-editor-heading,
[data-theme="dark"] .inventory-editor-actions,
[data-theme="dark"] .inventory-list-pagination,
[data-theme="dark"] .inventory-form-heading,
[data-theme="dark"] .inventory-profile-main,
[data-theme="dark"] .inventory-profile-facts > div,
[data-theme="dark"] .inventory-history-heading,
[data-theme="dark"] .inventory-event-item {
  border-color: #30404d;
}

[data-theme="dark"] .inventory-operation-badge {
  color: #c7d2dc;
  background: #263541;
}

[data-theme="dark"] .inventory-form-section {
  background: #18242e;
  border-color: #30404d;
  box-shadow: none;
}

[data-theme="dark"] .inventory-status-in_use {
  color: #79d5b7;
  background: rgba(37, 174, 130, 0.16);
}

[data-theme="dark"] .inventory-status-maintenance {
  color: #f0c56d;
  background: rgba(222, 164, 48, 0.16);
}

/* Technical operations workspace */
.technical-ops-page-description {
  max-width: 50rem;
  margin: 0;
  color: #687684;
  font-size: 0.9rem;
}

.technical-ops-primary-action {
  min-height: 42px;
}

.technical-ops-filter-panel,
.technical-ops-list-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.technical-ops-filter-heading,
.technical-ops-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border-bottom: 1px solid var(--da-border);
}

.technical-ops-filter-heading h2,
.technical-ops-list-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1rem;
  font-weight: 700;
}

.technical-ops-filter-heading p,
.technical-ops-list-heading p {
  margin: 0.2rem 0 0;
  color: #7b8796;
  font-size: 0.8rem;
}

.technical-ops-eyebrow {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--da-blue);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.technical-ops-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  color: var(--da-blue);
  background: #eaf5fc;
  border-radius: 8px;
  font-size: 1.05rem;
}

.technical-ops-filter-body {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  align-items: end;
  gap: 1rem;
  padding: 1.1rem 1.25rem 1.25rem;
}

.technical-ops-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.technical-ops-list-panel > .table-responsive {
  border: 0;
  border-radius: 0;
}

.technical-ops-table {
  min-width: 980px;
}

.technical-ops-date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--da-navy);
  white-space: nowrap;
}

.technical-ops-date i {
  color: var(--da-blue);
}

.technical-ops-status-badge {
  min-width: 7rem;
  text-align: center;
}

.technical-ops-cell-value,
.technical-ops-asset-link {
  color: #2b3a50;
  font-weight: 650;
}

.technical-ops-asset-link {
  text-decoration: none;
}

.technical-ops-asset-link:hover {
  color: var(--da-blue);
}

.technical-ops-cell-meta {
  margin-top: 0.15rem;
  color: #84909e;
  font-size: 0.75rem;
}

.technical-ops-client {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #516076;
  font-size: 0.84rem;
}

.technical-ops-client i {
  color: var(--da-blue);
}

.technical-ops-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.technical-ops-pagination {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--da-border);
}

.technical-ops-empty-state {
  text-align: center;
}

.technical-ops-empty-state p {
  margin-inline: auto;
  color: #768394;
}

@media (max-width: 767.98px) {
  .technical-ops-filter-body {
    grid-template-columns: 1fr;
  }

  .technical-ops-filter-actions {
    justify-content: stretch;
  }

  .technical-ops-filter-actions .btn {
    flex: 1 1 0;
  }
}

@media (max-width: 575.98px) {
  .technical-ops-primary-action {
    width: 100%;
  }

  .technical-ops-filter-heading,
  .technical-ops-list-heading,
  .technical-ops-filter-body {
    padding: 1rem;
  }

  .technical-ops-filter-heading,
  .technical-ops-list-heading {
    align-items: flex-start;
  }

  .technical-ops-filter-actions {
    flex-direction: column-reverse;
  }

  .technical-ops-filter-actions .btn {
    width: 100%;
  }
}

[data-theme="dark"] .technical-ops-page-description,
[data-theme="dark"] .technical-ops-filter-heading p,
[data-theme="dark"] .technical-ops-list-heading p,
[data-theme="dark"] .technical-ops-cell-meta,
[data-theme="dark"] .technical-ops-empty-state p {
  color: #9eacb9;
}

[data-theme="dark"] .technical-ops-filter-panel,
[data-theme="dark"] .technical-ops-list-panel {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.18);
}

[data-theme="dark"] .technical-ops-filter-heading,
[data-theme="dark"] .technical-ops-list-heading {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .technical-ops-filter-heading h2,
[data-theme="dark"] .technical-ops-list-heading h2,
[data-theme="dark"] .technical-ops-date,
[data-theme="dark"] .technical-ops-cell-value,
[data-theme="dark"] .technical-ops-asset-link {
  color: #f3f6f9;
}

[data-theme="dark"] .technical-ops-client {
  color: #aab6c1;
}

[data-theme="dark"] .technical-ops-panel-icon {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.13);
}

[data-theme="dark"] .technical-ops-pagination {
  border-color: #30404d;
}

/* Commercial catalog workspace */
.catalog-page-description {
  max-width: 50rem;
  margin: 0;
  color: #687684;
  font-size: 0.9rem;
}

.catalog-primary-action {
  min-height: 42px;
}

.catalog-list-panel,
.catalog-editor-shell,
.catalog-profile-panel,
.catalog-detail-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.catalog-panel-heading,
.catalog-editor-heading,
.catalog-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border-bottom: 1px solid var(--da-border);
}

.catalog-panel-heading h2,
.catalog-editor-heading h2,
.catalog-form-heading h2,
.catalog-detail-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1rem;
  font-weight: 700;
}

.catalog-panel-heading p,
.catalog-editor-heading p,
.catalog-form-heading p,
.catalog-detail-heading p {
  margin: 0.2rem 0 0;
  color: #7b8796;
  font-size: 0.8rem;
}

.catalog-eyebrow {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--da-blue);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.catalog-panel-icon,
.catalog-editor-heading-icon,
.catalog-form-icon,
.catalog-profile-icon,
.catalog-detail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  color: var(--da-blue);
  background: #eaf5fc;
  border-radius: 8px;
  font-size: 1.05rem;
}

.catalog-count-badge {
  flex: 0 0 auto;
  padding: 0.35rem 0.65rem;
  color: #536274;
  background: #eef2f6;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.catalog-list-panel > .table-responsive {
  border: 0;
  border-radius: 0;
}

.catalog-list-table {
  min-width: 1080px;
}

.catalog-item-link {
  color: #243650;
  font-weight: 700;
  text-decoration: none;
}

.catalog-item-link:hover {
  color: var(--da-blue);
}

.catalog-cell-value,
.catalog-price {
  color: #34445a;
}

.catalog-cell-meta {
  max-width: 22rem;
  margin-top: 0.15rem;
  color: #84909e;
  font-size: 0.75rem;
}

.catalog-type-label,
.catalog-code {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #546375;
  font-size: 0.8rem;
  font-weight: 650;
}

.catalog-type-label i {
  color: var(--da-blue);
}

.catalog-code {
  padding: 0.25rem 0.45rem;
  background: #f2f5f8;
  border-radius: 5px;
  font-family: var(--bs-font-monospace);
  font-size: 0.75rem;
}

.catalog-tax-badge,
.catalog-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.catalog-tax-badge {
  color: #346a86;
  background: #e9f4fa;
}

.catalog-tax-badge.is-exempt {
  color: #675b79;
  background: #f1edf5;
}

.catalog-status-badge.is-active {
  color: #187558;
  background: #e8f6f0;
}

.catalog-status-badge.is-inactive {
  color: #90691c;
  background: #fff4d9;
}

.catalog-status-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.catalog-row-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.catalog-list-pagination {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--da-border);
}

.catalog-empty-state {
  text-align: center;
}

.catalog-empty-state p {
  max-width: 32rem;
  margin-inline: auto;
  color: #768394;
}

.catalog-editor-heading {
  justify-content: flex-start;
}

.catalog-editor-body {
  padding: 1.25rem;
}

.catalog-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border-top: 1px solid var(--da-border);
}

.catalog-form-section {
  margin-bottom: 1rem;
  padding: 1.15rem;
  background: #fbfcfe;
  border: 1px solid #e3e9ef;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(19, 43, 68, 0.035);
}

.catalog-form-section-last {
  margin-bottom: 0;
}

.catalog-form-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e6ebf0;
}

.catalog-form-heading > div {
  min-width: 0;
}

.catalog-form-icon,
.catalog-detail-icon {
  width: 34px;
  height: 34px;
  font-size: 0.9rem;
}

.catalog-tax-option {
  padding: 0.8rem 1rem;
  background: #f7f9fb;
  border: 1px solid var(--da-border);
  border-radius: 7px;
}

.catalog-page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.catalog-page-actions form {
  margin: 0;
}

.catalog-profile-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 1fr);
}

.catalog-profile-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem;
}

.catalog-profile-icon {
  width: 52px;
  height: 52px;
  font-size: 1.3rem;
}

.catalog-profile-main h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1.2rem;
  font-weight: 750;
}

.catalog-profile-main p {
  margin: 0.2rem 0 0;
  color: #788697;
  font-size: 0.82rem;
}

.catalog-profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid var(--da-border);
}

.catalog-profile-facts > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--da-border);
}

.catalog-profile-facts > div:last-child {
  border-right: 0;
}

.catalog-profile-facts span,
.catalog-trace-list dt {
  color: #7b8796;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.catalog-profile-facts strong {
  color: #293b54;
  font-size: 0.9rem;
}

.catalog-detail-heading {
  align-items: flex-start;
  justify-content: flex-start;
}

.catalog-detail-content {
  padding: 1.25rem;
}

.catalog-description {
  color: #46566c;
  line-height: 1.65;
  white-space: pre-line;
}

.catalog-detail-empty {
  color: #84909e;
  font-style: italic;
}

.catalog-trace-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--da-border);
}

.catalog-trace-list > div:first-child {
  padding-top: 0;
}

.catalog-trace-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.catalog-trace-list dt,
.catalog-trace-list dd {
  margin: 0;
}

.catalog-trace-list dd {
  color: #3c4d63;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: right;
}

@media (max-width: 991.98px) {
  .catalog-profile-panel {
    grid-template-columns: 1fr;
  }

  .catalog-profile-facts {
    border-top: 1px solid var(--da-border);
    border-left: 0;
  }
}

@media (max-width: 575.98px) {
  .catalog-primary-action,
  .catalog-page-actions,
  .catalog-page-actions .btn,
  .catalog-page-actions form,
  .catalog-page-actions form .btn,
  .catalog-editor-actions .btn {
    width: 100%;
  }

  .catalog-page-actions,
  .catalog-editor-actions {
    flex-direction: column-reverse;
  }

  .catalog-panel-heading,
  .catalog-editor-heading,
  .catalog-editor-body,
  .catalog-editor-actions,
  .catalog-detail-heading,
  .catalog-detail-content,
  .catalog-profile-main {
    padding: 1rem;
  }

  .catalog-panel-heading {
    align-items: flex-start;
  }

  .catalog-count-badge {
    display: none;
  }

  .catalog-profile-main {
    align-items: flex-start;
  }

  .catalog-profile-facts {
    grid-template-columns: 1fr;
  }

  .catalog-profile-facts > div {
    border-right: 0;
    border-bottom: 1px solid var(--da-border);
  }

  .catalog-profile-facts > div:last-child {
    border-bottom: 0;
  }
}

[data-theme="dark"] .catalog-page-description,
[data-theme="dark"] .catalog-panel-heading p,
[data-theme="dark"] .catalog-editor-heading p,
[data-theme="dark"] .catalog-form-heading p,
[data-theme="dark"] .catalog-detail-heading p,
[data-theme="dark"] .catalog-cell-meta,
[data-theme="dark"] .catalog-profile-main p,
[data-theme="dark"] .catalog-empty-state p,
[data-theme="dark"] .catalog-detail-empty {
  color: #9eacb9;
}

[data-theme="dark"] .catalog-list-panel,
[data-theme="dark"] .catalog-editor-shell,
[data-theme="dark"] .catalog-profile-panel,
[data-theme="dark"] .catalog-detail-panel {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.18);
}

[data-theme="dark"] .catalog-panel-heading,
[data-theme="dark"] .catalog-editor-heading,
[data-theme="dark"] .catalog-editor-actions,
[data-theme="dark"] .catalog-detail-heading {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .catalog-panel-heading h2,
[data-theme="dark"] .catalog-editor-heading h2,
[data-theme="dark"] .catalog-form-heading h2,
[data-theme="dark"] .catalog-detail-heading h2,
[data-theme="dark"] .catalog-item-link,
[data-theme="dark"] .catalog-cell-value,
[data-theme="dark"] .catalog-price,
[data-theme="dark"] .catalog-profile-main h2,
[data-theme="dark"] .catalog-profile-facts strong,
[data-theme="dark"] .catalog-trace-list dd,
[data-theme="dark"] .catalog-description {
  color: #f3f6f9;
}

[data-theme="dark"] .catalog-panel-icon,
[data-theme="dark"] .catalog-editor-heading-icon,
[data-theme="dark"] .catalog-form-icon,
[data-theme="dark"] .catalog-profile-icon,
[data-theme="dark"] .catalog-detail-icon {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.13);
}

[data-theme="dark"] .catalog-count-badge,
[data-theme="dark"] .catalog-code {
  color: #bdc8d2;
  background: #263541;
}

[data-theme="dark"] .catalog-type-label {
  color: #bdc8d2;
}

[data-theme="dark"] .catalog-tax-badge {
  color: #87c9ed;
  background: rgba(77, 163, 220, 0.14);
}

[data-theme="dark"] .catalog-tax-badge.is-exempt {
  color: #c7b4db;
  background: rgba(154, 120, 183, 0.16);
}

[data-theme="dark"] .catalog-status-badge.is-active {
  color: #79d5b7;
  background: rgba(37, 174, 130, 0.16);
}

[data-theme="dark"] .catalog-status-badge.is-inactive {
  color: #f0c56d;
  background: rgba(222, 164, 48, 0.16);
}

[data-theme="dark"] .catalog-editor-actions,
[data-theme="dark"] .catalog-form-section,
[data-theme="dark"] .catalog-list-pagination,
[data-theme="dark"] .catalog-profile-facts,
[data-theme="dark"] .catalog-profile-facts > div,
[data-theme="dark"] .catalog-trace-list > div {
  border-color: #30404d;
}

[data-theme="dark"] .catalog-tax-option {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .catalog-form-section {
  background: #18242e;
  box-shadow: none;
}

@media (max-width: 575.98px) {
  .client-form-section,
  .inventory-form-section,
  .catalog-form-section {
    padding: 1rem;
  }
}

/* Dashboard workspace */
.dashboard-page-header .breadcrumb {
  margin-bottom: 0;
}

.dashboard-page-eyebrow,
.dashboard-overview-kicker,
.dash-section-kicker,
.dash-panel-kicker {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--da-blue);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-page-description {
  margin: 0.25rem 0 0;
  color: #687684;
  font-size: 0.9rem;
}

.dashboard-header-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #718093;
  font-size: 0.78rem;
}

.dashboard-header-meta i {
  color: #218267;
}

.dashboard-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(520px, 1.2fr);
  align-items: center;
  gap: 2rem;
  padding: 1.35rem 1.5rem;
  color: #fff;
  background: #071d3f;
  border: 1px solid #16345e;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(7, 29, 63, 0.13);
}

.dashboard-overview-kicker {
  color: #78c8f5;
}

.dashboard-overview-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 750;
}

.dashboard-overview-copy p {
  max-width: 34rem;
  margin: 0.4rem 0 0;
  color: #bdcbe0;
  font-size: 0.84rem;
}

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.dashboard-quick-action {
  appearance: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 86px;
  padding: 0.8rem;
  color: #e4edf8;
  background: #132c50;
  border: 1px solid #28466c;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.dashboard-quick-action i {
  color: #79c7f3;
  font-size: 1.1rem;
}

.dashboard-quick-action:hover {
  color: #fff;
  background: #1a3a64;
  border-color: #4a79a5;
}

.dashboard-quick-action.is-primary {
  color: #fff;
  background: var(--da-blue);
  border-color: var(--da-blue);
}

.dashboard-quick-action.is-primary i {
  color: #fff;
}

.dashboard-quick-action.is-primary:hover {
  background: #0874b8;
  border-color: #0874b8;
}

.dash-section {
  margin-top: 1.4rem;
}

.dashboard-setup-alert {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  color: #664d03;
  background: #fff8e1;
  border: 1px solid #f0d98b;
  border-radius: 7px;
}

.dashboard-setup-alert strong {
  display: block;
  font-size: 0.86rem;
}

.dashboard-setup-alert p {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
}

.dashboard-setup-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #8b6717;
  background: rgba(240, 188, 63, 0.18);
  border-radius: 7px;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.dash-kpi-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 154px;
  padding: 1.05rem;
  color: inherit;
  background: #fff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.dash-kpi-card:hover {
  color: inherit;
  border-color: #a9cee5;
  box-shadow: 0 12px 28px rgba(19, 52, 76, 0.1);
}

.dash-kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.dash-kpi-icon,
.dash-status-icon,
.dash-activity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--da-blue);
  background: #eaf5fc;
  border-radius: 7px;
  font-size: 1rem;
}

.dash-kpi-icon.is-warning,
.dash-activity-icon.is-warning {
  color: #956b17;
  background: #fff4d9;
}

.dash-kpi-arrow {
  color: #9aa7b4;
  font-size: 0.82rem;
}

.dash-kpi-label {
  color: #677587;
  font-size: 0.78rem;
  font-weight: 650;
}

.dash-kpi-value {
  display: block;
  margin: 0.18rem 0 0.35rem;
  color: var(--da-navy);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
}

.dash-kpi-help {
  margin-top: auto;
  color: #84909e;
  font-size: 0.74rem;
}

.dash-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.dash-section-title {
  margin: 0;
  color: var(--da-navy);
  font-size: 1rem;
  font-weight: 750;
}

.dash-section-subtitle {
  margin: 0.25rem 0 0;
  color: #7b8796;
  font-size: 0.8rem;
}

.dash-status-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.dash-status-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.9rem 0.8rem;
  color: inherit;
  border-right: 1px solid var(--da-border);
  text-decoration: none;
  transition: background 0.15s ease;
}

.dash-status-item:last-child {
  border-right: 0;
}

.dash-status-item:hover {
  color: inherit;
  background: #f7fafc;
}

.dash-status-icon {
  width: 32px;
  height: 32px;
  font-size: 0.84rem;
}

.dash-status-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-status-content strong {
  color: var(--da-navy);
  font-size: 1rem;
}

.dash-status-content span {
  overflow: hidden;
  color: #748295;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-status-arrow,
.dashboard-attention-arrow {
  color: #a2adb8;
  font-size: 0.72rem;
}

.dashboard-attention-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-attention-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  padding: 1rem;
  color: inherit;
  background: #fff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-attention-item:hover {
  color: inherit;
  border-color: #b4d2e4;
  box-shadow: 0 10px 24px rgba(19, 52, 76, 0.09);
}

.dashboard-attention-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 7px;
  font-size: 1.05rem;
}

.dashboard-attention-icon.is-maintenance {
  color: #9a6a10;
  background: #fff3d6;
}

.dashboard-attention-icon.is-warranty {
  color: #31718f;
  background: #e9f4fa;
}

.dashboard-attention-icon.is-follow-up {
  color: #7b578d;
  background: #f3ecf7;
}

.dashboard-attention-icon.is-draft {
  color: #31718f;
  background: #e9f4fa;
}

.dashboard-attention-icon.is-expired {
  color: #a84f4f;
  background: #fbecec;
}

.dashboard-attention-copy {
  display: grid;
  min-width: 0;
}

.dashboard-attention-copy > span {
  color: #647286;
  font-size: 0.76rem;
  font-weight: 650;
}

.dashboard-attention-copy strong {
  margin: 0.1rem 0;
  color: var(--da-navy);
  font-size: 1.3rem;
  line-height: 1.1;
}

.dashboard-attention-copy small {
  overflow: hidden;
  color: #8a95a2;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dash-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
  padding: 0.9rem 1rem;
  background: #fbfcfe;
  border-bottom: 1px solid var(--da-border);
}

.dash-panel-header h3 {
  margin: 0;
  color: var(--da-navy);
  font-size: 0.9rem;
  font-weight: 750;
}

.dash-panel-body {
  padding: 0.45rem 1rem;
}

.dashboard-activity-list {
  display: grid;
}

.dash-activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  min-height: 62px;
  padding: 0.65rem 0;
  color: inherit;
  border-bottom: 1px solid #edf1f4;
  text-decoration: none;
}

.dash-activity-item:last-child {
  border-bottom: 0;
}

.dash-activity-item:hover {
  color: inherit;
}

.dash-activity-item:hover .dash-activity-copy strong {
  color: var(--da-blue);
}

.dash-activity-icon {
  width: 34px;
  height: 34px;
  font-size: 0.86rem;
}

.dash-activity-copy {
  display: grid;
  min-width: 0;
}

.dash-activity-copy strong,
.dash-activity-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-activity-copy strong {
  color: #33445a;
  font-size: 0.78rem;
  transition: color 0.15s ease;
}

.dash-activity-copy small {
  margin-top: 0.15rem;
  color: #8995a2;
  font-size: 0.68rem;
}

.dash-activity-value,
.dash-activity-tag {
  color: #5c6b7e;
  background: #f2f5f8;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 650;
  white-space: nowrap;
}

.dash-activity-value {
  padding: 0.28rem 0.45rem;
}

.dash-activity-tag {
  max-width: 7rem;
  overflow: hidden;
  padding: 0.25rem 0.4rem;
  text-overflow: ellipsis;
}

.dashboard-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  padding: 1.5rem 1rem;
  text-align: center;
}

.dashboard-empty-state > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.75rem;
  color: var(--da-blue);
  background: #eaf5fc;
  border-radius: 7px;
}

.dashboard-empty-state strong {
  color: #34455b;
  font-size: 0.82rem;
}

.dashboard-empty-state p {
  max-width: 17rem;
  margin: 0.3rem 0 0.8rem;
  color: #8a95a2;
  font-size: 0.72rem;
}

.dashboard-quick-form {
  display: grid;
  gap: 1rem;
}

.dashboard-quick-form-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  color: #42657b;
  background: #edf7fc;
  border: 1px solid #cfe6f3;
  border-radius: 7px;
  font-size: 0.78rem;
}

.dashboard-quick-form-note i {
  flex: 0 0 auto;
  color: var(--da-blue);
}

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

  .dash-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dash-status-item:nth-child(4) {
    border-right: 0;
  }

  .dash-status-item:nth-child(-n + 4) {
    border-bottom: 1px solid var(--da-border);
  }

  .dashboard-activity-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-attention-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-activity-panel:last-child {
    grid-column: 1 / -1;
  }
}

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

  .dashboard-attention-item:last-child {
    grid-column: 1 / -1;
  }

  .dashboard-attention-grid-even .dashboard-attention-item:last-child {
    grid-column: auto;
  }
}

@media (max-width: 767.98px) {
  .dashboard-quick-actions,
  .dash-status-grid,
  .dashboard-activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-activity-panel:last-child {
    grid-column: auto;
  }

  .dash-status-item:nth-child(2n) {
    border-right: 0;
  }

  .dash-status-item:nth-child(-n + 6) {
    border-bottom: 1px solid var(--da-border);
  }
}

@media (max-width: 575.98px) {
  .dashboard-overview {
    gap: 1.25rem;
    padding: 1.1rem;
  }

  .dashboard-quick-actions,
  .dash-kpi-grid,
  .dashboard-attention-grid,
  .dashboard-activity-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-action {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    min-height: 48px;
  }

  .dashboard-setup-alert {
    grid-template-columns: auto 1fr;
  }

  .dashboard-setup-alert .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .dash-section-heading {
    align-items: flex-start;
  }

  .dashboard-attention-item:last-child,
  .dashboard-activity-panel:last-child {
    grid-column: auto;
  }

}

[data-theme="dark"] .dashboard-page-description,
[data-theme="dark"] .dashboard-header-meta,
[data-theme="dark"] .dash-section-subtitle,
[data-theme="dark"] .dash-kpi-label,
[data-theme="dark"] .dash-kpi-help,
[data-theme="dark"] .dash-status-content span,
[data-theme="dark"] .dashboard-attention-copy > span,
[data-theme="dark"] .dashboard-attention-copy small,
[data-theme="dark"] .dash-activity-copy small,
[data-theme="dark"] .dashboard-empty-state p {
  color: #9eacb9;
}

[data-theme="dark"] .dashboard-overview {
  background: #12202d;
  border-color: #30485d;
  box-shadow: 0 12px 28px rgba(2, 8, 14, 0.2);
}

[data-theme="dark"] .dashboard-quick-action {
  color: #d9e4ed;
  background: #1b2d3c;
  border-color: #365063;
}

[data-theme="dark"] .dashboard-quick-action:hover {
  color: #fff;
  background: #243b4d;
  border-color: #4f728b;
}

[data-theme="dark"] .dashboard-quick-action.is-primary {
  background: #287fb8;
  border-color: #287fb8;
}

[data-theme="dark"] .dashboard-setup-alert {
  color: #f1d28e;
  background: #302b1f;
  border-color: #655632;
}

[data-theme="dark"] .dash-kpi-card,
[data-theme="dark"] .dash-status-grid,
[data-theme="dark"] .dashboard-attention-item,
[data-theme="dark"] .dash-panel {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.18);
}

[data-theme="dark"] .dash-kpi-card:hover,
[data-theme="dark"] .dashboard-attention-item:hover {
  border-color: #486479;
  box-shadow: 0 12px 26px rgba(2, 8, 14, 0.24);
}

[data-theme="dark"] .dash-section-title,
[data-theme="dark"] .dash-kpi-value,
[data-theme="dark"] .dash-status-content strong,
[data-theme="dark"] .dashboard-attention-copy strong,
[data-theme="dark"] .dash-panel-header h3,
[data-theme="dark"] .dash-activity-copy strong,
[data-theme="dark"] .dashboard-empty-state strong {
  color: #f3f6f9;
}

[data-theme="dark"] .dash-kpi-icon,
[data-theme="dark"] .dash-status-icon,
[data-theme="dark"] .dash-activity-icon,
[data-theme="dark"] .dashboard-empty-state > span {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.13);
}

[data-theme="dark"] .dash-kpi-icon.is-warning,
[data-theme="dark"] .dash-activity-icon.is-warning {
  color: #f0c56d;
  background: rgba(222, 164, 48, 0.16);
}

[data-theme="dark"] .dash-status-item,
[data-theme="dark"] .dash-activity-item {
  border-color: #30404d;
}

[data-theme="dark"] .dash-status-item:hover {
  background: #22323f;
}

[data-theme="dark"] .dashboard-quick-form-note {
  color: #b8d9eb;
  background: rgba(77, 163, 220, 0.12);
  border-color: #35566c;
}

[data-theme="dark"] .dash-panel-header {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .dash-activity-value,
[data-theme="dark"] .dash-activity-tag {
  color: #bdc8d2;
  background: #263541;
}

/* Company settings */
.company-settings-page-header {
  padding-bottom: 1.25rem;
}

.company-settings-eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  color: #227fbd;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.company-settings-page-description {
  max-width: 680px;
  margin: 0.35rem 0 0.75rem;
  color: #667582;
}

.company-settings-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.48rem 0.75rem;
  color: #52636f;
  background: #f5f8fa;
  border: 1px solid #dce5eb;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}

.company-settings-status-dot {
  width: 0.48rem;
  height: 0.48rem;
  background: #d7982f;
  border-radius: 50%;
}

.company-settings-status.is-complete {
  color: #26724d;
  background: #edf8f2;
  border-color: #cbe7d7;
}

.company-settings-status.is-complete .company-settings-status-dot {
  background: #35a56d;
}

.company-settings-form {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe6eb;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(24, 49, 69, 0.07);
}

.company-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
}

.company-settings-editor {
  min-width: 0;
}

.company-settings-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: #fbfcfd;
  border-bottom: 1px solid #e4eaee;
}

.company-settings-editor-header h2,
.company-settings-side h2 {
  margin: 0;
  color: #172d3d;
  font-size: 1.08rem;
  font-weight: 700;
}

.company-settings-editor-header p,
.company-settings-section-heading p,
.company-settings-logo-preview p,
.company-settings-impact-panel p {
  margin: 0.3rem 0 0;
  color: #71808b;
  font-size: 0.83rem;
  line-height: 1.55;
}

.company-settings-required-note {
  flex: 0 0 auto;
  color: #7c8992;
  font-size: 0.76rem;
}

.company-settings-required-note span,
.company-settings-required {
  color: #c74545;
}

.company-settings-editor-body {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
}

.company-settings-section {
  padding: 1.25rem;
  background: #fbfcfd;
  border: 1px solid #e2e9ee;
  border-radius: 8px;
}

.company-settings-section-last {
  margin-bottom: 0;
}

.company-settings-section-heading,
.company-settings-side-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.company-settings-section-heading h3 {
  margin: 0;
  color: #1c3343;
  font-size: 0.96rem;
  font-weight: 700;
}

.company-settings-section-icon,
.company-settings-impact-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #177fc4;
  background: #eaf5fc;
  border-radius: 7px;
  font-size: 1rem;
}

.company-settings-info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  color: #526774;
  background: #f3f8fb;
  border-left: 3px solid #2d91cf;
  border-radius: 4px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.company-settings-info-note i {
  color: #2489c9;
  font-size: 1rem;
}

.company-settings-side {
  background: #f4f7f9;
  border-left: 1px solid #e1e7eb;
}

.company-settings-brand-panel,
.company-settings-impact-panel {
  padding: 1.5rem;
}

.company-settings-brand-panel {
  border-bottom: 1px solid #e1e7eb;
}

.company-settings-logo-preview {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
  text-align: center;
  background: #eef3f6;
  border: 1px solid #d7e0e6;
  border-radius: 8px;
  overflow: hidden;
}

.company-settings-logo-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 1.25rem;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #f4f6f8 25%, transparent 25%),
    linear-gradient(-45deg, #f4f6f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f4f6f8 75%),
    linear-gradient(-45deg, transparent 75%, #f4f6f8 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.company-settings-logo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.company-settings-logo-preview strong {
  margin-top: 0.65rem;
  color: #2b3f4d;
  font-size: 0.87rem;
}

.company-settings-logo-image {
  display: block;
  max-width: 100%;
  max-height: 115px;
  object-fit: contain;
}

.company-settings-logo-caption {
  min-height: 2.85rem;
  margin: 0 !important;
  padding: 0.7rem 0.85rem;
  color: #657581 !important;
  background: #f8fafb;
  border-top: 1px solid #dfe6eb;
  font-size: 0.74rem !important;
}

.company-settings-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: #2184c3;
  background: #eaf5fc;
  border-radius: 8px;
  font-size: 1.35rem;
}

.company-settings-logo-placeholder.is-warning {
  color: #a96d13;
  background: #fff4dd;
}

.company-settings-impact-panel {
  color: #425b6b;
  background: #eaf4fa;
}

.company-settings-impact-panel .company-settings-impact-icon {
  margin-bottom: 0.9rem;
  color: #1b7fb9;
  background: #d7ebf6;
}

.company-settings-impact-panel h2 {
  color: #18374a;
}

.company-settings-impact-panel p {
  color: #557080;
}

.company-settings-impact-panel ul {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  color: #35566a;
  font-size: 0.8rem;
}

.company-settings-impact-panel li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.company-settings-impact-panel li i {
  color: #2387bf;
}

.company-settings-file-input::file-selector-button {
  color: #24465b;
  background: #eaf2f7;
  border: 0;
  border-right: 1px solid #d4e0e7;
}

.company-settings-file-input:hover::file-selector-button {
  color: #0b659d;
  background: #dcecf5;
}

.company-settings-file-input:focus::file-selector-button {
  background: #dcecf5;
}

.company-settings-file-input:disabled::file-selector-button {
  color: #8997a0;
  background: #edf1f3;
}

.company-settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  background: #f7f9fa;
  border-top: 1px solid #dfe6ea;
}

@media (max-width: 1199.98px) {
  .company-settings-layout {
    grid-template-columns: 1fr;
  }

  .company-settings-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border-top: 1px solid #e1e7eb;
    border-left: 0;
  }

  .company-settings-brand-panel {
    border-right: 1px solid #e1e7eb;
    border-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  .company-settings-editor-header,
  .company-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .company-settings-editor-header,
  .company-settings-editor-body,
  .company-settings-brand-panel,
  .company-settings-impact-panel {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .company-settings-side {
    grid-template-columns: 1fr;
  }

  .company-settings-brand-panel {
    border-right: 0;
    border-bottom: 1px solid #e1e7eb;
  }

  .company-settings-actions .btn {
    width: 100%;
  }
}

[data-theme="dark"] .company-settings-page-description,
[data-theme="dark"] .company-settings-editor-header p,
[data-theme="dark"] .company-settings-section-heading p,
[data-theme="dark"] .company-settings-logo-preview p {
  color: #aebbc4;
}

[data-theme="dark"] .company-settings-status {
  color: #d6c394;
  background: #302b1f;
  border-color: #625432;
}

[data-theme="dark"] .company-settings-status.is-complete {
  color: #9fd8b9;
  background: #1d332a;
  border-color: #315d49;
}

[data-theme="dark"] .company-settings-form,
[data-theme="dark"] .company-settings-logo-preview,
[data-theme="dark"] .company-settings-section {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 12px 30px rgba(2, 8, 14, 0.2);
}

[data-theme="dark"] .company-settings-editor-header,
[data-theme="dark"] .company-settings-side,
[data-theme="dark"] .company-settings-actions {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .company-settings-editor-header h2,
[data-theme="dark"] .company-settings-section-heading h3,
[data-theme="dark"] .company-settings-side h2,
[data-theme="dark"] .company-settings-logo-preview strong {
  color: #f3f6f9;
}

[data-theme="dark"] .company-settings-section,
[data-theme="dark"] .company-settings-brand-panel {
  border-color: #30404d;
}

[data-theme="dark"] .company-settings-logo-canvas {
  background-color: #eef2f5;
  background-image:
    linear-gradient(45deg, #e1e6ea 25%, transparent 25%),
    linear-gradient(-45deg, #e1e6ea 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e1e6ea 75%),
    linear-gradient(-45deg, transparent 75%, #e1e6ea 75%);
}

[data-theme="dark"] .company-settings-logo-caption {
  color: #b2c0c9 !important;
  background: #20303c;
  border-color: #30404d;
}

[data-theme="dark"] .company-settings-section-icon,
[data-theme="dark"] .company-settings-logo-placeholder {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.13);
}

[data-theme="dark"] .company-settings-logo-placeholder.is-warning {
  color: #f0c56d;
  background: rgba(222, 164, 48, 0.16);
}

[data-theme="dark"] .company-settings-info-note {
  color: #c5d2da;
  background: #20313d;
  border-left-color: #4fa6d8;
}

[data-theme="dark"] .company-settings-impact-panel {
  color: #d4e1e9;
  background: #203541;
}

[data-theme="dark"] .company-settings-impact-panel h2 {
  color: #f3f6f9;
}

[data-theme="dark"] .company-settings-impact-panel p,
[data-theme="dark"] .company-settings-impact-panel ul {
  color: #bdd0db;
}

[data-theme="dark"] .company-settings-file-input {
  color: #dce4eb;
  background-color: #1d2c37;
  border-color: #40515e;
}

[data-theme="dark"] .company-settings-file-input::file-selector-button {
  color: #dbe8ef;
  background: #2b4352;
  border-right-color: #405867;
}

[data-theme="dark"] .company-settings-file-input:hover::file-selector-button,
[data-theme="dark"] .company-settings-file-input:focus::file-selector-button {
  color: #fff;
  background: #36586c;
}

[data-theme="dark"] .company-settings-file-input:disabled::file-selector-button {
  color: #8fa0ab;
  background: #263641;
}

[data-theme="dark"] .quote-document .invoice-doc-brand-logo {
  background: transparent;
  border-color: transparent;
}

/* Application shell */
.app-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1100;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: #006fb5;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 20, 59, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 0.15s ease;
}

.app-skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

.header {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 rgba(0, 20, 59, 0.03);
}

.header-left {
  gap: 0.75rem;
}

.app-header-brand-mark,
.app-brand-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #087ec4;
  border-radius: 7px;
}

.header-logo .app-header-brand-mark {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  font-size: 0.9rem;
}

.header-logo .app-header-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
}

.app-header-context {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  margin-left: 1.15rem;
  padding-left: 1.15rem;
  border-left: 1px solid #e2e8ed;
}

.app-header-context-label {
  color: #84919b;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.app-header-context-title {
  overflow: hidden;
  color: #193248;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header .sidebar-toggle,
.header .header-action > button,
.header button.header-action {
  border: 1px solid transparent;
  border-radius: 7px;
}

.header .sidebar-toggle:hover,
.header .header-action > button:hover,
.header button.header-action:hover {
  background: #edf6fb;
  border-color: #d5e9f5;
}

.user-dropdown .dropdown-menu {
  width: 260px;
  border-color: #dce5eb;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(13, 35, 52, 0.16);
}

.user-dropdown-header {
  background: #0b3150;
}

.user-dropdown-footer {
  display: grid;
  gap: 0.25rem;
  padding: 0.5rem;
}

.user-dropdown-settings,
.user-dropdown-logout {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}

.user-dropdown-settings {
  color: #435865;
}

.user-dropdown-settings:hover {
  color: #087ec4;
  background: #edf6fb;
}

.user-dropdown-settings i,
.user-dropdown-logout i {
  width: 1.1rem;
  font-size: 1rem;
  text-align: center;
}

.user-dropdown-logout:hover {
  background: #fff0f0;
}

.sidebar {
  background: #00143b;
  border-right-color: rgba(145, 184, 213, 0.16);
  box-shadow: 7px 0 28px rgba(4, 24, 45, 0.08);
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 1rem;
  border-bottom-color: rgba(155, 192, 219, 0.14);
}

.sidebar-logo {
  gap: 0.5rem;
}

.app-brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 14px rgba(0, 20, 43, 0.3);
}

.sidebar-logo .app-brand-mark {
  width: 4.7rem;
  height: 2.45rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sidebar-logo .app-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-logo .app-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  opacity: 1;
}

.sidebar-logo .app-brand-copy strong {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.2;
}

.sidebar-logo .app-brand-copy small {
  color: #c7ccd6;
  font-size: 0.6rem;
  font-weight: 500;
  line-height: 1.25;
}

.sidebar-nav {
  padding: 0.85rem 0.75rem 1rem;
}

.sidebar .nav-menu {
  gap: 0.18rem;
}

.sidebar .nav-heading {
  padding: 1.25rem 0.7rem 0.45rem;
  color: #707783;
  font-size: 0.62rem;
  font-weight: 700;
}

.sidebar .nav-heading:first-child {
  padding-top: 0.35rem;
}

.sidebar .nav-item > .nav-link {
  min-height: 43px;
  padding: 0.38rem 0.55rem;
  color: #c7ccd6;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 500;
}

.sidebar .nav-item > .nav-link > i:first-child {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.55rem;
  color: #8b93a1;
  background: rgba(145, 184, 213, 0.08);
  border-radius: 6px;
  font-size: 1rem;
}

.sidebar .nav-item > .nav-link:hover {
  color: #fff;
  background: rgba(105, 168, 210, 0.1);
  border-color: rgba(145, 184, 213, 0.1);
}

.sidebar .nav-item > .nav-link:hover > i:first-child {
  color: #01aaf2;
  background: rgba(1, 170, 242, 0.14);
}

.sidebar .nav-item > .nav-link.active {
  color: #fff;
  background: rgba(6, 27, 74, 0.82);
  border-color: rgba(1, 170, 242, 0.18);
  box-shadow: inset 3px 0 #01aaf2;
  font-weight: 600;
}

.sidebar .nav-item > .nav-link.active > i:first-child {
  color: #01aaf2;
  background: rgba(1, 170, 242, 0.16);
}

.sidebar-footer {
  padding: 0.75rem;
  border-top-color: rgba(155, 192, 219, 0.14);
}

.sidebar-footer-user {
  padding: 0.55rem;
  background: #061b4a;
  border: 1px solid rgba(145, 184, 213, 0.12);
  border-radius: 8px;
}

.sidebar-footer-avatar {
  width: 2.15rem;
  height: 2.15rem;
  color: #00143b !important;
  background: #01aaf2 !important;
  border-color: rgba(255, 255, 255, 0.14);
}

.sidebar-footer-name {
  font-size: 0.8rem;
}

.sidebar-footer-role {
  color: #809aaf;
  font-size: 0.61rem;
}

.sidebar-footer-action {
  border: 1px solid transparent;
}

.sidebar-footer-action:hover {
  border-color: rgba(145, 184, 213, 0.14);
}

.footer {
  border-top-color: #e1e7ec;
}

.footer-content {
  min-height: 58px;
}

.app-footer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #73828c;
  font-size: 0.74rem;
  font-weight: 600;
}

.app-footer-status i {
  color: #35855d;
  font-size: 0.88rem;
}

@media (min-width: 1200px) {
  .sidebar-collapsed .sidebar-header {
    padding: 0.65rem;
  }

  .sidebar-collapsed .sidebar-logo .app-brand-copy {
    display: none;
  }

  .sidebar-collapsed .sidebar-logo .app-brand-mark {
    width: 3.4rem;
    overflow: visible;
    opacity: 1;
  }

  .sidebar-collapsed .sidebar .nav-item > .nav-link {
    padding: 0.35rem;
  }

  .sidebar-collapsed .sidebar .nav-item > .nav-link > i:first-child {
    margin-right: 0;
  }
}

@media (max-width: 767.98px) {
  .app-header-context {
    display: none;
  }

  .footer-content {
    gap: 0.45rem;
  }
}

@media (max-width: 1199px) {
  .sidebar-open .sidebar-logo .app-brand-copy,
  .sidebar-collapsed .sidebar-logo .app-brand-copy {
    display: flex;
    width: auto;
    opacity: 1;
  }

  .sidebar-open .sidebar-logo .app-brand-mark,
  .sidebar-collapsed .sidebar-logo .app-brand-mark {
    width: 4.7rem;
    overflow: visible;
    opacity: 1;
  }

  .sidebar-open .sidebar .nav-item > .nav-link,
  .sidebar-collapsed .sidebar .nav-item > .nav-link {
    padding: 0.38rem 0.55rem;
  }

  .sidebar-open .sidebar .nav-item > .nav-link > i:first-child,
  .sidebar-collapsed .sidebar .nav-item > .nav-link > i:first-child {
    margin-right: 0.55rem;
    font-size: 1rem;
  }
}

[data-theme="dark"] .header {
  background: rgba(23, 34, 44, 0.98);
  border-bottom-color: #2d3d49;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .app-header-context {
  border-left-color: #354551;
}

[data-theme="dark"] .app-header-context-label {
  color: #8796a2;
}

[data-theme="dark"] .app-header-context-title {
  color: #eef3f7;
}

[data-theme="dark"] .header .sidebar-toggle:hover,
[data-theme="dark"] .header .header-action > button:hover,
[data-theme="dark"] .header button.header-action:hover {
  background: #223440;
  border-color: #365061;
}

[data-theme="dark"] .user-dropdown .dropdown-menu {
  background: #1b2733;
  border-color: #354551;
}

[data-theme="dark"] .user-dropdown-header {
  background: #122f43;
}

[data-theme="dark"] .user-dropdown-footer {
  border-color: #354551;
}

[data-theme="dark"] .user-dropdown-settings {
  color: #c8d4dc;
}

[data-theme="dark"] .user-dropdown-settings:hover {
  color: #8bcdf1;
  background: #223440;
}

[data-theme="dark"] .footer {
  background: #17222c;
  border-top-color: #2d3d49;
}

[data-theme="dark"] .app-footer-status,
[data-theme="dark"] .footer-copyright {
  color: #9fadb8;
}

[data-theme="dark"] .app-footer-status i {
  color: #75c69a;
}

/* Users and access management */
.users-page-header {
  padding-bottom: 0.5rem;
}

.users-eyebrow,
.users-panel-eyebrow {
  display: block;
  color: #227fbd;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.users-page-description {
  max-width: 680px;
  color: #667582;
}

.users-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.users-summary-card,
.users-list-panel,
.users-editor-shell,
.users-profile-panel,
.users-detail-panel {
  background: #fff;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: var(--da-shadow);
}

.users-summary-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 92px;
  padding: 1rem;
}

.users-summary-icon,
.users-panel-icon,
.users-editor-heading-icon,
.users-form-section-icon,
.users-profile-icon,
.users-detail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--da-blue);
  background: #eaf5fc;
}

.users-summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  font-size: 1.08rem;
}

.users-summary-icon.is-success {
  color: #2d8759;
  background: #eaf8f1;
}

.users-summary-icon.is-warning {
  color: #a96d13;
  background: #fff4dd;
}

.users-summary-label {
  display: block;
  color: #758291;
  font-size: 0.74rem;
  font-weight: 700;
}

.users-summary-card strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--da-navy);
  font-size: 1.28rem;
  font-weight: 760;
  line-height: 1.1;
}

.users-list-panel,
.users-editor-shell,
.users-profile-panel {
  overflow: hidden;
}

.users-panel-heading,
.users-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border-bottom: 1px solid var(--da-border);
}

.users-panel-heading h2,
.users-editor-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1rem;
  font-weight: 700;
}

.users-panel-heading p,
.users-editor-heading p,
.users-form-section-header p,
.users-detail-heading p {
  margin: 0.2rem 0 0;
  color: #7b8796;
  font-size: 0.8rem;
  line-height: 1.5;
}

.users-panel-icon,
.users-editor-heading-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1.05rem;
}

.users-list-panel > .table-responsive {
  border: 0;
  border-radius: 0;
}

.users-list-table {
  min-width: 850px;
}

.users-name-link {
  color: var(--da-navy);
  font-weight: 700;
  text-decoration: none;
}

.users-name-link:hover {
  color: var(--da-blue);
}

.users-cell-value {
  color: #2b3a50;
  font-weight: 600;
}

.users-cell-meta {
  margin-top: 0.15rem;
  color: #84909e;
  font-size: 0.75rem;
}

.users-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #516076;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
}

.users-role-chip i {
  color: var(--da-blue);
}

.users-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 4.8rem;
}

.users-status-dot {
  width: 0.38rem;
  height: 0.38rem;
  background: currentColor;
  border-radius: 50%;
}

.users-row-actions {
  display: inline-flex;
  gap: 0.4rem;
}

.users-row-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.users-list-pagination {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--da-border);
}

.users-empty-state {
  text-align: center;
}

.users-empty-state p {
  margin-inline: auto;
  color: #768394;
}

.users-editor-body {
  padding: 1.25rem;
}

.users-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 1.25rem -1.25rem -1.25rem;
  padding: 1rem 1.25rem;
  background: #fbfcfe;
  border-top: 1px solid var(--da-border);
}

.users-form-section {
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid #e9edf2;
}

.users-form-section-last {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.users-form-section-header,
.users-detail-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.users-form-section-icon,
.users-detail-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.users-form-section-header h2,
.users-detail-heading h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 0.96rem;
  font-weight: 700;
}

.users-status-switch {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background: #fbfcfe;
  border: 1px solid #e5ebf1;
  border-radius: 8px;
}

.users-status-switch span {
  color: #7b8796;
  font-size: 0.78rem;
}

.users-profile-panel {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem;
}

.users-profile-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.users-profile-icon {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  font-size: 1.45rem;
}

.users-profile-main h2 {
  margin: 0;
  color: var(--da-navy);
  font-size: 1.2rem;
  font-weight: 760;
}

.users-profile-main p {
  margin: 0.2rem 0 0;
  color: #6f7d8c;
}

.users-profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 0.75rem;
  min-width: min(100%, 430px);
}

.users-profile-facts > div {
  padding: 0.8rem 0.9rem;
  background: #f7fafc;
  border: 1px solid #e5ebf1;
  border-radius: 8px;
}

.users-profile-facts span {
  display: block;
  color: #7c8895;
  font-size: 0.72rem;
  font-weight: 700;
}

.users-profile-facts strong {
  display: block;
  margin-top: 0.2rem;
  color: #1d3044;
  font-size: 0.9rem;
  font-weight: 720;
}

.users-detail-panel {
  padding: 1.2rem;
}

.users-data-list {
  margin: 0;
}

.users-data-list > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #edf1f5;
}

.users-data-list > div:last-child {
  border-bottom: 0;
}

.users-data-list dt {
  color: #7b8796;
  font-size: 0.78rem;
  font-weight: 700;
}

.users-data-list dd {
  margin: 0;
  color: #223348;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.users-data-list-compact > div {
  grid-template-columns: 92px minmax(0, 1fr);
}

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

  .users-profile-panel {
    flex-direction: column;
  }

  .users-profile-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }
}

@media (max-width: 575.98px) {
  .users-summary-grid,
  .users-profile-facts {
    grid-template-columns: 1fr;
  }

  .users-editor-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .users-data-list > div,
  .users-data-list-compact > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

[data-theme="dark"] .users-page-description,
[data-theme="dark"] .users-panel-heading p,
[data-theme="dark"] .users-editor-heading p,
[data-theme="dark"] .users-form-section-header p,
[data-theme="dark"] .users-detail-heading p,
[data-theme="dark"] .users-empty-state p,
[data-theme="dark"] .users-profile-main p,
[data-theme="dark"] .users-status-switch span {
  color: #a5b2bd;
}

[data-theme="dark"] .users-summary-card,
[data-theme="dark"] .users-list-panel,
[data-theme="dark"] .users-editor-shell,
[data-theme="dark"] .users-profile-panel,
[data-theme="dark"] .users-detail-panel {
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.2);
}

[data-theme="dark"] .users-panel-heading,
[data-theme="dark"] .users-editor-heading,
[data-theme="dark"] .users-editor-actions {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .users-summary-card strong,
[data-theme="dark"] .users-panel-heading h2,
[data-theme="dark"] .users-editor-heading h2,
[data-theme="dark"] .users-form-section-header h2,
[data-theme="dark"] .users-detail-heading h2,
[data-theme="dark"] .users-profile-main h2,
[data-theme="dark"] .users-name-link {
  color: #f3f6f9;
}

[data-theme="dark"] .users-name-link:hover {
  color: #8bcdf1;
}

[data-theme="dark"] .users-summary-icon,
[data-theme="dark"] .users-panel-icon,
[data-theme="dark"] .users-editor-heading-icon,
[data-theme="dark"] .users-form-section-icon,
[data-theme="dark"] .users-profile-icon,
[data-theme="dark"] .users-detail-icon {
  color: #8bcdf1;
  background: #12364c;
}

[data-theme="dark"] .users-summary-icon.is-success {
  color: #7fd6a7;
  background: #173a2b;
}

[data-theme="dark"] .users-summary-icon.is-warning {
  color: #f2c46d;
  background: #3a2d18;
}

[data-theme="dark"] .users-summary-label,
[data-theme="dark"] .users-cell-meta,
[data-theme="dark"] .users-data-list dt,
[data-theme="dark"] .users-profile-facts span {
  color: #9aa8b4;
}

[data-theme="dark"] .users-cell-value,
[data-theme="dark"] .users-role-chip,
[data-theme="dark"] .users-data-list dd,
[data-theme="dark"] .users-profile-facts strong {
  color: #dce4eb;
}

[data-theme="dark"] .users-form-section,
[data-theme="dark"] .users-list-pagination,
[data-theme="dark"] .users-data-list > div {
  border-color: #30404d;
}

[data-theme="dark"] .users-status-switch,
[data-theme="dark"] .users-profile-facts > div {
  background: #17222c;
  border-color: #30404d;
}

/* Authentication screens */
.auth-page {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.5rem 0;
  color: #00143b;
  background: #f5f7fa;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(410px, 0.88fr) minmax(0, 1.12fr);
  width: min(1180px, calc(100% - 2rem));
  min-height: 680px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e6eaf0;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 20, 59, 0.13);
}

/* Login-only composition: the aside carries no content, so the form leads
   (~62%) and the atmospheric panel is a supporting band (~38%). */
.auth-shell-solo {
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  min-height: 560px;
}

/* Faint centered isotype so the empty panel reads as intentional negative
   space, not missing content. Decorative: sits behind the circuits and hides
   automatically with the aside below the desktop breakpoint. */
.auth-brand-panel-atmosphere::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 200px;
  height: 100px;
  transform: translate(-50%, -50%);
  background: url("../img/brand/da-isotype-light.png") center / contain no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

.auth-brand-panel {
  display: flex;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 3.25rem;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(0, 127, 206, 0.26), transparent 48%),
    linear-gradient(325deg, rgba(0, 200, 253, 0.15), transparent 42%),
    #061b4a;
}

.auth-brand-lockup {
  display: flex;
  position: relative;
  z-index: 2;
  align-items: center;
  gap: 0.85rem;
}

.auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 4.6rem;
  height: 4.6rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 15px 32px rgba(0, 20, 59, 0.22);
  backdrop-filter: blur(8px);
}

.auth-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand-copy {
  display: flex;
  flex-direction: column;
}

.auth-brand-copy strong {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 750;
}

.auth-brand-copy small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.75rem;
}

.auth-brand-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  margin-block: 2.75rem;
}

.auth-eyebrow {
  display: block;
  margin-bottom: 0.6rem;
  color: #007fce;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.auth-brand-panel h1 {
  max-width: 540px;
  margin: 0;
  color: #fff;
  font-size: 2.25rem;
  font-weight: 760;
  line-height: 1.14;
}

.auth-brand-panel p {
  max-width: 500px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.96rem;
  line-height: 1.65;
}

.auth-brand-panel .auth-eyebrow {
  color: #00c8fd;
}

.auth-security-note {
  display: inline-flex;
  position: relative;
  z-index: 2;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  padding: 0.75rem 0.9rem;
  color: #fff;
  background: rgba(0, 20, 59, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.auth-security-note > i {
  color: #00c8fd;
  font-size: 1.1rem;
}

.auth-security-note span {
  display: flex;
  flex-direction: column;
}

.auth-security-note strong {
  font-size: 0.78rem;
}

.auth-security-note small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.68rem;
}

.auth-circuit {
  position: absolute;
  z-index: 1;
  width: 160px;
  height: 100px;
  opacity: 0.3;
  border-color: rgba(0, 200, 253, 0.45);
  pointer-events: none;
}

.auth-circuit::before,
.auth-circuit::after {
  position: absolute;
  content: "";
  border-color: inherit;
}

.auth-circuit-one {
  top: 10%;
  right: -35px;
  border-bottom: 1px solid;
  border-left: 1px solid;
  border-bottom-left-radius: 24px;
}

.auth-circuit-one::after {
  right: 28px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  background: #00c8fd;
  border-radius: 50%;
}

.auth-circuit-two {
  right: 8%;
  bottom: 15%;
  border-top: 1px solid;
  border-right: 1px solid;
  border-top-right-radius: 24px;
}

.auth-circuit-two::after {
  top: -4px;
  left: 24px;
  width: 8px;
  height: 8px;
  background: #01aaf2;
  border-radius: 50%;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  padding: 3.5rem;
  background: #ffffff;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.auth-card-body {
  padding: 0;
}

.auth-form-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 3.5rem;
}

.auth-form-lockup-line {
  display: block;
  width: 4px;
  height: 34px;
  background: #007fce;
  border-radius: 4px;
}

.auth-form-lockup-mark {
  display: inline-flex;
  flex: 0 0 auto;
  width: 3.6rem;
  height: 1.8rem;
}

.auth-form-lockup-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.auth-form-lockup > span:last-child {
  display: flex;
  flex-direction: column;
}

.auth-form-lockup strong {
  color: #00143b;
  font-size: 1rem;
  font-weight: 750;
}

.auth-form-lockup small {
  color: #8b93a1;
  font-size: 0.7rem;
}

.auth-heading {
  margin-bottom: 1.75rem;
}

.auth-heading h1,
.auth-heading h2 {
  margin: 0;
  color: #00143b;
  font-size: 1.75rem;
  font-weight: 750;
}

.auth-heading p {
  margin: 0.45rem 0 0;
  color: #6d7a88;
  font-size: 0.9rem;
  line-height: 1.55;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  font-size: 0.87rem;
}

.auth-form .form-label {
  color: #304255;
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-form .form-control {
  min-height: 50px;
  border-color: #e6eaf0;
  border-radius: 12px;
}

.auth-form .form-control:focus {
  border-color: rgba(0, 127, 206, 0.68);
  box-shadow: 0 0 0 0.2rem rgba(0, 127, 206, 0.12);
}

.auth-form .form-control.is-invalid {
  padding-right: 0.9rem;
  background-image: none;
  border-color: #dc3545;
}

.auth-form .invalid-feedback {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.auth-password-control {
  display: flex;
  position: relative;
  align-items: center;
}

.auth-password-control .form-control {
  padding-right: 3rem;
}

.auth-password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 0.45rem;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  color: #647587;
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.auth-password-toggle:hover {
  color: #007fce;
  background: #eef6fb;
}

.auth-password-toggle:focus-visible {
  color: #006aa9;
  outline: 3px solid rgba(0, 127, 206, 0.18);
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.auth-help-text {
  color: #74808d;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: right;
}

.auth-secondary-link,
.auth-back-link {
  color: #007fce;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-secondary-link:hover,
.auth-back-link:hover {
  color: #00143b;
  text-decoration: underline;
}

.auth-submit {
  min-height: 50px;
  background: #007fce;
  border-color: #007fce;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 127, 206, 0.18);
  font-weight: 700;
}

.auth-submit:hover,
.auth-submit:focus {
  background: #00143b;
  border-color: #00143b;
}

.auth-footer-note {
  margin: 2.5rem 0 0;
  color: #7c8995;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
}

.auth-page-compact {
  padding-block: 2rem;
}

.auth-compact-shell {
  width: min(480px, calc(100% - 2rem));
  margin-inline: auto;
}

.auth-compact-card {
  max-width: none;
  padding: 2.75rem;
  background: #ffffff;
  border: 1px solid #e6eaf0;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 20, 59, 0.12);
}

.auth-compact-brand {
  display: inline-flex;
  width: 190px;
  height: 58px;
  margin-bottom: 2.5rem;
}

.auth-compact-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.auth-logo-dark-theme {
  display: none;
}

.auth-status span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.auth-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

/* Below wide desktop the empty atmospheric aside would read as missing
   content or stack as a decorative band, so the login collapses to a single
   content-height column and drops the aside entirely. */
@media (max-width: 1279.98px) {
  .auth-shell-solo {
    grid-template-columns: 1fr;
    width: min(620px, calc(100% - 2rem));
    min-height: auto;
  }

  .auth-shell-solo .auth-brand-panel-atmosphere {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .auth-page {
    background: #f5f8fb;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    width: min(620px, calc(100% - 2rem));
    min-height: auto;
  }

  .auth-form-panel {
    order: 1;
    min-height: auto;
    padding: 3rem;
  }

  .auth-brand-panel {
    order: 2;
    min-height: auto;
    padding: 2.5rem 3rem;
    text-align: left;
  }

  .auth-brand-panel h1 {
    max-width: 470px;
    font-size: 1.7rem;
  }

  .auth-form-lockup {
    margin-bottom: 2.5rem;
  }

  .auth-brand-content {
    margin: 2rem 0;
  }
}

@media (max-width: 575.98px) {
  .auth-page {
    align-items: flex-start;
    padding: 0.75rem 0;
  }

  .auth-shell {
    width: min(calc(100% - 1rem), 540px);
    border-radius: 18px;
  }

  .auth-form-panel {
    min-height: auto;
    padding: 2rem 1.5rem;
  }

  .auth-form-lockup {
    margin-bottom: 2rem;
  }

  .auth-heading h1,
  .auth-heading h2 {
    font-size: 1.55rem;
  }

  .auth-form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

  .auth-help-text {
    text-align: left;
  }

  .auth-footer-note {
    margin-top: 2rem;
  }

  .auth-brand-panel {
    padding: 2rem 1.5rem;
  }

  .auth-brand-lockup {
    display: none;
  }

  .auth-brand-content {
    margin: 0;
  }

  .auth-brand-panel h1 {
    font-size: 1.4rem;
  }

  .auth-brand-panel p {
    margin-top: 0.7rem;
    font-size: 0.84rem;
  }

  .auth-security-note,
  .auth-circuit {
    display: none;
  }

  .auth-page-compact {
    align-items: center;
    padding-block: 1rem;
  }

  .auth-compact-shell {
    width: min(100% - 1rem, 480px);
  }

  .auth-compact-card {
    padding: 2rem 1.5rem;
    border-radius: 18px;
  }
}

[data-theme="dark"] .auth-page {
  color: #dce4eb;
  background: #00102f;
}

[data-theme="dark"] .auth-shell {
  background: #1b2733;
  border-color: rgba(139, 147, 161, 0.24);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .auth-brand-panel {
  background:
    linear-gradient(145deg, rgba(0, 127, 206, 0.28), transparent 48%),
    linear-gradient(325deg, rgba(0, 200, 253, 0.12), transparent 42%),
    #061b4a;
}

[data-theme="dark"] .auth-form-panel {
  background: #1b2733;
}

[data-theme="dark"] .auth-brand-panel h1,
[data-theme="dark"] .auth-heading h1,
[data-theme="dark"] .auth-heading h2,
[data-theme="dark"] .auth-form-lockup strong {
  color: #f3f6f9;
}

[data-theme="dark"] .auth-brand-panel p,
[data-theme="dark"] .auth-heading p,
[data-theme="dark"] .auth-help-text,
[data-theme="dark"] .auth-footer-note {
  color: #a5b2bd;
}

[data-theme="dark"] .auth-card {
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .auth-compact-card {
  background: #1b2733;
  border-color: rgba(139, 147, 161, 0.24);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .auth-logo-light-theme {
  display: none;
}

[data-theme="dark"] .auth-logo-dark-theme {
  display: block;
}

[data-theme="dark"] .auth-secondary-link,
[data-theme="dark"] .auth-back-link {
  color: #83c7ed;
}

[data-theme="dark"] .auth-secondary-link:hover,
[data-theme="dark"] .auth-back-link:hover {
  color: #ffffff;
}

[data-theme="dark"] .auth-form .form-label {
  color: #dce4eb;
}

[data-theme="dark"] .auth-form .form-control {
  color: #e6edf3;
  background-color: #15212b;
  border-color: #354653;
}

[data-theme="dark"] .auth-form .form-control::placeholder {
  color: #7f8e9b;
}

[data-theme="dark"] .auth-form .form-control:focus {
  color: #f3f6f9;
  background-color: #182630;
  border-color: #4da3dc;
  box-shadow: 0 0 0 0.2rem rgba(77, 163, 220, 0.16);
}

[data-theme="dark"] .auth-password-toggle {
  color: #9eacb9;
}

[data-theme="dark"] .auth-password-toggle:hover {
  color: #83c7ed;
  background: rgba(77, 163, 220, 0.12);
}

[data-theme="dark"] .auth-form-lockup-line {
  background: #01aaf2;
}

/* Controlled Design QA polish */
.main-content .form-label {
  margin-bottom: 0.4rem;
  color: #34445a;
  font-size: 0.82rem;
  font-weight: 700;
}

.main-content .form-text {
  margin-top: 0.4rem;
  line-height: 1.45;
}

.dashboard-quick-action {
  min-height: 92px;
  padding: 0.9rem;
}

.dashboard-attention-item {
  align-items: flex-start;
  min-height: 106px;
}

.dashboard-attention-copy small {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-activity-grid {
  align-items: stretch;
}

.dashboard-activity-panel,
.dashboard-activity-panel .dash-panel {
  height: 100%;
}

.quote-row-actions .btn {
  width: 34px;
  height: 34px;
}

.da-modal-dialog.modal-lg {
  max-width: 860px;
}

.da-modal-content {
  overflow: hidden;
  border: 1px solid var(--da-border);
  border-radius: 8px;
  box-shadow: 0 22px 55px rgba(0, 20, 59, 0.18);
}

.da-modal-header {
  align-items: flex-start;
  padding: 1.25rem 1.5rem 1rem;
  background: #fbfcfe;
  border-bottom: 1px solid var(--da-border);
}

.da-modal-heading {
  min-width: 0;
  padding-right: 1rem;
}

.da-modal-heading .modal-title {
  color: var(--da-navy);
  font-size: 1.05rem;
  font-weight: 750;
}

.da-modal-description {
  margin: 0.3rem 0 0;
  color: #748295;
  font-size: 0.8rem;
  line-height: 1.45;
}

.da-modal-body {
  padding: 1.25rem 1.5rem;
}

.da-modal-footer {
  gap: 0.5rem;
  padding: 1rem 1.5rem 1.25rem;
  background: #fbfcfe;
  border-top: 1px solid var(--da-border);
}

.da-modal-footer .btn {
  min-height: 40px;
}

@media (max-width: 575.98px) {
  .dashboard-attention-item {
    min-height: auto;
  }

  .da-modal-dialog {
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
  }

  .da-modal-header,
  .da-modal-body,
  .da-modal-footer {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .da-modal-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .da-modal-footer .btn,
  .da-modal-footer .btn-link {
    width: 100%;
    margin: 0 !important;
  }
}

[data-theme="dark"] .main-content .form-label {
  color: #dce4eb;
}

[data-theme="dark"] .da-modal-content {
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 22px 55px rgba(2, 8, 14, 0.38);
}

[data-theme="dark"] .da-modal-header,
[data-theme="dark"] .da-modal-footer {
  background: #18242e;
  border-color: #30404d;
}

[data-theme="dark"] .da-modal-heading .modal-title {
  color: #f3f6f9;
}

[data-theme="dark"] .da-modal-description {
  color: #a5b2bd;
}

.service-report-context-card > .card-header {
  display: block;
}

[data-theme="dark"] .service-report-origin-context {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d !important;
}

.dashboard-empty-priorities {
  min-height: 9rem;
}

.dashboard-attention-item.is-neutral {
  opacity: 0.88;
}

.dashboard-decision-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem;
}

.dashboard-decision-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(8rem, 1fr));
  flex: 1;
  gap: 0.75rem;
}

.dashboard-decision-metrics > * {
  padding: 0.75rem 1rem;
  color: inherit;
  background: var(--da-surface-muted);
  border: 1px solid var(--da-border);
  border-radius: 7px;
  text-decoration: none;
}

.dashboard-decision-metrics span,
.dashboard-decision-metrics strong {
  display: block;
}

.dashboard-decision-metrics span {
  color: var(--da-text-muted);
  font-size: 0.78rem;
}

.dashboard-decision-metrics strong {
  margin-top: 0.2rem;
  color: var(--da-navy);
  font-size: 1.5rem;
}

.dashboard-recent-details > summary {
  color: var(--da-text-muted);
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 767.98px) {
  .dashboard-decision-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-decision-metrics {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .dashboard-decision-summary > .btn {
    width: 100%;
  }
}

[data-theme="dark"] .dashboard-decision-metrics > * {
  background: var(--da-panel-bg);
}

[data-theme="dark"] .dashboard-decision-metrics strong {
  color: var(--da-white);
}

/* --- Utility: tabular figures for monetary amounts --- */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* --- Work order detail: lifecycle stepper strip --- */
.wo-stepper {
  display: flex;
}

.wo-stepper li {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  text-align: center;
  padding: 0 0.25rem;
}

.wo-stepper li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 0.8125rem;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--da-border);
}

.wo-stepper li.is-done:not(:last-child)::before {
  background: #157347;
}

.wo-stepper-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: var(--da-border);
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1;
}

.wo-stepper li.is-done .wo-stepper-dot {
  background: #157347;
  color: #fff;
}

.wo-stepper li.is-current .wo-stepper-dot {
  background: transparent;
  border: 2px solid #157347;
}

.wo-stepper-label {
  line-height: 1.25;
}

@media (max-width: 991.98px) {
  .wo-stepper {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .wo-stepper li {
    flex: 0 0 25%;
  }

  .wo-stepper li:not(:last-child)::before {
    display: none;
  }
}

[data-theme="dark"] .wo-stepper-dot {
  background: #253340;
  color: #8fa4b3;
}

[data-theme="dark"] .wo-stepper li.is-done .wo-stepper-dot,
[data-theme="dark"] .wo-stepper li.is-done:not(:last-child)::before {
  background: #43a769;
  color: #0b1620;
}

[data-theme="dark"] .wo-stepper li.is-current .wo-stepper-dot {
  background: transparent;
  border-color: #43a769;
}

/* --- Quote lifecycle tracker: 3-node wo-stepper modifier --- */
.quote-stage-tracker.wo-stepper {
  flex-wrap: nowrap;
}

.quote-stage-tracker.wo-stepper li {
  flex: 1 1 0;
}

.quote-stage-tracker.wo-stepper li:not(:last-child)::before {
  display: block;
}

.quote-stage-tracker li.is-current.is-tone-success .wo-stepper-dot {
  background: #157347;
  border-color: #157347;
  color: #fff;
}

.quote-stage-tracker li.is-current.is-tone-danger .wo-stepper-dot {
  background: #b02a37;
  border-color: #b02a37;
  color: #fff;
}

.quote-stage-tracker li.is-current.is-tone-secondary .wo-stepper-dot {
  background: #6c757d;
  border-color: #6c757d;
  color: #fff;
}

.quote-stage-tracker li.is-current.is-tone-warning .wo-stepper-dot {
  background: #ffc107;
  border-color: #ffc107;
  color: #3b2f00;
}

@media (max-width: 991.98px) {
  .quote-stage-tracker.wo-stepper {
    flex-wrap: nowrap;
    row-gap: 0;
  }

  .quote-stage-tracker.wo-stepper li {
    flex: 1 1 0;
  }

  .quote-stage-tracker.wo-stepper li:not(:last-child)::before {
    display: block;
  }
}

[data-theme="dark"] .quote-stage-tracker li.is-current.is-tone-success .wo-stepper-dot {
  background: #43a769;
  border-color: #43a769;
  color: #0b1620;
}

[data-theme="dark"] .quote-stage-tracker li.is-current.is-tone-danger .wo-stepper-dot {
  background: #ea868f;
  border-color: #ea868f;
  color: #2c0b0e;
}

[data-theme="dark"] .quote-stage-tracker li.is-current.is-tone-secondary .wo-stepper-dot {
  background: #98a2b3;
  border-color: #98a2b3;
  color: #10151b;
}

[data-theme="dark"] .quote-stage-tracker li.is-current.is-tone-warning .wo-stepper-dot {
  background: #ffca2c;
  border-color: #ffca2c;
  color: #3b2f00;
}

/* --- Work order detail: evidence file input dark mode --- */
[data-theme="dark"] .main-content input[type="file"].form-control::file-selector-button {
  padding: 0.45rem 0.85rem;
  margin: -0.375rem 0.85rem -0.375rem -0.75rem;
  color: #dbe8ef;
  background: #2b4352;
  border: 0;
  border-right: 1px solid #405867;
}

[data-theme="dark"] .main-content input[type="file"].form-control:hover::file-selector-button,
[data-theme="dark"] .main-content input[type="file"].form-control:focus::file-selector-button {
  color: #fff;
  background: #36586c;
}

/* --- Alert overrides — dark mode --- */
[data-theme="dark"] .main-content .alert-light {
  color: #dce4eb !important;
  background: #18242e !important;
  border-color: #334858 !important;
}

[data-theme="dark"] .main-content .alert-warning {
  color: #facc15 !important;
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.40) !important;
}

[data-theme="dark"] .main-content .alert-info {
  color: #bae6fd !important;
  background: rgba(14, 165, 233, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

[data-theme="dark"] .main-content .alert-success {
  color: #83d9a0 !important;
  background: rgba(67, 167, 105, 0.14) !important;
  border-color: rgba(67, 167, 105, 0.40) !important;
}

[data-theme="dark"] .main-content .alert-danger {
  color: #f1a0a0 !important;
  background: rgba(194, 76, 76, 0.14) !important;
  border-color: rgba(194, 76, 76, 0.40) !important;
}

[data-theme="dark"] .app-toast-container .app-toast {
  color: #dce4eb;
  background: #1b2733;
  border-color: #30404d;
  box-shadow: 0 10px 28px rgba(2, 8, 14, 0.22);
}

[data-theme="dark"] .app-toast-container .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- Work order detail: quick actions sticky panel (desktop only) --- */
@media (min-width: 992px) {
  .work-order-quick-actions {
    position: sticky;
    top: 4.5rem;
  }
}

/* --- Responsive tables: prevent full-page horizontal overflow and improve touch UX --- */
.main {
  overflow-x: clip;
}

.main-content .table-responsive {
  overscroll-behavior-x: contain;
}

/* --- Table headers: improve contrast in light mode (was #707783 / ~4.17:1 on #f5f7fa) --- */
.main-content .table thead th {
  color: #505a68;
}

/* --- Table action buttons: focus-visible ring for keyboard navigation --- */
.main-content .table .btn:focus-visible {
  outline: 2px solid #087ec4;
  outline-offset: 1px;
}

[data-theme="dark"] .main-content .table .btn:focus-visible {
  outline-color: #4da3dc;
}

/* --- Work Orders index: min-width for mobile horizontal scroll --- */
.work-order-list-table {
  min-width: 820px;
}

/* --- Service Reports index: min-width for mobile horizontal scroll --- */
.service-report-list-table {
  min-width: 760px;
}

/* --- Quote filter tabs: focus-visible ring (inset to avoid overflow-x:auto clipping) --- */
.quote-filter-tab:focus-visible {
  outline: 2px solid #087ec4;
  outline-offset: 1px;
  border-radius: 4px;
}

[data-theme="dark"] .quote-filter-tab:focus-visible {
  outline-color: #4da3dc;
}

/* --- Service report context links: external-link icon --- */
.sr-ext-link {
  font-size: 0.72em;
  vertical-align: middle;
  opacity: 0.6;
  margin-left: 0.2em;
}
